﻿:root {
  --bg: #f4f7f4;
  --bg-elevated: #f8fbf8;
  --surface: #ffffff;
  --surface-soft: #f7faf7;
  --line: #e3ebe4;
  --line-strong: #d5e0d7;
  --text: #1f2937;
  --text-strong: #111827;
  --text-soft: #64748b;
  --primary: #2f8f5b;
  --primary-dark: #1e6d43;
  --primary-soft: rgba(47, 143, 91, 0.12);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --orange: #f59e0b;
  --orange-soft: rgba(245, 158, 11, 0.14);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.12);
  --shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --sidebar-width: 252px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --transition: 0.18s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app-body {
  min-height: 100vh;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 18px;
  background: linear-gradient(180deg, #f8fbf8 0%, #f5f8f5 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.brand-emblem {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  padding: 9px 12px;
  background: linear-gradient(135deg, #0f5132 0%, #1e6d43 56%, #2f8f5b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 22px rgba(15, 81, 50, 0.18);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-emblem img {
  width: 100%;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(3, 31, 20, 0.22));
}

.brand-copy {
  min-width: 0;
  padding: 0 2px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-strong);
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-soft);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.menu-group-title {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-group-title::-webkit-details-marker {
  display: none;
}

.menu-group-title::after {
  content: "▾";
  font-size: 12px;
  color: var(--text-soft);
  transition: transform var(--transition);
}

.menu-group[open] .menu-group-title::after {
  transform: rotate(180deg);
}

.menu-group-links {
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.nav-item:hover {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--text-strong);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(47, 143, 91, 0.18);
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-badge,
.icon-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-footer-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-user-name {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-strong);
}

.sidebar-user-meta,
.sidebar-card-row,
.sidebar-footer-card p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.sidebar-footer-card p {
  margin-bottom: 0;
  line-height: 1.7;
}

.sidebar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  margin-top: 12px;
}

.sidebar-cta:hover {
  background: var(--primary-dark);
}

.muted-card {
  background: linear-gradient(135deg, #f8fbf8 0%, #f6faf7 100%);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px 14px;
  background: rgba(244, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(227, 235, 228, 0.9);
}

.topbar-intro {
  min-width: 0;
}

.page-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.topbar-intro h1 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text-strong);
}

.topbar-intro p {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: 14px;
  color: var(--text-soft);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-search {
  min-width: 240px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.topbar-search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-strong);
}

.topbar-search input::placeholder {
  color: #98a5b5;
}

.search-icon {
  color: var(--text-soft);
  font-size: 14px;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-soft);
}

.icon-btn.compact {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: none;
}

.bell-btn.has-unread {
  border-color: rgba(47, 143, 91, 0.24);
  background: rgba(47, 143, 91, 0.08);
}

.topbar-user {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
}

.topbar-user-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-strong);
}

.topbar-user-role {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-soft);
}

.logout-form {
  margin: 0;
}

.workspace {
  padding: 20px 24px 32px;
  min-width: 0;
}

.flash-area {
  margin-bottom: 16px;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.alert-error,
.alert-danger {
  background: #fff4f4;
  border-color: #fecaca;
  color: #b91c1c;
}

.alert-success {
  background: #edf9f1;
  border-color: #c8ead2;
  color: var(--primary-dark);
}

.alert-warning {
  background: #fff7e9;
  border-color: #f6d8a5;
  color: #b36f10;
}

.alert-info {
  background: #eef6ff;
  border-color: #cfe3ff;
  color: #1d4ed8;
}

.page-shell,
.dashboard-shell,
.detail-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 18px;
}

.hero-main,
.hero-side,
.card,
.panel,
.soft-card,
.filter-panel,
.modal-card,
.auth-main .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
}

.hero-main,
.hero-side,
.card,
.panel,
.soft-card,
.filter-panel {
  padding: 22px;
}

.hero-main {
  background: linear-gradient(135deg, #f8fcf9 0%, #f1f8f4 56%, #eef4ff 100%);
  border-color: #d8e9df;
}

.hero-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  color: var(--text-strong);
}

.hero-desc,
.section-tip,
.muted,
.helper,
.empty-note {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.hero-desc {
  margin-top: 10px;
}

.hero-chip-row,
.chip-row,
.action-row,
.inline-actions,
.toolbar-actions,
.hero-actions,
.tabs-row,
.segment-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-chip,
.badge,
.tag,
.stat-chip,
.tiny-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.badge {
  min-height: 28px;
}

.badge-success,
.tag-success,
.status-success {
  background: #eaf7ef;
  border-color: #c8ead2;
  color: var(--primary-dark);
}

.badge-info,
.tag-info,
.status-info {
  background: #eef6ff;
  border-color: #d7e7ff;
  color: #2456cc;
}

.badge-warning,
.tag-warning,
.status-warning {
  background: #fff4e7;
  border-color: #f6d8a5;
  color: #b36f10;
}

.badge-danger,
.tag-danger,
.status-danger {
  background: #fff0f0;
  border-color: #fecaca;
  color: #b91c1c;
}

.badge-neutral,
.tag-neutral,
.status-neutral {
  background: #f4f7fa;
  border-color: #e4ebf1;
  color: #64748b;
}

.badge-purple,
.tag-purple {
  background: #f2ebff;
  border-color: #e3d7ff;
  color: #6d28d9;
}

.badge-project {
  background: #e8fbf8;
  border-color: #bfefe8;
  color: #0f766e;
}

.badge-archived {
  background: #edf9f1;
  border-color: #c8ead2;
  color: var(--primary-dark);
}

.metric-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card,
.stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.metric-icon.blue {
  background: var(--blue-soft);
  color: #2456cc;
}

.metric-icon.orange {
  background: var(--orange-soft);
  color: #b36f10;
}

.metric-icon.purple {
  background: var(--purple-soft);
  color: #6d28d9;
}

.metric-icon.red {
  background: var(--red-soft);
  color: #b91c1c;
}

.metric-label,
.stat-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.metric-value,
.stat-value {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--text-strong);
}

.metric-sub,
.stat-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
}

.card-header,
.panel-header,
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.card-header h2,
.card-header h3,
.panel-header h2,
.panel-header h3,
.section-header h2,
.section-header h3,
.card h2,
.card h3,
.panel h2,
.panel h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-strong);
}

.card-desc,
.panel-desc,
.section-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
}

.link-action,
.more-link,
.admin-link,
.soft-link {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.link-action:hover,
.more-link:hover,
.admin-link:hover,
.soft-link:hover {
  text-decoration: underline;
}

.btn,
.btnx,
.soft-btn,
.btn-filter,
.qa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover,
.btnx:hover,
.soft-btn:hover,
.btn-filter:hover,
.qa-btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.btnx.primary,
.soft-btn.primary,
.btn-filter,
.qa-btn-approve {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover,
.btnx.primary:hover,
.soft-btn.primary:hover,
.btn-filter:hover,
.qa-btn-approve:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline,
.btn-light,
.btnx.soft,
.soft-btn {
  background: var(--surface);
  color: var(--text);
}

.btn-danger,
.btnx.danger,
.qa-btn-reject {
  background: #fff2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-danger:hover,
.btnx.danger:hover,
.qa-btn-reject:hover {
  background: #fee2e2;
}

.btn-secondary,
.qa-btn-revision {
  background: #f2ebff;
  border-color: #ddceff;
  color: #6d28d9;
}

.btn-secondary:hover,
.qa-btn-revision:hover {
  background: #eadcff;
}

.btn-sm,
.btn-small,
.tiny-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.form-label {
  font-size: 13px;
  font-weight: 800;
  color: #4b5563;
}

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select,
.toolbar textarea,
.form-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfd9d2;
  background: #fff;
  color: var(--text-strong);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea,
textarea.form-control {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.toolbar textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.08);
}

.required {
  color: var(--red);
  margin-left: 2px;
}

.help,
.field-help,
.section-hint {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.filter-panel {
  padding: 18px 20px;
}

.filter-grid,
.form-grid,
.info-grid,
.detail-grid,
.kv-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.span-12 { grid-column: span 12; }
.span-9 { grid-column: span 9; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.info-item,
.kv-item,
.summary-item,
.detail-item,
.readonly-box {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid #eef2ee;
}

.info-label,
.detail-label,
.summary-label,
.kv-item span {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
}

.info-value,
.detail-value,
.summary-value,
.kv-item strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  word-break: break-word;
}

.layout-two,
.current-grid,
.split-layout,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.content-grid.three {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(280px, 0.9fr);
}

.aside-stack,
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-strip {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.progress-step {
  position: relative;
  min-width: 110px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.progress-step::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: #dbe3dd;
}

.progress-step:first-child::before {
  display: none;
}

.progress-step.done::before {
  background: var(--primary);
}

.progress-step.current::before {
  background: linear-gradient(90deg, var(--primary), var(--orange));
}

.progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  background: var(--surface);
  border: 2px solid #d7dfd9;
  color: var(--text-soft);
  position: relative;
  z-index: 1;
}

.progress-step.done .progress-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.progress-step.current .progress-dot {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.progress-label {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.45;
}

.progress-step.done .progress-label {
  color: var(--primary-dark);
  font-weight: 800;
}

.progress-step.current .progress-label {
  color: #b36f10;
  font-weight: 900;
}

.timeline-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-card,
.stage-card,
.list-card,
.approval-item,
.feed-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.timeline-card {
  padding: 16px;
}

.timeline-card.current,
.stage-card.current {
  border-color: #cde7d6;
  background: linear-gradient(135deg, #fbfefa 0%, #f5faf6 100%);
}

.timeline-top,
.stage-head,
.list-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.timeline-title,
.stage-title,
.list-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-strong);
}

.timeline-meta,
.stage-meta,
.list-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
}

.timeline-body,
.stage-body {
  margin-top: 12px;
}

.comment-box,
.warn-box,
.soft-box,
.tip-box,
.empty-state,
.archive-check {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.75;
}

.comment-box {
  background: #fff7ea;
  border-color: #fde2b6;
  color: #a56714;
}

.warn-box {
  background: #fff3f3;
  border-color: #fecaca;
  color: #b91c1c;
}

.tip-box.success,
.archive-check.success {
  background: #edf9f1;
  border-color: #c8ead2;
  color: var(--primary-dark);
}

.tip-box.warning,
.archive-check.warning {
  background: #fff7ea;
  border-color: #fde2b6;
  color: #a56714;
}

.tip-box.info {
  background: #eef6ff;
  border-color: #d7e7ff;
  color: #2456cc;
}

.empty-state {
  text-align: center;
  padding: 24px 18px;
}

.empty-state.compact {
  padding: 16px;
  font-size: 12px;
}

.file-list,
.attach-list,
.mini-list,
.data-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item,
.attach-item,
.data-row,
.simple-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.file-item-main,
.attach-main {
  min-width: 0;
  flex: 1;
}

.file-name,
.attach-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  text-decoration: none;
  word-break: break-word;
}

.file-name:hover,
.attach-name:hover {
  color: var(--primary);
}

.file-meta,
.attach-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.list-table {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  vertical-align: top;
}

.table thead th {
  background: #fbfcfb;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-link {
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 800;
}

.table-link:hover {
  color: var(--primary);
}

.list-row {
  display: grid;
  grid-template-columns: minmax(220px, 2.2fr) repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid #edf1ee;
}

.list-row.header {
  border-top: none;
  background: #fbfcfb;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.list-row strong {
  color: var(--text-strong);
}

.author-table {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.author-table-head,
.author-table-row {
  display: grid;
  grid-template-columns: 72px minmax(200px, 1.3fr) 120px minmax(200px, 1.1fr) 150px 180px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.author-table-head {
  background: #fbfcfb;
  border-bottom: 1px solid #edf1ee;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.author-table-row {
  border-bottom: 1px solid #f2f5f3;
}

.author-table-row:last-child {
  border-bottom: none;
}

.author-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-strong);
}

.author-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
}

.author-ops {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.score-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 var(--score, 72%), #e6ece8 var(--score, 72%) 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface);
}

.score-ring strong {
  position: relative;
  z-index: 1;
  font-size: 22px;
}

.check-list,
.mini-feed,
.legend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item,
.mini-feed-item,
.legend-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
}

.wizard-strip,
.segment-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wizard-step,
.segment-tab,
.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7faf8;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.wizard-step.active,
.segment-tab.active,
.tab-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.wizard-step.done {
  background: #edf9f1;
  border-color: #c8ead2;
  color: var(--primary-dark);
}

.section-block {
  padding: 18px 0 0;
  border-top: 1px solid #edf1ee;
}

.section-block:first-child {
  padding-top: 0;
  border-top: none;
}

.section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-strong);
}

.section-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.hint-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed #cedad1;
  background: #fbfcfb;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.75;
}

.message-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.14);
  display: flex;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 40;
}

.message-drawer.open {
  opacity: 1;
  visibility: visible;
}

.message-drawer-panel {
  width: min(420px, 100%);
  height: calc(100vh - 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.message-drawer-header,
.message-drawer-footer {
  padding: 18px 18px 14px;
  border-bottom: 1px solid #edf1ee;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-drawer-header h3 {
  margin: 0;
  font-size: 18px;
}

.message-drawer-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.message-drawer-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-drawer-footer {
  margin-top: auto;
  border-top: 1px solid #edf1ee;
  border-bottom: none;
}

.message-item {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  text-decoration: none;
}

.message-item:hover {
  border-color: #cfded3;
  background: #fbfcfb;
}

.message-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
}

.message-item-meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-soft);
}

.message-item.is-approved:not(.is-read) {
  border-left: 4px solid var(--primary);
}

.message-item.is-rejected:not(.is-read) {
  border-left: 4px solid var(--red);
}

.message-item.is-revision:not(.is-read) {
  border-left: 4px solid var(--orange);
}

.message-item.is-read {
  opacity: 0.7;
}

.msg-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.14);
  z-index: 45;
}

.msg-popup.open {
  display: flex;
}

.msg-popup-box {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.msg-popup-header,
.msg-popup-footer {
  padding: 16px 18px;
  border-bottom: 1px solid #edf1ee;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.msg-popup-header h3 {
  margin: 0;
  font-size: 18px;
}

.msg-popup-body {
  padding: 14px 18px 6px;
  max-height: 360px;
  overflow-y: auto;
}

.msg-popup-item {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  border-top: 1px solid #f1f4f2;
}

.msg-popup-item:first-child {
  border-top: none;
}

.msg-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
}

.msg-time {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.msg-popup-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.msg-popup-item.unread .msg-title {
  color: var(--primary-dark);
}

.msg-popup-color-rejected.unread .msg-title {
  color: #b91c1c;
}

.msg-popup-color-revision.unread .msg-title {
  color: #a56714;
}

.auth-layout {
  --auth-page-pad: clamp(16px, min(4vw, 5vh), 56px);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding: var(--auth-page-pad);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfc 58%, #edf7f1 100%);
}

.auth-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(150deg, transparent 0 21px, rgba(15, 81, 50, 0.045) 22px 23px),
    linear-gradient(115deg, transparent 0 58%, rgba(31, 138, 91, 0.08) 58% 58.2%, transparent 58.2% 100%);
  opacity: 0.75;
}

.auth-layout::after {
  content: "";
  position: absolute;
  left: -9vw;
  right: -9vw;
  bottom: -17vh;
  height: 30vh;
  min-height: 210px;
  pointer-events: none;
  border-radius: 52% 48% 0 0 / 36% 34% 0 0;
  background: linear-gradient(135deg, #1b7f58 0%, #00643e 48%, #004f32 100%);
  box-shadow:
    0 -7px 0 rgba(255, 255, 255, 0.9),
    0 -15px 0 rgba(31, 138, 91, 0.14);
  transform: rotate(2deg);
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  height: min(780px, calc(100dvh - var(--auth-page-pad) - var(--auth-page-pad)));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(430px, 500px);
  gap: clamp(42px, 6.5vw, 96px);
  align-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-panel.product-auth-panel {
  box-shadow: none;
}

.auth-side {
  position: relative;
  min-height: 0;
  height: 100%;
  padding: clamp(12px, 2vw, 24px) 0 clamp(72px, 9vw, 126px);
  background: transparent;
  border-right: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.auth-side::after {
  content: "";
  position: absolute;
  left: -4vw;
  right: -5vw;
  bottom: 18px;
  height: 280px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.34;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(148, 163, 184, 0.34) 6.2% 6.4%, transparent 6.6% 100%),
    linear-gradient(0deg, rgba(148, 163, 184, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0%, rgba(31, 138, 91, 0.11) 100%);
  background-size: 100% 100%, 64px 28px, 64px 28px, 100% 100%;
  clip-path: polygon(0 34%, 10% 24%, 22% 36%, 31% 16%, 45% 27%, 57% 8%, 69% 25%, 80% 12%, 100% 28%, 100% 100%, 0 100%);
}

.auth-brand {
  width: min(100%, 390px);
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.auth-brand .brand-emblem {
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  place-items: start;
}

.auth-brand .brand-emblem img {
  width: 100%;
  height: auto;
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) saturate(100%) invert(20%) sepia(28%) saturate(1826%) hue-rotate(118deg) brightness(90%) contrast(96%);
}

.auth-side-note {
  max-width: 680px;
}

.auth-side-note h1 {
  margin: 0;
  color: #06452f;
  font-size: clamp(44px, 4.9vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-system-subtitle {
  margin: 16px 0 0;
  color: #475569;
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.45;
  font-weight: 500;
}

.auth-title-rule {
  display: block;
  width: 58px;
  height: 4px;
  margin: 28px 0 24px;
  border-radius: 999px;
  background: #007348;
}

.auth-side-note h2 {
  margin: 0;
  color: #07192c;
  font-size: clamp(24px, 2.3vw, 36px);
  line-height: 1.25;
  font-weight: 900;
}

.auth-side-note > p:not(.auth-system-subtitle) {
  max-width: 460px;
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.75;
}

.auth-feature-grid {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.auth-feature-card {
  min-height: 158px;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #dfe7e3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.auth-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 20%, #0b8b5e 0%, #00643e 72%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 24px rgba(0, 100, 62, 0.22);
}

.auth-feature-icon svg,
.login-security-icon svg,
.login-input-icon svg,
.login-note-icon svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-feature-icon svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.8;
}

.auth-feature-card strong {
  display: block;
  margin-top: 14px;
  color: #005f3e;
  font-size: 18px;
  font-weight: 900;
}

.auth-feature-card p {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.65;
}

.auth-main {
  position: relative;
  z-index: 2;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

.auth-main .flash-area {
  width: min(100%, 500px);
}

.auth-main .card {
  box-shadow: none;
}

.auth-main .login-card {
  width: min(100%, 500px);
  max-height: 100%;
  padding: clamp(30px, 3vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  border: 1px solid #d8dee6;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px);
}

.login-back-link {
  align-self: flex-start;
  color: #52708f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-back-link:hover {
  color: #007348;
}

.login-security {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #0f172a;
}

.login-security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #00643e;
  flex: 0 0 auto;
}

.login-security-icon svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.8;
}

.login-security strong,
.login-security em {
  display: block;
}

.login-security strong {
  font-size: 16px;
  font-weight: 900;
}

.login-security em {
  margin-top: 4px;
  color: #4b5563;
  font-size: 14px;
  font-style: normal;
}

.login-head {
  padding-top: 10px;
}

.login-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  color: #07192c;
  font-weight: 900;
}

.login-head p {
  margin: 14px 0 0;
  color: #4b5563;
  line-height: 1.75;
  font-size: 15px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  gap: 9px;
}

.login-field label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input-icon svg {
  width: 22px;
  height: 22px;
}

.login-card .login-field input {
  min-height: 56px;
  padding: 0 16px 0 54px;
  border-color: #cfd8e3;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.login-card .login-field input::placeholder {
  color: #a0aaba;
}

.login-card .login-field input:focus {
  border-color: #007348;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 115, 72, 0.11);
}

.auth-main .login-submit {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #007348 0%, #005f3e 100%);
  box-shadow: 0 14px 24px rgba(0, 95, 62, 0.22);
  font-size: 17px;
  font-weight: 850;
}

.auth-main .login-submit:hover {
  background: linear-gradient(180deg, #006d44 0%, #004d32 100%);
}

.login-divider {
  height: 1px;
  background: #e4e8ed;
}

.login-note {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #cfe5dc;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6fbf8 0%, #edf7f2 100%);
  color: #425466;
  font-size: 13px;
  line-height: 1.75;
}

.login-note strong {
  display: block;
  color: #00643e;
  font-size: 15px;
  font-weight: 900;
}

.login-note p {
  margin: 6px 0 0;
}

.login-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: rgba(0, 100, 62, 0.46);
}

.login-note-icon svg {
  width: 58px;
  height: 58px;
  stroke-width: 1.55;
}

@media (max-height: 820px) and (min-width: 901px) {
  .auth-layout {
    --auth-page-pad: clamp(16px, 4.4vh, 34px);
  }

  .auth-panel {
    grid-template-columns: minmax(520px, 1fr) minmax(400px, 480px);
    gap: clamp(34px, 5vw, 72px);
  }

  .auth-side {
    gap: 22px;
    padding-bottom: clamp(56px, 8vh, 82px);
  }

  .auth-brand {
    width: min(100%, 330px);
  }

  .auth-side-note h1 {
    font-size: clamp(40px, 4.4vw, 56px);
  }

  .auth-system-subtitle {
    margin-top: 10px;
    font-size: clamp(16px, 1.4vw, 20px);
  }

  .auth-title-rule {
    margin: 18px 0 16px;
  }

  .auth-side-note h2 {
    font-size: clamp(22px, 2vw, 30px);
  }

  .auth-side-note > p:not(.auth-system-subtitle) {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
  }

  .auth-feature-grid {
    width: min(100%, 520px);
    gap: 14px;
  }

  .auth-feature-card {
    min-height: 128px;
    padding: 14px 12px 16px;
  }

  .auth-feature-icon {
    width: 52px;
    height: 52px;
  }

  .auth-feature-icon svg {
    width: 25px;
    height: 25px;
  }

  .auth-feature-card strong {
    margin-top: 10px;
    font-size: 16px;
  }

  .auth-feature-card p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
  }

  .auth-main .login-card {
    width: min(100%, 480px);
    padding: 26px 30px;
    gap: 16px;
  }

  .login-security {
    gap: 12px;
  }

  .login-security-icon,
  .login-security-icon svg {
    width: 40px;
    height: 40px;
  }

  .login-head {
    padding-top: 2px;
  }

  .login-head h2 {
    font-size: 29px;
  }

  .login-head p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
  }

  .login-form {
    gap: 12px;
  }

  .login-field {
    gap: 6px;
  }

  .login-card .login-field input {
    min-height: 48px;
  }

  .auth-main .login-submit {
    min-height: 50px;
  }

  .login-note {
    grid-template-columns: minmax(0, 1fr) 48px;
    padding: 13px 15px;
    font-size: 12px;
    line-height: 1.55;
  }

  .login-note-icon,
  .login-note-icon svg {
    width: 46px;
    height: 46px;
  }
}

@media (max-height: 700px) and (min-width: 901px) {
  .auth-layout {
    --auth-page-pad: 14px;
  }

  .auth-panel {
    grid-template-columns: minmax(470px, 1fr) minmax(380px, 450px);
    gap: 42px;
  }

  .auth-side {
    gap: 16px;
    padding-bottom: 52px;
  }

  .auth-brand {
    width: min(100%, 285px);
  }

  .auth-side-note h1 {
    font-size: clamp(34px, 4vw, 46px);
  }

  .auth-system-subtitle {
    margin-top: 7px;
    font-size: 15px;
  }

  .auth-title-rule {
    height: 3px;
    margin: 12px 0 10px;
  }

  .auth-side-note h2 {
    font-size: 22px;
  }

  .auth-side-note > p:not(.auth-system-subtitle) {
    font-size: 13px;
    line-height: 1.5;
  }

  .auth-feature-grid {
    gap: 10px;
  }

  .auth-feature-card {
    min-height: 108px;
    padding: 11px;
  }

  .auth-feature-icon {
    width: 42px;
    height: 42px;
  }

  .auth-feature-icon svg {
    width: 21px;
    height: 21px;
  }

  .auth-feature-card strong {
    margin-top: 8px;
    font-size: 15px;
  }

  .auth-feature-card p {
    font-size: 11px;
    line-height: 1.4;
  }

  .auth-main .login-card {
    width: min(100%, 450px);
    padding: 20px 26px;
    gap: 12px;
  }

  .login-security-icon,
  .login-security-icon svg {
    width: 34px;
    height: 34px;
  }

  .login-security strong {
    font-size: 14px;
  }

  .login-security em,
  .login-head p,
  .login-field label {
    font-size: 12px;
  }

  .login-head h2 {
    font-size: 25px;
  }

  .login-form {
    gap: 9px;
  }

  .login-card .login-field input {
    min-height: 42px;
  }

  .auth-main .login-submit {
    min-height: 44px;
    font-size: 15px;
  }

  .login-note {
    padding: 10px 12px;
    font-size: 11px;
  }

  .login-note-icon {
    display: none;
  }
}

@media (max-height: 610px) and (min-width: 901px) {
  .auth-feature-grid,
  .login-note {
    display: none;
  }

  .auth-side {
    justify-content: center;
    padding-bottom: 68px;
  }
}

@media (max-width: 900px) {
  .auth-layout {
    --auth-page-pad: 18px;
    padding: var(--auth-page-pad);
  }

  .auth-panel {
    width: min(720px, 100%);
    height: calc(100dvh - var(--auth-page-pad) - var(--auth-page-pad));
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    overflow: hidden;
  }

  .auth-side {
    height: auto;
    min-height: 0;
    padding: 0;
    border-right: none;
    border-bottom: 0;
    gap: 12px;
  }

  .auth-side::after {
    display: none;
  }

  .auth-side-note > p:not(.auth-system-subtitle) {
    max-width: none;
  }

  .auth-feature-grid {
    display: none;
  }

  .auth-main {
    align-items: center;
    min-height: 0;
  }

  .auth-main .login-card {
    max-height: 100%;
    padding: 24px;
    gap: 14px;
  }

  .login-security-icon,
  .login-security-icon svg {
    width: 40px;
    height: 40px;
  }

  .login-head {
    padding-top: 0;
  }

  .login-head h2 {
    font-size: 28px;
  }

  .login-form {
    gap: 12px;
  }

  .login-card .login-field input {
    min-height: 48px;
  }

  .auth-main .login-submit {
    min-height: 50px;
  }
}

@media (max-width: 640px) {
  .auth-layout {
    --auth-page-pad: 10px;
    padding: var(--auth-page-pad);
    align-items: center;
  }

  .auth-layout::after {
    min-height: 150px;
    bottom: -13vh;
  }

  .auth-brand {
    width: min(100%, 240px);
  }

  .auth-side-note h1 {
    font-size: 28px;
  }

  .auth-system-subtitle {
    margin-top: 6px;
    font-size: 13px;
  }

  .auth-title-rule {
    width: 44px;
    height: 3px;
    margin: 10px 0 8px;
  }

  .auth-side-note h2 {
    display: none;
  }

  .auth-side-note > p:not(.auth-system-subtitle) {
    display: none;
  }

  .auth-main .login-card {
    padding: 18px 16px;
    gap: 12px;
    border-radius: 14px;
  }

  .login-head h2 {
    font-size: 26px;
  }

  .login-security-icon,
  .login-security-icon svg {
    width: 34px;
    height: 34px;
  }

  .login-security strong {
    font-size: 14px;
  }

  .login-security em,
  .login-head p,
  .login-field label {
    font-size: 12px;
  }

  .login-head p {
    margin-top: 6px;
    line-height: 1.5;
  }

  .login-card .login-field input {
    min-height: 44px;
  }

  .auth-main .login-submit {
    min-height: 46px;
    font-size: 15px;
  }

  .login-note {
    grid-template-columns: 1fr;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.55;
  }

  .login-note-icon {
    display: none;
  }
}

@media (max-width: 900px) and (max-height: 820px) {
  .auth-layout {
    --auth-page-pad: 12px;
  }

  .auth-brand {
    width: min(100%, 230px);
  }

  .auth-side-note h1 {
    font-size: 28px;
  }

  .auth-title-rule,
  .auth-side-note h2,
  .auth-side-note > p:not(.auth-system-subtitle) {
    display: none;
  }

  .auth-main .login-card {
    padding: 18px 20px;
    gap: 11px;
  }

  .login-note {
    display: none;
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  .auth-brand {
    width: min(100%, 210px);
  }

  .auth-side-note h1 {
    font-size: 24px;
  }

  .auth-system-subtitle {
    display: none;
  }

  .login-security {
    display: none;
  }

  .login-head h2 {
    font-size: 24px;
  }

  .login-note {
    display: none;
  }
}

.modal-mask,
.qa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-mask.open,
.qa-modal-overlay.open {
  display: flex;
}

.modal-card,
.qa-modal {
  width: min(760px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  padding: 22px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.bar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-value,
.bar-foot {
  font-size: 12px;
  color: var(--text-soft);
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e8eeea;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.bar-fill.blue { background: linear-gradient(90deg, #3f81e8, #85b7ff); }
.bar-fill.green { background: linear-gradient(90deg, var(--primary), #6dbb88); }
.bar-fill.amber { background: linear-gradient(90deg, #d99022, #f3bf66); }
.bar-fill.purple { background: linear-gradient(90deg, #7c65e7, #b3a3ff); }

.qa-request-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
  border: 1px solid #d7e7ff;
}

.qa-request-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.qa-request-title {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--text-strong);
}

.qa-request-body {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #d7e7ff;
  color: var(--text);
  white-space: pre-wrap;
}

.table-wrap,
.overflow-wrap {
  width: 100%;
  overflow-x: auto;
}

.compact-workbench {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.compact-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.priority-list,
.focus-list,
.mini-list,
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.priority-item,
.focus-item,
.mini-item,
.message-record {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

a.priority-item,
a.focus-item,
a.shortcut-card {
  text-decoration: none;
}

a.priority-item:hover,
a.focus-item:hover,
a.shortcut-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.priority-main,
.message-record-main {
  min-width: 0;
  flex: 1;
}

.priority-title,
.focus-title,
.shortcut-title,
.message-record-title {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 800;
  color: var(--text-strong);
  word-break: break-word;
}

.priority-meta,
.focus-meta,
.shortcut-desc,
.message-record-meta,
.message-record-content {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-soft);
}

.priority-side,
.message-record-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.priority-side .tiny {
  font-size: 12px;
  color: var(--text-soft);
}

.shortcut-grid,
.compact-aux-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.shortcut-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shortcut-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
}

.shortcut-icon.blue {
  background: var(--blue-soft);
  color: #2456cc;
}

.shortcut-icon.orange {
  background: var(--orange-soft);
  color: #b36f10;
}

.shortcut-icon.purple {
  background: var(--purple-soft);
  color: #6d28d9;
}

.shortcut-desc {
  margin-top: 0;
}

.focus-item,
.mini-item {
  background: var(--surface);
}

.focus-item strong,
.mini-item strong {
  display: block;
  font-size: 14px;
  color: var(--text-strong);
}

.focus-item span,
.mini-item span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-soft);
}

.mini-item {
  padding: 14px 16px;
}

.message-record {
  align-items: stretch;
  background: var(--surface);
}

.message-record.unread {
  border-color: #dbe8df;
  background: #fbfefc;
}

.message-record.read {
  opacity: 0.82;
}

.message-record-title a {
  color: inherit;
  text-decoration: none;
}

.message-record-title a:hover {
  color: var(--primary);
}

.message-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.message-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-soft);
}

.inbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inbox-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.inbox-type-filters .hero-chip {
  text-decoration: none;
}

.inbox-type-filters .hero-chip.active {
  border-color: #0f8a4c;
  background: #eaf7ef;
  color: #0f6f3f;
}

@media (max-width: 1320px) {
  .metric-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }

  .hero-banner,
  .compact-main-grid,
  .layout-two,
  .split-layout,
  .content-grid,
  .content-grid.three,
  .current-grid {
    grid-template-columns: 1fr;
  }

  .author-table-head,
  .author-table-row,
  .list-row,
  .list-row.header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-tools {
    justify-content: flex-start;
  }

  .topbar-search {
    min-width: 0;
    width: 100%;
  }

  .filter-grid,
  .form-grid,
  .info-grid,
  .detail-grid,
  .kv-grid {
    grid-template-columns: 1fr;
  }

  .span-12,
  .span-9,
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4,
  .span-3 {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .workspace,
  .app-topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .metric-grid,
  .stats-grid,
  .shortcut-grid,
  .compact-aux-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .panel,
  .hero-main,
  .hero-side,
  .filter-panel,
  .soft-card {
    padding: 18px;
  }

  .hero-title {
    font-size: 24px;
  }

  .topbar-intro h1 {
    font-size: 24px;
  }

  .auth-layout {
    padding: 16px;
  }

  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .message-drawer {
    padding: 10px;
  }

  .message-drawer-panel {
    height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .priority-item,
  .focus-item,
  .mini-item,
  .message-record {
    flex-direction: column;
  }

  .priority-side,
  .message-record-actions {
    width: 100%;
    align-items: flex-start;
  }

  .inbox-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}


/* student homepage v2 - template scoped styles live in index.html for faster iteration */


/* ===== Student workspace unified pages V2 ===== */
.student-page{display:flex;flex-direction:column;gap:18px}
.student-hero-lite{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap;padding:22px;background:linear-gradient(135deg,#f8fcf9 0%,#f2f8f4 58%,#eef4ff 100%);border:1px solid #d8e9df;border-radius:var(--radius-2xl);box-shadow:var(--shadow-sm)}
.student-hero-lite h2{margin:0;font-size:26px;color:var(--text-strong)}
.student-hero-lite p{margin:8px 0 0;color:var(--text-soft);font-size:14px;line-height:1.75;max-width:780px}
.student-hero-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.student-chip{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:12px;font-weight:800;color:var(--text-soft)}
.student-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.student-filter-panel{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm)}
.student-filter-panel .field{margin:0;min-width:150px}
.student-filter-panel .field label{display:block;font-size:12px;color:var(--text-soft);font-weight:800;margin-bottom:6px}
.student-filter-panel input,.student-filter-panel select{width:100%;height:42px;padding:0 12px;border:1px solid var(--line-strong);border-radius:12px;background:#fbfcfb;color:var(--text)}
.student-grid-2{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.9fr);gap:16px}
.student-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.student-grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.student-grid-main{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.95fr);gap:16px;align-items:start}
.student-mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.student-stat-card{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:center;padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-sm);overflow:hidden}
.student-stat-card::after{content:'';position:absolute;right:-34px;top:-42px;width:112px;height:112px;border-radius:999px;background:rgba(255,255,255,.62)}
.student-stat-card .stat-icon{position:relative;z-index:1;width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-size:18px;font-weight:900;background:#eef6ff;color:#1d4ed8}
.student-stat-card .stat-copy{position:relative;z-index:1;min-width:0}
.student-stat-card.tone-blue{background:linear-gradient(135deg,#f8fbff 0%,#eef6ff 100%);border-color:#cfe2ff}
.student-stat-card.tone-amber{background:linear-gradient(135deg,#fffdf5 0%,#fff3d6 100%);border-color:#fde7a2}
.student-stat-card.tone-amber .stat-icon{background:#fff7db;color:#b45309}
.student-stat-card.tone-green{background:linear-gradient(135deg,#f7fef9 0%,#e8f8ee 100%);border-color:#bfe8cf}
.student-stat-card.tone-green .stat-icon{background:#dcfce7;color:#166534}
.student-stat-card.tone-purple{background:linear-gradient(135deg,#fbfaff 0%,#f1edff 100%);border-color:#ddd3ff}
.student-stat-card.tone-purple .stat-icon{background:#f5f3ff;color:#6d28d9}
.student-stat-card .label{font-size:12px;font-weight:800;color:var(--text-soft);text-transform:uppercase;letter-spacing:.04em}
.student-stat-card .value{margin-top:10px;font-size:28px;font-weight:900;line-height:1;color:var(--text-strong)}
.student-stat-card .meta{margin-top:8px;font-size:13px;color:var(--text-soft)}
.student-list-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-sm);padding:18px}
.student-list{display:flex;flex-direction:column;gap:12px}
.student-item{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid #edf2ee;border-radius:16px;background:#fbfdfb}
.student-item-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-size:18px;font-weight:800;background:var(--primary-soft);color:var(--primary-dark)}
.student-item-icon.blue{background:var(--blue-soft);color:#2456cc}.student-item-icon.orange{background:var(--orange-soft);color:#b36f10}.student-item-icon.purple{background:var(--purple-soft);color:#6d28d9}.student-item-icon.red{background:var(--red-soft);color:#b91c1c}
.student-item-title{font-size:15px;font-weight:800;color:var(--text-strong);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.student-item-sub{margin-top:4px;font-size:12px;color:var(--text-soft);display:flex;gap:12px;flex-wrap:wrap}
.student-item-side{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.student-deadline{font-size:12px;font-weight:800;color:var(--text-soft);white-space:nowrap}
.student-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.student-kpi{padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-sm)}
.student-kpi-main{display:grid;grid-template-columns:56px minmax(0,1fr) 110px;gap:14px;align-items:center}
.student-kpi-main.compact{grid-template-columns:56px minmax(0,1fr)}
.student-kpi-value{font-size:28px;font-weight:900;color:var(--text-strong);line-height:1;margin-top:8px}
.student-kpi-meta{font-size:12px;color:var(--text-soft);line-height:1.7}
.student-kpi-side{border-left:1px solid #edf1ee;padding-left:12px;display:grid;gap:6px}
.student-kpi-side div{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--text-soft);font-weight:700}
.student-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.student-action-card{display:flex;gap:12px;align-items:flex-start;padding:16px;border:1px solid var(--line);border-radius:18px;background:#fbfcfb;text-decoration:none;transition:transform var(--transition),box-shadow var(--transition),border-color var(--transition)}
.student-action-card:hover{transform:translateY(-1px);box-shadow:var(--shadow-sm);border-color:var(--line-strong)}
.student-action-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-size:18px;font-weight:900;background:var(--primary-soft);color:var(--primary-dark);flex-shrink:0}
.student-action-icon.blue{background:var(--blue-soft);color:#2456cc}.student-action-icon.orange{background:var(--orange-soft);color:#b36f10}.student-action-icon.purple{background:var(--purple-soft);color:#6d28d9}.student-action-icon.red{background:var(--red-soft);color:#b91c1c}
.student-action-card strong{display:block;font-size:15px;color:var(--text-strong)}
.student-action-card span{display:block;margin-top:5px;font-size:12px;color:var(--text-soft);line-height:1.6}
.student-summary-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.student-summary-pill{padding:16px;border:1px solid #edf1ee;border-radius:18px;background:#fbfcfb}
.student-summary-pill strong{display:block;font-size:28px;line-height:1;color:var(--text-strong)}
.student-summary-pill span{display:block;margin-top:6px;font-size:12px;color:var(--text-soft)}
.student-split-card{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px;align-items:center}
.student-chart{width:180px;height:180px;border-radius:50%;margin:0 auto;display:grid;place-items:center;position:relative;background:conic-gradient(var(--primary) 0deg,var(--primary) 130deg,var(--blue) 130deg 240deg,var(--orange) 240deg 320deg,#e4ebf1 320deg 360deg)}
.student-chart::after{content:"";position:absolute;width:108px;height:108px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #edf1ee}
.student-chart-inner{position:relative;z-index:1;text-align:center}
.student-chart-inner strong{display:block;font-size:42px;line-height:1;color:var(--text-strong)}
.student-chart-inner span{display:block;margin-top:6px;font-size:13px;font-weight:800;color:var(--text-soft)}
.student-legend{display:grid;gap:10px}
.student-legend-row{display:grid;grid-template-columns:minmax(0,1fr) 50px 48px;gap:10px;align-items:center;font-size:13px;color:var(--text-soft)}
.student-dot{width:10px;height:10px;border-radius:50%;display:inline-block;margin-right:8px;background:var(--primary)}
.student-dot.blue{background:var(--blue)}.student-dot.orange{background:var(--orange)}.student-dot.purple{background:var(--purple)}.student-dot.gray{background:#94a3b8}
.student-table-wrap{overflow:auto}
.student-table{width:100%;border-collapse:separate;border-spacing:0}
.student-table th,.student-table td{padding:14px 12px;border-bottom:1px solid #edf1ee;text-align:left;vertical-align:top}
.student-table thead th{font-size:12px;font-weight:800;color:var(--text-soft);background:#fbfcfb;white-space:nowrap}
.student-table tbody tr:hover{background:#fcfdfc}
.student-table-title{display:block;font-size:14px;font-weight:800;color:var(--text-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px;text-decoration:none}
.student-table-title:hover{color:var(--primary)}
.student-table-sub{display:block;margin-top:6px;font-size:12px;color:var(--text-soft);line-height:1.6}
.student-calendar-wrap{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.student-mini-calendar{padding:8px 0}
.student-mini-calendar .calendar-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.student-mini-calendar .calendar-title{font-size:14px;font-weight:800;color:var(--text-strong)}
.student-mini-calendar .calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;font-size:12px;text-align:center}
.student-mini-calendar .calendar-grid .muted{font-size:12px;line-height:1.4}
.student-mini-calendar .day{height:36px;border-radius:12px;display:grid;place-items:center;color:#64748b}
.student-mini-calendar .day.is-today{background:var(--primary);color:#fff;font-weight:800}
.student-agenda{display:flex;flex-direction:column;gap:10px}
.student-agenda-item{display:grid;grid-template-columns:56px 4px minmax(0,1fr);gap:10px;align-items:start;padding:6px 0}
.student-agenda-time{font-size:13px;font-weight:800;color:var(--text-strong);text-align:right}
.student-agenda-line{width:4px;border-radius:999px;background:var(--primary);min-height:44px}.student-agenda-line.blue{background:var(--blue)}.student-agenda-line.orange{background:var(--orange)}.student-agenda-line.purple{background:var(--purple)}
.student-agenda-body strong{display:block;font-size:14px;color:var(--text-strong)}
.student-agenda-body span{display:block;margin-top:4px;font-size:12px;color:var(--text-soft)}
.student-note-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.student-note-card{padding:16px;border-radius:18px;border:1px solid #edf1ee;background:#fbfcfb}
.student-note-card strong{display:block;font-size:26px;line-height:1;color:var(--text-strong)}
.student-note-card .note-title{font-size:13px;font-weight:800;color:var(--text-strong);margin-top:6px}
.student-note-card .note-desc{margin-top:4px;font-size:12px;color:var(--text-soft)}
.student-note-card.danger{background:#fff6f6;border-color:#ffe0e0}.student-note-card.warning{background:#fff8ee;border-color:#f6e2ba}.student-note-card.info{background:#f3f7ff;border-color:#dce8ff}
.student-file-list{display:flex;flex-direction:column;gap:10px}
.student-file-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid #edf1ee;border-radius:16px;background:#fbfcfb}
.student-file-icon{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:900;font-size:14px}.student-file-icon.doc{background:#3b82f6}.student-file-icon.ppt{background:#f97316}.student-file-icon.xls{background:#16a34a}.student-file-icon.pdf{background:#ef4444}
.student-breadcrumb{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:13px;color:var(--text-soft)}
.student-breadcrumb a{color:var(--primary);text-decoration:none}.student-breadcrumb a:hover{text-decoration:underline}
.student-folder-list{display:flex;flex-direction:column;gap:6px}
.student-folder-link{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;text-decoration:none;color:var(--text);font-size:13px;font-weight:700}.student-folder-link:hover,.student-folder-link.active{background:#eef6f1;color:var(--primary-dark)}
.student-empty{padding:24px;border:1px dashed var(--line-strong);border-radius:18px;background:#fbfcfb;color:var(--text-soft);text-align:center;line-height:1.8}
.truncate-1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.truncate-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:1280px){.student-grid-main,.student-grid-2,.student-split-card,.student-calendar-wrap{grid-template-columns:1fr}.student-kpi-grid,.student-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.student-grid-3,.student-note-grid{grid-template-columns:1fr 1fr}.student-action-grid{grid-template-columns:1fr 1fr}.student-table-title{max-width:260px}}
@media(max-width:820px){.student-kpi-grid,.student-grid-4,.student-grid-3,.student-note-grid,.student-summary-strip,.student-action-grid{grid-template-columns:1fr}.student-kpi-main{grid-template-columns:56px minmax(0,1fr)}.student-kpi-side{border-left:none;padding-left:0;padding-top:10px;border-top:1px solid #edf1ee}.student-item{grid-template-columns:42px minmax(0,1fr)}.student-item-side{grid-column:2;justify-content:flex-start}.student-table{min-width:860px}}

/* Teacher workspace system ------------------------------------------------ */
.menu-badge{
  margin-left:auto;
  margin-right:8px;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:var(--red);
  color:#fff;
  font-size:11px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 18px rgba(239,68,68,.16);
}
.teacher-page-shell{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.teacher-overview-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:20px 22px;
  border:1px solid #dfe9e2;
  border-radius:24px;
  background:linear-gradient(135deg,#ffffff 0%,#f5fbf7 58%,#eef6ff 100%);
  box-shadow:var(--shadow-sm);
}
.teacher-eyebrow{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--primary-dark);
}
.teacher-overview-title{
  margin-top:6px;
  font-size:24px;
  line-height:1.25;
  font-weight:900;
  color:var(--text-strong);
}
.teacher-overview-card p{
  margin:8px 0 0;
  color:var(--text-soft);
  font-size:14px;
  line-height:1.7;
}
.teacher-overview-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.teacher-metric-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}
.teacher-metric-grid.compact{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.teacher-metric-card{
  display:block;
  min-height:128px;
  padding:18px;
  border:1px solid #dfe9e2;
  border-radius:20px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  text-decoration:none;
  position:relative;
  overflow:hidden;
}
.teacher-metric-card::after{
  content:"";
  position:absolute;
  right:-24px;
  top:-26px;
  width:88px;
  height:88px;
  border-radius:50%;
  background:var(--primary-soft);
}
.teacher-metric-card.orange::after{background:var(--orange-soft)}
.teacher-metric-card.blue::after{background:var(--blue-soft)}
.teacher-metric-card.purple::after{background:var(--purple-soft)}
.teacher-metric-card.red::after{background:var(--red-soft)}
.teacher-metric-label{
  display:block;
  font-size:12px;
  font-weight:900;
  color:var(--text-soft);
}
.teacher-metric-card strong{
  display:block;
  margin-top:12px;
  font-size:32px;
  line-height:1;
  color:var(--text-strong);
}
.teacher-metric-card em{
  display:block;
  margin-top:10px;
  font-style:normal;
  font-size:12px;
  color:var(--text-soft);
}
.teacher-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(320px,.9fr);
  gap:18px;
  align-items:start;
}
.teacher-panel{
  padding:20px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}
.teacher-panel-main{min-height:100%}
.teacher-section-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  margin-bottom:14px;
}
.teacher-section-head h3,
.teacher-section-head p{
  margin:0;
}
.teacher-section-head h3{
  font-size:17px;
  color:var(--text-strong);
}
.teacher-detail-title{
  margin:0;
  font-size:20px;
  line-height:1.35;
  font-weight:900;
  color:var(--text-strong);
}
.notice-detail-title{margin-top:8px}
.teacher-section-head p{
  margin-top:4px;
  font-size:13px;
  color:var(--text-soft);
}
.teacher-approval-list,
.teacher-compact-list,
.teacher-breakdown-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.teacher-approval-row{
  display:grid;
  grid-template-columns:100px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:13px 14px;
  border:1px solid #edf2ee;
  border-radius:16px;
  background:#fbfdfb;
  text-decoration:none;
}
.teacher-approval-row:hover,
.teacher-compact-row:hover,
.teacher-breakdown-row:hover,
.teacher-shortcut-card:hover{
  border-color:#d7e7dc;
  transform:translateY(-1px);
  box-shadow:var(--shadow-sm);
}
.teacher-approval-row.is-timeout{
  background:#fff9f0;
  border-color:#f4dfbb;
}
.teacher-approval-type{
  font-size:12px;
  font-weight:900;
  color:var(--primary-dark);
}
.teacher-approval-body strong,
.teacher-compact-row strong,
.teacher-breakdown-copy strong,
.teacher-shortcut-card strong{
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:14px;
  color:var(--text-strong);
}
.teacher-approval-body span,
.teacher-compact-row span,
.teacher-breakdown-copy span,
.teacher-shortcut-card span{
  display:block;
  margin-top:4px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:12px;
  color:var(--text-soft);
}
.teacher-status-chip,
.teacher-approval-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  background:#eef5f1;
  color:var(--primary-dark);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.teacher-status-chip.warning{background:var(--orange-soft);color:#a85f00}
.teacher-status-chip.danger{background:var(--red-soft);color:#b91c1c}
.teacher-status-chip.info{background:var(--blue-soft);color:#2456cc}
.teacher-empty-state{
  padding:28px 18px;
  border:1px dashed #dce7df;
  border-radius:18px;
  background:#fbfdfb;
  color:var(--text-soft);
  text-align:center;
  font-size:14px;
}
.teacher-breakdown-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 90px auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid #edf2ee;
  border-radius:16px;
  background:#fbfdfb;
  text-decoration:none;
}
.teacher-breakdown-meter{
  height:8px;
  border-radius:999px;
  background:#edf3ee;
  overflow:hidden;
}
.teacher-breakdown-meter i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--primary),#66bd86);
}
.teacher-compact-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:13px 14px;
  border:1px solid #edf2ee;
  border-radius:16px;
  background:#fbfdfb;
  text-decoration:none;
}
.teacher-shortcut-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
.teacher-shortcut-card{
  min-height:96px;
  padding:15px;
  border:1px solid #edf2ee;
  border-radius:18px;
  background:#fbfdfb;
  text-decoration:none;
}
.teacher-tabs-panel{padding:16px 18px}
.approval-shell{gap:18px}
.approval-toolbar form{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.approval-toolbar .field-inline{display:flex;flex-direction:column;gap:6px;min-width:180px}
.approval-toolbar .field-inline label,
.qa-label{display:block;font-size:13px;font-weight:900;color:#4b5563;margin-bottom:6px}
.approval-toolbar .field-inline input,
.approval-toolbar .field-inline select{
  min-height:42px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid #cfd9d2;
  background:#fff;
  color:var(--text-strong);
}
.approval-toolbar .field-inline input:focus,
.approval-toolbar .field-inline select:focus,
.qa-modal textarea:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(47,143,91,.08);
}
.approval-tabs{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.tab-badge{margin-left:6px}
.approval-table-card{padding:0;overflow:hidden}
.ac-table-head,.ac-row{display:grid;grid-template-columns:130px minmax(260px,1.4fr) 120px 110px 140px 180px;gap:12px;align-items:center;padding:14px 18px}
.ac-table-head{background:#fbfcfb;border-bottom:1px solid #edf1ee;font-size:12px;font-weight:900;color:var(--text-soft)}
.ac-row{border-bottom:1px solid #edf1ee}
.ac-row:last-child{border-bottom:none}
.ac-row:hover{background:#fcfdfc}
.ac-row.timeout-row{background:#fffaf1}
.ac-title{font-size:14px;font-weight:900;color:var(--text-strong)}
.ac-subtitle,.ac-date,.ac-student{margin-top:6px;font-size:12px;color:var(--text-soft);line-height:1.6}
.ac-student,.ac-date{margin-top:0}
.ac-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start}
.ac-timeout-chip{margin-left:8px}
.inline-action-form{display:inline-flex;gap:8px;flex-wrap:wrap}
.qa-modal-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.18);z-index:1000;align-items:center;justify-content:center;padding:20px}
.qa-modal-overlay.open{display:flex}
.qa-modal{width:min(760px,100%);padding:26px 28px;border-radius:24px;background:var(--surface);border:1px solid var(--line);box-shadow:0 18px 44px rgba(15,23,42,.12)}
.qa-title{margin:0;font-size:22px;color:var(--text-strong)}
.qa-subject{margin-top:8px}
.qa-request-card{margin:16px 0 18px;padding:18px 20px;border-radius:18px;background:linear-gradient(135deg,#f8fcf9 0%,#f1f8f4 56%,#eef4ff 100%);border:1px solid #d8e9df}
.qa-request-eyebrow{font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--primary)}
.qa-request-title{margin-top:8px;font-size:24px;line-height:1.4;font-weight:900;color:var(--text-strong)}
.qa-request-body{margin-top:12px;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.82);border:1px solid #e3ebe4;font-size:14px;line-height:1.8;color:var(--text-soft);white-space:pre-wrap}
.qa-modal textarea{width:100%;min-height:92px;padding:12px 14px;border-radius:14px;border:1px solid #cfd9d2;resize:vertical;font:inherit}
.qa-modal-btns{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:16px}
.hidden{display:none}
.empty-hint{padding:34px 20px;text-align:center;color:var(--text-soft);font-size:14px}
@media(max-width:1280px){
  .teacher-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .teacher-metric-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .teacher-dashboard-grid{grid-template-columns:1fr}
  .teacher-shortcut-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
  .teacher-overview-card{grid-template-columns:1fr}
  .teacher-overview-actions{justify-content:flex-start}
  .teacher-metric-grid,.teacher-metric-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .teacher-shortcut-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ac-table-head,.ac-row{grid-template-columns:1fr;align-items:flex-start}
  .ac-table-head{display:none}
}
@media(max-width:640px){
  .teacher-metric-grid,.teacher-metric-grid.compact,.teacher-shortcut-grid{grid-template-columns:1fr}
  .teacher-approval-row,.teacher-breakdown-row,.teacher-compact-row{grid-template-columns:1fr}
}

/* Teacher dashboard Plan A: high-density one-screen workbench -------------- */
.teacher-workbench-dashboard {
  width: 100%;
  min-height: calc(100vh - 96px);
  background: #f5f7fa;
}

.teacher-workbench-shell {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 12px;
  width: 100%;
}

.teacher-workbench-header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.twb-hello {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
  color: #111827;
}

.twb-date {
  margin-top: 3px;
  font-size: 12px;
  color: #6b7280;
}

.twb-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.twb-mini-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.twb-mini-btn.primary {
  background: #16834a;
  color: #fff;
  border-color: #16834a;
}

.teacher-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.teacher-kpi-card,
.teacher-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.teacher-kpi-card {
  min-height: 92px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.teacher-kpi-card:hover,
.teacher-card a:hover {
  border-color: #cfd9d2;
}

.twb-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eaf7ef;
  color: #16834a;
  font-size: 16px;
  font-weight: 900;
}

.tone-orange .twb-kpi-icon { background: #fff7ed; color: #d97706; }
.tone-blue .twb-kpi-icon { background: #eff6ff; color: #2563eb; }
.tone-green .twb-kpi-icon { background: #eaf7ef; color: #16834a; }
.tone-teal .twb-kpi-icon { background: #ecfeff; color: #0891b2; }
.tone-purple .twb-kpi-icon { background: #f5f3ff; color: #7c3aed; }
.tone-violet .twb-kpi-icon { background: #f3e8ff; color: #6d28d9; }

.twb-kpi-copy {
  min-width: 0;
}

.twb-kpi-copy span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #4b5563;
}

.twb-kpi-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 25px;
  line-height: 1.12;
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.twb-kpi-copy strong em {
  margin-left: 4px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.twb-kpi-copy small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-main-grid,
.teacher-data-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.teacher-bottom-grid {
  display: grid;
  grid-template-columns: .95fr 1.45fr;
  gap: 12px;
  align-items: stretch;
}

.teacher-card {
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.teacher-main-grid .teacher-card {
  min-height: 238px;
}

.teacher-data-grid .teacher-card {
  min-height: 198px;
}

.teacher-bottom-grid .teacher-card {
  min-height: 168px;
}

.twb-card-head {
  min-height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.twb-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  color: #111827;
}

.twb-card-head a {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.twb-count-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.twb-approval-list,
.twb-notice-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.twb-approval-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 48px 52px 34px;
  gap: 8px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
}

.twb-approval-row strong,
.twb-notice-row strong,
.twb-table-row strong,
.twb-table-row span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.twb-approval-row strong {
  color: #111827;
  font-weight: 800;
}

.twb-approval-row em,
.twb-approval-row time {
  font-style: normal;
  color: #4b5563;
  white-space: nowrap;
}

.twb-approval-row.is-timeout .twb-action-text,
.twb-approval-row.is-timeout strong {
  color: #dc2626;
}

.twb-type-chip {
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eaf7ef;
  color: #16834a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.twb-action-text {
  color: #dc2626;
  font-weight: 900;
  text-align: right;
}

.twb-more-row {
  margin-top: 2px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.twb-progress-panel {
  flex: 1;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.twb-donut {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  text-decoration: none;
  background: var(--twb-chart);
}

.twb-donut::after {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f7;
}

.twb-donut span,
.twb-donut small {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.twb-donut span {
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  color: #111827;
}

.twb-donut small {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.twb-progress-legend {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.twb-progress-legend a {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
}

.twb-progress-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.twb-progress-legend strong {
  font-size: 12px;
  color: #111827;
}

.twb-progress-legend em {
  font-style: normal;
  color: #64748b;
}

.twb-notice-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
}

.twb-notice-row span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

.twb-notice-row strong {
  color: #111827;
  font-weight: 750;
}

.twb-notice-row time {
  text-align: right;
  color: #64748b;
  font-size: 11px;
}

.twb-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.twb-table-head,
.twb-table-row {
  display: grid;
  gap: 8px;
  align-items: center;
}

.twb-table-head {
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: #f8fafc;
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
}

.twb-table-row {
  min-height: 37px;
  padding: 0 8px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: #374151;
  font-size: 12px;
}

.twb-table-row:last-child {
  border-bottom: none;
}

.twb-table-row strong {
  color: #111827;
  font-weight: 800;
}

.twb-project-table .twb-table-head,
.twb-project-table .twb-table-row {
  grid-template-columns: minmax(130px, 1.4fr) 54px 58px 58px 74px minmax(88px, .9fr);
}

.twb-paper-table .twb-table-head,
.twb-paper-table .twb-table-row {
  grid-template-columns: minmax(170px, 1.7fr) minmax(80px, .9fr) 62px 52px;
}

.twb-task-table .twb-table-head,
.twb-task-table .twb-table-row {
  grid-template-columns: minmax(180px, 1.7fr) 72px minmax(140px, 1.1fr) 82px 68px;
}

.twb-status {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.twb-status.success { background: #dcfce7; color: #15803d; }
.twb-status.warning { background: #fff7ed; color: #c2410c; }
.twb-status.info { background: #eff6ff; color: #2563eb; }
.twb-status.danger { background: #fee2e2; color: #b91c1c; }
.twb-status.neutral { background: #f1f5f9; color: #475569; }

.twb-mini-progress {
  display: grid;
  grid-template-columns: minmax(34px, 1fr) 30px;
  gap: 5px;
  align-items: center;
}

.twb-mini-progress b {
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.twb-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16834a;
}

.twb-mini-progress em {
  font-style: normal;
  font-size: 10px;
  color: #64748b;
}

.twb-fund-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.twb-fund-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0faf4 0%, #f8fcf9 100%);
  border: 1px solid #dceee3;
}

.twb-fund-main div + div {
  border-left: 1px solid #d7e8de;
  padding-left: 12px;
}

.twb-fund-main span,
.twb-fund-meta {
  display: block;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.twb-fund-main strong {
  display: inline-block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: #111827;
}

.twb-fund-main em {
  margin-left: 4px;
  font-style: normal;
  font-size: 12px;
  color: #374151;
}

.twb-fund-progress div {
  display: flex;
  justify-content: space-between;
  color: #374151;
  font-size: 12px;
  font-weight: 900;
}

.twb-fund-progress b {
  display: block;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.twb-fund-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16834a;
}

.teacher-workbench-dashboard .teacher-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.twb-shortcut {
  height: 58px;
  border: 1px solid #edf2ee;
  border-radius: 14px;
  background: #fbfcfb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: #111827;
}

.twb-shortcut span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eaf7ef;
  color: #16834a;
  font-size: 12px;
  font-weight: 900;
}

.twb-shortcut strong {
  font-size: 12px;
  font-weight: 850;
}

.twb-empty.compact {
  padding: 26px 12px;
  border: 1px dashed #d9e5dd;
  border-radius: 14px;
  background: #fbfdfb;
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 1599px) {
  .teacher-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .teacher-main-grid,
  .teacher-data-grid {
    grid-template-columns: 1fr 1fr;
  }
  .teacher-main-grid .teacher-notice-card,
  .teacher-data-grid .teacher-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1279px) {
  .teacher-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .teacher-main-grid,
  .teacher-data-grid,
  .teacher-bottom-grid {
    grid-template-columns: 1fr;
  }
  .teacher-main-grid .teacher-notice-card,
  .teacher-data-grid .teacher-card:last-child {
    grid-column: auto;
  }
  .teacher-workbench-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .twb-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .teacher-kpi-grid,
  .teacher-workbench-dashboard .teacher-shortcut-grid {
    grid-template-columns: 1fr;
  }
  .teacher-kpi-card {
    min-height: 82px;
  }
  .twb-approval-row,
  .twb-project-table .twb-table-head,
  .twb-project-table .twb-table-row,
  .twb-paper-table .twb-table-head,
  .twb-paper-table .twb-table-row,
  .twb-task-table .twb-table-head,
  .twb-task-table .twb-table-row {
    grid-template-columns: 1fr;
    height: auto;
    padding: 10px 8px;
  }
  .twb-table-head {
    display: none;
  }
  .twb-progress-panel,
  .twb-fund-main {
    grid-template-columns: 1fr;
  }
  .twb-fund-main div + div {
    border-left: none;
    border-top: 1px solid #d7e8de;
    padding-left: 0;
    padding-top: 12px;
  }
}

.add-form-wrap{display:none;padding:18px 20px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-sm)}
.add-form-wrap.open{display:block}
.upload-area{padding:20px;border:1.5px dashed var(--line-strong);border-radius:18px;background:#fbfcfb}
.modal-overlay{display:none;position:fixed;inset:0;z-index:500;background:rgba(15,23,42,.36);align-items:center;justify-content:center;padding:20px}
.modal-overlay.open{display:flex}
.modal-box{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:var(--shadow-md);width:min(520px,100%)}
.required{color:#dc2626}

/* UI V3: 顶部头像与个人资料入口 */
.topbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.topbar-profile:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #62bd85);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}
.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-ui {
  position: relative;
  overflow: hidden;
}
.avatar-ui img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.avatar-ui-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  line-height: 1;
}
.avatar-ui.has-image .avatar-ui-fallback {
  display: none;
}
.topbar-profile .topbar-user {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
  padding-right: 4px;
}
@media (max-width: 900px) {
  .topbar-profile .topbar-user { display:none; }
  .topbar-profile { padding:4px; }
}

/* UI V3.2: 顶部右侧工具区轻量化（通知与用户信息取消外框） */
.topbar-tools {
  gap: 12px;
  align-items: center;
}

.topbar-tools .bell-btn {
  width: 36px;
  height: 36px;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-strong);
  font-size: 18px;
}

.topbar-tools .bell-btn:hover,
.topbar-tools .bell-btn.has-unread:hover {
  background: rgba(47, 143, 91, 0.08) !important;
}

.topbar-tools .bell-btn .icon-badge {
  top: -3px;
  right: -4px;
}

.topbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.topbar-profile:hover {
  background: rgba(47, 143, 91, 0.06) !important;
  box-shadow: none !important;
  transform: none !important;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
}

.topbar-profile .topbar-user {
  min-width: 0 !important;
  padding: 0 !important;
  line-height: 1.18;
}

.topbar-profile .topbar-user-name,
.topbar-profile .topbar-user-role {
  max-width: 88px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .topbar-profile .topbar-user { display:none; }
  .topbar-profile { padding:0 !important; }
}

/* Home Workbench V3.9: 首页工作台紧凑首屏版 */
.app-sidebar {
  padding: 14px 12px;
  gap: 12px;
}

.sidebar-brand {
  padding: 12px 14px;
  border-radius: 18px;
}

.brand-emblem {
  min-height: 50px;
  border-radius: 14px;
}

.brand-emblem img {
  height: 32px;
}

.brand-title {
  font-size: 15px;
}

.brand-subtitle {
  font-size: 12px;
}

.app-topbar {
  gap: 14px;
  align-items: center;
  padding: 14px 18px 10px;
}

.topbar-intro h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
}

.topbar-intro p {
  margin-top: 6px;
  font-size: 13px;
}

.topbar-tools {
  gap: 12px;
  align-items: center;
}

.topbar-search {
  width: 332px;
  min-width: 332px;
  max-width: 360px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  box-shadow: none;
}

.topbar-search input {
  font-size: 13px;
}

.topbar-tools .bell-btn {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.topbar-tools .bell-btn .icon-badge {
  top: -2px;
  right: -5px;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
}

.topbar-profile .topbar-user-name {
  font-size: 14px;
}

.topbar-profile .topbar-user-role {
  font-size: 11px;
}

.logout-form .btn,
.logout-form .btn-outline {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
}

.workspace {
  padding: 12px 18px 18px;
}

.role-internal_student .sidebar-nav,
.role-external_student .sidebar-nav {
  gap: 8px;
}

.student-flat-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-internal_student .student-flat-nav .nav-item,
.role-external_student .student-flat-nav .nav-item {
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: #52637a;
  font-weight: 700;
}

.role-internal_student .student-flat-nav .nav-item:hover,
.role-external_student .student-flat-nav .nav-item:hover {
  background: rgba(47, 143, 91, 0.05);
  border-color: rgba(47, 143, 91, 0.08);
}

.role-internal_student .student-flat-nav .nav-item.active,
.role-external_student .student-flat-nav .nav-item.active {
  background: #159458;
  border-color: #159458;
  color: #fff;
  box-shadow: 0 10px 22px rgba(21, 148, 88, 0.18);
}

.role-internal_student .student-flat-nav .nav-item.active .nav-badge,
.role-external_student .student-flat-nav .nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.role-internal_student .student-flat-nav .nav-icon,
.role-external_student .student-flat-nav .nav-icon {
  width: 18px;
  font-size: 15px;
}

.nav-caret {
  margin-left: auto;
  color: #94a3b8;
  font-size: 14px;
}

.role-internal_student .student-flat-nav .nav-item.active .nav-caret,
.role-external_student .student-flat-nav .nav-item.active .nav-caret {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-footer {
  margin-top: auto;
  gap: 10px;
}

.sidebar-footer-card {
  padding: 14px;
  border-radius: 18px;
}

.sidebar-card-title {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.sidebar-team-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.sidebar-team-avatar {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #62bd85);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.sidebar-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-team-copy {
  min-width: 0;
}

.sidebar-team-copy .sidebar-user-name {
  margin-top: 0;
  font-size: 17px;
}

.sidebar-progress-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.sidebar-progress-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--primary) calc((var(--p, 0)) * 1%), #e7f0ea 0);
}

.sidebar-progress-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.sidebar-progress-ring strong {
  position: relative;
  z-index: 1;
  font-size: 18px;
  color: var(--text-strong);
}

.sidebar-progress-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-strong);
}

.sidebar-progress-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}

.sidebar-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.sidebar-progress-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
}

.sidebar-progress-meta strong {
  color: var(--text-strong);
  font-weight: 800;
}

.sidebar-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #edf3ef;
  overflow: hidden;
}

.sidebar-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #159458 0%, #28b56d 100%);
}

.sidebar-progress-empty {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.research-workbench-home {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: none;
}

.rw-svg {
  width: 1.05em;
  height: 1.05em;
}

.rw-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.rw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rw-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rw-card-title h3 {
  margin: 0;
  font-size: 17px;
  color: #0f172a;
  white-space: nowrap;
}

.rw-more {
  font-size: 12px;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.rw-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff1f1;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
}

.rw-iconbox {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.rw-blue .rw-iconbox,
.rw-iconbox.blue {
  background: var(--blue-soft);
  color: #2563eb;
}

.rw-orange .rw-iconbox,
.rw-iconbox.orange {
  background: var(--orange-soft);
  color: #c66a00;
}

.rw-purple .rw-iconbox,
.rw-iconbox.purple {
  background: var(--purple-soft);
  color: #7c3aed;
}

.rw-focus-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(460px, 1.3fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px 18px;
  border-radius: 22px;
  border: 1px solid #cfe7d6;
  background: linear-gradient(98deg, #16834d 0%, #27935d 42%, #ebf9f1 100%);
  box-shadow: 0 10px 28px rgba(47, 143, 91, 0.12);
  position: relative;
  overflow: hidden;
}

.rw-focus-strip::after {
  content: "";
  position: absolute;
  right: 12%;
  top: -136px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.rw-focus-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.rw-focus-main-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 20px;
  flex-shrink: 0;
}

.rw-focus-title {
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
}

.rw-focus-sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-focus-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 8px;
  position: relative;
  z-index: 1;
}

.rw-focus-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.78);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.rw-focus-card .mini-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef6ff;
  color: #2563eb;
}

.rw-focus-card.orange .mini-icon {
  background: #fff7e8;
  color: #b45309;
}

.rw-focus-card.purple .mini-icon {
  background: #f4f0ff;
  color: #7c3aed;
}

.rw-focus-card .label {
  font-size: 11px;
  font-weight: 850;
  color: #64748b;
}

.rw-focus-card .value {
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
  color: #0f172a;
}

.rw-focus-card .meta {
  margin-left: 2px;
  font-size: 11px;
  color: #64748b;
  font-weight: 800;
}

.rw-focus-card .arrow {
  color: #94a3b8;
  font-weight: 900;
}

.rw-hero-btn {
  position: relative;
  z-index: 1;
  height: 42px;
  min-width: 130px;
  border-radius: 999px;
  background: #159458;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(14, 94, 51, 0.14);
}

.rw-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rw-metric {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 80px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: 0.18s ease;
}

.rw-metric:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: #d4e2d7;
}

.rw-metric .label {
  font-size: 12px;
  font-weight: 850;
  color: #64748b;
  white-space: nowrap;
}

.rw-metric-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}

.rw-metric .value {
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  color: #0f172a;
}

.rw-metric .unit {
  font-size: 12px;
  font-weight: 850;
  color: #64748b;
}

.rw-metric .sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-metric .up {
  color: var(--primary);
}

.rw-progress-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), #ecf2ee 0);
  position: relative;
  flex-shrink: 0;
}

.rw-progress-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.rw-progress-ring strong {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: #0f172a;
}

.rw-main-grid {
  display: grid;
  grid-template-columns: minmax(400px, 0.95fr) minmax(540px, 1.05fr);
  gap: 12px;
  align-items: stretch;
}

.rw-bottom-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.46fr) minmax(540px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.research-workbench-home .rw-main-grid > .rw-card,
.research-workbench-home .rw-bottom-grid > .rw-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.task-reminder-popup{position:fixed;inset:0;z-index:4300;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.34);backdrop-filter:blur(2px)}.task-reminder-popup.open{display:flex}.task-reminder-dialog{width:min(680px,calc(100vw - 32px));max-height:calc(100vh - 48px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;border:1px solid #dbe6df;border-radius:16px;background:#fff;box-shadow:0 26px 80px rgba(15,23,42,.28);overflow:hidden}.task-reminder-head,.task-reminder-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:#fbfdfb;border-bottom:1px solid #edf2f7}.task-reminder-foot{border-top:1px solid #edf2f7;border-bottom:0;justify-content:flex-end}.task-reminder-head h3{margin:0;font-size:18px;font-weight:950;color:#0f172a}.task-reminder-head p{margin:4px 0 0;color:#64748b;font-size:12px}.task-reminder-close{width:32px;height:32px;border:1px solid #dbe3ea;border-radius:8px;background:#fff;color:#334155;cursor:pointer}.task-reminder-list{padding:12px 16px;overflow:auto;display:grid;gap:10px}.task-reminder-item{display:grid;grid-template-columns:72px minmax(0,1fr) 104px auto;gap:10px;align-items:center;padding:11px;border:1px solid #e5edf3;border-radius:12px;background:#fff}.task-reminder-type{height:26px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#ecfdf5;color:#166534;font-size:12px;font-weight:900}.task-reminder-main{min-width:0}.task-reminder-main strong{display:block;color:#0f172a;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-reminder-main span{display:block;margin-top:2px;color:#64748b;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-reminder-due{color:#64748b;font-size:12px;text-align:right}.task-reminder-action{height:30px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;border-radius:8px;background:#16834a;color:#fff;text-decoration:none;font-size:12px;font-weight:900}

.rw-priority-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(58px * 4 + 8px * 3);
  flex: 1;
}

.rw-priority-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 118px 72px 62px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #edf2ef;
  border-radius: 16px;
  background: #fbfdfb;
  text-decoration: none;
}

.rw-priority-item:hover {
  border-color: #d4e2d7;
  background: #fff;
}

.rw-priority-item-empty {
  border-style: dashed;
  border-color: #dce7df;
  background: linear-gradient(180deg, #fbfdfb 0%, #f7faf8 100%);
}

.rw-priority-item-empty:hover {
  border-color: #dce7df;
  background: linear-gradient(180deg, #fbfdfb 0%, #f7faf8 100%);
}

.rw-priority-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.rw-priority-item.blue .rw-priority-icon {
  background: var(--blue-soft);
  color: #2563eb;
}

.rw-priority-item.orange .rw-priority-icon {
  background: var(--orange-soft);
  color: #b45309;
}

.rw-priority-item.purple .rw-priority-icon {
  background: var(--purple-soft);
  color: #7c3aed;
}

.rw-priority-item-empty .rw-priority-icon {
  background: #eef3ef;
  color: #9aa8b6;
}

.rw-priority-title {
  font-size: 14px;
  font-weight: 950;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-priority-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rw-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #eaf7ef;
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff;
}

.rw-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rw-owner-name {
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-owner-role {
  font-size: 11px;
  color: #64748b;
}

.rw-owner-empty .rw-avatar {
  background: #eef3ef;
  color: #9aa8b6;
  box-shadow: none;
}

.rw-priority-item-empty .rw-priority-title,
.rw-priority-item-empty .rw-owner-name {
  color: #7b8a9a;
}

.rw-priority-item-empty .rw-priority-sub,
.rw-priority-item-empty .rw-owner-role,
.rw-priority-item-empty .rw-due {
  color: #9aa8b6;
}

.rw-due {
  text-align: right;
  font-size: 11px;
  font-weight: 850;
  color: #64748b;
  line-height: 1.35;
}

.rw-due strong {
  display: block;
  color: #ef4444;
  font-size: 13px;
}

.rw-priority-item-empty .rw-due strong {
  color: #94a3b8;
}

.rw-action-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #a7d9b7;
  color: #137a43;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rw-action-btn-empty {
  border-style: dashed;
  border-color: #d4e2d7;
  background: #f7faf8;
  color: #94a3b8;
}

.rw-schedule-card {
  min-height: 100%;
}

.rw-schedule-wrap {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: stretch;
}

.rw-schedule-board {
  display: grid;
  grid-template-columns: 62px repeat(7, minmax(70px, 1fr));
  grid-template-rows: 44px repeat(4, 52px);
  width: 100%;
  border: 1px solid #edf2ef;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.rw-schedule-corner,
.rw-schedule-day,
.rw-schedule-time,
.rw-schedule-cell {
  border-right: 1px solid #edf2ef;
  border-bottom: 1px solid #edf2ef;
}

.rw-schedule-corner {
  background: #fbfdfb;
}

.rw-schedule-day {
  padding: 6px 2px;
  text-align: center;
  background: #fbfdfb;
}

.rw-schedule-day strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

.rw-schedule-day span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.2;
}

.rw-schedule-day.today {
  background: #ebfaf1;
}

.rw-schedule-day.today strong {
  color: #137a43;
}

.rw-schedule-time {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #64748b;
  background: #fbfdfb;
}

.rw-schedule-cell {
  min-height: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  text-decoration: none;
}

.rw-schedule-cell:hover {
  background: #f0faf4;
}

.rw-calendar-event {
  z-index: 2;
  align-self: start;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 30px;
  margin: calc(4px + (var(--rw-event-offset, 0) * 10px)) 4px 4px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #eaf7ef;
  color: #16623a;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  border: 1px solid rgba(18, 122, 67, 0.08);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.rw-calendar-event .time {
  display: block;
  font-size: 10px;
  opacity: 0.72;
  margin-bottom: 2px;
  white-space: nowrap;
}

.rw-calendar-event-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rw-calendar-event.blue {
  background: #eef6ff;
  color: #1d4ed8;
}

.rw-calendar-event.orange {
  background: #fff7e8;
  color: #b45309;
}

.rw-calendar-event.purple {
  background: #f4f0ff;
  color: #7c3aed;
}

.rw-calendar-event.teal {
  background: #e9fbf6;
  color: #0f766e;
}

.rw-schedule-empty-hint {
  z-index: 3;
  grid-column: 2 / 9;
  grid-row: 2 / 6;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  border: 1px solid #d9eadd;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  color: #64748b;
  pointer-events: none;
}

.rw-schedule-empty-hint strong {
  color: #137a43;
  font-size: 14px;
}

.rw-schedule-empty-hint span {
  font-size: 12px;
}

.rw-empty {
  border: 1px dashed #d9e5dc;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  background: #fbfdfb;
}

.rw-empty-schedule-card {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 236px;
}

.rw-schedule-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.rw-add-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #cfe3d5;
  background: #f5fbf7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  color: #137a43;
  text-decoration: none;
  font-weight: 950;
  font-size: 13px;
  white-space: nowrap;
}

.rw-add-link-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e4f5eb;
  color: #159458;
  font-size: 13px;
  line-height: 1;
}

.rw-result-box {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rw-donut {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) 0deg var(--rw-angle-done), #3b82f6 var(--rw-angle-done) var(--rw-angle-running), #f59e0b var(--rw-angle-running) 360deg);
  position: relative;
}

.rw-donut::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #fff;
}

.rw-donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.rw-donut-center strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: #0f172a;
}

.rw-donut-center span {
  font-size: 11px;
  font-weight: 900;
  color: #64748b;
}

.rw-result-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rw-legend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px 38px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #64748b;
}

.rw-legend-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rw-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}

.rw-dot.blue {
  background: #3b82f6;
}

.rw-dot.orange {
  background: #f59e0b;
}

.rw-result-types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.rw-result-type {
  padding: 8px 4px;
  border-radius: 12px;
  background: #f7faf8;
  text-align: center;
  font-size: 11px;
  color: #64748b;
}

.rw-result-type strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.rw-messages {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: calc(56px * 3);
  flex: 1;
}

.rw-message {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2ef;
  text-decoration: none;
}

.rw-message:last-child {
  border-bottom: none;
}

.rw-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 950;
  overflow: hidden;
}

.rw-message-title {
  font-size: 13px;
  font-weight: 950;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-message-text {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-message-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.rw-message-empty {
  border-bottom-style: dashed;
}

.rw-message-empty .rw-message-avatar {
  background: #eef3ef;
  color: #9aa8b6;
}

.rw-message-empty .rw-message-title {
  color: #7b8a9a;
}

.rw-message-empty .rw-message-text,
.rw-message-empty .rw-message-time {
  color: #9aa8b6;
}

.rw-footer-link {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 8px;
}

.rw-footer-link a {
  font-size: 12px;
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1480px) {
  .rw-focus-strip {
    grid-template-columns: minmax(200px, 0.9fr) minmax(400px, 1.2fr) auto;
  }

  .rw-priority-item {
    grid-template-columns: 40px minmax(0, 1fr) 104px 68px 60px;
  }
}

@media (max-width: 1240px) {
  .app-layout {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .workspace,
  .app-topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .rw-focus-strip,
  .rw-main-grid,
  .rw-bottom-grid {
    grid-template-columns: 1fr;
  }

  .rw-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }

  .topbar-search {
    min-width: 0;
    width: min(100%, 360px);
  }

  .rw-focus-cards,
  .rw-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rw-priority-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .rw-owner,
  .rw-due,
  .rw-action-btn {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .workspace,
  .app-topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .rw-metrics,
  .rw-focus-cards,
  .rw-result-types {
    grid-template-columns: 1fr;
  }

  .rw-focus-strip {
    padding: 12px;
  }

  .rw-schedule-wrap {
    overflow-x: auto;
  }

  .rw-schedule-board {
    min-width: 760px;
  }
}


/* Sidebar IA refinement: two-level business-domain navigation */
.sidebar-v2 {
  gap: 14px;
}

.sidebar-v2 .sidebar-brand {
  padding: 14px 15px;
}

.sidebar-v2 .sidebar-nav {
  gap: 8px;
}

.sidebar-v2 .menu-group {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.035);
}

.sidebar-v2 .menu-group.active {
  border-color: rgba(47, 143, 91, 0.18);
  box-shadow: 0 10px 24px rgba(47, 143, 91, 0.07);
}

.sidebar-v2 .menu-group-title {
  min-height: 42px;
  padding: 0 14px;
  font-size: 13px;
  letter-spacing: 0;
  color: #334155;
}

.sidebar-v2 .menu-group.active .menu-group-title {
  color: var(--primary-dark);
}

.sidebar-v2 .menu-title-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.sidebar-v2 .menu-title-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #f0f7f2;
  color: var(--primary-dark);
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-v2 .menu-group-links {
  padding: 0 8px 9px;
  gap: 4px;
}

.sidebar-v2 .nav-item {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.sidebar-v2 .nav-item:hover {
  background: #f6faf7;
  border-color: rgba(47, 143, 91, 0.08);
  color: #26384f;
}

.sidebar-v2 .nav-item.active {
  background: var(--primary-soft);
  border-color: rgba(47, 143, 91, 0.20);
  color: var(--primary-dark);
  font-weight: 900;
}

.sidebar-v2 .nav-icon {
  width: 18px;
  font-size: 12px;
  opacity: 0.95;
}

.sidebar-v2 .nav-badge {
  height: 20px;
  min-width: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.sidebar-v2 .sidebar-footer {
  gap: 10px;
}

.sidebar-v2 .sidebar-footer-card {
  padding: 13px;
  border-radius: 18px;
}

.sidebar-v2 .sidebar-progress-card.compact .sidebar-progress-head {
  gap: 10px;
}

.sidebar-v2 .sidebar-progress-card.compact .sidebar-progress-list {
  display: none;
}

.sidebar-v2 .sidebar-progress-card.compact .sidebar-progress-ring {
  width: 58px;
  height: 58px;
}

.sidebar-v2 .sidebar-progress-card.compact .sidebar-progress-ring::after {
  inset: 8px;
}

.sidebar-v2 .sidebar-progress-card.compact .sidebar-progress-sub {
  font-size: 12px;
}

.sidebar-v2 .sidebar-quick-card {
  background: linear-gradient(135deg, #f8fbf8 0%, #f1faf5 100%);
}

.sidebar-v2 .sidebar-quick-card .sidebar-cta {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
}

.role-internal_student .sidebar-v2 .menu-group,
.role-external_student .sidebar-v2 .menu-group {
  box-shadow: none;
}

.role-internal_student .sidebar-v2 .nav-item.active,
.role-external_student .sidebar-v2 .nav-item.active {
  background: #e8f6ef;
  border-color: rgba(21, 148, 88, 0.18);
  color: #127a43;
  box-shadow: none;
}

@media (max-height: 860px) {
  .sidebar-v2 {
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 10px;
  }

  .sidebar-v2 .sidebar-brand {
    padding: 12px 14px;
  }

  .sidebar-v2 .menu-group-title {
    min-height: 38px;
  }

  .sidebar-v2 .nav-item {
    min-height: 32px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .sidebar-v2 .sidebar-footer-card {
    padding: 11px;
  }
}

/* ===== Achievement management unified UI ===== */
.achievement-shell {
  --achievement-min-table: 980px;
}

.achievement-hero .student-hero-actions,
.achievement-hero-banner .hero-actions {
  align-self: flex-start;
}

.achievement-filter-panel {
  padding: 18px 20px;
}

.achievement-filter-panel .card-header {
  margin-bottom: 14px;
}

.achievement-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.achievement-quick-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.achievement-quick-link,
.achievement-type-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.achievement-quick-link {
  flex-direction: column;
  gap: 6px;
}

.achievement-quick-link:hover,
.achievement-type-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.achievement-quick-link strong,
.achievement-type-card strong {
  display: block;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
}

.achievement-quick-link span,
.achievement-type-card span,
.achievement-table-meta {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.65;
}

.achievement-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.achievement-type-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
}

.achievement-type-mark.blue { background: var(--blue-soft); color: #2456cc; }
.achievement-type-mark.orange { background: var(--orange-soft); color: #b36f10; }
.achievement-type-mark.purple { background: var(--purple-soft); color: #6d28d9; }

.achievement-table {
  min-width: var(--achievement-min-table);
}

.achievement-table-title {
  display: block;
  max-width: 420px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-table-title:hover {
  color: var(--primary);
}

.achievement-table-meta {
  margin-top: 5px;
}

.achievement-table .badge {
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .achievement-quick-grid,
  .achievement-quick-grid.five,
  .achievement-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .achievement-quick-grid,
  .achievement-quick-grid.five,
  .achievement-type-grid {
    grid-template-columns: 1fr;
  }

  .achievement-table-title {
    max-width: 260px;
  }
}

/* ===== Achievement overview dashboard / scheme A ===== */
.achievement-overview-dashboard {
  width: 100%;
  min-height: calc(100vh - 118px);
  padding: 0;
  box-sizing: border-box;
  color: #111827;
}

.achievement-overview-dashboard .achievement-dashboard-shell{
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}

.achievement-overview-dashboard .achievement-dashboard-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.achievement-overview-dashboard .achievement-dashboard-header h1{
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
}

.achievement-overview-dashboard .achievement-dashboard-header p{
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.achievement-overview-dashboard .achievement-toolbar-strip{
  min-height: 34px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.achievement-overview-dashboard .achievement-toolbar-tip{
  min-width: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}

.achievement-overview-dashboard .achievement-dashboard-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.achievement-overview-dashboard .achievement-btn{
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #dbe5ee;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.achievement-overview-dashboard .achievement-btn:hover{
  transform: translateY(-1px);
  border-color: #b9d7c5;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.achievement-overview-dashboard .achievement-btn.primary{
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.achievement-overview-dashboard .achievement-btn.small{
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.achievement-overview-dashboard .achievement-kpi-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.achievement-overview-dashboard .achievement-kpi-card,
.achievement-overview-dashboard .achievement-flow-card,
.achievement-overview-dashboard .achievement-chart-card,
.achievement-overview-dashboard .achievement-table-card,
.achievement-overview-dashboard .achievement-quick-card{
  border: 1px solid #e1e8ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.achievement-overview-dashboard .achievement-kpi-card{
  min-height: 90px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.achievement-overview-dashboard .achievement-kpi-card:hover,
.achievement-overview-dashboard .achievement-type-bar:hover,
.achievement-overview-dashboard .achievement-quick-tile:hover{
  transform: translateY(-1px);
  border-color: #cfe1d6;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.achievement-overview-dashboard .achievement-kpi-icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-svg-icon{
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.achievement-overview-dashboard .achievement-kpi-icon .achievement-svg-icon{
  width: 24px;
  height: 24px;
}

.achievement-overview-dashboard .achievement-kpi-icon.green{ background: #eaf7ef; color: #16834a; }
.achievement-overview-dashboard .achievement-kpi-icon.blue{ background: #eff6ff; color: #2563eb; }
.achievement-overview-dashboard .achievement-kpi-icon.orange{ background: #fff7ed; color: #f59e0b; }
.achievement-overview-dashboard .achievement-kpi-icon.purple{ background: #f3e8ff; color: #8b5cf6; }

.achievement-overview-dashboard .achievement-kpi-body{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.achievement-overview-dashboard .achievement-kpi-label{
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.achievement-overview-dashboard .achievement-kpi-body strong{
  font-size: 25px;
  line-height: 1.1;
  font-weight: 900;
  color: #111827;
}

.achievement-overview-dashboard .achievement-kpi-desc,
.achievement-overview-dashboard .achievement-kpi-delta{
  font-size: 11px;
  color: #6b7280;
}

.achievement-overview-dashboard .achievement-kpi-delta.up{ color: #16834a; }
.achievement-overview-dashboard .achievement-kpi-delta.down{ color: #dc2626; }
.achievement-overview-dashboard .achievement-kpi-delta.muted{ color: #94a3b8; }

.achievement-overview-dashboard .achievement-flow-card{
  padding: 10px 12px;
}

.achievement-overview-dashboard .achievement-card-head{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 7px;
}

.achievement-overview-dashboard .achievement-card-head.compact{
  margin-bottom: 6px;
}

.achievement-overview-dashboard .achievement-card-head h2{
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  color: #111827;
}

.achievement-overview-dashboard .achievement-card-head p{
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.25;
  color: #6b7280;
}

.achievement-overview-dashboard .achievement-card-head a{
  color: #16834a;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.achievement-overview-dashboard .achievement-flow-steps{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.achievement-overview-dashboard .achievement-flow-step{
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 4px 10px;
  color: #111827;
  text-decoration: none;
}

.achievement-overview-dashboard .achievement-flow-step:not(:last-child)::after{
  content: "→";
  position: absolute;
  right: -8px;
  top: 18px;
  color: #56a778;
  font-size: 18px;
  font-weight: 500;
}

.achievement-overview-dashboard .achievement-flow-icon{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-flow-icon .achievement-svg-icon{
  width: 18px;
  height: 18px;
}

.achievement-overview-dashboard .achievement-flow-step.green .achievement-flow-icon{ background: #eaf7ef; color: #16834a; }
.achievement-overview-dashboard .achievement-flow-step.blue .achievement-flow-icon{ background: #eff6ff; color: #2563eb; }
.achievement-overview-dashboard .achievement-flow-step.orange .achievement-flow-icon{ background: #fff7ed; color: #f59e0b; }
.achievement-overview-dashboard .achievement-flow-step.purple .achievement-flow-icon{ background: #f3e8ff; color: #8b5cf6; }

.achievement-overview-dashboard .achievement-flow-copy strong,
.achievement-overview-dashboard .achievement-flow-copy em{
  display: block;
  font-style: normal;
}

.achievement-overview-dashboard .achievement-flow-copy strong{
  font-size: 12px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-flow-copy em{
  margin-top: 0;
  font-size: 17px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-flow-line{
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: #16a34a;
}

.achievement-overview-dashboard .achievement-flow-step.blue .achievement-flow-line{ background: #3b82f6; }
.achievement-overview-dashboard .achievement-flow-step.orange .achievement-flow-line{ background: #f59e0b; }
.achievement-overview-dashboard .achievement-flow-step.purple .achievement-flow-line{ background: #8b5cf6; }

.achievement-overview-dashboard .achievement-main-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 10px;
  align-items: stretch;
  min-height: 0;
}

.achievement-overview-dashboard .achievement-left-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 198px 250px;
  gap: 10px;
  min-height: 0;
}

.achievement-overview-dashboard .achievement-chart-card,
.achievement-overview-dashboard .achievement-table-card,
.achievement-overview-dashboard .achievement-quick-card{
  padding: 10px 12px;
  min-width: 0;
}

.achievement-overview-dashboard .achievement-table-card{
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.achievement-overview-dashboard .achievement-side-stack{
  display: grid;
  grid-template-rows: 198px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.achievement-overview-dashboard .achievement-type-bars{
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.achievement-overview-dashboard .achievement-type-bar{
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 28px;
  gap: 9px;
  align-items: center;
  color: #111827;
  text-decoration: none;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.achievement-overview-dashboard .achievement-type-name{
  font-size: 12px;
  font-weight: 800;
}

.achievement-overview-dashboard .achievement-bar-track{
  height: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.achievement-overview-dashboard .achievement-bar-track i{
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #8bd3a7, #16a34a);
}

.achievement-overview-dashboard .achievement-type-bar strong{
  text-align: right;
  font-size: 12px;
}

.achievement-overview-dashboard .achievement-select-pill{
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.achievement-overview-dashboard .achievement-trend-wrap{
  min-height: 132px;
}

.achievement-overview-dashboard .achievement-trend-svg{
  width: 100%;
  height: 114px;
  display: block;
}

.achievement-overview-dashboard .achievement-grid-lines line{
  stroke: #e5e7eb;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.achievement-overview-dashboard .achievement-trend-axis{
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 11px;
  padding: 0 4px;
}

.achievement-overview-dashboard .achievement-table-wrap{
  overflow-x: auto;
  min-height: 0;
}

.achievement-overview-dashboard .achievement-overview-table{
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.achievement-overview-dashboard .achievement-overview-table th,
.achievement-overview-dashboard .achievement-overview-table td{
  height: 34px;
  padding: 5px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  white-space: nowrap;
}

.achievement-overview-dashboard .achievement-overview-table thead th{
  height: 30px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-overview-table tbody tr{
  cursor: pointer;
}

.achievement-overview-dashboard .achievement-overview-table tbody tr:hover{
  background: #fbfdfc;
}

.achievement-overview-dashboard .achievement-overview-table tbody tr.achievement-row-hidden{
  display: none;
}

.achievement-overview-dashboard .achievement-overview-table td:first-child a{
  display: inline-block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
  vertical-align: middle;
}

.achievement-overview-dashboard .achievement-status{
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-status.success{ background: #eaf7ef; color: #16834a; }
.achievement-overview-dashboard .achievement-status.info{ background: #eff6ff; color: #2563eb; }
.achievement-overview-dashboard .achievement-status.warning{ background: #fff7ed; color: #d97706; }
.achievement-overview-dashboard .achievement-status.danger{ background: #fff1f2; color: #dc2626; }
.achievement-overview-dashboard .achievement-status.neutral{ background: #f1f5f9; color: #64748b; }

.achievement-overview-dashboard .achievement-table-action{
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.achievement-overview-dashboard .achievement-table-pager{
  min-height: 28px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.achievement-overview-dashboard .achievement-table-pager button{
  height: 26px;
  padding: 0 10px;
  border: 1px solid #dbe5ee;
  border-radius: 999px;
  background: #fff;
  color: #16834a;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.achievement-overview-dashboard .achievement-table-pager button:disabled{
  color: #94a3b8;
  cursor: not-allowed;
  background: #f8fafc;
}

.achievement-overview-dashboard .achievement-table-pager b{
  color: #111827;
}

.achievement-overview-dashboard .achievement-link-card{
  cursor: pointer;
}

.achievement-overview-dashboard .achievement-link-card,
.achievement-overview-dashboard .achievement-quick-card{
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.achievement-overview-dashboard .achievement-link-body{
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  align-content: center;
  min-height: 0;
}

.achievement-overview-dashboard .achievement-donut-link{
  width: max-content;
  color: inherit;
  text-decoration: none;
}

.achievement-overview-dashboard .achievement-donut{
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#16a34a 0 calc(var(--linked-rate) * 1%), #d1d5db 0 100%);
}

.achievement-overview-dashboard .achievement-donut > div{
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf2f7;
}

.achievement-overview-dashboard .achievement-donut span{
  font-size: 11px;
  color: #64748b;
}

.achievement-overview-dashboard .achievement-donut strong{
  font-size: 19px;
  line-height: 1.1;
  color: #111827;
}

.achievement-overview-dashboard .achievement-donut-legend{
  display: grid;
  gap: 5px;
}

.achievement-overview-dashboard .achievement-donut-legend a{
  display: grid;
  grid-template-columns: 10px 42px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #334155;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.achievement-overview-dashboard .achievement-donut-legend i{
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.achievement-overview-dashboard .achievement-donut-legend i.green{ background: #16a34a; }
.achievement-overview-dashboard .achievement-donut-legend i.gray{ background: #cbd5e1; }
.achievement-overview-dashboard .achievement-donut-legend strong{ color: #475569; font-weight: 800; }
.achievement-overview-dashboard .achievement-donut-legend em{
  width: fit-content;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eaf7ef;
  color: #16834a;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-quick-grid2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: 100%;
}

.achievement-overview-dashboard .achievement-quick-tile{
  min-height: 86px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  color: #111827;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.achievement-overview-dashboard .achievement-quick-tile span{
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-quick-tile .achievement-svg-icon{
  width: 20px;
  height: 20px;
}

.achievement-overview-dashboard .achievement-quick-tile.green span{ background: #eaf7ef; color: #16834a; }
.achievement-overview-dashboard .achievement-quick-tile.blue span{ background: #eff6ff; color: #2563eb; }
.achievement-overview-dashboard .achievement-quick-tile.orange span{ background: #fff7ed; color: #f59e0b; }
.achievement-overview-dashboard .achievement-quick-tile.purple span{ background: #f3e8ff; color: #8b5cf6; }

.achievement-overview-dashboard .achievement-quick-tile strong{
  font-size: 12px;
  font-weight: 900;
}

.achievement-overview-dashboard .achievement-quick-tile em{
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.achievement-overview-dashboard .achievement-empty{
  min-height: 148px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #cfd9e3;
  border-radius: 14px;
  background: #fbfdfc;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.achievement-overview-dashboard .achievement-empty.compact{
  min-height: 112px;
}

.achievement-overview-dashboard .achievement-table-card .achievement-empty{
  min-height: 190px;
}

@media (max-width: 1280px) {
  .achievement-overview-dashboard .achievement-main-grid{
    grid-template-columns: 1fr;
  }

  .achievement-overview-dashboard .achievement-side-stack{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
}

@media (max-width: 1024px) {
  .achievement-overview-dashboard .achievement-kpi-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .achievement-overview-dashboard .achievement-side-stack{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .achievement-overview-dashboard .achievement-dashboard-header{
    flex-direction: column;
  }

  .achievement-overview-dashboard .achievement-toolbar-strip{
    flex-direction: column;
    align-items: flex-start;
  }

  .achievement-overview-dashboard .achievement-dashboard-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .achievement-overview-dashboard .achievement-left-grid{
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .achievement-overview-dashboard .achievement-table-card{
    grid-template-rows: auto auto auto;
  }

  .achievement-overview-dashboard .achievement-table-card{
    grid-column: auto;
  }

  .achievement-overview-dashboard .achievement-flow-steps{
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 640px) {
  .achievement-overview-dashboard .achievement-kpi-grid{
    grid-template-columns: 1fr;
  }

  .achievement-overview-dashboard .achievement-kpi-card{
    min-height: 100px;
  }

  .achievement-overview-dashboard .achievement-link-body{
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .achievement-overview-dashboard .achievement-quick-grid2{
    grid-template-columns: 1fr;
  }
}


/* ===== Achievement module: compact lists and multi-type registration ===== */
.achievement-list-page {
  gap: 14px;
}

.achievement-status-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
}

.achievement-status-tab {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.achievement-status-tab:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.achievement-status-tab.active {
  background: #edf8f1;
  border-color: rgba(47, 162, 95, 0.28);
  color: var(--primary-dark);
}

.achievement-status-tab strong {
  color: var(--text-strong);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.achievement-status-tab span {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 800;
}

.achievement-status-tab.active span {
  color: var(--primary-dark);
}

.achievement-list-page .achievement-formal-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr)) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.achievement-list-page .achievement-formal-tabs .achievement-status-tab {
  min-height: 42px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
}

.achievement-list-page .achievement-formal-tabs .achievement-status-tab strong {
  font-size: 18px;
}

.achievement-list-page .achievement-formal-tabs .achievement-status-actions .btn {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  white-space: nowrap;
}

.achievement-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.achievement-filter-panel.compact {
  padding: 14px 16px;
}

.achievement-filter-panel.compact .toolbar-actions {
  margin-top: 12px;
}

.achievement-management-filter-card {
  padding: 10px 12px;
}

.achievement-management-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(110px, .78fr) minmax(118px, .82fr) minmax(150px, 1fr) minmax(118px, .82fr) minmax(126px, .88fr) 128px 128px auto auto auto;
  gap: 8px;
  align-items: center;
}

.achievement-management-filter-toolbar input,
.achievement-management-filter-toolbar select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 10px;
}

.achievement-management-filter-toolbar .btn {
  height: 34px;
  min-width: 58px;
  padding: 0 12px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.achievement-management-filter-toolbar .am-filter-export {
  min-width: 54px;
}

@media (max-width: 1599px) {
  .achievement-management-filter-toolbar {
    grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(96px, .85fr)) 118px 118px auto auto auto;
  }
}

@media (max-width: 1280px) {
  .achievement-management-filter-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .achievement-list-page .achievement-formal-tabs,
  .achievement-list-filter-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .achievement-list-page .achievement-formal-tabs .achievement-status-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .achievement-management-filter-toolbar {
    grid-template-columns: 1fr;
  }
  .achievement-list-page .achievement-formal-tabs,
  .achievement-list-filter-toolbar,
  .achievement-linked-list {
    grid-template-columns: 1fr;
  }
}

.achievement-full-list-card {
  padding: 16px;
}

.achievement-list-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.55fr) repeat(4, minmax(116px, .9fr)) auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
}

.achievement-list-filter-toolbar label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-list-filter-toolbar label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.achievement-list-filter-toolbar input,
.achievement-list-filter-toolbar select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 10px;
}

.achievement-list-filter-toolbar .btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

.achievement-table th,
.achievement-table td {
  vertical-align: middle !important;
}

.achievement-table td {
  height: 54px;
}

.achievement-table td:nth-last-child(1) {
  white-space: nowrap;
}

.achievement-status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 76px;
}

.formal-info-approved-chip {
  margin-left: 0;
  white-space: nowrap;
}

.achievement-submit-record-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.achievement-record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.achievement-record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.achievement-record-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.achievement-status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.achievement-status-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.achievement-status-pill:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.achievement-status-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.achievement-status-pill strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-strong);
  font-size: 12px;
  line-height: 1;
}

.achievement-status-pill.active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.achievement-list-filter-inline {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0;
}

.achievement-list-filter-inline .field {
  gap: 6px;
}

.achievement-list-filter-inline .field label {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 850;
}

.achievement-list-filter-inline select,
.achievement-list-filter-inline input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
}

.achievement-inline-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.achievement-submit-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.achievement-linked-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text-soft);
}

.achievement-linked-strip strong {
  color: var(--text-strong);
}

.achievement-linked-compact {
  display: block;
  padding: 0;
  overflow: hidden;
}

.achievement-linked-compact summary {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.achievement-linked-compact summary::-webkit-details-marker {
  display: none;
}

.achievement-linked-compact summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.achievement-linked-compact summary span {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf7ef;
  color: #167a46;
  font-size: 12px;
  font-weight: 900;
}

.achievement-linked-compact summary em {
  min-width: 0;
  color: #94a3b8;
  font-style: normal;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-linked-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
  border-top: 1px solid #eef2f7;
}

.achievement-linked-list a {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #fbfdfc;
  color: #334155;
  text-decoration: none;
}

.achievement-linked-list strong,
.achievement-linked-list span,
.achievement-linked-list em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-linked-list strong {
  color: #0f172a;
  font-size: 13px;
}

.achievement-linked-list span,
.achievement-linked-list em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.achievement-form-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.achievement-register-select-card {
  padding: 20px;
}

.achievement-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.achievement-section-head.compact {
  margin-bottom: 12px;
}

.achievement-section-head h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.3;
}

.achievement-section-head p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
}

.achievement-register-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.achievement-register-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.achievement-register-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.achievement-register-card strong {
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 900;
}

.achievement-register-card em {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
  font-style: normal;
}

.achievement-register-icon,
.achievement-type-summary > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eaf7ef;
  color: var(--primary-dark);
}

.achievement-register-card.blue .achievement-register-icon,
.achievement-type-summary.patent > span { background: var(--blue-soft); color: #2456cc; }
.achievement-register-card.purple .achievement-register-icon,
.achievement-type-summary.software > span { background: var(--purple-soft); color: #6d28d9; }
.achievement-register-card.orange .achievement-register-icon,
.achievement-type-summary.contest > span { background: var(--orange-soft); color: #b36f10; }
.achievement-register-card.slate .achievement-register-icon,
.achievement-type-summary.other > span { background: #f1f5f9; color: #475569; }

.achievement-reg-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.achievement-compact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.achievement-type-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.achievement-type-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.achievement-type-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.achievement-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
}

.achievement-form-card {
  padding: 18px;
}

.achievement-form-section + .achievement-form-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.achievement-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.achievement-form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-form-grid.two-col .span-2 {
  grid-column: span 2;
}

.achievement-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.achievement-form-actions.compact {
  margin-top: 14px;
}

.achievement-form-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
}

.achievement-side-card {
  padding: 16px;
}

.achievement-type-summary {
  display: flex;
  gap: 12px;
  align-items: center;
}

.achievement-type-summary strong,
.achievement-side-tip strong {
  display: block;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 900;
}

.achievement-type-summary em,
.achievement-side-tip p {
  display: block;
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.65;
  font-style: normal;
}

.achievement-check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-check-list > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
}

.achievement-check-list strong {
  color: var(--text-strong);
  white-space: nowrap;
}

.achievement-author-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
}

.achievement-author-stat {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.achievement-author-stat span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.achievement-author-panel {
  display: none;
  margin-bottom: 12px;
}

.achievement-author-panel.open {
  display: block;
}

.achievement-author-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.achievement-author-drawer-mask.open {
  opacity: 1;
  pointer-events: auto;
}

.achievement-author-panel.achievement-author-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1201;
  display: flex;
  flex-direction: column;
  width: min(1120px, 96vw);
  height: 100vh;
  margin: 0;
  padding: 18px 22px;
  overflow: auto;
  border-left: 1px solid #e5edf0;
  background: #fff;
  box-shadow: -24px 0 48px rgba(15, 23, 42, .18);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .22s ease;
}

.achievement-author-panel.achievement-author-drawer.open {
  display: flex;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.achievement-author-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.achievement-author-drawer-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 950;
}

.achievement-author-drawer-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.achievement-author-drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.achievement-author-drawer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.achievement-author-drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

body.achievement-author-drawer-open {
  overflow: hidden;
}

.achievement-author-workbench {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-author-actions,
.achievement-author-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.achievement-author-tabs {
  margin-bottom: 10px;
}

.achievement-author-tabs button {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d8e6de;
  background: #fff;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.achievement-author-tabs button.is-active {
  background: #e9f8ef;
  border-color: #b9e5c9;
  color: var(--primary);
}

.achievement-author-pane {
  display: none;
}

.achievement-author-pane.is-active {
  display: block;
}

.author-candidate-list {
  display: block;
  margin-top: 8px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.author-candidate-head,
.author-candidate-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.05fr) 86px minmax(130px, .95fr) minmax(110px, .85fr) minmax(90px, .7fr) minmax(150px, 1fr) minmax(118px, .85fr) 98px;
  min-width: 980px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
}

.author-candidate-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.author-candidate-row {
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
}

.author-candidate-row:last-child {
  border-bottom: 0;
}

.author-candidate-row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-candidate-name strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
}

.author-candidate-name span {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.document-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.document-toolbar-card .hero-chip-row {
  margin: 0;
}

.document-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.document-sidebar {
  position: sticky;
  top: 88px;
}

.document-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.document-filter-card {
  padding: 16px;
}

.document-filter-panel {
  align-items: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.document-filter-panel .document-search-field {
  flex: 1 1 280px;
  min-width: 240px;
}

.document-filter-panel .btn {
  min-height: 42px;
}

.document-sidebar .card-header {
  margin-bottom: 10px;
}

.document-sidebar .student-folder-link {
  min-height: 38px;
}

.document-main .student-file-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

@media (max-width: 900px) {
  .document-toolbar-card {
    align-items: stretch;
    flex-direction: column;
  }

  .document-layout {
    grid-template-columns: 1fr;
  }

  .document-sidebar {
    position: static;
  }
}

.author-row.is-creator {
  background: #fbfffc;
}

.author-badge.creator {
  background: #ecfdf5;
  color: #15803d;
  margin-left: 6px;
}

.author-op-list button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.achievement-author-search-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.achievement-author-search-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
}

.author-results:not(.author-candidate-list) {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.author-result {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.achievement-author-table {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.author-head,
.author-row {
  display: grid;
  grid-template-columns: 54px minmax(150px, 1.1fr) minmax(138px, .82fr) 88px minmax(130px, .9fr) minmax(110px, .8fr) minmax(94px, .7fr) minmax(150px, .9fr) minmax(120px, .8fr) minmax(190px, 1.05fr) 96px 310px;
  min-width: 1490px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
}

.author-head {
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
  border-bottom: 1px solid var(--line);
}

.author-row {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.author-row:last-child {
  border-bottom: 0;
}

.author-name,
.author-org-line {
  color: var(--text-strong);
  font-weight: 850;
}
.author-cell-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.author-contribution-input {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.author-en-input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 0 8px;
  background: #f8fbff;
  color: #1e293b;
  font-size: 12px;
}

.author-en-input::placeholder {
  color: #94a3b8;
}


.author-meta,
.author-tag-meta {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.author-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf7ef;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.author-badge.muted {
  background: #f1f5f9;
  color: #64748b;
}

.author-op-list,
.author-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.author-op-list button,
.author-actions button,
.author-tag-head button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.author-op-list button.active,
.author-actions button.active,
.author-flag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.author-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.author-tag {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.author-tag-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.author-tag-title {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
}

.author-empty {
  padding: 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.author-empty.compact {
  padding: 0;
}

.align-right {
  text-align: right;
}

.achievement-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
}

.achievement-modal-mask.open {
  display: flex;
}

.achievement-modal-card {
  width: min(720px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.achievement-modal-mask.achievement-author-manual-drawer {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.achievement-modal-mask.achievement-author-manual-drawer .achievement-modal-card {
  width: min(560px, 92vw);
  height: 100vh;
  overflow: auto;
  border-radius: 22px 0 0 22px;
  box-shadow: -24px 0 48px rgba(15, 23, 42, .18);
}

.achievement-inline-review {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.achievement-inline-review form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.achievement-inline-review input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .achievement-status-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .achievement-status-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .achievement-register-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .achievement-form-layout {
    grid-template-columns: 1fr;
  }
  .achievement-form-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .achievement-status-tabs,
  .achievement-register-grid,
  .achievement-form-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .achievement-form-grid,
  .achievement-form-grid.two-col,
  .achievement-list-filter-inline,
  .achievement-author-search-row {
    grid-template-columns: 1fr;
  }
  .achievement-form-grid .span-12,
  .achievement-form-grid .span-9,
  .achievement-form-grid .span-8,
  .achievement-form-grid .span-6,
  .achievement-form-grid .span-5,
  .achievement-form-grid .span-4,
  .achievement-form-grid .span-3,
  .achievement-form-grid.two-col .span-2 {
    grid-column: span 1;
  }
  .author-op-list,
  .author-actions,
  .align-right {
    justify-content: flex-start;
    text-align: left;
  }
  .achievement-inline-review {
    min-width: 0;
  }
  .achievement-inline-review form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .achievement-status-tabs,
  .achievement-register-grid,
  .achievement-form-side {
    grid-template-columns: 1fr;
  }
  .achievement-section-head,
  .achievement-compact-toolbar,
  .achievement-record-head,
  .achievement-linked-strip {
    align-items: stretch;
    flex-direction: column;
  }
  .achievement-status-actions,
  .achievement-record-actions,
  .achievement-inline-filter-actions,
  .achievement-form-actions {
    justify-content: flex-start;
  }
}






/* ===== Paper detail redesign: one-screen workbench ===== */
.paper-detail-redesign {
  --pdr-line: #e5ece7;
  --pdr-soft: #f8fbf8;
  --pdr-green: #16a34a;
  --pdr-green-dark: #16834a;
  --pdr-blue: #2563eb;
  --pdr-orange: #f59e0b;
  --pdr-red: #dc2626;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.paper-detail-redesign .pdr-summary-grid,
.paper-detail-redesign .pdr-progress-card,
.paper-detail-redesign .pdr-work-card {
  background: #fff;
  border: 1px solid var(--pdr-line);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.paper-detail-redesign .pdr-progress-head,
.paper-detail-redesign .pdr-progress-actions,
.paper-detail-redesign .pdr-file-actions,
.paper-detail-redesign .pdr-submit-row,
.paper-detail-redesign .pdr-upload-toolbar,
.paper-detail-redesign .pdr-upload-toolbar form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.paper-detail-redesign .pdr-progress-head {
  justify-content: space-between;
}

.paper-detail-redesign .pdr-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--pdr-line);
  border-radius: 999px;
  background: #f8fbf8;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-status {
  background: #eff6ff;
  border-color: #d7e7ff;
  color: #2456cc;
}

.paper-detail-redesign .pdr-status.is-approved,
.paper-detail-redesign .pdr-status.is-accepted,
.paper-detail-redesign .pdr-status.is-published,
.paper-detail-redesign .pdr-status.is-archived,
.paper-detail-redesign .pdr-status.is-finalized,
.paper-detail-redesign .pdr-status.is-done {
  background: #eaf7ef;
  border-color: #c8ead2;
  color: var(--pdr-green-dark);
}

.paper-detail-redesign .pdr-status.is-rejected,
.paper-detail-redesign .pdr-status.is-rejected-ext {
  background: #fff0f0;
  border-color: #fecaca;
  color: #b91c1c;
}

.paper-detail-redesign .pdr-status.is-revision,
.paper-detail-redesign .pdr-status.is-major-rev,
.paper-detail-redesign .pdr-status.is-minor-rev {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #b45309;
}

.paper-detail-redesign .pdr-status.is-not-started {
  background: #f4f7f5;
  border-color: #e2e8e4;
  color: #94a3b8;
}

.paper-detail-redesign .pdr-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.paper-detail-redesign .pdr-summary-grid > div {
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #f8fbf8;
}

.paper-detail-redesign .pdr-summary-grid span,
.paper-detail-redesign .pdr-node-overview span,
.paper-detail-redesign .pdr-description-grid dt,
.paper-detail-redesign .pdr-modal-text span,
.paper-detail-redesign .pdr-modal-files > span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.paper-detail-redesign .pdr-summary-grid strong,
.paper-detail-redesign .pdr-node-overview strong {
  display: block;
  margin-top: 3px;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-detail-redesign .pdr-progress-card {
  padding: 10px;
}

.paper-detail-redesign .pdr-progress-head {
  margin-bottom: 6px;
}

.paper-detail-redesign .pdr-progress-head strong {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.paper-detail-redesign .pdr-progress-head strong span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.paper-detail-redesign .pdr-progress-actions {
  justify-content: flex-end;
}

.paper-detail-redesign .pdr-inline-form {
  margin: 0;
}

.paper-detail-redesign .pdr-progress-line {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding: 3px 2px 6px;
}

.paper-detail-redesign .pdr-progress-step {
  position: relative;
  min-width: 102px;
  flex: 1 0 102px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.paper-detail-redesign .pdr-progress-step::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 2px;
  background: #dce7df;
}

.paper-detail-redesign .pdr-progress-step:first-child::before {
  left: 50%;
}

.paper-detail-redesign .pdr-progress-step:last-child::before {
  right: 50%;
}

.paper-detail-redesign .pdr-progress-step.is-done::before {
  background: #bfe8cc;
}

.paper-detail-redesign .pdr-step-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  margin: 0 auto 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid #d5e0d7;
  background: #fff;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-progress-step.is-done .pdr-step-dot {
  background: var(--pdr-green);
  border-color: var(--pdr-green);
  color: #fff;
}

.paper-detail-redesign .pdr-progress-step.is-current .pdr-step-dot,
.paper-detail-redesign .pdr-progress-step.is-selected .pdr-step-dot {
  background: var(--pdr-blue);
  border-color: var(--pdr-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.paper-detail-redesign .pdr-progress-step.is-bad .pdr-step-dot {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.paper-detail-redesign .pdr-progress-step.is-warning .pdr-step-dot {
  background: #fff7ed;
  border-color: #fb923c;
  color: #c2410c;
}

.paper-detail-redesign .pdr-step-text strong,
.paper-detail-redesign .pdr-step-text em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-detail-redesign .pdr-step-text strong {
  color: var(--text-strong);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 950;
}

.paper-detail-redesign .pdr-step-text em {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.paper-detail-redesign .pdr-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.paper-detail-redesign .pdr-work-card {
  min-width: 0;
  overflow: hidden;
}

.paper-detail-redesign .pdr-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 10px 0;
  border-bottom: 1px solid #edf2ee;
  overflow-x: auto;
}

.paper-detail-redesign .pdr-tabs button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-tabs button.is-active {
  color: var(--pdr-green-dark);
  border-bottom-color: var(--pdr-green);
}

.paper-detail-redesign .pdr-tab-panel {
  display: none;
  padding: 10px 12px 12px;
}

.paper-detail-redesign .pdr-tab-panel.is-active {
  display: block;
}

.paper-detail-redesign .pdr-description-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 20px;
  margin: 0;
}

.paper-detail-redesign .pdr-description-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid #eef3ef;
}

.paper-detail-redesign .pdr-description-grid > div.wide {
  grid-column: 1 / -1;
}

.paper-detail-redesign .pdr-description-grid dd {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.paper-detail-redesign .pdr-description-grid a {
  color: var(--pdr-green-dark);
  font-weight: 900;
  text-decoration: none;
}

.paper-detail-redesign .pdr-description-grid a:hover {
  text-decoration: underline;
}

.paper-detail-redesign .pdr-node-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #edf2ee;
  border-radius: 13px;
  background: #f8fbf8;
}

.paper-detail-redesign .pdr-node-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.42fr);
  gap: 10px;
  align-items: start;
  margin-top: 8px;
}

.paper-detail-redesign .pdr-node-action-main,
.paper-detail-redesign .pdr-node-context-side {
  min-width: 0;
}

.paper-detail-redesign .pdr-node-action-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paper-detail-redesign .pdr-node-action-head,
.paper-detail-redesign .pdr-node-side-card {
  min-width: 0;
  border: 1px solid #e2ece5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.paper-detail-redesign .pdr-node-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.paper-detail-redesign .pdr-node-action-head span,
.paper-detail-redesign .pdr-node-side-note span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.paper-detail-redesign .pdr-node-action-head h3 {
  margin: 3px 0 4px;
  color: var(--text-strong);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 950;
  word-break: break-word;
}

.paper-detail-redesign .pdr-node-action-head p,
.paper-detail-redesign .pdr-node-side-note p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.paper-detail-redesign .pdr-node-action-state {
  flex: 0 0 auto;
}

.paper-detail-redesign .pdr-node-context-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paper-detail-redesign .pdr-node-side-card {
  padding: 10px;
}

.paper-detail-redesign .pdr-node-side-card .pdr-file-list {
  max-height: 220px;
}

.paper-detail-redesign .pdr-node-side-note {
  margin-bottom: 8px;
  padding: 8px 9px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #f8fbf8;
}

.paper-detail-redesign .pdr-node-side-note strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-side-log-list {
  display: grid;
  gap: 6px;
}

.paper-detail-redesign .pdr-side-log-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #edf2ee;
  border-radius: 11px;
  background: #f8fbf8;
  color: var(--text-soft);
  font-size: 12px;
}

.paper-detail-redesign .pdr-side-log-row strong,
.paper-detail-redesign .pdr-side-log-row span,
.paper-detail-redesign .pdr-side-log-row time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-side-log-row strong {
  color: var(--text-strong);
}

.paper-detail-redesign .pdr-upload-toolbar,
.paper-detail-redesign .pdr-form-panel,
.paper-detail-redesign .pdr-note {
  border: 1px solid #edf2ee;
  border-radius: 13px;
  background: #f8fbf8;
}

.paper-detail-redesign .pdr-node-overview > div {
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid #e5ece7;
}

.paper-detail-redesign .pdr-node-overview > div:first-child {
  padding-left: 0;
}

.paper-detail-redesign .pdr-node-overview > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.paper-detail-redesign .pdr-teacher-revision-alert {
  margin-top: 7px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.paper-detail-redesign .pdr-teacher-revision-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.paper-detail-redesign .pdr-teacher-revision-alert-head strong {
  display: block;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-teacher-revision-alert-head span,
.paper-detail-redesign .pdr-teacher-revision-item em,
.paper-detail-redesign .pdr-teacher-revision-item p {
  display: block;
  margin: 2px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  font-style: normal;
}

.paper-detail-redesign .pdr-teacher-revision-alert-head b {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-teacher-revision-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paper-detail-redesign .pdr-teacher-revision-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
}

.paper-detail-redesign .pdr-teacher-revision-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-node-material-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1.18fr);
  gap: 6px;
  align-items: start;
  margin-top: 6px;
}

.paper-detail-redesign .pdr-node-workbench .pdr-node-material-row {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.paper-detail-redesign .pdr-node-material-row.only-files {
  grid-template-columns: 1fr;
}

.paper-detail-redesign .pdr-version-guidance {
  margin-top: 7px;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fffb 100%);
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.08);
}

.paper-detail-redesign .pdr-version-guidance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.paper-detail-redesign .pdr-version-guidance-head {
  margin-bottom: 8px;
}

.paper-detail-redesign .pdr-version-guidance-head strong {
  display: block;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-version-guidance-head span,
.paper-detail-redesign .pdr-upload-copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.paper-detail-redesign .pdr-version-guidance-head b {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
}

.paper-detail-redesign .pdr-version-targets {
  display: grid;
  gap: 6px;
}

.paper-detail-redesign .pdr-version-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d9f5df;
  border-radius: 12px;
  background: #fff;
}

.paper-detail-redesign .pdr-version-target.is-returned {
  border-color: #bae6fd;
  background: #f8fcff;
}

.paper-detail-redesign .pdr-version-target-main {
  min-width: 0;
}

.paper-detail-redesign .pdr-version-target-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.paper-detail-redesign .pdr-version-target strong {
  display: inline-block;
  max-width: min(520px, 52vw);
  vertical-align: middle;
  color: var(--text-strong);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-version-target em {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
  font-style: normal;
}

.paper-detail-redesign .pdr-version-target .pdr-returned-line {
  color: #0369a1;
}

.paper-detail-redesign .pdr-returned-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.paper-detail-redesign .pdr-target-history {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.paper-detail-redesign .pdr-upload-toolbar {
  justify-content: space-between;
  min-height: 58px;
  padding: 7px 9px;
  background: #fbfdfb;
  border-color: #e2e8e4;
}

.paper-detail-redesign .pdr-upload-toolbar strong,
.paper-detail-redesign .pdr-mini-title,
.paper-detail-redesign .pdr-section-split h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-upload-toolbar form {
  flex: 1;
  justify-content: flex-end;
}

.paper-detail-redesign .pdr-upload-copy {
  min-width: 180px;
}

.paper-detail-redesign .pdr-upload-toolbar input[type="file"] {
  max-width: 360px;
  min-height: 31px;
  padding: 4px 7px;
  border: 1px solid #cfd9d2;
  border-radius: 10px;
  background: #fff;
}

.paper-detail-redesign .pdr-current-files {
  min-width: 0;
}

.paper-detail-redesign .pdr-mini-title {
  margin-bottom: 5px;
}

.paper-detail-redesign .pdr-file-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 148px;
  overflow: auto;
  padding-right: 2px;
}

.paper-detail-redesign .pdr-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #fff;
}

.paper-detail-redesign .pdr-file-thread {
  grid-template-columns: minmax(0, 1fr) auto;
}

.paper-detail-redesign .pdr-file-name {
  min-width: 0;
}

.paper-detail-redesign .pdr-file-name strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-detail-redesign .pdr-file-name span {
  display: block;
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 12px;
}

.paper-detail-redesign .pdr-file-actions form {
  margin: 0;
}

.paper-detail-redesign .pdr-vtag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eaf7ef;
  color: #15803d;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.paper-detail-redesign .pdr-vtag.teacher {
  background: #eff6ff;
  color: #1d4ed8;
}

.paper-detail-redesign .pdr-version-history {
  grid-column: 1 / -1;
  margin-top: 4px;
  border-top: 1px dashed #e2e8e4;
  padding-top: 4px;
}

.paper-detail-redesign .pdr-version-history summary {
  cursor: pointer;
  color: var(--pdr-green-dark);
  font-size: 12px;
  font-weight: 900;
}

.paper-detail-redesign .pdr-version-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 82px 84px 112px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 4px 0;
  color: var(--text-soft);
  font-size: 12px;
}

.paper-detail-redesign .pdr-version-row a,
.paper-detail-redesign .pdr-version-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-version-row a {
  color: var(--text-strong);
  font-weight: 900;
  text-decoration: none;
}

.paper-detail-redesign .pdr-version-row a:hover {
  color: var(--pdr-green-dark);
  text-decoration: underline;
}

.paper-detail-redesign .pdr-version-row em {
  font-style: normal;
}

.paper-detail-redesign .pdr-form-panel {
  margin-top: 7px;
  padding: 8px 10px;
  background: #fff;
}

.paper-detail-redesign .pdr-form-grid {
  gap: 7px;
}

.paper-detail-redesign .pdr-submit-ready-workbench,
.paper-detail-redesign .pdr-archive-workbench {
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(480px, 1.14fr);
  gap: 12px;
  align-items: start;
}

.paper-detail-redesign .pdr-submit-info-card,
.paper-detail-redesign .pdr-archive-meta,
.paper-detail-redesign .pdr-archive-materials,
.paper-detail-redesign .pdr-teacher-archive-audit {
  min-width: 0;
  border: 1px solid #e2ece5;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.paper-detail-redesign .pdr-submit-info-card,
.paper-detail-redesign .pdr-archive-meta {
  background: #fff;
}

.paper-detail-redesign .pdr-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #edf2ee;
}

.paper-detail-redesign .pdr-compact-head strong {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-compact-head span,
.paper-detail-redesign .pdr-field-hint {
  color: var(--text-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.paper-detail-redesign .pdr-submit-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.paper-detail-redesign .pdr-submit-info-grid .field.wide {
  grid-column: 1 / -1;
}

.paper-detail-redesign .pdr-submit-info-grid textarea {
  min-height: 58px;
  max-height: 84px;
}

.paper-detail-redesign .pdr-submit-ready-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 10px;
  align-items: start;
}

.paper-detail-redesign .pdr-author-verify {
  min-width: 0;
  border: 1px solid #dceee1;
  border-radius: 14px;
  background: #fbfefc;
  padding: 10px;
}

.paper-detail-redesign .pdr-archive-checklist {
  display: grid;
  gap: 7px;
}

.paper-detail-redesign .pdr-archive-checklist.teacher {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paper-detail-redesign .pdr-archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e5ece7;
  border-radius: 12px;
  background: #fff;
}

.paper-detail-redesign .pdr-archive-checklist.teacher .pdr-archive-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.paper-detail-redesign .pdr-archive-item.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.paper-detail-redesign .pdr-archive-item.is-missing {
  border-color: #fed7aa;
  background: #fff7ed;
}

.paper-detail-redesign .pdr-archive-item strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-archive-item span {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.paper-detail-redesign .pdr-archive-item input[type="file"] {
  width: 100%;
  min-height: 31px;
  padding: 4px 7px;
  border: 1px solid #cfd9d2;
  border-radius: 10px;
  background: #fff;
}

.paper-detail-redesign .pdr-archive-files {
  margin-top: 7px;
}

.paper-detail-redesign .pdr-teacher-archive-audit {
  margin-bottom: 8px;
  background: #fffaf0;
  border-color: #fed7aa;
}

.paper-detail-redesign .pdr-archive-log-highlight {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.paper-detail-redesign .pdr-archive-log-highlight > div {
  display: grid;
  grid-template-columns: 130px 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
}

.paper-detail-redesign .pdr-archive-log-highlight strong {
  color: #b45309;
}

.paper-detail-redesign .pdr-archive-log-highlight span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-detail-redesign .pdr-reviewer-snapshot {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.paper-detail-redesign .pdr-reviewer-snapshot.teacher {
  border-color: #fed7aa;
  background: #fff7ed;
}

.paper-detail-redesign .pdr-reviewer-snapshot p {
  margin: 6px 0 8px;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.55;
  max-height: 42px;
  overflow: hidden;
}

.paper-detail-redesign .pdr-reviewer-files .pdr-file-list {
  max-height: 120px;
}

.paper-detail-redesign .pdr-archive-workbench {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.paper-detail-redesign .pdr-archive-workbench .pdr-archive-meta,
.paper-detail-redesign .pdr-archive-workbench .pdr-archive-materials {
  padding: 10px;
}

.paper-detail-redesign .pdr-archive-workbench .pdr-submit-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.paper-detail-redesign .pdr-archive-workbench .pdr-submit-info-grid .wide {
  grid-column: 1 / -1;
}

.paper-detail-redesign .pdr-archive-workbench .pdr-archive-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paper-detail-redesign .pdr-node-preview-panel .pdr-node-preview[hidden] {
  display: none;
}

.paper-detail-redesign .pdr-author-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.paper-detail-redesign .pdr-author-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.paper-detail-redesign .pdr-author-head strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-author-head span {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.paper-detail-redesign .achievement-author-shell.compact {
  padding: 8px;
  border-radius: 13px;
  background: #fff;
}

.paper-detail-redesign .achievement-author-shell.compact .achievement-author-stat {
  margin-bottom: 6px;
}

.paper-detail-redesign .achievement-author-shell.compact .achievement-author-stat span {
  min-height: 24px;
}

.paper-detail-redesign .achievement-author-shell.compact .achievement-author-search-row {
  gap: 6px;
}

.paper-detail-redesign .achievement-author-shell.compact .achievement-author-search-row input {
  min-height: 32px;
}

.paper-detail-redesign .achievement-author-shell.compact .author-head,
.paper-detail-redesign .achievement-author-shell.compact .author-row {
  grid-template-columns: 46px minmax(140px, 1.05fr) minmax(130px, .82fr) 82px minmax(120px, .85fr) minmax(100px, .75fr) minmax(84px, .7fr) minmax(130px, .85fr) minmax(110px, .75fr) minmax(170px, 1fr) 90px 300px;
  min-width: 1410px;
  gap: 6px;
  padding: 7px 8px;
}

.paper-detail-redesign .achievement-author-shell.compact .author-row {
  font-size: 12px;
}

.doc-archive-browser {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-archive-folder {
  overflow: hidden;
  border: 1px solid #b7d8c1;
  border-radius: 16px;
  background: #f6fbf7;
  box-shadow: 0 10px 24px rgba(22, 101, 52, .08);
}

.doc-archive-folder > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  background: linear-gradient(135deg, #dff3e6 0%, #cbe8d5 100%);
}

.doc-archive-folder > summary::-webkit-details-marker {
  display: none;
}

.doc-archive-title {
  min-width: 0;
}

.doc-archive-title strong {
  display: block;
  overflow: hidden;
  color: #064e3b;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-archive-title span,
.doc-archive-stage-head span,
.doc-archive-file em {
  color: var(--text-soft);
  font-size: 12px;
}

.doc-archive-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #0f7a45;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.doc-archive-stage {
  margin: 10px 12px 12px;
  padding: 10px 12px;
  border: 1px solid #dceee1;
  border-radius: 12px;
  background: #fff;
}

.doc-archive-stage-head,
.doc-archive-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.doc-archive-stage-head {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f0f7f2;
}

.doc-archive-file {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #fff;
}

.doc-archive-file-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-archive-file-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-archive-version-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.doc-archive-version-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eefaf2;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.doc-archive-version-chip .role {
  color: #64748b;
  font-weight: 700;
}

.doc-archive-version-chip.final {
  background: #166534;
  color: #fff;
}

.doc-archive-version-chip.final .role {
  color: #fff;
}

.doc-archive-version-chip b {
  font-size: 11px;
}

.paper-detail-redesign .field label {
  margin-bottom: 4px;
  font-size: 12px;
}

.paper-detail-redesign .field input,
.paper-detail-redesign .field select {
  min-height: 34px;
}

.paper-detail-redesign .field textarea {
  min-height: 64px;
  max-height: 96px;
  resize: vertical;
}

.paper-detail-redesign .pdr-submit-row {
  justify-content: flex-start;
  margin-top: 7px;
}

.paper-detail-redesign .pdr-note {
  margin-top: 7px;
  padding: 8px 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.paper-detail-redesign .pdr-section-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.paper-detail-redesign .pdr-section-split h3 {
  margin-bottom: 6px;
}

.paper-detail-redesign .pdr-stage-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paper-detail-redesign .pdr-stage-files {
  padding: 8px;
  border: 1px solid #edf2ee;
  border-radius: 13px;
  background: #f8fbf8;
}

.paper-detail-redesign .pdr-stage-files > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.paper-detail-redesign .pdr-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paper-detail-redesign .pdr-log-row {
  display: grid;
  grid-template-columns: 140px 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #f8fbf8;
  font-size: 13px;
}

.paper-detail-redesign .pdr-log-row time {
  color: var(--text-soft);
}

.paper-detail-redesign .pdr-log-row strong {
  color: var(--text-strong);
}

.paper-detail-redesign .pdr-log-row span {
  min-width: 0;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-detail-redesign .pdr-empty {
  min-height: 72px;
  padding: 12px 10px;
  border: 1px dashed #d7e2da;
  border-radius: 13px;
  background: #fff;
  color: #94a3b8;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
}

.paper-detail-redesign .pdr-empty.compact {
  min-height: 40px;
  padding: 8px;
}

.pdr-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.pdr-modal.is-open {
  display: block;
}

.pdr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.pdr-modal-panel {
  position: relative;
  margin: 5vh auto 0;
  width: min(1080px, calc(100vw - 32px));
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.32);
}

.pdr-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf2ee;
  background: #fbfdfb;
}

.pdr-modal-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 950;
}

.pdr-modal-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  max-width: 760px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdr-modal-body {
  padding: 14px 16px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.pdr-modal-stage {
  padding: 12px;
  border: 1px solid #e5ece7;
  border-radius: 15px;
  background: #f8fbf8;
}

.pdr-modal-stage.is-current {
  border-color: #fed7aa;
  background: #fff7ed;
}

.pdr-modal-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pdr-modal-stage-head strong {
  display: block;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 950;
}

.pdr-modal-stage-head span,
.pdr-modal-files > span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
}

.pdr-modal-text {
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid #e5ece7;
  border-radius: 12px;
  background: #fff;
}

.pdr-modal-text.comment {
  background: #fffaf0;
  border-color: #f7e1b8;
}

.pdr-modal-text p {
  margin: 4px 0 0;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.pdr-modal-files {
  margin-top: 9px;
}

.pdr-modal-files .pdr-file-list {
  margin-top: 6px;
  max-height: none;
}

.pdr-revision-panel {
  max-width: 560px;
}

.pdr-revision-form {
  padding: 12px 14px 14px;
}

.pdr-revision-form .field + .field {
  margin-top: 10px;
}

.pdr-revision-form input[type="file"],
.pdr-revision-form textarea {
  width: 100%;
}

.pdr-revision-form textarea {
  min-height: 72px;
  resize: vertical;
}

.pdr-modal-open {
  overflow: hidden;
}

@media (max-width: 1480px) {
  .paper-detail-redesign .pdr-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .paper-detail-redesign .pdr-node-workbench,
  .paper-detail-redesign .pdr-section-split,
  .paper-detail-redesign .pdr-node-material-row,
  .paper-detail-redesign .pdr-submit-ready-workbench,
  .paper-detail-redesign .pdr-archive-workbench,
  .paper-detail-redesign .pdr-submit-ready-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .paper-detail-redesign .pdr-progress-head,
  .paper-detail-redesign .pdr-upload-toolbar,
  .paper-detail-redesign .pdr-node-action-head,
  .paper-detail-redesign .pdr-teacher-revision-alert-head,
  .paper-detail-redesign .pdr-teacher-revision-item,
  .paper-detail-redesign .pdr-version-guidance-head,
  .paper-detail-redesign .pdr-version-target,
  .pdr-modal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .paper-detail-redesign .pdr-summary-grid,
  .paper-detail-redesign .pdr-node-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-detail-redesign .pdr-node-overview > div {
    padding: 5px 8px;
    border-right: 0;
  }

  .paper-detail-redesign .pdr-description-grid,
  .paper-detail-redesign .pdr-submit-info-grid,
  .paper-detail-redesign .pdr-archive-checklist.teacher,
  .paper-detail-redesign .pdr-archive-item,
  .paper-detail-redesign .pdr-archive-log-highlight > div {
    grid-template-columns: 1fr;
  }

  .paper-detail-redesign .pdr-description-grid > div.wide {
    grid-column: auto;
  }

  .paper-detail-redesign .pdr-log-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .paper-detail-redesign .pdr-side-log-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 640px) {
  .paper-detail-redesign .pdr-summary-grid,
  .paper-detail-redesign .pdr-node-overview {
    grid-template-columns: 1fr;
  }

  .paper-detail-redesign .pdr-file-row {
    grid-template-columns: 1fr;
  }

  .paper-detail-redesign .pdr-version-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .paper-detail-redesign .pdr-version-row span,
  .paper-detail-redesign .pdr-version-row em {
    display: none;
  }

  .paper-detail-redesign .pdr-file-actions {
    justify-content: flex-start;
  }

  .paper-detail-redesign .pdr-description-grid > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .pdr-modal-panel {
    width: calc(100vw - 20px);
    margin-top: 3vh;
    max-height: 92vh;
  }
}


/* Approval center Plan A: dense table workbench -------------------------- */
.approval-center-page {
  width: 100%;
  min-height: calc(100vh - 96px);
  padding: 0;
  background: #f5f7fa;
}

.approval-shell-v2 {
  width: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
}

.approval-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.approval-header-copy {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.approval-eyebrow {
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #eaf7ef;
  color: #16834a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.approval-header-copy strong {
  font-size: 16px;
  line-height: 1;
  color: #111827;
}

.approval-header-copy small {
  color: #6b7280;
  font-size: 12px;
}

.approval-top-actions,
.approval-bulk-left,
.approval-pagination,
.approval-page-size,
.approval-actions-cell,
.approval-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.approval-action,
.approval-filter-submit,
.approval-filter-reset {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid #d8e1dc;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: .16s ease;
}

.approval-action:hover,
.approval-filter-reset:hover {
  border-color: #bcd9c7;
  color: #16834a;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .05);
}

.approval-action.primary,
.approval-filter-submit {
  border-color: #16834a;
  background: #16834a;
  color: #fff;
}

.approval-action.small {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.approval-action:disabled,
.approval-action.disabled,
.approval-page-btn.disabled {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}

.approval-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.approval-kpi-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  transition: .16s ease;
}

.approval-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
}

.approval-kpi-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 900;
  color: #16834a;
  background: #eaf7ef;
}

.approval-kpi-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.approval-kpi-copy em,
.approval-kpi-copy small {
  font-style: normal;
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.approval-kpi-copy strong {
  color: #111827;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
}

.approval-kpi-card.tone-blue .approval-kpi-icon { background: #eaf2ff; color: #2563eb; }
.approval-kpi-card.tone-orange .approval-kpi-icon { background: #fff4df; color: #d97706; }
.approval-kpi-card.tone-purple .approval-kpi-icon { background: #f3edff; color: #7c3aed; }
.approval-kpi-card.tone-red .approval-kpi-icon { background: #fff1f2; color: #dc2626; }

.approval-filter-card {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.approval-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 120px 120px 120px minmax(250px, .9fr) 132px 72px 78px;
  gap: 9px;
  align-items: center;
}

.approval-filter-toolbar input,
.approval-filter-toolbar select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid #d8e1dc;
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  font-size: 13px;
  color: #111827;
  outline: none;
}

.approval-filter-toolbar input:focus,
.approval-filter-toolbar select:focus {
  border-color: #16834a;
  box-shadow: 0 0 0 3px rgba(22, 131, 74, .10);
}

.approval-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.approval-date-range span {
  color: #94a3b8;
  font-size: 12px;
}

.approval-filter-reset,
.approval-filter-submit {
  width: 100%;
}

.approval-type-tabs {
  min-height: 38px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0 2px;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
}

.approval-tab {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 10px 10px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.approval-tab span {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 11px;
}

.approval-tab.active {
  background: #eaf7ef;
  color: #16834a;
}

.approval-tab.active span {
  background: #16834a;
  color: #fff;
}

.approval-table-card-v2 {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.approval-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.approval-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.approval-table th,
.approval-table td {
  padding: 0 10px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}

.approval-table th {
  height: 40px;
  background: #f8fafc;
  color: #374151;
  font-size: 12px;
  font-weight: 900;
}

.approval-table td {
  height: 50px;
  color: #111827;
  font-size: 13px;
}

.approval-table tbody tr:hover {
  background: #fbfdfb;
}

.approval-table tr.is-timeout {
  background: #fffaf1;
}

.approval-table .col-check { width: 44px; text-align: center; }
.approval-table .col-title { width: 25%; }
.approval-table .col-actions { width: 164px; }

.approval-title-cell a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
  font-weight: 900;
  text-decoration: none;
}

.approval-title-cell a:hover { color: #16834a; }

.approval-title-cell small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-node {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-type-chip,
.approval-status-chip,
.approval-inline-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.approval-type-chip.tone-green { background: #eaf7ef; color: #16834a; }
.approval-type-chip.tone-blue { background: #eaf2ff; color: #2563eb; }
.approval-type-chip.tone-teal { background: #e8fbf7; color: #0f766e; }
.approval-type-chip.tone-orange { background: #fff4df; color: #d97706; }
.approval-type-chip.tone-purple { background: #f3edff; color: #7c3aed; }
.approval-type-chip.tone-slate { background: #eef2f7; color: #475569; }

.approval-status-chip.tone-warning { background: #fff4df; color: #b45309; }
.approval-status-chip.tone-success { background: #eaf7ef; color: #16834a; }
.approval-status-chip.tone-danger,
.approval-status-chip.tone-danger-soft { background: #fff1f2; color: #dc2626; }
.approval-status-chip.tone-orange { background: #fff7ed; color: #ea580c; }

.approval-inline-alert {
  min-height: 20px;
  margin-left: 6px;
  background: #fff1f2;
  color: #dc2626;
  font-size: 11px;
}

.approval-code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.approval-link.primary { color: #16834a; }
.approval-link.danger,
.danger-text { color: #dc2626; }
.approval-link.muted,
.approval-table .muted { color: #64748b; }
.approval-link:hover { text-decoration: underline; }
.inline-action-form.compact { display: inline-flex; margin: 0; }
.nowrap { white-space: nowrap; }

.approval-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #64748b;
}

.approval-empty-state strong {
  color: #111827;
  font-size: 16px;
}

.approval-empty-state div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.approval-bottom-bar {
  min-height: 40px;
  justify-content: space-between;
  padding: 0 2px 2px;
  color: #64748b;
  font-size: 13px;
}

.approval-page-size a,
.approval-page-btn {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #d8e1dc;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.approval-page-size a.active,
.approval-page-btn.active {
  border-color: #16834a;
  background: #16834a;
  color: #fff;
}

.approval-batch-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .24);
}

.approval-batch-modal.open { display: flex; }

.approval-batch-dialog {
  width: min(620px, 100%);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.approval-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.approval-batch-head strong {
  color: #111827;
  font-size: 18px;
}

.approval-batch-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}

.approval-batch-dialog p {
  margin: 8px 0 14px;
  color: #64748b;
  font-size: 13px;
}

.approval-batch-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.approval-batch-list a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  text-decoration: none;
}

.approval-batch-list b {
  color: #16834a;
  font-size: 12px;
}

.approval-batch-list span {
  color: #111827;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-batch-list em {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.approval-batch-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1599px) {
  .approval-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .approval-filter-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(3, 120px) minmax(250px, 1fr); }
  .approval-filter-submit,
  .approval-filter-reset { width: auto; }
}

@media (max-width: 1280px) {
  .approval-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-header-row,
  .approval-bottom-bar { align-items: stretch; flex-direction: column; }
  .approval-filter-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-table { min-width: 960px; }
  .approval-table th:nth-child(5),
  .approval-table td:nth-child(5),
  .approval-table th:nth-child(7),
  .approval-table td:nth-child(7) {
    display: none;
  }
}

@media (max-width: 720px) {
  .approval-kpi-grid,
  .approval-filter-toolbar { grid-template-columns: 1fr; }
  .approval-date-range { grid-template-columns: 1fr; }
  .approval-date-range span { display: none; }
  .approval-kpi-card { min-height: 78px; }
  .approval-header-copy { align-items: flex-start; flex-direction: column; }
  .approval-table { min-width: 820px; }
  .approval-table th:nth-child(6),
  .approval-table td:nth-child(6),
  .approval-table th:nth-child(10),
  .approval-table td:nth-child(10) {
    display: none;
  }
}

/* Teacher dashboard redesign v2: task-first compact workbench ------------- */
.twb-redesign-v2 {
  width: 100%;
  min-height: calc(100vh - 96px);
  background: #f5f7fa;
}

.twb-redesign-v2 .teacher-workbench-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.twb-redesign-v2 .teacher-workbench-header {
  min-height: 40px;
  align-items: center;
  padding: 0 2px;
}

.twb-redesign-v2 .twb-greeting-block {
  min-width: 0;
}

.twb-redesign-v2 .twb-hello {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
  color: #111827;
  max-width: 100%;
}

.twb-redesign-v2 .twb-date {
  margin-top: 3px;
  font-size: 12px;
  color: #6b7280;
}

.twb-svg-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.twb-redesign-v2 .teacher-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.twb-redesign-v2 .teacher-kpi-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  text-decoration: none;
  color: inherit;
  transition: .16s ease;
}

.twb-redesign-v2 .teacher-kpi-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
}

.twb-redesign-v2 .twb-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eaf7ef;
  color: #16834a;
}

.twb-redesign-v2 .tone-orange .twb-kpi-icon { background: #fff7ed; color: #f59e0b; }
.twb-redesign-v2 .tone-blue .twb-kpi-icon { background: #eff6ff; color: #2563eb; }
.twb-redesign-v2 .tone-green .twb-kpi-icon { background: #eaf7ef; color: #16834a; }
.twb-redesign-v2 .tone-teal .twb-kpi-icon { background: #ecfeff; color: #0891b2; }
.twb-redesign-v2 .tone-purple .twb-kpi-icon { background: #f5f3ff; color: #7c3aed; }
.twb-redesign-v2 .tone-violet .twb-kpi-icon { background: #f3e8ff; color: #6d28d9; }

.twb-redesign-v2 .twb-kpi-copy span,
.twb-redesign-v2 .twb-kpi-copy small,
.twb-redesign-v2 .twb-shortcut strong,
.twb-redesign-v2 .twb-card-head a,
.twb-redesign-v2 .twb-table-row strong,
.twb-redesign-v2 .twb-table-row span,
.twb-redesign-v2 .twb-notice-row strong,
.twb-redesign-v2 .twb-schedule-body strong,
.twb-redesign-v2 .twb-schedule-body small,
.twb-redesign-v2 .twb-bar-label em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twb-redesign-v2 .twb-kpi-copy span {
  display: block;
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
}

.twb-redesign-v2 .twb-kpi-copy strong {
  display: block;
  margin-top: 1px;
  color: #111827;
  font-size: 25px;
  line-height: 1.08;
  font-weight: 950;
  white-space: nowrap;
}

.twb-redesign-v2 .twb-kpi-copy strong em {
  margin-left: 4px;
  color: #374151;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.twb-redesign-v2 .twb-kpi-copy small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 11px;
}

.twb-redesign-v2 .twb-two-column-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, .82fr);
  gap: 12px;
  align-items: start;
}

.twb-redesign-v2 .teacher-left-stack,
.twb-redesign-v2 .teacher-right-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.twb-redesign-v2 .teacher-card {
  min-width: 0;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
}

.twb-redesign-v2 .twb-card-head {
  min-height: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.twb-redesign-v2 .twb-card-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #111827;
  font-size: 15px;
  font-weight: 950;
}

.twb-redesign-v2 .twb-card-title .twb-svg-icon {
  width: 18px;
  height: 18px;
  color: #16834a;
}

.twb-redesign-v2 .twb-card-head a {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.twb-redesign-v2 .twb-card-head a:hover { color: #16834a; }

.twb-research-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, .72fr);
  gap: 14px;
  align-items: stretch;
}

.twb-subtitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #374151;
  font-size: 12px;
  font-weight: 950;
}

.twb-subtitle span {
  color: #94a3b8;
  font-weight: 800;
}

.twb-research-bars {
  min-width: 0;
}

.twb-bar-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(110px, .9fr) minmax(120px, 1.5fr) 38px;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.twb-bar-row + .twb-bar-row {
  border-top: 1px solid #f1f5f9;
}

.twb-bar-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.twb-bar-label .twb-svg-icon {
  width: 17px;
  height: 17px;
  color: #16834a;
}

.twb-bar-label em {
  min-width: 0;
  font-style: normal;
}

.twb-bar-row b {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.twb-bar-row b i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.twb-bar-row strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.twb-alert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.twb-alert-card {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: #f8fafc;
  text-decoration: none;
}

.twb-alert-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.twb-alert-card strong {
  color: #111827;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 950;
}

.twb-alert-card strong em {
  margin-left: 3px;
  font-size: 11px;
  font-style: normal;
  color: #64748b;
}

.twb-alert-card.tone-green { background: #f0fdf4; border-color: #dcfce7; }
.twb-alert-card.tone-blue { background: #eff6ff; border-color: #dbeafe; }
.twb-alert-card.tone-orange { background: #fff7ed; border-color: #ffedd5; }
.twb-alert-card.tone-red { background: #fff1f2; border-color: #ffe4e6; }

.twb-redesign-v2 .twb-table-head,
.twb-redesign-v2 .twb-table-row {
  display: grid;
  gap: 8px;
  align-items: center;
}

.twb-redesign-v2 .twb-table-head {
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  background: #f8fafc;
  color: #6b7280;
  font-size: 11px;
  font-weight: 950;
}

.twb-redesign-v2 .twb-table-row {
  min-height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  font-size: 12px;
  text-decoration: none;
}

.twb-redesign-v2 .twb-table-row:last-child { border-bottom: 0; }
.twb-redesign-v2 .twb-table-row:hover { background: #fbfdfb; }
.twb-redesign-v2 .twb-task-table .twb-table-head,
.twb-redesign-v2 .twb-task-table .twb-table-row {
  grid-template-columns: minmax(220px, 1.7fr) 78px minmax(120px, 1fr) 82px 68px;
}

.twb-redesign-v2 .twb-status {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.twb-redesign-v2 .twb-status.success,
.twb-redesign-v2 .twb-status.green { background: #dcfce7; color: #15803d; }
.twb-redesign-v2 .twb-status.warning { background: #fff7ed; color: #c2410c; }
.twb-redesign-v2 .twb-status.info,
.twb-redesign-v2 .twb-status.blue { background: #eff6ff; color: #2563eb; }
.twb-redesign-v2 .twb-status.danger { background: #fee2e2; color: #b91c1c; }
.twb-redesign-v2 .twb-status.neutral { background: #f1f5f9; color: #475569; }

.twb-schedule-list,
.twb-redesign-v2 .twb-notice-list {
  display: grid;
  gap: 7px;
}

.twb-schedule-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #eef2f7;
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.twb-schedule-row:hover {
  border-color: #dbeafe;
  background: #fbfdff;
}

.twb-schedule-date {
  display: grid;
  place-items: center;
  align-content: center;
  height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

.twb-schedule-date strong {
  color: #111827;
  font-size: 14px;
  line-height: 1;
}

.twb-schedule-date span {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.twb-schedule-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.twb-schedule-body div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.twb-schedule-body time {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.twb-schedule-body strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

.twb-schedule-body small {
  color: #64748b;
  font-size: 11px;
}

.twb-redesign-v2 .twb-notice-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
}

.twb-redesign-v2 .twb-notice-row:last-child { border-bottom: 0; }
.twb-redesign-v2 .twb-notice-row span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}
.twb-redesign-v2 .twb-notice-row time {
  text-align: right;
  color: #64748b;
  font-size: 11px;
}

.twb-redesign-v2 .twb-fund-box {
  display: grid;
  gap: 11px;
}

.twb-redesign-v2 .twb-fund-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dceee3;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbf8, #eefaf3);
}

.twb-redesign-v2 .twb-fund-main div + div {
  border-left: 1px solid #d7e8de;
  padding-left: 10px;
}

.twb-redesign-v2 .twb-fund-main span,
.twb-redesign-v2 .twb-fund-meta {
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
}

.twb-redesign-v2 .twb-fund-main strong {
  display: inline-block;
  margin-top: 4px;
  max-width: 100%;
  color: #111827;
  font-size: 21px;
  line-height: 1;
  font-weight: 950;
}

.twb-redesign-v2 .twb-fund-main em {
  margin-left: 3px;
  color: #374151;
  font-size: 11px;
  font-style: normal;
}

.twb-redesign-v2 .twb-fund-progress div {
  display: flex;
  justify-content: space-between;
  color: #374151;
  font-size: 12px;
  font-weight: 950;
}

.twb-redesign-v2 .twb-fund-progress b {
  display: block;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.twb-redesign-v2 .twb-fund-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16834a;
}

.twb-redesign-v2 .teacher-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.twb-redesign-v2 .twb-shortcut {
  height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid #edf2ee;
  border-radius: 14px;
  background: #fbfcfb;
  color: #111827;
  text-decoration: none;
  transition: .16s ease;
}

.twb-redesign-v2 .twb-shortcut:hover {
  transform: translateY(-1px);
  border-color: #d6e9dd;
  background: #f7fcf9;
}

.twb-redesign-v2 .twb-shortcut span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eaf7ef;
  color: #16834a;
}

.twb-redesign-v2 .twb-shortcut .twb-svg-icon {
  width: 18px;
  height: 18px;
}

.twb-redesign-v2 .twb-shortcut strong {
  max-width: 100%;
  padding: 0 4px;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.twb-redesign-v2 .twb-empty.compact {
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px dashed #d9e5dd;
  border-radius: 14px;
  background: #fbfdfb;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.twb-redesign-v2 .schedule-empty a {
  color: #16834a;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1599px) {
  .twb-redesign-v2 .teacher-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .twb-redesign-v2 .twb-two-column-main { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .88fr); }
}

@media (max-width: 1279px) {
  .twb-redesign-v2 .teacher-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twb-redesign-v2 .twb-two-column-main,
  .twb-research-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .twb-redesign-v2 .teacher-kpi-grid,
  .twb-redesign-v2 .teacher-shortcut-grid,
  .twb-alert-grid,
  .twb-redesign-v2 .twb-fund-main { grid-template-columns: 1fr; }
  .twb-redesign-v2 .twb-fund-main div + div { border-left: 0; border-top: 1px solid #d7e8de; padding-left: 0; padding-top: 10px; }
  .twb-redesign-v2 .twb-task-table .twb-table-head { display: none; }
  .twb-redesign-v2 .twb-task-table .twb-table-row { grid-template-columns: 1fr; height: auto; padding: 9px 8px; }
  .twb-bar-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .twb-bar-row b { grid-column: 1 / -1; }
}

/* 教师首页工作台：按截图收敛后的高密度一屏布局 */
.twb-screenshot-v3 {
  --twb-bg: #f5f7fa;
  --twb-card: #ffffff;
  --twb-line: #e6ebf0;
  --twb-text: #111827;
  --twb-muted: #6b7280;
  --twb-green: #16834a;
  --twb-blue: #2563eb;
  background: var(--twb-bg);
}

.twb-screenshot-v3 .teacher-workbench-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.twb-screenshot-v3 .twb-svg-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.twb-screenshot-v3 .twb-screenshot-greeting {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--twb-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.twb-screenshot-v3 .twb-hello {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.twb-screenshot-v3 .twb-date {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.twb-screenshot-v3 .twb-greeting-note {
  min-width: 230px;
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.twb-screenshot-v3 .twb-greeting-note span {
  color: var(--twb-green);
  font-size: 13px;
  font-weight: 900;
}

.twb-screenshot-v3 .teacher-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.twb-screenshot-v3 .teacher-kpi-card {
  min-width: 0;
  height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--twb-line);
  border-radius: 16px;
  background: #fff;
  color: var(--twb-text);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.twb-screenshot-v3 .teacher-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cfe1d6;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.twb-screenshot-v3 .twb-kpi-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  border-radius: 15px;
  background: #eaf7ef;
  color: var(--twb-green);
}

.twb-screenshot-v3 .tone-orange .twb-kpi-icon { background: #fff7ed; color: #f59e0b; }
.twb-screenshot-v3 .tone-blue .twb-kpi-icon { background: #eff6ff; color: #2563eb; }
.twb-screenshot-v3 .tone-green .twb-kpi-icon { background: #eaf7ef; color: #16834a; }
.twb-screenshot-v3 .tone-teal .twb-kpi-icon { background: #ecfeff; color: #0891b2; }
.twb-screenshot-v3 .tone-purple .twb-kpi-icon { background: #f5f3ff; color: #7c3aed; }
.twb-screenshot-v3 .tone-violet .twb-kpi-icon { background: #f3e8ff; color: #6d28d9; }

.twb-screenshot-v3 .twb-kpi-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.twb-screenshot-v3 .twb-kpi-copy span,
.twb-screenshot-v3 .twb-kpi-copy small,
.twb-screenshot-v3 .twb-card-head a,
.twb-screenshot-v3 .twb-research-legend span,
.twb-screenshot-v3 .twb-agenda-main strong,
.twb-screenshot-v3 .twb-agenda-main small,
.twb-screenshot-v3 .twb-notice-row strong,
.twb-screenshot-v3 .twb-task-row strong,
.twb-screenshot-v3 .twb-task-row span,
.twb-screenshot-v3 .twb-shortcut strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twb-screenshot-v3 .twb-kpi-copy span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.twb-screenshot-v3 .twb-kpi-copy strong {
  color: #0f172a;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.08;
}

.twb-screenshot-v3 .twb-kpi-copy strong em {
  margin-left: 3px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.twb-screenshot-v3 .twb-kpi-copy small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.twb-screenshot-v3 .twb-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.twb-screenshot-v3 .twb-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.twb-screenshot-v3 .teacher-card {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--twb-line);
  border-radius: 16px;
  background: var(--twb-card);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.twb-screenshot-v3 .twb-overview-grid .teacher-card {
  height: 302px;
}

.twb-screenshot-v3 .twb-bottom-grid .teacher-card {
  height: 250px;
}

.twb-screenshot-v3 .twb-card-head {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.twb-screenshot-v3 .twb-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.twb-screenshot-v3 .twb-card-title .twb-svg-icon {
  width: 18px;
  height: 18px;
  color: var(--twb-green);
}

.twb-screenshot-v3 .twb-card-head a {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.twb-screenshot-v3 .twb-card-head a:hover {
  color: var(--twb-green);
}

.twb-screenshot-v3 .twb-research-body {
  display: grid;
  grid-template-columns: 146px minmax(150px, 1fr) 128px;
  gap: 12px;
  align-items: stretch;
  height: calc(100% - 40px);
}

.twb-screenshot-v3 .twb-research-left {
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 2px 12px 6px 0;
  border-right: 1px solid #eef2f7;
}

.twb-screenshot-v3 .twb-research-left p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.twb-screenshot-v3 .twb-research-middle,
.twb-screenshot-v3 .twb-research-status {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr);
  gap: 8px;
  align-content: stretch;
}

.twb-screenshot-v3 .twb-research-middle {
  padding-right: 12px;
  border-right: 1px solid #eef2f7;
}

.twb-screenshot-v3 .twb-research-subhead {
  display: flex;
  align-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .01em;
}

.twb-screenshot-v3 .twb-research-donut {
  width: 126px;
  height: 126px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .03);
}

.twb-screenshot-v3 .twb-research-donut::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #eef2f7;
}

.twb-screenshot-v3 .twb-research-donut div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.twb-screenshot-v3 .twb-research-donut span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.twb-screenshot-v3 .twb-research-donut strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.twb-screenshot-v3 .twb-research-legend {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 4px;
  align-content: start;
  padding-top: 0;
}

.twb-screenshot-v3 .twb-research-legend a {
  min-width: 0;
  height: 24px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  color: #334155;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.twb-screenshot-v3 .twb-research-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.twb-screenshot-v3 .twb-research-legend b {
  justify-self: end;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.twb-screenshot-v3 .twb-project-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-self: stretch;
}

.twb-screenshot-v3 .twb-project-mini {
  min-width: 0;
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #edf2f7;
  border-radius: 11px;
  background: #f8fafc;
  color: #111827;
  text-decoration: none;
}

.twb-screenshot-v3 .twb-project-mini span {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twb-screenshot-v3 .twb-project-mini strong {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.twb-screenshot-v3 .twb-project-mini em {
  margin-left: 2px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.twb-screenshot-v3 .twb-project-mini.tone-green { background: #f0fdf4; border-color: #dcfce7; }
.twb-screenshot-v3 .twb-project-mini.tone-blue { background: #eff6ff; border-color: #dbeafe; }
.twb-screenshot-v3 .twb-project-mini.tone-red { background: #fef2f2; border-color: #fee2e2; }
.twb-screenshot-v3 .twb-project-mini.tone-orange { background: #fff7ed; border-color: #ffedd5; }

.twb-screenshot-v3 .twb-agenda-list,
.twb-screenshot-v3 .twb-notice-list,
.twb-screenshot-v3 .twb-task-list {
  display: grid;
  gap: 8px;
}

.twb-screenshot-v3 .twb-agenda-row {
  min-width: 0;
  height: 43px;
  display: grid;
  grid-template-columns: 54px 1px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #fbfcfd;
  color: #111827;
  text-decoration: none;
}

.twb-screenshot-v3 .twb-agenda-date {
  display: grid;
  justify-items: center;
  gap: 1px;
}

.twb-screenshot-v3 .twb-agenda-date strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.twb-screenshot-v3 .twb-agenda-date span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.twb-screenshot-v3 .twb-agenda-line {
  height: 24px;
  background: #e5e7eb;
}

.twb-screenshot-v3 .twb-agenda-main {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.twb-screenshot-v3 .twb-agenda-main div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.twb-screenshot-v3 .twb-agenda-main time {
  color: var(--twb-green);
  font-size: 11px;
  font-weight: 950;
}

.twb-screenshot-v3 .twb-agenda-main strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.twb-screenshot-v3 .twb-agenda-main small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.twb-screenshot-v3 .twb-status {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.twb-screenshot-v3 .twb-status.green,
.twb-screenshot-v3 .twb-status.success { background: #dcfce7; color: #15803d; }
.twb-screenshot-v3 .twb-status.blue,
.twb-screenshot-v3 .twb-status.info { background: #dbeafe; color: #2563eb; }
.twb-screenshot-v3 .twb-status.warning { background: #ffedd5; color: #c2410c; }
.twb-screenshot-v3 .twb-status.danger { background: #fee2e2; color: #b91c1c; }
.twb-screenshot-v3 .twb-status.neutral { background: #f1f5f9; color: #64748b; }

.twb-screenshot-v3 .twb-notice-row {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: center;
  padding: 0 3px;
  border-bottom: 1px solid #eef2f7;
  color: #111827;
  text-decoration: none;
}

.twb-screenshot-v3 .twb-notice-row:last-child {
  border-bottom: 0;
}

.twb-screenshot-v3 .twb-notice-row span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--twb-green);
}

.twb-screenshot-v3 .twb-notice-row strong {
  color: #1f2937;
  font-size: 13px;
  font-weight: 850;
}

.twb-screenshot-v3 .twb-notice-row time {
  justify-self: end;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.twb-screenshot-v3 .twb-task-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 9px;
}

.twb-screenshot-v3 .twb-task-tabs button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.twb-screenshot-v3 .twb-task-tabs button.active {
  border-color: #b9dec7;
  background: #eaf7ef;
  color: var(--twb-green);
}

.twb-screenshot-v3 .twb-task-tabs b {
  font-weight: 950;
}

.twb-screenshot-v3 .twb-task-row {
  min-width: 0;
  height: 37px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 110px 92px 72px;
  gap: 8px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #fbfcfd;
  color: #111827;
  text-decoration: none;
}

.twb-screenshot-v3 .twb-task-row[hidden] {
  display: none;
}

.twb-screenshot-v3 .twb-task-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--twb-green);
  font-size: 12px;
  font-weight: 950;
}

.twb-screenshot-v3 .twb-task-row strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.twb-screenshot-v3 .twb-task-row span,
.twb-screenshot-v3 .twb-task-row time {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.twb-screenshot-v3 .twb-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.twb-screenshot-v3 .twb-shortcut {
  min-width: 0;
  height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #edf2f7;
  border-radius: 15px;
  background: #fbfcfd;
  color: #111827;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.twb-screenshot-v3 .twb-shortcut:hover {
  transform: translateY(-2px);
  border-color: #cfe1d6;
  background: #f7fcf9;
}

.twb-screenshot-v3 .twb-shortcut span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf7ef;
  color: var(--twb-green);
}

.twb-screenshot-v3 .twb-shortcut .twb-svg-icon {
  width: 19px;
  height: 19px;
}

.twb-screenshot-v3 .twb-shortcut strong {
  max-width: 100%;
  padding: 0 6px;
  color: #111827;
  font-size: 12px;
  font-weight: 950;
}

.twb-screenshot-v3 .twb-empty.compact {
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px dashed #d9e5dd;
  border-radius: 14px;
  background: #fbfdfb;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.twb-screenshot-v3 .twb-empty.compact a {
  color: var(--twb-green);
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 1599px) {
  .twb-screenshot-v3 .teacher-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .twb-screenshot-v3 .twb-overview-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .95fr);
  }
  .twb-screenshot-v3 .twb-research-body {
    grid-template-columns: 122px minmax(106px, 1fr) 104px;
    gap: 10px;
  }
  .twb-screenshot-v3 .twb-research-left {
    padding-right: 10px;
  }
  .twb-screenshot-v3 .twb-research-donut {
    width: 108px;
    height: 108px;
  }
  .twb-screenshot-v3 .twb-research-donut::after {
    inset: 16px;
  }
  .twb-screenshot-v3 .twb-research-donut strong {
    font-size: 24px;
  }
  .twb-screenshot-v3 .twb-research-legend a {
    grid-template-columns: 9px minmax(0, 1fr) 24px;
    gap: 6px;
    font-size: 11px;
  }
  .twb-screenshot-v3 .twb-project-mini {
    min-height: 38px;
    padding: 7px 8px;
  }
  .twb-screenshot-v3 .twb-project-mini span {
    font-size: 10.5px;
  }
  .twb-screenshot-v3 .twb-project-mini strong {
    font-size: 16px;
  }
}

@media (max-width: 1399px) {
  .twb-screenshot-v3 .twb-overview-grid {
    grid-template-columns: 1fr;
  }
  .twb-screenshot-v3 .twb-research-body {
    grid-template-columns: 146px minmax(150px, 1fr) 128px;
    gap: 12px;
  }
  .twb-screenshot-v3 .twb-research-donut {
    width: 126px;
    height: 126px;
  }
  .twb-screenshot-v3 .twb-research-donut::after {
    inset: 18px;
  }
  .twb-screenshot-v3 .twb-research-donut strong {
    font-size: 28px;
  }
}

@media (max-width: 1279px) {
  .twb-screenshot-v3 .teacher-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .twb-screenshot-v3 .twb-overview-grid,
  .twb-screenshot-v3 .twb-bottom-grid {
    grid-template-columns: 1fr;
  }
  .twb-screenshot-v3 .twb-overview-grid .teacher-card,
  .twb-screenshot-v3 .twb-bottom-grid .teacher-card {
    height: auto;
  }
}

@media (max-width: 760px) {
  .twb-screenshot-v3 .twb-screenshot-greeting {
    align-items: flex-start;
    flex-direction: column;
  }
  .twb-screenshot-v3 .twb-greeting-note {
    min-width: 0;
    justify-items: start;
  }
  .twb-screenshot-v3 .teacher-kpi-grid,
  .twb-screenshot-v3 .twb-project-progress,
  .twb-screenshot-v3 .twb-quick-grid {
    grid-template-columns: 1fr;
  }
  .twb-screenshot-v3 .twb-research-body {
    grid-template-columns: 1fr;
    height: auto;
  }
  .twb-screenshot-v3 .twb-research-left,
  .twb-screenshot-v3 .twb-research-middle {
    padding-right: 0;
    border-right: 0;
  }
  .twb-screenshot-v3 .twb-research-middle,
  .twb-screenshot-v3 .twb-research-status {
    grid-template-rows: auto auto;
  }
  .twb-screenshot-v3 .twb-research-legend {
    width: 100%;
  }
  .twb-screenshot-v3 .twb-task-tabs {
    flex-wrap: wrap;
  }
  .twb-screenshot-v3 .twb-task-row {
    height: auto;
    grid-template-columns: 1fr;
    padding: 10px;
  }
}

/* ==========================================================================
   Teacher Project Management · Scheme A table workbench
   ========================================================================== */
.project-management-page {
  --pm-green: #16854d;
  --pm-green-dark: #0f6f3f;
  --pm-blue: #2563eb;
  --pm-orange: #f59e0b;
  --pm-red: #dc2626;
  --pm-purple: #7c3aed;
  --pm-ink: #111827;
  --pm-muted: #64748b;
  --pm-soft: #f5f7fa;
  --pm-line: #e5e7eb;
  width: 100%;
  display: grid;
  gap: 12px;
}

.project-management-page * {
  box-sizing: border-box;
}

.project-page-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: -4px;
}

.project-action-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid #d9e3dc;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  transition: .16s ease;
}

.project-action-btn:hover {
  border-color: #b8d7c5;
  background: #f7fcf9;
  color: var(--pm-green-dark);
}

.project-action-btn.primary {
  border-color: var(--pm-green);
  background: var(--pm-green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 133, 77, .18);
}

.project-action-btn.primary:hover {
  background: var(--pm-green-dark);
  color: #fff;
}

.project-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.project-kpi-card {
  min-width: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--pm-line);
  border-radius: 16px;
  background: #fff;
  color: var(--pm-ink);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.project-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cddfd5;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.project-kpi-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eef8f2;
  color: var(--pm-green);
}

.project-kpi-icon svg {
  width: 21px;
  height: 21px;
}

.project-kpi-card.tone-blue .project-kpi-icon { background: #eff6ff; color: var(--pm-blue); }
.project-kpi-card.tone-slate .project-kpi-icon { background: #f1f5f9; color: #475569; }
.project-kpi-card.tone-orange .project-kpi-icon { background: #fff7ed; color: var(--pm-orange); }
.project-kpi-card.tone-purple .project-kpi-icon { background: #f5f3ff; color: var(--pm-purple); }

.project-kpi-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 6px;
  row-gap: 3px;
}

.project-kpi-copy em {
  grid-column: 1 / -1;
  color: var(--pm-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.project-kpi-copy strong {
  color: var(--pm-ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.02em;
}

.project-kpi-copy small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.project-filter-card,
.project-table-card,
.project-pagination-bar {
  border: 1px solid var(--pm-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.project-filter-card {
  padding: 10px;
  overflow: visible;
  position: relative;
  z-index: 5;
}

.project-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) 112px 132px 118px 118px 218px 96px 66px 66px;
  gap: 8px;
  align-items: center;
}

.project-filter-toolbar input,
.project-filter-toolbar select,
.project-date-range {
  min-width: 0;
  height: 36px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
}

.project-filter-toolbar input,
.project-filter-toolbar select {
  padding: 0 10px;
}

.project-search-input {
  font-weight: 750 !important;
}

.project-filter-toolbar input:focus,
.project-filter-toolbar select:focus {
  outline: 0;
  border-color: #a7d7b8;
  box-shadow: 0 0 0 3px rgba(22, 133, 77, .11);
}

.project-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  padding: 0 8px;
}

.project-date-range input {
  height: 30px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.project-date-range span {
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.project-filter-reset,
.project-filter-submit,
.project-more-filter > summary {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.project-filter-reset {
  border: 1px solid #dbe3ea;
  background: #fff;
  color: #64748b;
}

.project-filter-submit {
  border: 1px solid var(--pm-green);
  background: var(--pm-green);
  color: #fff;
}

.project-more-filter {
  position: relative;
  height: 36px;
}

.project-more-filter > summary {
  list-style: none;
  border: 1px solid #dbe3ea;
  background: #f8fafc;
  color: #334155;
}

.project-more-filter > summary::-webkit-details-marker {
  display: none;
}

.project-more-filter[open] > summary {
  border-color: #b9dec7;
  background: #edf8f1;
  color: var(--pm-green-dark);
}

.project-more-panel {
  position: absolute;
  right: 0;
  top: 42px;
  width: 520px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e5dd;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.project-more-panel label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.project-more-panel label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.project-more-panel input,
.project-more-panel select {
  width: 100%;
}

.project-status-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.project-status-tab {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.project-status-tab span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
}

.project-status-tab.active {
  border-color: #b9dec7;
  background: #eaf7ef;
  color: var(--pm-green-dark);
}

.project-status-tab.active span {
  background: var(--pm-green);
  color: #fff;
}

.project-table-card {
  overflow: hidden;
}

.project-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.project-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.project-table th,
.project-table td {
  min-width: 0;
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f6;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.project-table th {
  height: 42px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  white-space: nowrap;
}

.project-table tbody tr {
  height: 58px;
  transition: background .14s ease;
}

.project-table tbody tr:hover {
  background: #fbfdfb;
}

.project-table tbody tr.is-overdue {
  background: #fffafa;
}

.project-table .col-project-name { width: 24%; }
.project-table .col-actions { width: 92px; text-align: right; }

.project-table th:nth-child(2), .project-table td:nth-child(2) { width: 11%; }
.project-table th:nth-child(3), .project-table td:nth-child(3) { width: 8%; }
.project-table th:nth-child(4), .project-table td:nth-child(4) { width: 8%; }
.project-table th:nth-child(5), .project-table td:nth-child(5) { width: 12%; }
.project-table th:nth-child(6), .project-table td:nth-child(6) { width: 8%; text-align: center; }
.project-table th:nth-child(7), .project-table td:nth-child(7) { width: 10%; }
.project-table th:nth-child(8), .project-table td:nth-child(8) { width: 8%; text-align: right; }
.project-table th:nth-child(9), .project-table td:nth-child(9) { width: 11%; }

.project-title-cell {
  min-width: 0;
}

.project-title-cell a,
.project-title-cell small,
.project-table td:not(.project-title-cell):not(.project-actions-cell):not(.project-progress-td) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-title-cell a {
  display: block;
  color: #0f172a;
  font-weight: 950;
  line-height: 1.35;
  text-decoration: none;
}

.project-title-cell a:hover {
  color: var(--pm-green-dark);
}

.project-title-cell small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.project-table .nowrap {
  white-space: nowrap;
}

.project-table .money {
  color: #0f172a;
  font-weight: 900;
  text-align: right;
}

.project-source-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.project-source-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-source-cell a {
  flex: 0 0 auto;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
}

.project-status-chip {
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.project-status-chip.tone-green { background: #dcfce7; color: #166534; }
.project-status-chip.tone-orange,
.project-status-chip.tone-amber { background: #fff7ed; color: #b45309; }
.project-status-chip.tone-blue { background: #eff6ff; color: #1d4ed8; }
.project-status-chip.tone-bluegray { background: #e2e8f0; color: #334155; }
.project-status-chip.tone-gray,
.project-status-chip.tone-slate { background: #f1f5f9; color: #64748b; }
.project-status-chip.tone-red { background: #fee2e2; color: #b91c1c; }

.project-progress-cell {
  min-width: 92px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.project-progress-cell span {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.project-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.project-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.project-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.project-actions-cell a {
  display: inline-flex;
  align-items: center;
  color: var(--pm-green-dark);
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
}

.project-actions-cell a + a {
  margin-left: 10px;
  color: #64748b;
}

/* ===== Dense business table alignment pass ===== */
.project-table,
.student-table,
.table,
.task-table,
.todo-table,
.approval-table,
.topic-approval-table,
.student-management-table {
  border-collapse: collapse;
}

.project-table th,
.project-table td,
.student-table th,
.student-table td,
.table th,
.table td,
.task-table th,
.task-table td,
.todo-table th,
.todo-table td,
.approval-table th,
.approval-table td,
.topic-approval-table th,
.topic-approval-table td,
.student-management-table th,
.student-management-table td {
  vertical-align: middle !important;
}

.project-table th,
.student-table th,
.table th,
.task-table th,
.todo-table th,
.approval-table th,
.topic-approval-table th,
.student-management-table th {
  line-height: 1.25;
}

.project-actions-cell,
.student-table td:last-child,
.table td:last-child,
.task-table td:last-child,
.todo-table td:last-child {
  white-space: nowrap;
}

.project-empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #64748b;
  text-align: center;
}

.project-empty-state strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.project-empty-state div {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.project-pagination-bar {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
}

.project-pagination-info {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.project-pagination-info span {
  margin-left: 8px;
  color: #94a3b8;
}

.project-page-size,
.project-page-buttons,
.project-page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-page-size a,
.project-page-btn,
.project-page-jump button {
  height: 30px;
  min-width: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 9px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.project-page-size a.active,
.project-page-btn.active,
.project-page-jump button {
  border-color: var(--pm-green);
  background: var(--pm-green);
  color: #fff;
}

.project-page-btn.disabled {
  pointer-events: none;
  opacity: .45;
}

.project-page-jump span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.project-page-jump input {
  width: 58px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 1599px) {
  .project-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .project-filter-toolbar {
    grid-template-columns: minmax(210px, 1.4fr) 104px 118px 110px 106px 204px 90px 62px 62px;
    gap: 7px;
  }
  .project-filter-toolbar input,
  .project-filter-toolbar select,
  .project-date-range,
  .project-filter-reset,
  .project-filter-submit,
  .project-more-filter > summary {
    font-size: 12px;
  }
}

@media (max-width: 1399px) {
  .project-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .project-filter-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .project-date-range {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .project-page-actions {
    justify-content: flex-start;
  }
  .project-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-more-panel {
    position: static;
    width: min(100%, 520px);
    margin-top: 8px;
    box-shadow: none;
  }
  .project-pagination-bar {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .project-kpi-grid,
  .project-filter-toolbar,
  .project-more-panel {
    grid-template-columns: 1fr;
  }
  .project-date-range {
    grid-column: auto;
  }
  .project-status-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

/* ==========================================================================
   Teacher Student Topic Approval Workbench
   ========================================================================== */
.topic-approval-page {
  --ta-green: #16854d;
  --ta-blue: #2563eb;
  --ta-orange: #f59e0b;
  --ta-red: #dc2626;
  --ta-purple: #7c3aed;
  --ta-ink: #0f172a;
  --ta-muted: #64748b;
  --ta-line: #e5e7eb;
  display: grid;
  gap: 12px;
  width: 100%;
}

.topic-approval-page * {
  box-sizing: border-box;
}

.topic-approval-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.topic-approval-kpi {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ta-line);
  border-radius: 16px;
  background: #fff;
  color: var(--ta-ink);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.topic-approval-kpi:hover {
  transform: translateY(-2px);
  border-color: #cddfd5;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.topic-approval-kpi-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #fff7ed;
  color: var(--ta-orange);
}

.topic-approval-kpi-icon svg {
  width: 21px;
  height: 21px;
}

.topic-approval-kpi.tone-blue .topic-approval-kpi-icon { background: #eff6ff; color: var(--ta-blue); }
.topic-approval-kpi.tone-green .topic-approval-kpi-icon { background: #eaf7ef; color: var(--ta-green); }
.topic-approval-kpi.tone-purple .topic-approval-kpi-icon { background: #f5f3ff; color: var(--ta-purple); }
.topic-approval-kpi.tone-slate .topic-approval-kpi-icon { background: #f1f5f9; color: #475569; }

.topic-approval-kpi em {
  display: block;
  color: var(--ta-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.topic-approval-kpi strong {
  display: block;
  margin-top: 4px;
  color: var(--ta-ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.topic-approval-filter-card,
.topic-approval-table-card,
.topic-approval-pagination {
  border: 1px solid var(--ta-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.topic-approval-filter-card {
  padding: 10px;
}

.topic-approval-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) 140px 150px 140px 126px 66px 66px;
  align-items: center;
  gap: 8px;
}

.topic-approval-filter input,
.topic-approval-filter select {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 750;
}

.topic-approval-reset,
.topic-approval-submit {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.topic-approval-reset {
  border: 1px solid #dbe3ea;
  background: #fff;
  color: #64748b;
}

.topic-approval-submit {
  border: 1px solid var(--ta-green);
  background: var(--ta-green);
  color: #fff;
  cursor: pointer;
}

.topic-approval-table-card {
  overflow: hidden;
}

.topic-approval-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.topic-approval-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.topic-approval-table th,
.topic-approval-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f6;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.topic-approval-table th {
  height: 42px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  white-space: nowrap;
}

.topic-approval-table tbody tr {
  height: 58px;
}

.topic-approval-table tbody tr.needs-action {
  background: #fffdf7;
}

.topic-approval-table tbody tr.is-overdue {
  background: #fffafa;
}

.topic-approval-table .col-topic-name {
  width: 24%;
}

.topic-approval-table .col-actions {
  width: 86px;
  text-align: right;
}

.topic-approval-title a,
.topic-approval-title small,
.topic-approval-table td:not(.topic-approval-title):not(.topic-approval-actions) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-approval-title a {
  display: block;
  color: #0f172a;
  font-weight: 950;
  text-decoration: none;
}

.topic-approval-title a:hover {
  color: #0f6f3f;
}

.topic-approval-title small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
}

.topic-stage-chip,
.topic-pending-chip,
.topic-risk-chip,
.topic-approval-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.topic-stage-chip {
  background: #eff6ff;
  color: #1d4ed8;
}

.topic-pending-chip {
  margin-right: 6px;
  background: #fff7ed;
  color: #b45309;
}

.topic-pending-text {
  color: #334155;
  font-weight: 850;
}

.topic-risk-chip {
  margin-left: 6px;
  background: #fee2e2;
  color: #b91c1c;
}

.topic-approval-status.tone-orange { background: #fff7ed; color: #b45309; }
.topic-approval-status.tone-blue { background: #eff6ff; color: #1d4ed8; }
.topic-approval-status.tone-green { background: #dcfce7; color: #166534; }
.topic-approval-status.tone-red { background: #fee2e2; color: #b91c1c; }
.topic-approval-status.tone-gray,
.topic-approval-status.tone-slate { background: #f1f5f9; color: #64748b; }

.topic-approval-table .nowrap {
  white-space: nowrap;
}

.topic-approval-table .muted {
  color: #94a3b8;
  font-weight: 750;
}

.topic-approval-actions {
  text-align: right;
}

.topic-approval-actions a {
  color: #0f6f3f;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
}

.topic-approval-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #64748b;
  text-align: center;
}

.topic-approval-empty strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.topic-approval-empty a {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--ta-green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.topic-approval-pagination {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.topic-approval-pagination span {
  margin-left: 8px;
  color: #94a3b8;
}

.topic-approval-page-size,
.topic-approval-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topic-approval-page-size a,
.topic-approval-pages a {
  height: 30px;
  min-width: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 9px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.topic-approval-page-size a.active,
.topic-approval-pages a.active {
  border-color: var(--ta-green);
  background: var(--ta-green);
  color: #fff;
}

.topic-approval-pages a.disabled {
  pointer-events: none;
  opacity: .45;
}

@media (max-width: 1399px) {
  .topic-approval-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topic-approval-filter {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topic-approval-kpis,
  .topic-approval-filter,
  .topic-approval-pagination {
    grid-template-columns: 1fr;
  }
  .topic-approval-page-size,
  .topic-approval-pages {
    flex-wrap: wrap;
  }
}

/* Teacher topic detail one-page workspace ---------------------------------- */
.teacher-topic-detail-page{display:flex;flex-direction:column;gap:14px}
.teacher-topic-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px 20px;box-shadow:0 8px 20px rgba(15,23,42,.04)}
.teacher-topic-titlebox{min-width:0}.teacher-topic-eyebrow{font-size:12px;font-weight:800;color:#16834a;margin-bottom:6px}.teacher-topic-titlebox h2{margin:0;font-size:22px;color:#0f172a;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.teacher-topic-titlebox p{margin:8px 0 0;color:#64748b;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.teacher-topic-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.ttd-btn{height:34px;border-radius:10px;padding:0 14px;border:1px solid #dbe3ea;background:#fff;color:#334155;font-weight:800;font-size:13px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer}.ttd-btn.primary{background:#16834a;border-color:#16834a;color:#fff}.ttd-btn.danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}.ttd-btn.ghost{background:#f8fafc}.ttd-btn.full{width:100%}
.teacher-topic-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.teacher-topic-metrics>div{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:13px 14px;min-width:0}.teacher-topic-metrics span{display:block;font-size:12px;color:#64748b;font-weight:700}.teacher-topic-metrics strong{display:block;margin-top:5px;font-size:16px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.teacher-topic-metrics small{display:block;margin-top:3px;color:#94a3b8;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.teacher-topic-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:14px;align-items:start}.ttd-panel{background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 8px 20px rgba(15,23,42,.04);overflow:hidden}.ttd-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:15px 16px;border-bottom:1px solid #eef2f7}.ttd-panel-head.compact{padding:14px 15px}.ttd-panel-head h3{margin:0;color:#111827;font-size:16px}.ttd-panel-head p{margin:4px 0 0;color:#64748b;font-size:12px}.ttd-stage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}
.ttd-stage-card{border:1px solid #e5e7eb;border-radius:16px;background:#fbfdff;padding:12px;min-width:0}.ttd-stage-card.is-current{border-color:#93c5fd;background:#eff6ff}.ttd-stage-card.needs-action{border-color:#fdba74;background:#fff7ed}.ttd-stage-card.status-done{background:#f0fdf4}.ttd-stage-card.status-rejected{background:#fff1f2}.ttd-stage-card.status-locked{background:#f8fafc;color:#64748b}
.ttd-stage-top{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:center}.ttd-stage-index{width:34px;height:34px;border-radius:10px;background:#eaf7ef;color:#16834a;font-weight:900;display:flex;align-items:center;justify-content:center;font-size:12px}.ttd-stage-top h4{margin:0;font-size:14px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ttd-stage-top p{margin:3px 0 0;font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ttd-stage-chip,.ttd-alert-dot,.ttd-ok-dot{display:inline-flex;align-items:center;height:24px;border-radius:999px;padding:0 9px;font-size:12px;font-weight:800;background:#eef2ff;color:#3730a3}.ttd-alert-dot{background:#ffedd5;color:#c2410c}.ttd-ok-dot{background:#dcfce7;color:#166534}
.ttd-stage-content{margin-top:12px}.ttd-summary{font-size:13px;color:#334155;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ttd-kv{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;font-size:13px}.ttd-kv span,.ttd-kv-grid span{color:#64748b}.ttd-kv strong,.ttd-kv-grid strong{color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ttd-kv-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ttd-kv-grid div{min-width:0}.ttd-kv-grid span,.ttd-kv-grid strong{display:block;font-size:12px}
.ttd-stage-files{margin-top:12px;border-top:1px dashed #e5e7eb;padding-top:10px}.ttd-subtitle{font-size:12px;font-weight:900;color:#334155;margin-bottom:7px}.ttd-subtitle b{color:#16834a}.ttd-file{display:flex;justify-content:space-between;gap:8px;align-items:center;text-decoration:none;color:#0f172a;font-size:12px;padding:6px 0;border-bottom:1px solid #f1f5f9}.ttd-file span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ttd-file em,.ttd-more,.ttd-empty-line{font-style:normal;color:#94a3b8;font-size:12px;flex-shrink:0}.ttd-approval-note{margin-top:10px;border-radius:12px;background:#f8fafc;padding:9px 10px}.ttd-approval-note span,.ttd-approval-note em{display:block;color:#64748b;font-size:12px}.ttd-approval-note strong{display:block;margin:3px 0;color:#334155;font-size:13px}
.teacher-topic-side{display:flex;flex-direction:column;gap:14px}.ttd-action-panel form{padding:14px 15px;display:flex;flex-direction:column;gap:9px}.ttd-action-panel label{font-size:12px;font-weight:800;color:#475569}.ttd-action-panel input,.ttd-action-panel textarea{width:100%;box-sizing:border-box;border:1px solid #dbe3ea;border-radius:10px;padding:9px 10px;font-size:13px;background:#fff}.ttd-action-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ttd-action-copy,.ttd-empty-state{margin:14px 15px;color:#64748b;font-size:13px;line-height:1.55}.ttd-member-list,.ttd-log-list{padding:12px 15px;display:flex;flex-direction:column;gap:10px}.ttd-member{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center}.ttd-member>span{width:34px;height:34px;border-radius:10px;background:#eaf7ef;color:#16834a;font-weight:900;display:flex;align-items:center;justify-content:center}.ttd-member strong,.ttd-log strong{display:block;color:#111827;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ttd-member em,.ttd-log span{font-style:normal;color:#94a3b8;font-size:12px}.ttd-log{border-bottom:1px solid #f1f5f9;padding-bottom:8px}.ttd-log p{margin:4px 0 0;color:#64748b;font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:1400px){.teacher-topic-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.teacher-topic-layout{grid-template-columns:1fr}.teacher-topic-side{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.ttd-stage-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.teacher-topic-hero{flex-direction:column}.teacher-topic-metrics,.ttd-stage-grid,.teacher-topic-side{grid-template-columns:1fr}.teacher-topic-titlebox h2,.teacher-topic-titlebox p{white-space:normal}}

/* Student management high-density workspace -------------------------------- */
.student-management-page{display:flex;flex-direction:column;gap:14px}.student-management-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}.student-management-breadcrumb{font-size:12px;color:#64748b;font-weight:800}.student-management-action-row{display:flex;gap:8px;align-items:center}.sm-action-note{font-size:12px;color:#94a3b8}.sm-btn{height:36px;border-radius:10px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;text-decoration:none;border:1px solid #dbe3ea;background:#fff;color:#334155;cursor:pointer}.sm-btn.primary{background:#16834a;border-color:#16834a;color:#fff}.sm-btn.ghost{background:#f8fafc}.sm-btn.compact{height:34px;padding:0 12px}
.student-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.student-kpi-card{min-height:92px;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:14px;display:flex;align-items:center;gap:12px;text-decoration:none;box-shadow:0 8px 20px rgba(15,23,42,.04);min-width:0}.student-kpi-card:hover{border-color:#cbd5e1;transform:translateY(-1px)}.student-kpi-icon{width:42px;height:42px;border-radius:13px;background:#eaf7ef;color:#16834a;display:flex;align-items:center;justify-content:center;flex-shrink:0}.student-kpi-icon svg{width:22px;height:22px}.student-kpi-card.tone-blue .student-kpi-icon{background:#eff6ff;color:#2563eb}.student-kpi-card.tone-orange .student-kpi-icon{background:#fff7ed;color:#f59e0b}.student-kpi-card.tone-purple .student-kpi-icon{background:#f5f3ff;color:#7c3aed}.student-kpi-card.tone-slate .student-kpi-icon{background:#f1f5f9;color:#64748b}.student-kpi-copy{min-width:0}.student-kpi-copy em{display:block;font-style:normal;font-size:12px;color:#64748b;font-weight:800}.student-kpi-copy strong{display:inline-block;margin-top:5px;font-size:24px;color:#0f172a;line-height:1}.student-kpi-copy small{margin-left:4px;color:#94a3b8}
.student-filter-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:10px;box-shadow:0 8px 20px rgba(15,23,42,.04)}.student-filter-toolbar{display:grid;grid-template-columns:minmax(260px,1.6fr) 118px 104px 134px 134px 118px 82px 68px 76px;gap:8px;align-items:center}.student-filter-toolbar input,.student-filter-toolbar select{height:34px;border:1px solid #dbe3ea;border-radius:10px;padding:0 10px;background:#fff;min-width:0}.student-more-filter{position:relative}.student-more-filter summary{height:34px;border:1px solid #dbe3ea;border-radius:10px;background:#f8fafc;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;cursor:pointer}.student-more-panel{position:absolute;right:0;top:40px;width:260px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:12px;color:#64748b;font-size:12px;box-shadow:0 12px 28px rgba(15,23,42,.12);z-index:5}
.student-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;align-items:start}.student-table-card,.student-chart-card,.student-shortcut-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 8px 20px rgba(15,23,42,.04);overflow:hidden}.student-status-tabs{height:46px;display:flex;align-items:center;gap:18px;padding:0 16px;border-bottom:1px solid #eef2f7}.student-status-tabs a{height:46px;display:inline-flex;align-items:center;gap:6px;color:#64748b;text-decoration:none;font-size:13px;font-weight:900;border-bottom:2px solid transparent}.student-status-tabs a.active{color:#16834a;border-bottom-color:#16834a}.student-status-tabs span{color:#94a3b8}.student-table-scroll{width:100%;overflow-x:auto}.student-management-table{width:100%;min-width:1120px;border-collapse:separate;border-spacing:0}.student-management-table th{height:42px;background:#f8fafc;color:#475569;font-size:12px;font-weight:900;text-align:left;padding:0 10px;white-space:nowrap}.student-management-table td{height:52px;border-top:1px solid #eef2f7;padding:8px 10px;font-size:13px;color:#111827;vertical-align:middle}.student-management-table tbody tr:hover{background:#fbfdfc}.student-info-cell{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center}.student-avatar{width:34px;height:34px;border-radius:10px;background:#eaf7ef;color:#16834a;font-weight:900;display:flex;align-items:center;justify-content:center}.student-info-cell a{display:block;color:#0f172a;font-weight:900;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.student-info-cell small{display:block;margin-top:2px;color:#94a3b8;font-size:12px}.student-management-table .ellipsis{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.student-management-table .nowrap{white-space:nowrap}.student-status-chip{height:24px;border-radius:999px;padding:0 9px;display:inline-flex;align-items:center;font-size:12px;font-weight:900}.student-status-chip.status-active{background:#dcfce7;color:#166534}.student-status-chip.status-graduated{background:#e0f2fe;color:#0369a1}.student-status-chip.status-left{background:#f1f5f9;color:#64748b}.student-row-actions{white-space:nowrap}.student-row-actions a{color:#16834a;text-decoration:none;font-weight:900;margin-right:10px}.student-management-empty{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#64748b}.student-management-empty strong{color:#0f172a}.student-management-empty a{color:#16834a;font-weight:900;text-decoration:none}.student-pagination-bar{min-height:50px;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:10px 14px;border-top:1px solid #eef2f7;color:#64748b;font-size:13px}.student-pagination-bar span{color:#94a3b8}.student-page-size,.student-pages{display:flex;gap:6px;align-items:center}.student-page-size a,.student-pages a{height:28px;min-width:28px;border:1px solid #dbe3ea;border-radius:8px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;color:#475569;text-decoration:none;font-size:12px}.student-page-size a.active,.student-pages a.active{background:#16834a;border-color:#16834a;color:#fff}.student-pages a.disabled{pointer-events:none;opacity:.45}
.student-side-panel{display:flex;flex-direction:column;gap:14px}.student-card-head{display:flex;justify-content:space-between;align-items:center;padding:13px 14px;border-bottom:1px solid #eef2f7}.student-card-head h3{margin:0;font-size:15px;color:#111827}.student-card-head span{font-size:12px;color:#94a3b8;font-weight:800}.student-donut-row{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;padding:14px}.student-donut{width:104px;height:104px;border-radius:50%;background:conic-gradient(#16834a 0 58%,#2563eb 58% 82%,#f59e0b 82% 100%);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#0f172a;position:relative}.student-donut:before{content:"";position:absolute;inset:12px;border-radius:50%;background:#fff}.student-donut strong,.student-donut span{position:relative}.student-donut strong{font-size:22px}.student-donut span{font-size:12px;color:#64748b}.student-legend-list,.student-bar-list{display:flex;flex-direction:column;gap:8px}.student-legend-item,.student-bar-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;text-decoration:none;color:#334155;font-size:12px}.student-legend-item span,.student-bar-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.student-legend-item b,.student-bar-item b{color:#111827}.student-legend-item em{font-style:normal;color:#94a3b8}.student-bar-list{padding:14px}.student-bar-item{grid-template-columns:minmax(0,1fr) 28px}.student-bar-item i{grid-column:1 / -1;height:6px;border-radius:999px;background:#eef2f7;overflow:hidden}.student-bar-item i em{display:block;height:100%;border-radius:999px;background:#16834a}.student-side-empty{color:#94a3b8;font-size:13px;padding:10px}.student-shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px}.student-shortcut-grid a{height:38px;border-radius:11px;background:#f8fafc;border:1px solid #e5e7eb;color:#334155;text-decoration:none;font-weight:900;font-size:13px;display:flex;align-items:center;justify-content:center}
.formal-info-maintenance{margin-top:16px;border:1px solid #dbeafe;background:#f8fbff}
.student-status-form{display:flex;align-items:center;gap:7px;min-width:138px}.student-status-form select{height:28px;border:1px solid #dbe3ea;border-radius:8px;background:#fff;color:#334155;font-size:12px;font-weight:800;padding:0 7px}.student-status-form select:focus{outline:2px solid rgba(22,131,74,.18);border-color:#16834a}
@media(max-width:1500px){.student-filter-toolbar{grid-template-columns:minmax(220px,1fr) repeat(4,110px) 100px 78px 66px 72px}.student-main-grid{grid-template-columns:minmax(0,1fr) 300px}}
@media(max-width:1280px){.student-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.student-filter-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.student-main-grid{grid-template-columns:1fr}.student-side-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.student-kpi-grid,.student-filter-toolbar,.student-side-panel,.student-pagination-bar{grid-template-columns:1fr}.student-management-actions{flex-direction:column;align-items:flex-start}.student-donut-row{grid-template-columns:1fr}.student-donut{margin:auto}}

/* Project detail overview refresh */
.project-detail-summary-card{background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);border:1px solid #e3eaf3;border-radius:20px;padding:18px 20px;margin-bottom:14px;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.project-detail-summary-main{display:grid;grid-template-columns:minmax(0,1fr) 142px;gap:18px;align-items:center}
.project-detail-eyebrow{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:#e8f5ee;color:#16834a;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.project-detail-summary-card h2{margin:8px 0 6px;font-size:24px;line-height:1.25;color:#102033;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-detail-summary-card p{margin:0;color:#64748b;font-size:13px;line-height:1.6;max-width:860px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.project-detail-chip-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.project-detail-chip-row span{height:26px;display:inline-flex;align-items:center;padding:0 10px;border-radius:999px;background:#fff;border:1px solid #dbe6f2;color:#334155;font-size:12px;font-weight:700}
.project-detail-progress-dial{width:118px;height:118px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#16a34a calc(var(--pct,0)*1%),#e5edf5 0);position:relative;justify-self:end}.project-detail-progress-dial:before{content:"";position:absolute;inset:10px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #edf2f7}.project-detail-progress-dial strong,.project-detail-progress-dial span{position:relative;z-index:1}.project-detail-progress-dial strong{font-size:24px;color:#0f172a;font-weight:900}.project-detail-progress-dial span{font-size:11px;color:#64748b;margin-top:-24px}
.project-detail-facts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:16px}.project-detail-facts div{background:#fff;border:1px solid #e5edf6;border-radius:14px;padding:10px 12px;min-width:0}.project-detail-facts em{display:block;font-style:normal;font-size:11px;color:#64748b;margin-bottom:4px}.project-detail-facts strong{display:block;font-size:14px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-detail-stage-rail{display:grid;grid-template-columns:repeat(auto-fit,minmax(116px,1fr));gap:8px;margin:0 0 14px}.project-detail-stage-step{min-height:70px;border:1px solid #e2eaf4;background:#fff;border-radius:14px;padding:10px 10px 9px;text-decoration:none;color:#0f172a;display:grid;grid-template-columns:26px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;align-items:center;box-shadow:0 1px 4px rgba(15,23,42,.04)}.project-detail-stage-step span{grid-row:1/3;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eef6f1;color:#16834a;font-size:12px;font-weight:900}.project-detail-stage-step strong{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-detail-stage-step em{font-style:normal;font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-detail-stage-step.is-current{border-color:#16a34a;box-shadow:0 0 0 2px rgba(22,163,74,.12)}.project-detail-stage-step.status-done span{background:#dcfce7;color:#166534}.project-detail-stage-step.status-overdue span,.project-detail-stage-step.status-rejected span{background:#fee2e2;color:#991b1b}.project-detail-stage-step.status-processing span{background:#fef3c7;color:#92400e}
.formal-info-state{display:flex;align-items:flex-start;gap:10px;margin:10px 0 12px;padding:10px 12px;border:1px solid #dbe7f3;border-radius:12px;background:#f8fbff;color:#334155}.formal-info-state strong{font-size:13px;color:#0f172a;white-space:nowrap}.formal-info-state span{font-size:12px;line-height:1.6;color:#64748b}.formal-info-state.status-pending{background:#fff7ed;border-color:#fed7aa}.formal-info-state.status-rejected{background:#fff1f2;border-color:#fecdd3}.formal-info-state.status-approved{background:#f0fdf4;border-color:#bbf7d0}
.formal-research-field{grid-column:1/-1}.formal-research-picker{border:1px solid #dbe6df;border-radius:12px;background:#fff;padding:10px;display:grid;gap:9px}.formal-research-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.formal-research-head strong{font-size:13px;color:#0f172a}.formal-research-head input{max-width:360px;border:1px solid #dbe3ea;border-radius:9px;padding:8px 10px;font-size:12px}.formal-research-picked{display:flex;flex-wrap:wrap;gap:7px;min-height:28px}.formal-research-chip{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border:1px solid #bbf7d0;border-radius:8px;background:#ecfdf5;color:#166534;font-size:12px;font-weight:800}.formal-research-chip b{font-weight:950}.formal-research-chip button{width:18px;height:18px;border:0;border-radius:50%;background:#d1fae5;color:#047857;cursor:pointer;line-height:18px}.formal-research-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.formal-research-group{border:1px solid #edf2f7;border-radius:10px;background:#fbfdff;padding:9px;min-width:0}.formal-research-group h4{margin:0 0 7px;font-size:13px;color:#0f172a;font-weight:950}.formal-research-option{display:grid;grid-template-columns:18px minmax(0,1fr);gap:7px;align-items:start;padding:8px;border-radius:9px;cursor:pointer}.formal-research-option:hover{background:#f0fdf4}.formal-research-option span{min-width:0}.formal-research-option b{display:block;min-width:0;font-size:13px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.formal-research-option em{display:block;margin-top:2px;color:#64748b;font-size:12px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.formal-research-empty{color:#94a3b8;font-size:12px}.pdr-research-link-list{display:flex;flex-wrap:wrap;gap:6px}.pdr-research-link-list span{display:inline-flex;align-items:center;gap:2px;padding:4px 8px;border:1px solid #dbe6df;border-radius:8px;background:#f8fafc;font-size:12px;color:#334155}.pdr-research-link-list b{font-weight:950;color:#0f172a}
.catalog-research-chip{display:inline-flex;align-items:center;gap:2px;margin:2px 5px 2px 0;padding:4px 8px;border:1px solid #dbe6df;border-radius:8px;background:#f8fafc;color:#334155;font-size:12px}.catalog-research-chip b{color:#0f172a;font-weight:950}.research-chip button{width:18px;height:18px;border:0;border-radius:50%;background:#d1fae5;color:#047857;cursor:pointer;line-height:18px}
@media(max-width:1280px){.project-detail-summary-main{grid-template-columns:1fr}.project-detail-progress-dial{justify-self:start}.project-detail-facts{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.project-detail-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.project-detail-stage-rail{grid-template-columns:1fr}.project-detail-summary-card h2{white-space:normal}.formal-info-state{flex-direction:column}.formal-research-head{align-items:stretch;flex-direction:column}.formal-research-head input{max-width:none}.formal-research-options{grid-template-columns:1fr}}


/* Teacher project detail workbench */
.project-detail-workbench{display:flex;flex-direction:column;gap:12px;color:#0f172a}.pd-summary-card,.pd-timeline-card,.pd-tabs-card,.pd-all-flow,.pd-sub-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 8px 22px rgba(15,23,42,.04)}.pd-summary-card{padding:16px}.pd-summary-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.pd-eyebrow{font-size:12px;color:#16834a;font-weight:900}.pd-titlebox h2{margin:4px 0 8px;font-size:25px;line-height:1.18;font-weight:900;max-width:980px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.pd-chip-row{display:flex;gap:8px;flex-wrap:wrap}.pd-chip-row span{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:999px;background:#f0fdf4;color:#167a46;border:1px solid #bbf7d0;font-size:12px;font-weight:800}.pd-action-row{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.pd-btn{height:34px;padding:0 12px;border:1px solid #dbe3ea;border-radius:10px;background:#fff;color:#0f172a;text-decoration:none;font-size:13px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;white-space:nowrap}.pd-btn:hover{background:#f8fafc}.pd-btn.primary{background:#2563eb;border-color:#2563eb;color:#fff}.pd-btn.danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}.pd-btn.small{height:30px;font-size:12px}.pd-btn.tiny{height:26px;padding:0 8px;font-size:12px;border-radius:8px}.pd-btn.block{width:100%}.pd-btn:disabled{opacity:.45;cursor:not-allowed}.pd-fact-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin-top:14px}.pd-fact-grid>div{min-width:0;border:1px solid #e5e7eb;background:#f8fafc;border-radius:12px;padding:10px}.pd-fact-grid span{display:block;font-size:12px;color:#64748b;font-weight:700;margin-bottom:5px}.pd-fact-grid strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pd-timeline-card{padding:12px 14px}.pd-timeline-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.pd-timeline-head strong{display:block;font-size:15px}.pd-timeline-head span{font-size:12px;color:#64748b}.pd-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:8px;align-items:stretch}.pd-step{position:relative;min-width:0;text-decoration:none;border:1px solid #dbeafe;background:#fbfdff;border-radius:14px;padding:10px 8px 9px;text-align:center;color:#334155}.pd-step:before{content:'';position:absolute;left:-9px;right:calc(50% + 18px);top:24px;height:2px;background:#bfdbfe}.pd-step:first-child:before{display:none}.pd-step-dot{width:28px;height:28px;border-radius:50%;margin:0 auto 6px;display:flex;align-items:center;justify-content:center;background:#e2e8f0;color:#475569;font-weight:900;font-size:12px}.pd-step strong{display:block;font-size:12px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pd-step em{display:block;font-style:normal;font-size:11px;color:#64748b;margin-top:4px}.pd-step.status-done .pd-step-dot{background:#16a34a;color:#fff}.pd-step.status-processing .pd-step-dot,.pd-step.is-current .pd-step-dot{background:#2563eb;color:#fff}.pd-step.status-overdue .pd-step-dot,.pd-step.status-rejected .pd-step-dot{background:#ef4444;color:#fff}.pd-step.status-locked .pd-step-dot{background:#f8fafc;border:1px dashed #94a3b8;color:#94a3b8}.pd-step.is-current{border-color:#93c5fd;background:#eff6ff;box-shadow:0 0 0 2px rgba(37,99,235,.08)}.pd-tabs-card{overflow:hidden}.pd-tab-nav{display:flex;gap:2px;border-bottom:1px solid #e5e7eb;background:#fbfdff;padding:0 12px}.pd-tab-nav button{height:42px;border:0;background:transparent;padding:0 12px;font-size:14px;font-weight:900;color:#64748b;cursor:pointer;border-bottom:2px solid transparent}.pd-tab-nav button.is-active{color:#16834a;border-bottom-color:#16a34a}.pd-tab-panel{display:none;padding:14px}.pd-tab-panel.is-active{display:block}.pd-current-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:14px;align-items:start}.pd-current-main{display:flex;flex-direction:column;gap:12px}.pd-section-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.pd-section-head span{font-size:12px;color:#16834a;font-weight:900}.pd-section-head h3{margin:3px 0 4px;font-size:22px;line-height:1.2;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pd-section-head p{margin:0;color:#64748b;font-size:13px;line-height:1.6}.pd-section-head.slim h3{font-size:16px;margin:0}.pd-node-meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.pd-node-meta span{color:#64748b;background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;padding:5px 9px}.pd-status{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:900;background:#e2e8f0;color:#334155}.pd-status-done{background:#dcfce7;color:#166534}.pd-status-processing{background:#dbeafe;color:#1d4ed8}.pd-status-overdue,.pd-status-rejected{background:#fee2e2;color:#991b1b}.pd-status-locked{background:#f1f5f9;color:#64748b}.pd-node-note,.pd-node-box{border:1px solid #e5e7eb;border-radius:16px;background:#fbfdff;padding:12px}.pd-node-note{display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px}.pd-node-note strong,.pd-node-box h4{font-size:14px;margin:0;color:#0f172a}.pd-node-note span{font-size:13px;line-height:1.65;color:#334155}.pd-node-box{display:flex;flex-direction:column;gap:10px}.pd-node-box p{font-size:13px;color:#64748b;line-height:1.65;margin:0}.pd-node-box textarea{width:100%;min-height:116px;border:1px solid #dbe3ea;border-radius:12px;padding:10px;resize:vertical;font-size:13px}.pd-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.pd-inline-form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;border-top:1px dashed #e5e7eb;margin-top:10px;padding-top:10px}.pd-inline-form label,.pd-form-grid label{display:flex;flex-direction:column;gap:5px;min-width:150px;flex:1}.pd-inline-form label.wide{min-width:260px}.pd-inline-form span,.pd-form-grid span{font-size:12px;color:#64748b;font-weight:800}.pd-inline-form input,.pd-inline-form select,.pd-form-grid input,.pd-form-grid select{height:34px;border:1px solid #dbe3ea;border-radius:10px;background:#fff;padding:0 10px;min-width:0}.pd-form-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.pd-file-list{display:flex;flex-direction:column;border:1px solid #e5e7eb;border-radius:14px;overflow:hidden;background:#fff}.pd-file-row{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #eef2f7}.pd-file-row:last-child{border-bottom:0}.pd-file-main{min-width:0;display:flex;flex-direction:column;gap:4px}.pd-file-main a,.pd-link{font-size:13px;font-weight:900;color:#2563eb;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pd-file-main span{font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pd-link-danger{border:0;background:transparent;color:#dc2626;font-size:12px;font-weight:900;cursor:pointer;white-space:nowrap}.pd-current-side{display:flex;flex-direction:column;gap:10px}.pd-side-card{border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:12px;display:flex;flex-direction:column;gap:8px}.pd-side-card strong{font-size:14px}.pd-side-card a{display:flex;justify-content:space-between;gap:8px;text-decoration:none;color:#334155;background:#f8fafc;border-radius:10px;padding:8px}.pd-side-card a span{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pd-side-card a em{font-style:normal;font-size:12px;color:#64748b;white-space:nowrap}.pd-side-card p{font-size:13px;color:#94a3b8;margin:0}.pd-description-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid #e5e7eb;border-radius:14px;overflow:hidden}.pd-description-grid>div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;padding:11px 12px;border-bottom:1px solid #eef2f7}.pd-description-grid>div:nth-child(odd){border-right:1px solid #eef2f7}.pd-description-grid>div.wide{grid-column:1/-1;border-right:0}.pd-description-grid span{font-size:12px;color:#64748b;font-weight:900}.pd-description-grid strong{font-size:13px;line-height:1.55;min-width:0;word-break:break-word}.pd-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pd-sub-card{padding:12px;min-width:0}.pd-mini-table-wrap{width:100%;overflow:auto;border:1px solid #e5e7eb;border-radius:14px;background:#fff}.pd-mini-table{width:100%;border-collapse:collapse;font-size:13px}.pd-mini-table th{background:#f8fafc;color:#475569;font-size:12px;text-align:left;padding:10px;border-bottom:1px solid #e5e7eb;white-space:nowrap}.pd-mini-table td{padding:10px;border-bottom:1px solid #eef2f7;vertical-align:middle}.pd-mini-table tr:last-child td{border-bottom:0}.pd-ellipsis{max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pd-nowrap{white-space:nowrap}.pd-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.pd-check-grid>div{border:1px solid #e5e7eb;border-radius:12px;background:#f8fafc;padding:10px}.pd-check-grid strong{display:block;font-size:20px}.pd-check-grid span{font-size:12px;color:#64748b}.pd-log-list{max-height:420px;overflow:auto;border:1px solid #e5e7eb;border-radius:14px;background:#fff}.pd-log-row{display:grid;grid-template-columns:150px minmax(0,1fr) 190px;gap:12px;padding:10px 12px;border-bottom:1px solid #eef2f7;font-size:13px}.pd-log-row:last-child{border-bottom:0}.pd-log-row span{color:#334155;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pd-log-row em{font-style:normal;color:#64748b;text-align:right}.pd-empty{padding:28px 12px;text-align:center;color:#94a3b8;font-size:13px}.pd-empty.compact{padding:14px}.pd-all-flow{padding:12px 14px}.pd-all-flow summary{cursor:pointer;font-weight:900;color:#0f172a}.pd-flow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.pd-flow-card{border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:12px}.pd-flow-card>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pd-flow-card b{width:28px;height:28px;border-radius:9px;background:#eaf7ef;color:#16834a;display:flex;align-items:center;justify-content:center}.pd-flow-card strong{font-size:14px}.pd-flow-card p{font-size:13px;color:#334155;line-height:1.55;margin:8px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.pd-flow-card>span{font-size:12px;color:#64748b}
@media(max-width:1500px){.pd-fact-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pd-current-layout{grid-template-columns:1fr}.pd-current-side{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.pd-two-col{grid-template-columns:1fr}.pd-flow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.pd-summary-top,.pd-section-head{flex-direction:column}.pd-action-row{justify-content:flex-start}.pd-fact-grid,.pd-form-grid,.pd-check-grid,.pd-current-side,.pd-flow-grid,.pd-description-grid{grid-template-columns:1fr}.pd-description-grid>div:nth-child(odd){border-right:0}.pd-tab-nav{overflow:auto}.pd-timeline{grid-template-columns:1fr 1fr}.pd-log-row{grid-template-columns:1fr}.pd-log-row em{text-align:left}}
@media(max-width:620px){.pd-timeline{grid-template-columns:1fr}.pd-file-row{align-items:flex-start}.pd-description-grid>div{grid-template-columns:1fr}.pd-inline-form{flex-direction:column;align-items:stretch}.pd-inline-form label{width:100%}}

.pd-current-tip{font-size:12px;color:#64748b;background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px;white-space:nowrap}.pd-step.status-done{border-color:#bbf7d0;background:#f0fdf4}.pd-step.status-done .pd-step-dot{background:#16a34a;color:#fff}.pd-step.is-current{border-color:#86efac;background:#ecfdf5;box-shadow:0 0 0 2px rgba(22,163,74,.10)}.pd-step.is-current .pd-step-dot{background:#22c55e;color:#fff}.pd-step.is-selected:not(.is-current){border-color:#93c5fd;background:#eff6ff;box-shadow:0 0 0 2px rgba(37,99,235,.08)}.pd-readonly-hint{font-size:12px;color:#64748b;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:9px 11px;line-height:1.6}.pd-readonly-content{min-height:72px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:11px 12px;font-size:13px;color:#334155;line-height:1.7}.pd-description-grid.compact{border-radius:12px}.pd-description-grid.compact>div{padding:9px 10px}
.teacher-topic-workbench .teacher-topic-action-card{gap:10px}.teacher-topic-workbench .compact-form{border:0;background:transparent;padding:0;gap:9px}.teacher-topic-workbench .compact-form label{display:flex;flex-direction:column;gap:5px}.teacher-topic-workbench .compact-form label span{font-size:12px;color:#64748b;font-weight:800}.teacher-topic-workbench .compact-form input,.teacher-topic-workbench .compact-form textarea{width:100%;box-sizing:border-box;border:1px solid #dbe3ea;border-radius:10px;padding:9px 10px;font-size:13px;background:#fff}.teacher-topic-workbench .topic-stage-file-group{margin-bottom:12px}.teacher-topic-workbench .topic-stage-file-group:last-child{margin-bottom:0}.teacher-topic-workbench .pd-tab-panel[data-pd-panel="files"].is-active{display:flex;flex-direction:column;gap:12px}.teacher-topic-workbench .pd-side-card form{margin:0}.teacher-topic-workbench .pd-side-card .pd-form-actions{display:grid;grid-template-columns:1fr 1fr}.teacher-topic-workbench .pd-step.status-pending:not(.is-current){border-color:#e5e7eb;background:#fff}.teacher-topic-workbench .pd-step.status-locked{border-color:#e5e7eb;background:#f8fafc;color:#94a3b8}

/* Unified workflow-node colors: completed = deep green, current = light green, rejected/overdue = red */
.pd-current-layout-single{grid-template-columns:1fr!important}.pd-inline-danger-form{display:flex;justify-content:flex-end;border-top:1px dashed #e5e7eb;margin-top:2px;padding-top:10px}.teacher-topic-approval-box{border-color:#bbf7d0;background:#f7fef9}.teacher-topic-approval-box .compact-form{display:flex;flex-direction:column;gap:10px}.teacher-topic-approval-box p{margin:0;color:#64748b;font-size:13px;line-height:1.6}
.pd-step.status-done:not(.is-current){border-color:#047857!important;background:#ecfdf5!important;color:#064e3b!important}.pd-step.status-done:not(.is-current) .pd-step-dot{background:#047857!important;color:#fff!important}.pd-step.is-current,.pd-step.status-processing.is-current,.pd-step.status-processing{border-color:#86efac!important;background:#f0fdf4!important;box-shadow:0 0 0 2px rgba(134,239,172,.28)!important}.pd-step.is-current .pd-step-dot,.pd-step.status-processing .pd-step-dot{background:#86efac!important;color:#14532d!important}.pd-step.status-pending:not(.is-current),.pd-step.status-locked:not(.is-current){border-color:#e5e7eb!important;background:#fff!important;color:#64748b!important}.pd-step.status-pending:not(.is-current) .pd-step-dot,.pd-step.status-locked:not(.is-current) .pd-step-dot{background:#f8fafc!important;border:1px dashed #cbd5e1!important;color:#94a3b8!important}.pd-step.status-rejected,.pd-step.status-overdue{border-color:#fecaca!important;background:#fff1f2!important;color:#991b1b!important}.pd-step.status-rejected .pd-step-dot,.pd-step.status-overdue .pd-step-dot{background:#ef4444!important;color:#fff!important}
.paper-detail-redesign .pdr-progress-step.is-done .pdr-step-dot{background:#047857!important;border-color:#047857!important;color:#fff!important}.paper-detail-redesign .pdr-progress-step.is-current .pdr-step-dot,.paper-detail-redesign .pdr-progress-step.is-selected .pdr-step-dot{background:#86efac!important;border-color:#86efac!important;color:#14532d!important}.paper-detail-redesign .pdr-progress-step.is-current .pdr-step-text strong,.paper-detail-redesign .pdr-progress-step.is-current .pdr-step-text em,.paper-detail-redesign .pdr-progress-step.is-selected .pdr-step-text strong,.paper-detail-redesign .pdr-progress-step.is-selected .pdr-step-text em{color:#166534!important}.paper-detail-redesign .pdr-progress-step.is-bad .pdr-step-dot{background:#ef4444!important;border-color:#ef4444!important;color:#fff!important}.pdr-modal-stage.is-current{border-color:#86efac!important;background:#f0fdf4!important}
.topic-phase-step.is-done{border-color:#047857!important;background:linear-gradient(180deg,#ecfdf5 0%,#fff 100%)!important}.topic-phase-step.is-done .topic-phase-order{background:#047857!important;color:#fff!important}.topic-phase-step.is-current,.topic-phase-step.is-active{border-color:#86efac!important;background:linear-gradient(180deg,#f0fdf4 0%,#fff 100%)!important;box-shadow:0 12px 30px rgba(22,163,74,.10)!important}.topic-phase-step.is-current .topic-phase-order,.topic-phase-step.is-active .topic-phase-order{background:#86efac!important;color:#14532d!important}.topic-phase-step.is-pending{border-color:#e5e7eb!important;background:#fff!important}.ms-dot-done{background:#047857!important;border-color:#047857!important}.ms-dot-processing{background:#dcfce7!important;border-color:#86efac!important}.ms-dot-rejected,.ms-dot-overdue{background:#fee2e2!important;border-color:#ef4444!important}.ms-s-done{background:#d1fae5!important;color:#065f46!important}.ms-s-processing{background:#dcfce7!important;color:#166534!important}.ms-s-rejected,.ms-s-overdue{background:#fee2e2!important;color:#991b1b!important}
body.role-internal_student .topic-node-step.is-done .topic-node-index,body.role-external_student .topic-node-step.is-done .topic-node-index{background:#047857!important;color:#fff!important}body.role-internal_student .topic-node-step.is-current .topic-node-index,body.role-external_student .topic-node-step.is-current .topic-node-index,body.role-internal_student .topic-node-step.is-active .topic-node-index,body.role-external_student .topic-node-step.is-active .topic-node-index{background:#86efac!important;color:#14532d!important;box-shadow:0 0 0 7px #fff,0 8px 18px rgba(22,163,74,.16)!important}body.role-internal_student .topic-node-step.is-current .topic-node-text b,body.role-internal_student .topic-node-step.is-current .topic-node-text em,body.role-external_student .topic-node-step.is-current .topic-node-text b,body.role-external_student .topic-node-step.is-current .topic-node-text em,body.role-internal_student .topic-node-step.is-active .topic-node-text b,body.role-internal_student .topic-node-step.is-active .topic-node-text em,body.role-external_student .topic-node-step.is-active .topic-node-text b,body.role-external_student .topic-node-step.is-active .topic-node-text em{color:#166534!important}body.role-internal_student .topic-node-step.is-waiting .topic-node-index,body.role-external_student .topic-node-step.is-waiting .topic-node-index{background:#f8fafc!important;color:#94a3b8!important;border:1px dashed #cbd5e1!important}body.role-internal_student .topic-node-step.is-rejected .topic-node-index,body.role-external_student .topic-node-step.is-rejected .topic-node-index{background:#ef4444!important;color:#fff!important;box-shadow:0 0 0 7px #fff,0 8px 18px rgba(239,68,68,.18)!important}body.role-internal_student .topic-node-step.is-rejected .topic-node-text b,body.role-internal_student .topic-node-step.is-rejected .topic-node-text em,body.role-external_student .topic-node-step.is-rejected .topic-node-text b,body.role-external_student .topic-node-step.is-rejected .topic-node-text em{color:#991b1b!important}

/* ===== Admin v2 business workbench ===== */
.admin-workbench-page,
.admin-report-page,
.admin-file-page,
.admin-diagnostic-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #0f172a;
}

.admin-workbench-kpis,
.admin-report-kpis,
.admin-file-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-workbench-kpi,
.admin-report-kpi,
.admin-file-kpi {
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.admin-workbench-kpi span,
.admin-report-kpi span,
.admin-file-kpi span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.admin-workbench-kpi strong,
.admin-report-kpi strong,
.admin-file-kpi strong {
  min-width: 0;
  color: #0f172a;
  font-size: 27px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workbench-kpi em,
.admin-report-kpi em,
.admin-file-kpi em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workbench-kpi.tone-green,
.admin-file-kpi.active { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%); }
.admin-workbench-kpi.tone-orange { border-color: #fed7aa; background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); }
.admin-workbench-kpi.tone-blue { border-color: #bfdbfe; background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); }
.admin-workbench-kpi.tone-purple { border-color: #ddd6fe; background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%); }
.admin-workbench-kpi.tone-red { border-color: #fecaca; background: linear-gradient(180deg, #fff1f2 0%, #fff 100%); }
.admin-workbench-kpi.tone-amber { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
.admin-workbench-kpi.tone-cyan { border-color: #a5f3fc; background: linear-gradient(180deg, #ecfeff 0%, #fff 100%); }

.admin-workbench-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
  align-items: start;
}

.admin-workbench-stack,
.admin-workbench-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card,
.admin-report-card,
.admin-file-toolbar {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
  overflow: hidden;
}

.admin-card {
  padding: 0;
}

.admin-card-head {
  min-height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfdff;
}

.admin-card-head.compact {
  min-height: 46px;
}

.admin-card-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 950;
}

.admin-card-head p {
  margin: 3px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.admin-card-head a,
.admin-actions a {
  color: #16834a;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-table th,
.admin-table td {
  height: 48px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  font-size: 13px;
  vertical-align: middle !important;
}

.admin-table th {
  height: 40px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  text-align: right;
  white-space: nowrap;
}

.admin-actions span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.admin-chip {
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.admin-chip.soft-green { background: #dcfce7; color: #166534; }
.admin-chip.soft-blue { background: #eff6ff; color: #1d4ed8; }
.admin-chip.soft-orange { background: #fff7ed; color: #b45309; }
.admin-chip.soft-red { background: #fee2e2; color: #b91c1c; }

.admin-ellipsis {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.admin-empty {
  padding: 26px 12px;
  color: #94a3b8;
  text-align: center;
  font-size: 13px;
}

.admin-empty.compact {
  padding: 12px;
}

.admin-feed-list {
  display: flex;
  flex-direction: column;
}

.admin-feed-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  text-decoration: none;
}

.admin-feed-row:hover {
  background: #fbfdfb;
}

.admin-feed-row div {
  min-width: 0;
}

.admin-feed-row strong,
.admin-feed-row em,
.admin-feed-row time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-feed-row strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.admin-feed-row em,
.admin-feed-row time {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.admin-quick-grid,
.admin-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.admin-quick-item {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfdff;
  color: #334155;
  text-decoration: none;
}

.admin-quick-item strong,
.admin-quick-item span,
.admin-quick-item em {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-quick-item strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.admin-quick-item span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-quick-item em {
  color: #16834a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-mini-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fbfdff;
  color: #334155;
  text-decoration: none;
}

.admin-mini-row.active,
.admin-mini-row:hover {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.admin-mini-row strong,
.admin-mini-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.admin-mini-row strong {
  color: #0f172a;
  font-weight: 900;
}

.admin-mini-row span {
  color: #64748b;
  font-weight: 850;
}

.admin-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.admin-btn.primary {
  border-color: #16834a;
  background: #16834a;
  color: #fff;
}

.admin-btn.dark {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.admin-report-toolbar,
.admin-file-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.admin-report-toolbar form,
.admin-file-filter {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-report-toolbar label,
.admin-file-filter label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.admin-report-toolbar input,
.admin-file-filter input,
.admin-file-filter select {
  height: 34px;
  min-width: 128px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 10px;
}

.admin-file-filter label.wide input {
  min-width: 260px;
}

.admin-report-grid,
.admin-diagnostic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-report-card {
  padding: 0;
}

.admin-report-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.admin-bar-row {
  display: grid;
  gap: 6px;
}

.admin-bar-row div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 13px;
}

.admin-bar-row span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.admin-bar-row i,
.admin-trend-month i {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #16834a 0%, #22c55e var(--w, 0%), #e5e7eb var(--w, 0%), #e5e7eb 100%);
}

.admin-bar-row::after,
.admin-trend-month div::before {
  content: none;
  display: none;
}

.admin-trend-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.admin-trend-month {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #fbfdff;
}

.admin-trend-month > strong {
  font-size: 14px;
  font-weight: 950;
}

.admin-trend-month div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 52px;
  gap: 6px;
  align-items: center;
}

.admin-trend-month span,
.admin-trend-month em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.admin-file-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-file-tabs a {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 999px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.admin-file-tabs a.active {
  background: #eaf7ef;
  color: #166534;
}

.admin-file-tabs span {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
}

.admin-archive-tree {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(90deg, rgba(22, 131, 74, .06) 0 3px, transparent 3px);
}

.admin-archive-project {
  border: 1px solid #d8eadf;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.admin-archive-project summary {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  background: linear-gradient(90deg, #eefaf2 0%, #fbfdff 100%);
}

.admin-archive-project summary strong,
.admin-archive-project summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-archive-project summary em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.admin-level {
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.admin-level.one {
  background: #16834a;
  color: #fff;
}

.admin-level.two {
  background: #dcfce7;
  color: #166534;
}

.admin-archive-stage {
  position: relative;
  margin-left: 22px;
  padding: 12px 12px 12px 18px;
  border-left: 2px solid #d8eadf;
}

.admin-archive-stage::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #86efac;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #bbf7d0;
}

.admin-archive-stage-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d8eadf;
  border-radius: 12px;
  background: #f0fdf4;
}

.admin-archive-stage-head strong,
.admin-archive-stage-head em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-archive-stage-head em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.admin-archive-file {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: center;
  margin-top: 7px;
  padding: 9px 10px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #fff;
}

.admin-file-index {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.admin-archive-file div {
  min-width: 0;
}

.admin-archive-file strong,
.admin-archive-file em,
.admin-archive-file small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-archive-file strong {
  color: #0f172a;
  font-size: 13px;
}

.admin-archive-file em,
.admin-archive-file small {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

@media (max-width: 1500px) {
  .admin-workbench-kpis,
  .admin-report-kpis,
  .admin-file-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .admin-trend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .admin-workbench-kpis,
  .admin-report-kpis,
  .admin-file-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-workbench-main,
  .admin-report-grid,
  .admin-diagnostic-grid {
    grid-template-columns: 1fr;
  }
  .admin-file-toolbar,
  .admin-report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .admin-workbench-kpis,
  .admin-report-kpis,
  .admin-file-kpis,
  .admin-trend-grid {
    grid-template-columns: 1fr;
  }
  .admin-feed-row,
  .admin-archive-file,
  .admin-archive-project summary,
  .admin-archive-stage-head {
    grid-template-columns: 1fr;
  }
  .admin-actions {
    text-align: left;
  }
  .admin-file-filter label.wide input {
    min-width: 0;
  }
}

/* ===== Document center unified workbench ===== */
.document-workbench {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #0f172a;
}

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

.doc-kpi {
  min-width: 0;
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.doc-kpi span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.doc-kpi strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-size: 28px;
  line-height: 1;
  color: #16834a;
  font-weight: 950;
}

.doc-kpi em {
  min-width: 0;
  color: #94a3b8;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-kpi.active {
  border-color: #9fd7b6;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  box-shadow: 0 12px 28px rgba(22, 131, 74, .10);
}

.doc-tab-card,
.doc-section-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}

.doc-tab-card {
  padding: 10px;
}

.doc-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
  overflow-x: auto;
}

.doc-tabs a {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.doc-tabs a.active {
  background: #eaf7ef;
  color: #166534;
}

.doc-filter-line {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(128px, .9fr)) auto auto auto auto;
  gap: 8px;
  align-items: end;
  padding-top: 10px;
}

.doc-filter-line label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.doc-filter-line label.wide {
  min-width: 220px;
}

.doc-filter-line label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.doc-filter-line input,
.doc-filter-line select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 10px;
}

.doc-filter-line .btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

.document-layout-v2 {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.doc-sidebar-compact {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fbfdff;
}

.doc-sidebar-compact strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  margin: 2px 0 4px;
}

.doc-side-title {
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 1px dashed #dbe3ea;
}

.doc-sidebar-compact a {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-sidebar-compact a.active,
.doc-sidebar-compact a:hover {
  background: #eaf7ef;
  color: #166534;
}

.doc-main-table {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-breadcrumb {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.doc-section-card {
  overflow: hidden;
}

.doc-section-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfdff;
}

.doc-section-head strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.doc-section-head span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.doc-section-note {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fbff;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.doc-folder-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.doc-folder-row a {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
}

.doc-folder-row strong,
.doc-folder-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-folder-row span {
  color: #94a3b8;
  font-size: 12px;
}

.doc-upload-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
}

.doc-upload-line input[type="file"] {
  min-width: 0;
  height: 34px;
  padding: 5px 8px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
}

.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.doc-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

.doc-table th,
.doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.doc-table th {
  height: 40px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  white-space: nowrap;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td:not(:first-child):not(.doc-actions) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-name {
  display: block;
  max-width: 100%;
  color: #0f172a;
  font-weight: 950;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-name + small,
.doc-table td small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-actions {
  width: 1%;
  white-space: nowrap;
}

.doc-actions,
.doc-actions form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-actions a,
.doc-actions button {
  border: 0;
  background: transparent;
  color: #16834a;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.doc-actions button {
  color: #dc2626;
}

.doc-archive-browser {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.doc-archive-folder {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.doc-archive-folder summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fbfdff;
}

.doc-archive-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-archive-title strong,
.doc-archive-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-archive-title strong {
  font-size: 14px;
}

.doc-archive-title span,
.doc-archive-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.doc-archive-stage {
  padding: 10px 12px;
  border-top: 1px solid #eef2f7;
}

.doc-archive-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
}

.doc-archive-stage-head span {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.doc-archive-file {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px dashed #eef2f7;
}

.doc-archive-file-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-archive-file-main strong,
.doc-archive-file-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-archive-file-main em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.doc-archive-version-strip {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.doc-archive-version-chip {
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.doc-archive-version-chip.final {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.doc-archive-version-chip .role,
.doc-archive-version-chip b {
  font-size: 11px;
  font-weight: 900;
}

.nav-badge[hidden],
.icon-badge[hidden] {
  display: none !important;
}

/* ===== Student stats dashboard ===== */
.student-stats-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.stats-kpi-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 94px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.stats-kpi-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.stats-kpi-card strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-kpi-card em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.stats-kpi-card.tone-green { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%); }
.stats-kpi-card.tone-blue { border-color: #bfdbfe; background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); }
.stats-kpi-card.tone-orange { border-color: #fed7aa; background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); }
.stats-kpi-card.tone-purple { border-color: #ddd6fe; background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%); }

.stats-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.stats-board-card,
.stats-table-card {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
  overflow: hidden;
}

.stats-card-head {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfdff;
}

.stats-card-head.compact {
  min-height: 48px;
}

.stats-card-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 950;
}

.stats-card-head p {
  margin: 3px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.stats-card-head a {
  color: #16834a;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.stats-bars,
.stats-project-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.stats-bar-row,
.stats-progress-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 13px;
}

.stats-bar-label span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.stats-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.stats-bar-track i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16834a, #22c55e);
}

.stats-progress-block {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 14px;
}

.stats-ring {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(#16834a var(--p, 0%), #e5e7eb 0);
}

.stats-ring strong {
  grid-area: 1 / 1;
  margin-top: -10px;
  font-size: 22px;
  font-weight: 950;
}

.stats-ring span {
  grid-area: 1 / 1;
  margin-top: 32px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.stats-progress-copy,
.stats-mini-grid {
  display: grid;
  gap: 8px;
}

.stats-progress-copy div,
.stats-mini-grid div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fbfdff;
}

.stats-progress-copy span,
.stats-mini-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.stats-progress-copy strong,
.stats-mini-grid strong {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2px;
}

.stats-table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.stats-table th,
.stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.stats-table th {
  height: 40px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
}

.stats-table tr:last-child td {
  border-bottom: 0;
}

.stats-ellipsis {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.stats-chip {
  min-width: 54px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.stats-chip.ok { background: #dcfce7; color: #166534; }
.stats-chip.wait { background: #fff7ed; color: #b45309; }
.stats-chip.bad { background: #fee2e2; color: #b91c1c; }

.stats-empty {
  padding: 30px 14px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.stats-empty.small {
  padding: 14px;
}

/* ===== Formal achievement and dense table alignment refinements ===== */
.achievement-table {
  table-layout: fixed;
}

.achievement-table th,
.achievement-table td,
.doc-table th,
.doc-table td,
.stats-table th,
.stats-table td {
  vertical-align: middle !important;
}

.achievement-table th:nth-child(1),
.achievement-table td:nth-child(1) { width: 31%; }
.achievement-table th:nth-child(2),
.achievement-table td:nth-child(2) { width: 90px; text-align: center; }
.achievement-table th:nth-last-child(4),
.achievement-table td:nth-last-child(4) { width: 18%; }
.achievement-table th:nth-last-child(3),
.achievement-table td:nth-last-child(3) { width: 110px; text-align: center; }
.achievement-table th:nth-last-child(2),
.achievement-table td:nth-last-child(2) { width: 136px; }
.achievement-table th:nth-last-child(1),
.achievement-table td:nth-last-child(1) { width: 136px; white-space: nowrap; }

.achievement-table-title,
.achievement-table-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-table-title {
  display: block;
  line-height: 1.35;
  white-space: nowrap;
}

.achievement-table-meta {
  display: block;
  margin-top: 4px;
  line-height: 1.3;
  white-space: nowrap;
}

.achievement-status-stack {
  align-items: center;
}

.achievement-list-page .achievement-linked-compact {
  width: min(520px, 100%);
  margin-left: auto;
}

/* ===== Table column alignment hardening ===== */
.project-table col.col-project-name { width: 24%; }
.project-table col.col-project-code { width: 11%; }
.project-table col.col-project-owner { width: 8.5%; }
.project-table col.col-project-level { width: 8.5%; }
.project-table col.col-project-source { width: 12%; }
.project-table col.col-project-status { width: 8%; }
.project-table col.col-project-progress { width: 10%; }
.project-table col.col-project-budget { width: 8%; }
.project-table col.col-project-date { width: 11%; }
.project-table col.col-project-actions { width: 9%; }

.project-table th,
.project-table td {
  height: 52px;
  vertical-align: middle !important;
}

.project-table thead th {
  height: 42px;
  text-align: left;
}

.project-table th.col-project-status,
.project-table td.col-project-status,
.project-table th.col-project-progress,
.project-table td.col-project-progress {
  text-align: center !important;
}

.project-table th.col-project-budget,
.project-table td.col-project-budget,
.project-table th.col-project-actions,
.project-table td.col-project-actions {
  text-align: right !important;
}

.project-table th.col-project-code,
.project-table td.col-project-code,
.project-table th.col-project-owner,
.project-table td.col-project-owner,
.project-table th.col-project-level,
.project-table td.col-project-level,
.project-table th.col-project-source,
.project-table td.col-project-source,
.project-table th.col-project-date,
.project-table td.col-project-date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-table col.ach-col-title { width: 31%; }
.achievement-table col.ach-col-type { width: 10%; }
.achievement-table col.ach-col-student { width: 12%; }
.achievement-table col.ach-col-relation { width: 22%; }
.achievement-table col.ach-col-status { width: 12%; }
.achievement-table col.ach-col-date { width: 12%; }
.achievement-table col.ach-col-actions { width: 13%; }

.achievement-table.is-student-view col.ach-col-title { width: 34%; }
.achievement-table.is-student-view col.ach-col-type { width: 10%; }
.achievement-table.is-student-view col.ach-col-relation { width: 24%; }
.achievement-table.is-student-view col.ach-col-status { width: 14%; }
.achievement-table.is-student-view col.ach-col-date { width: 12%; }
.achievement-table.is-student-view col.ach-col-actions { width: 12%; }

.achievement-table th,
.achievement-table td {
  height: 54px;
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: middle !important;
}

.achievement-table th {
  text-align: left;
}

.achievement-table th:nth-child(2),
.achievement-table td:nth-child(2),
.achievement-table th:nth-last-child(3),
.achievement-table td:nth-last-child(3) {
  text-align: center !important;
}

.achievement-table th:nth-last-child(1),
.achievement-table td:nth-last-child(1) {
  text-align: right !important;
  white-space: nowrap;
}

.achievement-table .ach-type-cell {
  text-align: center;
}

.achievement-relation-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.achievement-relation-cell span {
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.achievement-relation-cell a,
.achievement-relation-cell em {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  font-style: normal;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-relation-cell a:hover {
  color: #16834a;
}

.achievement-relation-cell.tone-topic span { background: #eaf7ef; color: #166534; }
.achievement-relation-cell.tone-project span { background: #eff6ff; color: #1d4ed8; }
.achievement-relation-cell.tone-graduation span { background: #f5f3ff; color: #6d28d9; }
.achievement-relation-cell.tone-empty span { background: #f8fafc; color: #94a3b8; }
.achievement-relation-cell.tone-empty em { color: #94a3b8; }

/* ===== Document archive hierarchy refinement ===== */
.doc-archive-browser {
  position: relative;
  gap: 12px;
  background: linear-gradient(90deg, rgba(22, 131, 74, .06) 0 3px, transparent 3px);
}

.doc-archive-folder {
  border-color: #d8eadf;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}

.doc-archive-folder summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  background: linear-gradient(90deg, #eefaf2 0%, #fbfdff 100%);
}

.doc-archive-level {
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.doc-archive-level.level-one {
  background: #16834a;
  color: #fff;
}

.doc-archive-level.level-two {
  background: #dcfce7;
  color: #166534;
}

.doc-archive-count {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe8e1;
}

.doc-archive-stage {
  position: relative;
  margin-left: 22px;
  padding: 12px 12px 12px 18px;
  border-left: 2px solid #d8eadf;
}

.doc-archive-stage::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #86efac;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #bbf7d0;
}

.doc-archive-stage-head {
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #d8eadf;
}

.doc-archive-stage-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-archive-stage-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-archive-file {
  grid-template-columns: 28px minmax(190px, .9fr) minmax(0, 1.1fr);
  min-height: 44px;
  padding: 9px 10px;
  margin-top: 7px;
  border: 1px solid #edf2ee;
  border-radius: 12px;
  background: #fff;
}

.doc-archive-file + .doc-archive-file {
  border-top: 1px solid #edf2ee;
}

.doc-archive-file-index {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.doc-archive-version-strip {
  align-items: center;
}

@media (max-width: 1599px) {
  .doc-filter-line {
    grid-template-columns: minmax(210px, 1.35fr) repeat(2, minmax(112px, .85fr)) auto auto auto auto;
  }
  .stats-board-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-board-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1280px) {
  .doc-kpi-grid,
  .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .document-layout-v2 {
    grid-template-columns: 1fr;
  }
  .doc-sidebar-compact {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .doc-sidebar-compact strong,
  .doc-side-title {
    grid-column: 1 / -1;
  }
  .doc-filter-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .doc-filter-line label.wide {
    min-width: 0;
  }
  .doc-folder-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-table-grid,
  .stats-board-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .doc-kpi-grid,
  .stats-kpi-grid,
  .doc-filter-line,
  .doc-sidebar-compact,
  .doc-folder-row,
  .stats-progress-block,
  .stats-mini-grid {
    grid-template-columns: 1fr;
  }
  .doc-upload-line,
  .doc-archive-file {
    grid-template-columns: 1fr;
  }
  .doc-archive-version-strip {
    justify-content: flex-start;
  }
  .stats-card-head {
    flex-direction: column;
  }
}

/* Achievement citation export modal */
body.achievement-export-open{overflow:hidden}
.achievement-export-modal{position:fixed;inset:0;z-index:4200;display:none;align-items:center;justify-content:center;padding:28px}
.achievement-export-modal.open{display:flex}
.achievement-export-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(3px)}
.achievement-export-panel{position:relative;width:min(1180px,calc(100vw - 56px));max-height:min(820px,calc(100vh - 56px));display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;border:1px solid #dce7ee;border-radius:20px;background:#fff;box-shadow:0 28px 90px rgba(15,23,42,.28);overflow:hidden}
.achievement-export-head,.achievement-export-toolbar,.achievement-export-foot{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid #edf2f7;background:#fbfdff}
.achievement-export-head{justify-content:space-between}.achievement-export-head h3{margin:0;color:#0f172a;font-size:17px;font-weight:950}.achievement-export-head p{margin:3px 0 0;color:#64748b;font-size:12px}
.achievement-export-close{width:34px;height:34px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;color:#64748b;font-size:22px;line-height:1;cursor:pointer}
.achievement-export-toolbar{flex-wrap:wrap}.achievement-export-toolbar input[type=search]{min-width:260px;flex:1;height:36px;border:1px solid #d8e1ea;border-radius:10px;padding:0 12px;background:#fff;color:#0f172a;font-size:13px}
.achievement-export-style{height:36px;display:inline-flex;align-items:center;gap:6px;padding:0 8px;border:1px solid #d8e1ea;border-radius:999px;background:#fff}.achievement-export-style label{display:inline-flex;align-items:center;gap:5px;color:#334155;font-size:12px;font-weight:900}
.achievement-export-body{min-height:0;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr)}.achievement-export-table-wrap{min-width:0;overflow:auto;border-right:1px solid #edf2f7}
.achievement-export-table{width:100%;min-width:900px;border-collapse:collapse;table-layout:fixed}.achievement-export-table:not(.is-teacher-view){min-width:760px}
.achievement-export-table th,.achievement-export-table td{height:46px;padding:8px 10px;border-bottom:1px solid #eef2f7;color:#334155;font-size:13px;vertical-align:middle}.achievement-export-table th{height:38px;background:#f8fafc;color:#64748b;font-size:12px;font-weight:950;text-align:left;white-space:nowrap}.achievement-export-table tr{cursor:pointer}.achievement-export-table tr:hover td{background:#fbfdff}
.achievement-export-table td strong,.achievement-export-table td em{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal}
.achievement-export-table .ae-col-check{width:58px}.achievement-export-table .ae-col-title{width:31%}.achievement-export-table .ae-col-type{width:92px}.achievement-export-table .ae-col-student{width:110px}.achievement-export-table .ae-col-relation{width:22%}.achievement-export-table .ae-col-status{width:105px}.achievement-export-table .ae-col-year{width:72px}.ae-check{text-align:center}
.achievement-export-chip,.achievement-export-status,.achievement-export-relation span{height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;border-radius:999px;font-size:12px;font-weight:900;white-space:nowrap}.achievement-export-chip{background:#eff6ff;color:#1d4ed8}.achievement-export-status{background:#dcfce7;color:#166534}.achievement-export-status.warn{background:#fff7ed;color:#c2410c}
.achievement-export-relation{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;align-items:center}.achievement-export-relation span{background:#f0fdf4;color:#15803d}
.achievement-export-preview{min-width:0;display:flex;flex-direction:column;background:#fcfffd}.achievement-export-preview-head{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;border-bottom:1px solid #edf2f7}.achievement-export-preview-head strong{color:#0f172a;font-size:13px;font-weight:950}.achievement-export-preview-head span{color:#64748b;font-size:12px;font-weight:850}
.achievement-export-warning-list{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px 0}.achievement-export-warning-list[hidden]{display:none}.achievement-export-warning{display:inline-flex;align-items:center;line-height:1.35;padding:6px 9px;border:1px solid #fed7aa;border-radius:10px;background:#fff7ed;color:#c2410c;font-size:12px;font-weight:850}
.achievement-export-rich-preview{flex:1;min-height:300px;overflow:auto;padding:12px 14px;color:#334155;font-size:13px;line-height:1.65}.achievement-export-rich-preview p{margin:0 0 12px}.achievement-export-rich-preview em{font-style:italic;color:#0f172a}.achievement-export-rich-preview.is-empty{color:#94a3b8}
#achievement-export-text{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.achievement-export-foot{justify-content:flex-end;border-top:1px solid #edf2f7;border-bottom:0}.achievement-export-foot span{margin-right:auto;color:#15803d;font-size:12px;font-weight:850}.achievement-export-foot span.is-error{color:#dc2626}.achievement-export-empty{padding:18px;color:#94a3b8;font-size:13px;text-align:center}
@media(max-width:1180px){.achievement-export-body{grid-template-columns:1fr}.achievement-export-table-wrap{max-height:360px;border-right:0;border-bottom:1px solid #edf2f7}}
@media(max-width:760px){.achievement-export-modal{padding:12px}.achievement-export-panel{width:calc(100vw - 24px);max-height:calc(100vh - 24px)}.achievement-export-toolbar input[type=search]{min-width:100%}}

/* ===== Admin closing polish: user / file / fund / visitor ===== */
.admin-chip.soft-slate{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}
.admin-ellipsis{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-ellipsis.strong{font-weight:950;color:#0f172a;text-decoration:none}.admin-table .danger{color:#dc2626;font-weight:950}
.admin-btn{min-height:34px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;border:1px solid #d9e4ea;border-radius:10px;background:#fff;color:#334155;font-size:13px;font-weight:850;text-decoration:none;white-space:nowrap;cursor:pointer}.admin-btn.primary{border-color:#16a34a;background:#16a34a;color:#fff}.admin-btn.dark{border-color:#0f172a;background:#0f172a;color:#fff}
.admin-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}.admin-actions form{display:inline-flex;margin:0}.admin-actions a,.admin-actions button{min-height:28px;padding:0 8px;border:1px solid #dbe6ee;border-radius:999px;background:#fff;color:#166534;font-size:12px;font-weight:900;text-decoration:none;cursor:pointer}.admin-actions button{font-family:inherit}.admin-card-table .admin-table th,.admin-card-table .admin-table td{vertical-align:middle}.admin-card-table .admin-table th:last-child,.admin-card-table .admin-table td:last-child{text-align:right}.admin-card-table .admin-table td small{color:#94a3b8}

.admin-user-page,.admin-user-form-page,.admin-file-v2-page,.admin-fund-page,.visitor-dashboard{display:flex;flex-direction:column;gap:14px}.admin-user-kpis,.admin-fund-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.admin-fund-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-user-kpi,.admin-fund-kpi{min-height:86px;padding:14px;border:1px solid #dce9df;border-radius:16px;background:linear-gradient(180deg,#f7fdf9 0%,#fff 100%);box-shadow:0 10px 28px rgba(15,23,42,.05);text-decoration:none}.admin-user-kpi span,.admin-fund-kpi span{display:block;color:#64748b;font-size:12px;font-weight:950}.admin-user-kpi strong,.admin-fund-kpi strong{display:block;margin-top:5px;color:#0f172a;font-size:26px;line-height:1;font-weight:1000}.admin-user-kpi em,.admin-fund-kpi em{display:block;margin-top:7px;color:#64748b;font-size:12px;font-style:normal}.admin-user-kpi.warn{border-color:#fed7aa;background:linear-gradient(180deg,#fff7ed 0%,#fff 100%)}
.admin-user-filter-card,.admin-file-v2-toolbar,.admin-fund-toolbar{padding:12px;border:1px solid #dce7ee;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.04)}.admin-user-filter,.admin-file-v2-toolbar form,.admin-fund-toolbar form{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.admin-user-filter input,.admin-user-filter select,.admin-file-v2-toolbar input,.admin-file-v2-toolbar select,.admin-fund-toolbar input,.admin-fund-toolbar select{height:34px;border:1px solid #d8e1ea;border-radius:10px;background:#fbfdff;color:#334155;font-size:13px;padding:0 10px}.admin-user-filter .wide,.admin-file-v2-toolbar .wide,.admin-fund-toolbar input[type=text]{flex:1 1 260px;min-width:220px}.admin-user-filter select,.admin-file-v2-toolbar select,.admin-fund-toolbar select{min-width:118px}
.admin-user-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:14px;align-items:start}.admin-user-side{display:flex;flex-direction:column;gap:14px}.admin-user-table{table-layout:fixed;min-width:1120px}.admin-user-table td,.admin-file-v2-table td,.admin-fund-project-table td,.admin-fund-application-table td{overflow:hidden}.admin-user-pagination{min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-top:1px solid #eef2f7;color:#64748b;font-size:13px}.admin-user-progress{height:12px;margin:14px;border-radius:999px;background:#e2e8f0;overflow:hidden}.admin-user-progress i{display:block;width:var(--w,0%);height:100%;border-radius:inherit;background:linear-gradient(90deg,#22c55e,#16a34a)}.admin-user-side-actions{display:flex;gap:8px;padding:0 14px 14px;flex-wrap:wrap}
.admin-user-form-hero{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px;border:1px solid #dce9df;border-radius:18px;background:linear-gradient(135deg,#f0fdf4 0%,#fff 60%,#eef6ff 100%);box-shadow:0 14px 34px rgba(15,23,42,.06)}.admin-user-form-hero h2{margin:8px 0 4px;color:#0f172a;font-size:22px}.admin-user-form-hero p{margin:0;color:#64748b;font-size:13px}.admin-user-form-card{display:flex;flex-direction:column;gap:14px}.admin-user-role-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.admin-user-role-card{display:flex;flex-direction:column;gap:6px;padding:14px;border:1px solid #dbe7ef;border-radius:16px;background:#fff;cursor:pointer;box-shadow:0 8px 22px rgba(15,23,42,.04)}.admin-user-role-card input{display:none}.admin-user-role-card strong{color:#0f172a;font-size:15px}.admin-user-role-card span{color:#64748b;font-size:12px;line-height:1.45}.admin-user-role-card.active{border-color:#16a34a;background:#f0fdf4;box-shadow:0 12px 26px rgba(22,163,74,.12)}.admin-user-form-section{padding:0;border:1px solid #dce7ee;border-radius:16px;background:#fff;overflow:hidden}.admin-user-form-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid #eef2f7;background:#f8fafc}.admin-user-form-section-head h3{margin:0;color:#0f172a;font-size:15px}.admin-user-form-section-head span{color:#64748b;font-size:12px;font-weight:850}.admin-user-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px}.admin-user-form-grid label{display:flex;min-width:0;flex-direction:column;gap:6px;color:#334155;font-size:12px;font-weight:900}.admin-user-form-grid input,.admin-user-form-grid select{height:38px;border:1px solid #d8e1ea;border-radius:10px;background:#fbfdff;padding:0 10px;color:#0f172a}.admin-user-form-grid em{color:#94a3b8;font-size:11px;font-style:normal}.admin-user-form-grid b{color:#dc2626}.admin-user-form-actions{display:flex;justify-content:flex-end;gap:10px;padding:4px 0 10px}

.admin-file-v2-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:10px;border:1px solid #dce7ee;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.04)}.admin-file-v2-strip a{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:13px;background:#f8fafc;color:#334155;text-decoration:none}.admin-file-v2-strip a span{font-size:12px;font-weight:950}.admin-file-v2-strip a strong{font-size:19px;color:#0f172a}.admin-file-v2-strip a.active{border-color:#86efac;background:#f0fdf4;color:#166534}.admin-archive-tree{display:flex;flex-direction:column;gap:10px;padding:14px}.admin-archive-project{border:1px solid #dbe8df;border-radius:16px;background:#fff;overflow:hidden}.admin-archive-project summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px 14px;cursor:pointer;background:linear-gradient(90deg,#f0fdf4,#fff)}.admin-archive-project summary strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#0f172a}.admin-archive-project summary em,.admin-archive-stage-head em,.admin-archive-file em{color:#64748b;font-size:12px;font-style:normal}.admin-level{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:950}.admin-level.one{background:#dcfce7;color:#166534}.admin-level.two{background:#eff6ff;color:#1d4ed8}.admin-archive-stage{margin:10px 14px 12px 28px;border-left:2px solid #bbf7d0;padding-left:12px}.admin-archive-stage-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:8px 10px;border-radius:12px;background:#f8fafc}.admin-archive-stage-head strong{margin-right:auto;color:#0f172a}.admin-archive-file{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 10px;border-top:1px solid #eef2f7}.admin-file-index{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:8px;background:#ecfdf5;color:#15803d;font-size:12px;font-weight:950}.admin-archive-file strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155}.admin-file-v2-table{table-layout:fixed;min-width:960px}

.admin-fund-page .admin-card{overflow:hidden}.admin-fund-project-table,.admin-fund-application-table{table-layout:fixed;min-width:1080px}.admin-fund-rate{display:flex;align-items:center;gap:6px}.admin-fund-rate::before{content:"";display:block;flex:1;height:8px;border-radius:999px;background:#e2e8f0}.admin-fund-rate i{position:absolute;display:none}.admin-fund-rate span{min-width:42px;color:#166534;font-size:12px;font-weight:950}.admin-fund-rate{position:relative}.admin-fund-rate:after{content:"";position:absolute;left:0;top:50%;width:var(--w,0%);max-width:calc(100% - 48px);height:8px;transform:translateY(-50%);border-radius:999px;background:linear-gradient(90deg,#22c55e,#16a34a)}

.visitor-dashboard{gap:16px}.visitor-hero-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:22px;border:1px solid #dce9df;border-radius:20px;background:linear-gradient(135deg,#f0fdf4,#fff 55%,#eef6ff);box-shadow:0 14px 34px rgba(15,23,42,.06)}.visitor-hero-card h2{margin:0 0 8px;color:#0f172a;font-size:24px}.visitor-hero-card p{margin:0;color:#64748b}.visitor-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.visitor-card{padding:16px;border:1px solid #dce7ee;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.04)}.visitor-card h3{margin:0 0 8px;color:#0f172a}.visitor-card p{margin:0 0 12px;color:#64748b;font-size:13px;line-height:1.55}

@media(max-width:1500px){.admin-user-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.admin-file-v2-strip{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-user-role-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1280px){.admin-user-layout{grid-template-columns:1fr}.admin-user-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.admin-fund-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-file-v2-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.admin-user-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.visitor-card-grid{grid-template-columns:1fr}}
@media(max-width:760px){.admin-user-kpis,.admin-fund-kpis,.admin-file-v2-strip,.admin-user-role-grid,.admin-user-side,.admin-user-form-grid{grid-template-columns:1fr}.admin-user-form-hero,.visitor-hero-card{grid-template-columns:1fr}.admin-user-filter,.admin-file-v2-toolbar form,.admin-fund-toolbar form{align-items:stretch}.admin-user-filter input,.admin-user-filter select,.admin-file-v2-toolbar input,.admin-file-v2-toolbar select,.admin-fund-toolbar input,.admin-fund-toolbar select,.admin-btn{width:100%}}
.admin-user-form-grid .span-2{grid-column:span 2}

/* ===== 2026 compact UI pass: one-screen dashboards and unified document centers ===== */
.topbar-intro p{display:none!important}
.workspace{padding-top:14px}

@media (min-width:1281px){
  .admin-workbench-kpis{grid-template-columns:repeat(8,minmax(0,1fr))!important}
  .approval-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
.admin-workbench-page{gap:9px}
.admin-workbench-kpis{gap:7px}
.admin-workbench-kpi{min-height:62px;padding:8px 10px;border-radius:12px;gap:3px}
.admin-workbench-kpi span,.doc-kpi span,.approval-kpi-copy em{color:#0f172a;font-size:12px;font-weight:1000;letter-spacing:0}
.admin-workbench-kpi strong{font-size:20px;line-height:1.05}
.admin-workbench-kpi em{font-size:11px;color:#64748b}
.admin-workbench-main{grid-template-columns:minmax(0,1fr) 280px;gap:9px}
.admin-workbench-stack,.admin-workbench-side{gap:9px}
.admin-card-head{min-height:42px;padding:8px 11px;align-items:center}
.admin-card-head.compact{min-height:38px}
.admin-card-head h3{font-size:14px}
.admin-card-head p{display:none}
.admin-table th{height:32px;padding:7px 10px}
.admin-table td{height:36px;padding:7px 10px;font-size:12px}
.admin-feed-row{grid-template-columns:74px minmax(0,1fr) 105px;min-height:40px;padding:8px 11px}
.admin-quick-grid,.admin-mini-list{gap:6px;padding:9px}
.admin-quick-item{padding:8px 10px}
.admin-mini-row{padding:7px 9px}

.approval-shell-v2{gap:8px;grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
.approval-actions-only{justify-content:flex-end;min-height:34px}
.approval-header-row{margin-top:-2px}
.approval-kpi-grid{gap:8px}
.approval-kpi-card{min-height:62px;grid-template-columns:34px minmax(0,1fr);gap:8px;padding:9px 11px;border-radius:13px}
.approval-kpi-icon{width:34px;height:34px;border-radius:10px;font-size:13px}
.approval-kpi-copy{gap:0}
.approval-kpi-copy strong{font-size:21px}
.approval-kpi-copy small{font-size:11px}
.approval-filter-card{padding:8px;border-radius:13px}
.approval-filter-toolbar{gap:7px}
.approval-filter-toolbar input,.approval-filter-toolbar select{height:32px;font-size:12px;border-radius:9px}
.approval-type-tabs{min-height:32px}
.approval-tab{height:31px;padding:0 10px;font-size:12px}
.approval-table th{height:34px}
.approval-table td{height:42px}
.approval-bottom-bar{min-height:34px}

.doc-kpi-grid{gap:8px}
.doc-kpi{min-height:62px;padding:9px 11px;border-radius:13px;gap:3px 8px}
.doc-kpi strong{font-size:22px}
.doc-kpi em{font-size:11px}
.doc-tab-card{padding:8px}
.doc-filter-line{padding-top:0;gap:7px}
.doc-filter-line input,.doc-filter-line select,.doc-filter-line .btn,.doc-filter-line .admin-btn{height:32px;font-size:12px}
.document-layout-v2{grid-template-columns:198px minmax(0,1fr);gap:9px}
.doc-sidebar-compact{top:68px;border-radius:13px;padding:9px;gap:4px}
.doc-sidebar-compact a{height:28px;font-size:12px;border-radius:8px}
.doc-section-head{min-height:38px;padding:8px 10px}
.doc-section-head strong{font-size:14px}
.doc-table th{height:32px}
.doc-table td{padding:7px 10px;font-size:12px}
.doc-upload-line{padding:8px 10px}
.doc-archive-browser{padding:9px;gap:8px}
.doc-archive-folder summary{min-height:40px;padding:8px 10px}
.doc-archive-stage{padding:9px 10px 9px 15px}
.doc-archive-file{min-height:38px;padding:7px 9px;margin-top:5px}
.admin-doc-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.teacher-file-filter,.admin-file-filter-v2{grid-template-columns:minmax(220px,1.4fr) repeat(2,minmax(110px,.7fr)) auto auto auto auto}

.form-group{margin-bottom:10px}
.form-group label{display:block;margin-bottom:4px;color:#475569;font-size:12px;font-weight:900}
.form-group input,.form-group select,.form-group textarea{width:100%;border:1px solid #d8e1ea;border-radius:10px;background:#fff;color:#0f172a;font-size:13px;padding:8px 10px}
.form-group textarea{min-height:64px;resize:vertical}
.recip-list{max-height:132px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px;padding:7px;background:#f8fafc}
.recip-list label{display:flex;align-items:center;gap:6px;margin:0;padding:3px 0;font-size:12px;color:#334155}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}

.notice-workbench{display:flex;flex-direction:column;gap:10px}
.notice-toolbar-card,.notice-table-card{border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.035);overflow:hidden}
.notice-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px}
.notice-toolbar input[type=text]{flex:1 1 260px;min-width:220px}
.notice-toolbar input[type=text],.notice-toolbar select{height:34px;border:1px solid #d8e1ea;border-radius:10px;background:#fbfdff;padding:0 10px;font-size:13px}
.notice-check{display:inline-flex;align-items:center;gap:5px;color:#64748b;font-size:12px;font-weight:850;white-space:nowrap}
.notice-btn{height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0 12px;border:1px solid #d8e1ea;border-radius:10px;background:#fff;color:#334155;font-size:13px;font-weight:900;text-decoration:none;cursor:pointer;white-space:nowrap}
.notice-btn.primary{border-color:#16834a;background:#16834a;color:#fff}
.notice-table-wrap{overflow-x:auto}
.notice-table-v2{width:100%;min-width:980px;border-collapse:collapse;table-layout:fixed}
.notice-table-v2 th{height:34px;background:#f8fafc;color:#64748b;font-size:12px;font-weight:950;text-align:left;padding:0 10px;border-bottom:1px solid #eef2f7}
.notice-table-v2 td{height:44px;padding:7px 10px;border-bottom:1px solid #eef2f7;color:#334155;font-size:12px;vertical-align:middle}
.notice-table-v2 tr:hover td{background:#fbfdfb}
.notice-table-v2 tr.is-withdrawn{opacity:.58}
.notice-title-link{display:inline-flex;max-width:100%;align-items:center;gap:6px;color:#0f172a;font-weight:950;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notice-title-link span{height:20px;padding:0 6px;border-radius:999px;background:#fff7ed;color:#b45309;font-size:11px}
.notice-withdrawn{margin-left:6px;color:#dc2626;font-size:11px;font-style:normal;font-weight:900}
.notice-type,.notice-target{height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:900;white-space:nowrap}
.notice-type.type-notice{background:#dbeafe;color:#1e40af}.notice-type.type-meeting{background:#dcfce7;color:#166534}.notice-type.type-reminder{background:#fef3c7;color:#92400e}.notice-type.type-material{background:#fdf4ff;color:#7e22ce}.notice-type.type-lab{background:#fff7ed;color:#9a3412}
.notice-read-cell{display:flex;align-items:center;gap:7px}.notice-read-bar{width:76px;height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden}.notice-read-bar i{display:block;height:100%;border-radius:inherit;background:#16a34a}.notice-read-cell b,.notice-muted{color:#64748b;font-size:12px;font-weight:800}
.notice-actions,.notice-actions form{display:inline-flex;align-items:center;gap:6px;margin:0}
.notice-actions a,.notice-actions button{border:0;background:transparent;color:#16834a;font-size:12px;font-weight:900;text-decoration:none;cursor:pointer;padding:0}.notice-actions button.danger{color:#dc2626}
.notice-empty{min-height:220px;display:grid;place-items:center;align-content:center;gap:8px;color:#64748b}.notice-empty strong{color:#0f172a;font-size:16px}

.retro-review-page{display:flex;flex-direction:column;gap:10px}
.retro-topline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.retro-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.retro-tabs a{min-height:58px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:13px;background:#fff;color:#334155;text-decoration:none;box-shadow:0 8px 20px rgba(15,23,42,.035)}
.retro-tabs a.active{border-color:#86efac;background:#f0fdf4;color:#166534}
.retro-tabs strong{font-size:21px;line-height:1;color:#0f172a}.retro-tabs span{font-size:12px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.retro-actions,.retro-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.retro-btn{height:32px;display:inline-flex;align-items:center;justify-content:center;padding:0 11px;border:1px solid #d8e1ea;border-radius:10px;background:#fff;color:#334155;font-size:12px;font-weight:900;text-decoration:none;cursor:pointer;white-space:nowrap}
.retro-btn.primary{border-color:#16834a;background:#16834a;color:#fff}
.retro-filter-card,.retro-table-card{border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.035);overflow:hidden}
.retro-filter{padding:10px}.retro-filter input,.retro-filter select{height:32px;border:1px solid #d8e1ea;border-radius:10px;background:#fbfdff;padding:0 10px;font-size:12px}.retro-filter input{flex:1 1 260px}
.retro-table-wrap{overflow-x:auto}.retro-table{width:100%;min-width:1080px;border-collapse:collapse;table-layout:fixed}.retro-table th{height:34px;background:#f8fafc;color:#64748b;font-size:12px;font-weight:950;text-align:left;padding:0 10px}.retro-table td{height:48px;padding:7px 10px;border-top:1px solid #eef2f7;color:#334155;font-size:12px;vertical-align:middle}
.retro-title,.retro-table td span,.retro-ellipsis{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.retro-title{color:#0f172a;font-size:13px}.retro-table td span{color:#64748b}.retro-chip{display:inline-flex!important;width:auto;padding:3px 8px;border-radius:999px;background:#eff6ff;color:#1d4ed8!important;font-weight:950}
.retro-review-actions{display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px;align-items:center}.retro-review-actions form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;margin:0;grid-column:1/-1}.retro-review-actions input{height:28px;min-width:0;border:1px solid #d8e1ea;border-radius:8px;padding:0 8px;font-size:12px}
.retro-link{border:0;background:transparent;color:#475569;font-size:12px;font-weight:950;text-decoration:none;cursor:pointer;padding:0;white-space:nowrap}.retro-link.primary{color:#16834a}.retro-link.danger{color:#dc2626}.retro-empty{padding:40px;text-align:center;color:#94a3b8}

@media(max-width:1280px){
  .admin-workbench-main,.document-layout-v2{grid-template-columns:1fr}
  .teacher-file-filter,.admin-file-filter-v2,.doc-filter-line{grid-template-columns:repeat(2,minmax(0,1fr))}
  .retro-topline{grid-template-columns:1fr}.retro-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ===== 2026-05 document center / profile / project-space polish ===== */
.doc-filter-line,
.teacher-file-filter,
.admin-file-filter-v2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: end;
  padding-top: 0 !important;
}
.doc-filter-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(130px, .8fr));
  gap: 8px;
  align-items: end;
}
.doc-filter-fields label { min-width: 0; }
.doc-filter-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-filter-actions .btn,
.doc-filter-actions .admin-btn {
  min-width: 74px;
  height: 34px;
  padding-inline: 14px;
}
.doc-filter-actions .btn:nth-last-child(-n+2),
.doc-filter-actions .admin-btn:nth-last-child(-n+2) {
  min-width: 126px;
}

.doc-upload-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
}
.doc-upload-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 65%);
}
.doc-upload-modal-head h3 { margin: 0; color: #0f172a; font-size: 17px; font-weight: 950; }
.doc-upload-modal-head p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.modal-close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.doc-upload-form {
  max-height: calc(100vh - 132px);
  overflow: auto;
  padding: 14px 18px 16px;
}
.doc-upload-section {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfdff;
}
.doc-upload-section + .doc-upload-section { margin-top: 10px; }
.doc-upload-section h4 {
  margin: 0 0 10px;
  color: #166534;
  font-size: 13px;
  font-weight: 950;
}
.doc-upload-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.doc-upload-grid .span-2 { grid-column: 1 / -1; }
.doc-recipient-grid {
  max-height: 154px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}
.doc-recipient-grid label {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}
.doc-recipient-grid label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-filter-toolbar {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.project-filter-toolbar .project-search-input { flex: 1 1 280px; }
.project-filter-toolbar select { flex: 0 1 116px; }
.project-date-range { flex: 0 1 220px; }
.project-more-filter { flex: 0 0 96px; }
.project-filter-reset,
.project-filter-submit { width: 68px; flex: 0 0 68px; }
.project-toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.project-toolbar-actions .project-action-btn { height: 36px; }

.project-files-workbench { display: flex; flex-direction: column; gap: 12px; }
.project-files-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid #dce9df;
  border-radius: 18px;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 58%, #eef6ff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}
.project-files-eyebrow { color: #16834a; font-size: 12px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.project-files-hero h2 { margin: 4px 0; color: #0f172a; font-size: 22px; font-weight: 950; }
.project-files-hero p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.55; }
.project-files-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.project-files-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.project-files-kpis div,
.project-files-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}
.project-files-kpis div { min-height: 70px; padding: 12px 14px; }
.project-files-kpis span { display: block; color: #64748b; font-size: 12px; font-weight: 950; }
.project-files-kpis strong { display: block; margin-top: 5px; color: #0f172a; font-size: 24px; line-height: 1; font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-files-kpis em { display: block; margin-top: 6px; color: #94a3b8; font-size: 12px; font-style: normal; font-weight: 850; }
.project-files-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.project-files-side { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.project-files-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.project-files-card { overflow: hidden; }
.project-files-card-head {
  min-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfdff;
}
.project-files-card-head.compact { min-height: 42px; }
.project-files-card-head h3 { margin: 0; color: #0f172a; font-size: 15px; font-weight: 950; }
.project-files-card-head p { margin: 2px 0 0; color: #64748b; font-size: 12px; }
.project-files-card-head a { color: #16834a; font-size: 12px; font-weight: 950; text-decoration: none; white-space: nowrap; }
.project-folder-tree { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.project-folder-group { border: 1px solid #e2e8f0; border-radius: 13px; background: #fff; overflow: hidden; }
.project-folder-group.active { border-color: #bbf7d0; background: #f8fffb; }
.project-folder-group summary {
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.project-folder-group summary::-webkit-details-marker { display: none; }
.project-folder-icon { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 8px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 950; }
.project-folder-group summary a,
.project-folder-group summary span:not(.project-folder-icon) { min-width: 0; color: #0f172a; font-size: 13px; font-weight: 950; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-folder-group summary em { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 12px; font-style: normal; font-weight: 950; text-align: center; }
.project-folder-section { padding: 8px 12px 3px; color: #94a3b8; font-size: 11px; font-weight: 950; letter-spacing: .06em; }
.project-folder-entry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 5px 8px;
  padding: 8px;
  border-radius: 10px;
  color: #334155;
  text-decoration: none;
}
.project-folder-entry:hover,
.project-folder-entry.active { background: #f0fdf4; }
.project-folder-entry > span { grid-row: 1 / span 2; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 950; }
.project-folder-entry.free > span { background: #dcfce7; color: #166534; }
.project-folder-entry strong,
.project-folder-entry em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-folder-entry strong { color: #0f172a; font-size: 13px; }
.project-folder-entry em { color: #94a3b8; font-size: 12px; font-style: normal; }
.project-folder-empty { padding: 8px 12px 12px; color: #94a3b8; font-size: 12px; }
.project-files-breadcrumb { display: flex; align-items: center; gap: 6px; padding: 10px 13px; border-bottom: 1px solid #eef2f7; color: #94a3b8; font-size: 12px; font-weight: 850; }
.project-files-breadcrumb a { color: #16834a; text-decoration: none; }
.project-files-table-wrap { overflow-x: auto; }
.project-files-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.project-files-table th { height: 36px; padding: 0 11px; border-bottom: 1px solid #eef2f7; background: #f8fafc; color: #64748b; font-size: 12px; font-weight: 950; text-align: left; }
.project-files-table td { height: 48px; padding: 8px 11px; border-bottom: 1px solid #eef2f7; color: #334155; font-size: 12px; vertical-align: middle; }
.project-files-table td strong,
.project-files-table td small,
.project-files-table td a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-files-table td strong { color: #0f172a; font-size: 13px; }
.project-files-table td small { margin-top: 3px; color: #94a3b8; }
.project-files-table td a { color: #166534; font-weight: 900; text-decoration: none; }
.project-files-table .muted { color: #94a3b8; }
.project-files-actions,
.project-files-actions form { display: inline-flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.project-files-actions a,
.project-files-actions button { border: 0; background: transparent; color: #16834a; font-size: 12px; font-weight: 950; text-decoration: none; cursor: pointer; padding: 0; }
.project-files-actions button { color: #dc2626; }
.project-files-empty { min-height: 180px; display: grid; place-items: center; color: #94a3b8; }
.project-files-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-files-form { padding-bottom: 12px; }
.project-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.project-form-grid .span-2 { grid-column: 1 / -1; }
.project-form-grid label { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: #334155; font-size: 12px; font-weight: 950; }
.project-form-grid input,
.project-form-grid select { width: 100%; height: 36px; border: 1px solid #d8e1ea; border-radius: 10px; background: #fbfdff; color: #0f172a; padding: 0 10px; }
.project-form-grid input[type=file] { padding: 6px 10px; }
.project-files-form-actions { display: flex; justify-content: flex-end; padding: 0 12px; }

.profile-v3 {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1180px;
}
.profile-v3-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.profile-v3-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f7fcf8 0%, #eef8f1 100%);
}
.profile-tone-blue .profile-v3-head { background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%); }
.profile-tone-slate .profile-v3-head { background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%); }
.profile-v3-title h2 { margin: 0 0 6px; color: var(--text-strong); font-size: 24px; font-weight: 950; }
.profile-v3-title p { margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.55; }
.profile-v3-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.profile-tone-blue .profile-v3-badge { color: #1d4ed8; }
.profile-tone-slate .profile-v3-badge { color: #475569; }
.profile-v3-body { padding: 24px 28px 28px; }
.profile-v3 .profile-photo-panel {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px dashed #cfe0d4;
  border-radius: 22px;
  background: #fbfefc;
  margin-bottom: 24px;
}
.profile-tone-blue .profile-photo-panel { border-color: #cfe0f8; background: #fbfdff; }
.profile-tone-slate .profile-photo-panel { border-color: #d8dee8; background: #fbfdff; }
.profile-v3 .profile-avatar-preview {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--primary), #68c18b);
  color: #fff;
  font-size: 42px;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(47, 143, 91, .18);
}
.profile-tone-blue .profile-avatar-preview { background: linear-gradient(135deg, #2563eb, #60a5fa); box-shadow: 0 12px 28px rgba(37, 99, 235, .18); }
.profile-tone-slate .profile-avatar-preview { background: linear-gradient(135deg, #475569, #94a3b8); box-shadow: 0 12px 28px rgba(71, 85, 105, .16); }
.profile-v3 .profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-v3 .profile-photo-copy h3 { margin: 0; color: var(--text-strong); font-size: 17px; }
.profile-v3 .profile-photo-copy p { margin: 6px 0 14px; color: var(--text-soft); font-size: 13px; line-height: 1.55; }
.profile-v3 .profile-file-input { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.profile-v3 .profile-file-input input[type=file] { max-width: 320px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text-soft); }
.profile-v3 .section-title { margin: 4px 0 14px; color: var(--primary-dark); font-size: 13px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.profile-tone-blue .section-title { color: #1d4ed8; }
.profile-tone-slate .section-title { color: #475569; }
.profile-v3 .form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.profile-v3 .field { display: flex; flex-direction: column; gap: 7px; }
.profile-v3 .field.full { grid-column: 1 / -1; }
.profile-v3 .field label { color: #334155; font-size: 13px; font-weight: 850; }
.profile-v3 .field input,
.profile-v3 .field select { height: 46px; padding: 0 13px; border: 1px solid #d6e0da; border-radius: 14px; background: #fff; color: #0f172a; font-size: 14px; transition: border-color .18s ease, box-shadow .18s ease; }
.profile-tone-blue .field input,
.profile-tone-blue .field select { border-color: #d6e0ea; }
.profile-v3 .field input:focus,
.profile-v3 .field select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47, 143, 91, .1); }
.profile-tone-blue .field input:focus,
.profile-tone-blue .field select:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.profile-v3 .field input[readonly] { background: #f8fafc; color: #475569; }
.profile-v3 .field-help { color: #64748b; font-size: 12px; line-height: 1.5; }
.profile-v3 .profile-section { margin-top: 24px; }
.profile-v3 .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; margin-top: 28px; }
.profile-v3 .btnx {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.profile-v3 .btnx.primary { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 10px 22px rgba(47, 143, 91, .2); }
.profile-tone-blue .btnx.primary { border-color: #2563eb; background: #2563eb; box-shadow: 0 10px 22px rgba(37, 99, 235, .2); }
.profile-tone-slate .btnx.primary { border-color: #475569; background: #475569; box-shadow: 0 10px 22px rgba(71, 85, 105, .18); }

@media (max-width: 1280px) {
  .doc-filter-line,
  .teacher-file-filter,
  .admin-file-filter-v2,
  .project-files-layout { grid-template-columns: 1fr !important; }
  .doc-filter-actions,
  .project-toolbar-actions { margin-left: 0; justify-content: flex-start; }
  .project-files-side { position: static; max-height: none; }
  .project-files-action-grid { grid-template-columns: 1fr; }
  .profile-v3 .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .doc-filter-fields,
  .doc-upload-grid.two-col,
  .doc-recipient-grid,
  .project-files-hero,
  .project-files-kpis,
  .project-form-grid,
  .profile-v3 .form-grid,
  .profile-v3 .profile-photo-panel { grid-template-columns: 1fr; }
  .doc-filter-actions .btn,
  .doc-filter-actions .admin-btn,
  .project-files-hero-actions .admin-btn { width: 100%; }
  .project-files-hero-actions { justify-content: stretch; }
  .project-form-grid .span-2 { grid-column: auto; }
  .profile-v3-head,
  .profile-v3-body { padding: 20px; }
  .profile-v3 .profile-photo-panel { text-align: center; }
  .profile-v3 .profile-avatar-preview { margin: 0 auto; }
}

/* Second-pass UI fixes: document recipients, project space, project filters, profile page */
.doc-upload-modal {
  width: min(920px, calc(100vw - 32px));
}

.doc-recipient-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.doc-recipient-label-row > label {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 950;
}

.doc-recipient-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.doc-recipient-toolbar strong {
  color: #166534;
  font-size: 13px;
}

.doc-recipient-toolbar button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #cfe8d6;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.doc-recipient-toolbar button:hover {
  border-color: #9bd4ad;
  background: #dcfce7;
}

.doc-recipient-table {
  border: 1px solid #dfe8ef;
  border-radius: 14px;
  background: #fff;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.doc-recipient-head,
.doc-recipient-row {
  min-width: 760px;
  display: grid;
  grid-template-columns: 60px minmax(150px, 1.15fr) minmax(126px, .85fr) minmax(112px, .72fr) minmax(190px, 1.28fr);
  gap: 10px;
  align-items: center;
}

.doc-recipient-head {
  min-height: 36px;
  padding: 0 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e8eef5;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.doc-recipient-body {
  min-width: 760px;
  max-height: 250px;
  overflow-y: auto;
}

.doc-recipient-row {
  min-height: 46px;
  padding: 7px 12px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.doc-recipient-row:last-child {
  border-bottom: 0;
}

.doc-recipient-row:hover,
.doc-recipient-row.selected {
  background: #f0fdf4;
}

.doc-recipient-row.selected {
  box-shadow: inset 3px 0 0 #22c55e;
}

.doc-recipient-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-recipient-check input {
  width: 16px;
  height: 16px;
  accent-color: #16a34a;
}

.doc-recipient-name,
.doc-recipient-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-recipient-name strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-recipient-name em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-recipient-meta {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.doc-recipient-empty {
  min-width: 760px;
  padding: 18px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.project-more-filter {
  flex: 0 0 112px;
  position: relative;
  z-index: 30;
}

.project-more-filter > summary {
  width: 100%;
  padding: 0 12px;
}

.project-more-panel {
  right: 0;
  top: 44px;
  width: min(780px, calc(100vw - 96px));
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
}

.project-more-panel label span {
  font-size: 13px;
  white-space: nowrap;
}

.project-files-summarybar {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px;
  border-radius: 16px;
}

.project-files-summary-main {
  min-width: 0;
}

.project-files-current {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 3px 0 2px;
}

.project-files-current strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-files-current em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.project-files-layout {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.project-files-side {
  position: static;
  align-self: start;
  height: fit-content;
  max-height: none;
  overflow: visible;
}

.project-files-side .project-files-card-head {
  min-height: 52px;
}

.project-folder-tree {
  max-height: min(620px, calc(100vh - 292px));
  overflow: auto;
  gap: 6px;
  padding: 8px;
}

.project-folder-group {
  border-radius: 12px;
}

.project-folder-group summary {
  min-height: 36px;
  padding: 7px 9px;
}

.project-folder-entry {
  margin: 4px 7px;
  padding: 7px;
}

.project-files-main {
  gap: 14px;
}

.project-file-table-card {
  align-self: stretch;
}

.profile-v3 {
  width: 100%;
  max-width: none;
  gap: 0;
}

.profile-v3-card {
  width: 100%;
  min-height: calc(100vh - 170px);
  border-radius: 22px;
}

.profile-v3-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px;
}

.profile-v3 .profile-photo-panel {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
  min-height: 100%;
  padding: 22px 18px;
  text-align: center;
}

.profile-v3 .profile-avatar-preview {
  width: 132px;
  height: 132px;
  border-radius: 34px;
}

.profile-v3 .profile-photo-copy p {
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
}

.profile-v3 .profile-file-input {
  justify-content: center;
}

.profile-v3 .profile-file-input input[type=file] {
  width: 100%;
  max-width: 250px;
}

.profile-v3 .profile-section {
  grid-column: 2;
  margin-top: 0;
  padding: 18px;
  border: 1px solid #edf2f7;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .025);
}

.profile-v3 .section-title {
  margin-top: 0;
}

.profile-v3 .actions {
  grid-column: 2;
  margin-top: 0;
  padding: 16px 18px;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  background: #fbfdff;
}

@media (max-width: 1180px) {
  .profile-v3-body {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
  }
  .profile-v3 .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .project-more-filter {
    flex: 1 1 100%;
    height: auto;
  }
  .project-more-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-shadow: none;
  }
  .project-files-layout {
    grid-template-columns: 1fr;
  }
  .project-folder-tree {
    max-height: 360px;
  }
  .profile-v3-body {
    grid-template-columns: 1fr;
  }
  .profile-v3 .profile-photo-panel,
  .profile-v3 .profile-section,
  .profile-v3 .actions {
    grid-column: 1;
    grid-row: auto;
  }
  .profile-v3 .profile-photo-panel {
    min-height: auto;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    text-align: left;
  }
  .profile-v3 .profile-file-input {
    justify-content: flex-start;
  }
  .profile-v3 .profile-photo-copy p {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 760px) {
  .doc-recipient-label-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .doc-recipient-head,
  .doc-recipient-row,
  .doc-recipient-body,
  .doc-recipient-empty {
    min-width: 680px;
  }
  .project-files-summarybar {
    grid-template-columns: 1fr;
  }
  .profile-v3-head {
    flex-direction: column;
  }
  .profile-v3-body {
    padding: 16px;
  }
  .profile-v3 .profile-photo-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-v3 .profile-file-input {
    justify-content: center;
  }
  .profile-v3 .form-grid,
  .project-more-panel {
    grid-template-columns: 1fr;
  }
  .profile-v3 .actions {
    justify-content: stretch;
  }
  .profile-v3 .btnx {
    flex: 1 1 100%;
  }
}

/* Third-pass fixes: recipient rows are divs, compact project-space toolbar */
.doc-recipient-table .doc-recipient-head,
.doc-recipient-table .doc-recipient-row {
  min-width: 820px;
  display: grid !important;
  grid-template-columns: 64px minmax(150px, 1.05fr) minmax(140px, .9fr) minmax(120px, .78fr) minmax(220px, 1.35fr);
  gap: 12px;
  align-items: center;
  box-sizing: border-box;
}

.doc-recipient-table .doc-recipient-body {
  min-width: 820px;
  max-height: 236px;
  overflow-y: auto;
  overflow-x: hidden;
}

.doc-recipient-table .doc-recipient-row {
  width: 100%;
  margin: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #fff;
  color: #334155;
}

.doc-recipient-table .doc-recipient-row:last-child {
  border-bottom: 0;
}

.doc-recipient-table .doc-recipient-row:hover,
.doc-recipient-table .doc-recipient-row.selected {
  background: #f0fdf4;
}

.doc-recipient-table .doc-recipient-check {
  justify-content: center;
}

.doc-recipient-table .doc-recipient-check input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  accent-color: #16a34a;
}

.doc-recipient-table .doc-recipient-name strong,
.doc-recipient-table .doc-recipient-meta,
.doc-recipient-table .doc-recipient-unit strong,
.doc-recipient-table .doc-recipient-unit em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-recipient-table .doc-recipient-unit {
  display: grid;
  gap: 2px;
}

.doc-recipient-table .doc-recipient-unit strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.doc-recipient-table .doc-recipient-unit em {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.project-files-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dce9df;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fcfa 0%, #fff 62%, #f3f7ff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.project-files-toolbar-main {
  min-width: 0;
}

.project-files-toolbar-main > strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-files-toolbar-main > p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.project-files-toolbar-stats {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(70px, auto));
  gap: 8px;
  align-items: stretch;
}

.project-files-toolbar-stats span {
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.project-files-toolbar-stats b {
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.project-files-toolbar-stats em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.project-files-toolbar-actions {
  justify-content: flex-end;
}

@media (min-width: 1041px) {
  .project-files-layout {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) !important;
    align-items: start;
  }
  .project-files-side {
    position: static !important;
    align-self: start;
    height: fit-content;
    max-height: none !important;
    overflow: visible;
  }
  .project-folder-tree {
    max-height: min(520px, calc(100vh - 310px));
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (max-width: 1040px) {
  .project-files-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .project-files-toolbar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .project-files-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .doc-recipient-table .doc-recipient-head,
  .doc-recipient-table .doc-recipient-row,
  .doc-recipient-table .doc-recipient-body,
  .doc-recipient-empty {
    min-width: 760px;
  }
  .project-files-toolbar-stats {
    grid-template-columns: 1fr;
  }
}

/* ===== Teacher project and formal achievement dashboard refinements ===== */
.project-management-page .project-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-management-page .project-kpi-card {
  min-height: 82px;
  align-items: stretch;
  border-radius: 12px;
  padding: 13px 14px;
  background:
    linear-gradient(135deg, rgba(22, 133, 77, .05), rgba(255, 255, 255, 0) 58%),
    #fff;
}

.project-management-page .project-kpi-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 10px;
}

.project-management-page .project-kpi-copy {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 5px;
}

.project-management-page .project-kpi-copy em,
.project-management-page .project-kpi-copy b,
.project-management-page .project-kpi-copy small {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-management-page .project-kpi-copy em {
  color: #64748b;
  font-size: 12px;
}

.project-management-page .project-kpi-value {
  min-width: 0;
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.project-management-page .project-kpi-value strong {
  color: #0f172a;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
}

.project-management-page .project-kpi-value small {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.project-management-page .project-kpi-copy b {
  color: #8a96a5;
  font-size: 11px;
  font-weight: 850;
}

.achievement-list-page .achievement-formal-summary {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(178px, auto);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
}

.achievement-formal-lead {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #dbeadf;
  border-radius: 12px;
  background: #f3fbf6;
}

.achievement-formal-lead span,
.achievement-formal-lead small {
  color: #5e6f66;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-formal-lead strong {
  color: #0f5f37;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.achievement-list-page .achievement-formal-summary .achievement-status-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 1fr));
  gap: 8px;
  padding: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.achievement-list-page .achievement-formal-summary .achievement-status-tab {
  min-height: 58px;
  border-radius: 10px;
  padding: 8px 10px;
}

.achievement-list-page .achievement-formal-summary .achievement-status-tab strong {
  font-size: 20px;
}

.achievement-formal-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: stretch;
}

.achievement-formal-actions .btn {
  min-height: 34px;
  justify-content: center;
}

.achievement-topic-entry {
  min-height: 42px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #dbe7ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}

.achievement-topic-entry span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.achievement-topic-entry strong {
  color: #2563eb;
  font-size: 13px;
  font-weight: 950;
}

.achievement-project-row .achievement-table-title {
  color: #0f766e;
}

.achievement-status-stack small {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

@media (max-width: 1280px) {
  .achievement-list-page .achievement-formal-summary {
    grid-template-columns: 1fr;
  }
  .achievement-formal-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .project-management-page .project-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .project-management-page .project-kpi-grid,
  .achievement-list-page .achievement-formal-summary .achievement-status-tabs,
  .achievement-formal-actions {
    grid-template-columns: 1fr;
  }
}

/* ===== Admin console visual system ===== */
body.role-admin {
  --admin-green: #0f7a43;
  --admin-green-2: #159356;
  --admin-ink: #102033;
  --admin-muted: #64748b;
  --admin-soft: #f6f8fb;
  --admin-line: #dfe7ef;
  --admin-panel: #ffffff;
  --admin-blue: #2563eb;
  --admin-amber: #b7791f;
  --admin-red: #c2413b;
}

body.role-admin .product-main,
body.role-admin .product-workspace {
  background: var(--admin-soft);
}

body.role-admin .topbar-intro h1 {
  color: var(--admin-ink);
  font-size: 20px;
  font-weight: 950;
}

body.role-admin .topbar-eyebrow {
  color: var(--admin-green);
  font-weight: 950;
}

body.role-admin .admin-workbench-page,
body.role-admin .admin-report-page,
body.role-admin .admin-file-v2-page,
body.role-admin .admin-fund-page,
body.role-admin .admin-diagnostic-page,
body.role-admin .admin-user-page,
body.role-admin .project-management-page,
body.role-admin .student-management-page,
body.role-admin .task-center-page,
body.role-admin .achievement-hub,
body.role-admin .notice-workbench,
body.role-admin .approval-center-page {
  gap: 12px;
  color: var(--admin-ink);
}

body.role-admin .admin-workbench-page::before,
body.role-admin .admin-report-page::before,
body.role-admin .admin-file-v2-page::before,
body.role-admin .admin-fund-page::before,
body.role-admin .admin-user-page::before,
body.role-admin .project-management-page::before,
body.role-admin .student-management-page::before,
body.role-admin .task-center-page::before,
body.role-admin .achievement-hub::before,
body.role-admin .notice-workbench::before,
body.role-admin .approval-center-page::before {
  content: "管理员控制台";
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--admin-line);
  border-left: 4px solid var(--admin-green);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-green);
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

body.role-admin .admin-workbench-kpis {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)) !important;
  gap: 10px;
}

body.role-admin .admin-workbench-kpi,
body.role-admin .admin-report-kpi,
body.role-admin .admin-fund-kpi,
body.role-admin .admin-user-kpi,
body.role-admin .doc-kpi,
body.role-admin .project-kpi-card,
body.role-admin .student-kpi-card,
body.role-admin .task-kpi,
body.role-admin .approval-kpi-card,
body.role-admin .hub-kpi,
body.role-admin .catalog-metric,
body.role-admin .retro-tabs a {
  min-height: 78px;
  border: 1px solid var(--admin-line) !important;
  border-radius: 8px !important;
  background: var(--admin-panel) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04) !important;
}

body.role-admin .admin-workbench-kpi {
  position: relative;
  padding: 12px 13px 12px 15px;
  justify-content: center;
}

body.role-admin .admin-workbench-kpi::before,
body.role-admin .admin-report-kpi::before,
body.role-admin .admin-fund-kpi::before,
body.role-admin .admin-user-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: var(--admin-green);
}

body.role-admin .admin-workbench-kpi.tone-orange::before,
body.role-admin .admin-workbench-kpi.tone-amber::before {
  background: var(--admin-amber);
}

body.role-admin .admin-workbench-kpi.tone-blue::before,
body.role-admin .admin-workbench-kpi.tone-cyan::before {
  background: var(--admin-blue);
}

body.role-admin .admin-workbench-kpi.tone-red::before {
  background: var(--admin-red);
}

body.role-admin .admin-workbench-kpi.tone-purple::before,
body.role-admin .admin-workbench-kpi.tone-slate::before {
  background: #475569;
}

body.role-admin .admin-workbench-kpi span,
body.role-admin .admin-report-kpi span,
body.role-admin .admin-fund-kpi span,
body.role-admin .admin-user-kpi span,
body.role-admin .project-kpi-copy em,
body.role-admin .student-kpi-copy em,
body.role-admin .task-kpi .label,
body.role-admin .doc-kpi span,
body.role-admin .hub-kpi-copy span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 950;
}

body.role-admin .admin-workbench-kpi strong,
body.role-admin .admin-report-kpi strong,
body.role-admin .admin-fund-kpi strong,
body.role-admin .admin-user-kpi strong,
body.role-admin .project-kpi-value strong,
body.role-admin .student-kpi-copy strong,
body.role-admin .task-kpi .value,
body.role-admin .doc-kpi strong,
body.role-admin .hub-kpi-copy strong {
  color: var(--admin-ink);
  font-size: 25px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

body.role-admin .admin-workbench-kpi em,
body.role-admin .admin-report-kpi em,
body.role-admin .admin-fund-kpi em,
body.role-admin .admin-user-kpi em,
body.role-admin .doc-kpi em,
body.role-admin .hub-kpi-copy small {
  color: #7b8794;
  font-size: 12px;
  font-style: normal;
}

body.role-admin .admin-card,
body.role-admin .admin-report-card,
body.role-admin .admin-user-filter-card,
body.role-admin .admin-fund-toolbar,
body.role-admin .doc-tab-card,
body.role-admin .doc-sidebar-compact,
body.role-admin .doc-main-table > section,
body.role-admin .project-filter-card,
body.role-admin .project-table-card,
body.role-admin .student-filter-card,
body.role-admin .student-table-card,
body.role-admin .student-chart-card,
body.role-admin .student-shortcut-card,
body.role-admin .task-filter-toolbar,
body.role-admin .task-tree-card,
body.role-admin .hub-card,
body.role-admin .notice-toolbar-card,
body.role-admin .notice-table-card,
body.role-admin .approval-filter-card,
body.role-admin .approval-table-card-v2,
body.role-admin .retro-filter-card,
body.role-admin .retro-table-card {
  border: 1px solid var(--admin-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .035) !important;
}

body.role-admin .admin-card-head,
body.role-admin .hub-card-head,
body.role-admin .student-card-head,
body.role-admin .task-tree-head,
body.role-admin .project-table-card thead,
body.role-admin .notice-table-v2 th,
body.role-admin .admin-table th,
body.role-admin .project-table th,
body.role-admin .student-management-table th,
body.role-admin .task-table th,
body.role-admin .approval-table th,
body.role-admin .retro-table th {
  background: #f8fafc !important;
}

body.role-admin .admin-card-head {
  min-height: 46px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-line);
}

body.role-admin .admin-card-head h3,
body.role-admin .hub-card-head h3,
body.role-admin .student-card-head h3,
body.role-admin .task-tree-head strong {
  color: var(--admin-ink);
  font-size: 15px;
  font-weight: 950;
}

body.role-admin .admin-card-head p {
  display: block;
  color: var(--admin-muted);
  font-size: 12px;
}

body.role-admin .admin-workbench-main {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
}

body.role-admin .admin-workbench-stack,
body.role-admin .admin-workbench-side {
  gap: 12px;
}

body.role-admin .admin-table th,
body.role-admin .project-table th,
body.role-admin .student-management-table th,
body.role-admin .task-table th,
body.role-admin .notice-table-v2 th,
body.role-admin .approval-table th,
body.role-admin .retro-table th {
  height: 38px;
  color: #526174;
  font-size: 12px;
  font-weight: 950;
}

body.role-admin .admin-table td,
body.role-admin .project-table td,
body.role-admin .student-management-table td,
body.role-admin .task-table td,
body.role-admin .notice-table-v2 td,
body.role-admin .approval-table td,
body.role-admin .retro-table td {
  height: 44px;
  color: #243244;
  font-size: 13px;
}

body.role-admin .admin-table tr:hover td,
body.role-admin .project-table tr:hover td,
body.role-admin .student-management-table tr:hover td,
body.role-admin .task-table tr:hover td,
body.role-admin .notice-table-v2 tr:hover td,
body.role-admin .approval-table tr:hover td,
body.role-admin .retro-table tr:hover td {
  background: #fbfdfc;
}

body.role-admin input,
body.role-admin select,
body.role-admin textarea {
  border-color: #d6e0e9 !important;
  border-radius: 8px !important;
  background-color: #fff !important;
}

body.role-admin .admin-btn,
body.role-admin .btn,
body.role-admin .sm-btn,
body.role-admin .task-btn,
body.role-admin .notice-btn,
body.role-admin .approval-action,
body.role-admin .project-action-btn,
body.role-admin .project-filter-submit,
body.role-admin .project-filter-reset,
body.role-admin .retro-btn,
body.role-admin .hub-pill {
  border-radius: 8px !important;
  font-weight: 900;
}

body.role-admin .admin-btn.primary,
body.role-admin .btn-primary,
body.role-admin .sm-btn.primary,
body.role-admin .task-btn.primary,
body.role-admin .notice-btn.primary,
body.role-admin .approval-action.primary,
body.role-admin .project-action-btn.primary,
body.role-admin .project-filter-submit,
body.role-admin .retro-btn.primary,
body.role-admin .hub-pill.active {
  border-color: var(--admin-green) !important;
  background: var(--admin-green) !important;
  color: #fff !important;
}

body.role-admin .admin-chip.soft-green,
body.role-admin .project-status-chip,
body.role-admin .student-status-chip,
body.role-admin .notice-type.type-meeting,
body.role-admin .hub-tag,
body.role-admin .badge-lite.green {
  background: #e7f6ee !important;
  color: #116b3d !important;
}

body.role-admin .admin-chip.soft-blue,
body.role-admin .badge-lite,
body.role-admin .notice-type.type-notice {
  background: #edf4ff !important;
  color: #1d4ed8 !important;
}

body.role-admin .admin-chip.soft-orange,
body.role-admin .notice-type.type-reminder {
  background: #fff7e6 !important;
  color: #a05a00 !important;
}

body.role-admin .admin-chip.soft-red {
  background: #fff0f0 !important;
  color: #b42318 !important;
}

body.role-admin .project-kpi-grid,
body.role-admin .student-kpi-grid,
body.role-admin .task-kpi-grid,
body.role-admin .admin-report-kpis,
body.role-admin .admin-fund-kpis,
body.role-admin .admin-user-kpis,
body.role-admin .doc-kpi-grid,
body.role-admin .approval-kpi-grid {
  gap: 10px;
}

body.role-admin .project-kpi-grid,
body.role-admin .admin-report-kpis,
body.role-admin .admin-fund-kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}

body.role-admin .student-kpi-grid,
body.role-admin .task-kpi-grid,
body.role-admin .doc-kpi-grid,
body.role-admin .approval-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

body.role-admin .hub-kpis {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

body.role-admin .hub-top,
body.role-admin .student-management-actions {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .035);
}

body.role-admin .hub-view-tabs,
body.role-admin .hub-actions {
  gap: 8px;
}

body.role-admin .project-filter-toolbar,
body.role-admin .student-filter-toolbar,
body.role-admin .task-filter-toolbar,
body.role-admin .notice-toolbar,
body.role-admin .approval-filter-toolbar,
body.role-admin .admin-user-filter,
body.role-admin .admin-fund-toolbar form,
body.role-admin .doc-filter-line {
  gap: 8px;
}

body.role-admin .admin-feed-row,
body.role-admin .admin-quick-item,
body.role-admin .admin-mini-row {
  border-radius: 8px;
}

body.role-admin .admin-quick-item {
  border: 1px solid #e5edf4;
  background: #fbfdff;
}

body.role-admin .admin-mini-row {
  border: 1px solid #edf2f7;
}

body.role-admin .achievement-hub {
  --green: var(--admin-green);
  --green2: var(--admin-green-2);
  --text: var(--admin-ink);
  --muted: var(--admin-muted);
  --line: var(--admin-line);
}

body.role-admin .hub-donut,
body.role-admin .hub-donut-center span {
  border-radius: 8px;
}

body.role-admin .doc-sidebar-compact a.active,
body.role-admin .student-status-tabs a.active,
body.role-admin .approval-tab.active {
  border-color: var(--admin-green) !important;
  background: #eaf7ef !important;
  color: var(--admin-green) !important;
}

body.role-admin .project-management-page::before { content: "管理员控制台 / 项目管理"; }
body.role-admin .student-management-page::before { content: "管理员控制台 / 学生管理"; }
body.role-admin .task-center-page::before { content: "管理员控制台 / 任务中心"; }
body.role-admin .achievement-hub::before { content: "管理员控制台 / 正式成果库"; }
body.role-admin .notice-workbench::before { content: "管理员控制台 / 公告通知"; }
body.role-admin .approval-center-page::before { content: "管理员控制台 / 综合审批"; }
body.role-admin .admin-report-page::before { content: "管理员控制台 / 统计报表"; }
body.role-admin .admin-file-v2-page::before { content: "管理员控制台 / 文件总览"; }
body.role-admin .admin-fund-page::before { content: "管理员控制台 / 经费审批"; }
body.role-admin .admin-user-page::before { content: "管理员控制台 / 用户管理"; }
body.role-admin .topic-approval-page::before { content: "管理员控制台 / 课题治理"; }
body.role-admin .project-detail-workbench::before { content: "管理员控制台 / 项目详情"; }
body.role-admin .task-detail-page::before { content: "管理员控制台 / 任务详情"; }
body.role-admin .task-form-page::before { content: "管理员控制台 / 任务表单"; }
body.role-admin .sp-page::before { content: "管理员控制台 / 学生业务参与"; }
body.role-admin .grad-header::before { content: "管理员控制台 / 论文审核"; }
body.role-admin .gd2-wrap::before { content: "管理员控制台 / 论文审核详情"; }
body.role-admin .catalog-v2::before { content: "管理员控制台 / 成果名录"; }
body.role-admin .achievement-list-page::before { content: "管理员控制台 / 成果审核"; }
body.role-admin .retro-review-page::before { content: "管理员控制台 / 补录审核"; }
body.role-admin .achievement-form-page::before { content: "管理员控制台 / 成果表单"; }
body.role-admin .paper-detail-redesign::before { content: "管理员控制台 / 成果详情"; }

body.role-admin .topic-approval-page,
body.role-admin .project-detail-workbench,
body.role-admin .task-detail-page,
body.role-admin .task-form-page,
body.role-admin .sp-page,
body.role-admin .gd2-wrap,
body.role-admin .catalog-v2,
body.role-admin .achievement-list-page,
body.role-admin .retro-review-page,
body.role-admin .achievement-form-page,
body.role-admin .paper-detail-redesign {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.role-admin .topic-approval-page::before,
body.role-admin .project-detail-workbench::before,
body.role-admin .task-detail-page::before,
body.role-admin .task-form-page::before,
body.role-admin .sp-page::before,
body.role-admin .grad-header::before,
body.role-admin .gd2-wrap::before,
body.role-admin .catalog-v2::before,
body.role-admin .achievement-list-page::before,
body.role-admin .retro-review-page::before,
body.role-admin .achievement-form-page::before,
body.role-admin .paper-detail-redesign::before {
  display: block;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

body.role-admin .topic-approval-kpi,
body.role-admin .catalog-metric-card,
body.role-admin .achievement-status-tab,
body.role-admin .retro-tabs a,
body.role-admin .grad-card,
body.role-admin .td-item {
  border: 1px solid var(--admin-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .035) !important;
}

body.role-admin .topic-approval-kpi strong,
body.role-admin .catalog-metric-card strong,
body.role-admin .achievement-status-tab strong,
body.role-admin .retro-tabs strong,
body.role-admin .sp-count span {
  color: var(--admin-ink) !important;
  font-size: 24px !important;
  line-height: 1.05;
}

body.role-admin .topic-approval-filter-card,
body.role-admin .topic-approval-table-card,
body.role-admin .topic-approval-pagination,
body.role-admin .pd-summary-card,
body.role-admin .pd-timeline-card,
body.role-admin .pd-tabs-card,
body.role-admin .pd-sub-card,
body.role-admin .td-top,
body.role-admin .td-card,
body.role-admin .task-form-card,
body.role-admin .sp-head,
body.role-admin .sp-card,
body.role-admin .gd2-hero,
body.role-admin .gd2-progress,
body.role-admin .gd2-card,
body.role-admin .catalog-filter-card,
body.role-admin .catalog-table-card,
body.role-admin .catalog-metric-panel,
body.role-admin .achievement-status-tabs,
body.role-admin .achievement-filter-panel,
body.role-admin .achievement-full-list-card,
body.role-admin .achievement-form-card,
body.role-admin .achievement-register-select-card,
body.role-admin .achievement-compact-toolbar,
body.role-admin .retro-topline,
body.role-admin .pdr-summary-grid,
body.role-admin .pdr-progress-card,
body.role-admin .pdr-work-card,
body.role-admin .pdr-form-panel,
body.role-admin .pdr-modal-panel {
  border: 1px solid var(--admin-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .035) !important;
}

body.role-admin .pd-summary-card,
body.role-admin .td-top,
body.role-admin .gd2-hero {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

body.role-admin .pd-eyebrow,
body.role-admin .pd-section-head span,
body.role-admin .gd2-eyebrow,
body.role-admin .catalog-pill.active,
body.role-admin .catalog-action-btn,
body.role-admin .retro-link,
body.role-admin .topic-approval-title a,
body.role-admin .td-link,
body.role-admin .pdr-progress-head strong,
body.role-admin .pdr-tabs button.is-active {
  color: var(--admin-green) !important;
}

body.role-admin .pd-tab-nav button.is-active,
body.role-admin .catalog-pill.active,
body.role-admin .achievement-status-tab.active,
body.role-admin .retro-tabs a.active {
  border-color: var(--admin-green) !important;
  color: var(--admin-green) !important;
}

body.role-admin .pd-step.is-current,
body.role-admin .pd-step.is-selected,
body.role-admin .gd2-step.cur,
body.role-admin .topic-approval-kpi.active,
body.role-admin .catalog-metric-card.active {
  border-color: #b8d7c4 !important;
  background: #f6fbf8 !important;
  box-shadow: 0 0 0 2px rgba(22, 131, 74, .08) !important;
}

body.role-admin .pd-step.is-current .pd-step-dot,
body.role-admin .pd-step.status-processing .pd-step-dot,
body.role-admin .gd2-step.cur .gd2-dot {
  background: var(--admin-green) !important;
  border-color: var(--admin-green) !important;
  color: #fff !important;
}

body.role-admin .td-btn,
body.role-admin .pd-btn,
body.role-admin .sp-btn,
body.role-admin .gd2-btn,
body.role-admin .gd2-back,
body.role-admin .catalog-action-btn,
body.role-admin .catalog-pill,
body.role-admin .retro-btn,
body.role-admin .topic-approval-submit,
body.role-admin .topic-approval-reset {
  border-radius: 8px !important;
  font-weight: 900;
}

body.role-admin .td-btn.primary,
body.role-admin .pd-btn.primary,
body.role-admin .gd2-btn.primary,
body.role-admin .topic-approval-submit,
body.role-admin .catalog-action-btn:hover,
body.role-admin .retro-btn.primary {
  border-color: var(--admin-green) !important;
  background: var(--admin-green) !important;
  color: #fff !important;
}

body.role-admin .topic-approval-table th,
body.role-admin .sp-table th,
body.role-admin .td-table th,
body.role-admin .pd-mini-table th,
body.role-admin .catalog-table th,
body.role-admin .achievement-table th,
body.role-admin .retro-table th {
  height: 38px !important;
  background: #f8fafc !important;
  color: #526174 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

body.role-admin .topic-approval-table td,
body.role-admin .sp-table td,
body.role-admin .td-table td,
body.role-admin .pd-mini-table td,
body.role-admin .catalog-table td,
body.role-admin .achievement-table td,
body.role-admin .retro-table td {
  color: #243244 !important;
  font-size: 13px !important;
}

body.role-admin .topic-approval-table tr:hover td,
body.role-admin .sp-table tr:hover td,
body.role-admin .td-table tr:hover td,
body.role-admin .pd-mini-table tr:hover td,
body.role-admin .catalog-table tr:hover td,
body.role-admin .achievement-table tr:hover td,
body.role-admin .retro-table tr:hover td {
  background: #fbfdfc !important;
}

body.role-admin .topic-approval-status,
body.role-admin .topic-stage-chip,
body.role-admin .topic-pending-chip,
body.role-admin .td-chip,
body.role-admin .gd2-chip,
body.role-admin .gd2-status,
body.role-admin .gd2-badge,
body.role-admin .catalog-badge,
body.role-admin .retro-chip,
body.role-admin .sp-chip {
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.role-admin .task-form-card {
  width: 100%;
  max-width: none !important;
  padding: 20px !important;
}

body.role-admin .task-form-card .form-grid,
body.role-admin .achievement-form-grid,
body.role-admin .pd-form-grid {
  gap: 12px !important;
}

body.role-admin .task-form-card .section-title {
  color: var(--admin-ink) !important;
  border-left-color: var(--admin-green) !important;
}

body.role-admin .td-summary,
body.role-admin .grad-grid {
  gap: 10px !important;
}

body.role-admin .grad-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 12px !important;
}

body.role-admin .grad-header::before {
  grid-column: 1 / -1;
}

body.role-admin .grad-card:hover {
  border-color: #b8d7c4 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06) !important;
}

body.role-admin .gd2-action-bar {
  border-color: var(--admin-line) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08) !important;
}

body.role-admin .catalog-filter-form,
body.role-admin .retro-filter,
body.role-admin .achievement-filter-panel form,
body.role-admin .topic-approval-filter {
  gap: 8px !important;
}

body.role-admin .catalog-empty,
body.role-admin .retro-empty,
body.role-admin .topic-approval-empty,
body.role-admin .sp-empty,
body.role-admin .td-muted,
body.role-admin .gd2-empty {
  color: var(--admin-muted) !important;
}

@media (max-width: 1280px) {
  body.role-admin .admin-workbench-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.role-admin .admin-workbench-kpis,
  body.role-admin .project-kpi-grid,
  body.role-admin .student-kpi-grid,
  body.role-admin .task-kpi-grid,
  body.role-admin .admin-report-kpis,
  body.role-admin .admin-fund-kpis,
  body.role-admin .admin-user-kpis,
  body.role-admin .doc-kpi-grid,
  body.role-admin .approval-kpi-grid,
  body.role-admin .hub-kpis,
  body.role-admin .topic-approval-kpis,
  body.role-admin .catalog-metric-grid,
  body.role-admin .grad-grid,
  body.role-admin .td-summary {
    grid-template-columns: 1fr !important;
  }

  body.role-admin .grad-header {
    grid-template-columns: 1fr !important;
  }

  body.role-admin .catalog-filter-form,
  body.role-admin .retro-filter,
  body.role-admin .topic-approval-filter,
  body.role-admin .td-topline,
  body.role-admin .td-actions {
    align-items: stretch !important;
  }
}

/* ===== Formal achievement catalog redesign ===== */
.catalog-shell.catalog-v2 {
  --catalog-green: #16834a;
  --catalog-text: #0f172a;
  --catalog-muted: #64748b;
  --catalog-line: #e1e8ef;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 126px);
  color: var(--catalog-text);
}

.catalog-v2 .btn.slim {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 900;
}

.catalog-v2 .catalog-topbar,
.catalog-v2 .catalog-table-head,
.catalog-v2 .catalog-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.catalog-v2 .catalog-tabs,
.catalog-v2 .catalog-actions,
.catalog-v2 .catalog-table-tools,
.catalog-v2 .catalog-actions-mini,
.catalog-v2 .catalog-page-size,
.catalog-v2 .catalog-pagination nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.catalog-v2 .catalog-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid #dce7ee;
  border-radius: 10px;
  background: #fff;
  color: #26364a;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.catalog-v2 .catalog-pill:hover,
.catalog-v2 .catalog-pill.active {
  border-color: var(--catalog-green);
  background: var(--catalog-green);
  color: #fff;
}

.catalog-v2 .catalog-actions {
  justify-content: flex-end;
}

.catalog-v2 .catalog-metric-panel,
.catalog-v2 .catalog-filter-card,
.catalog-v2 .catalog-table-card {
  border: 1px solid var(--catalog-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.catalog-v2 .catalog-metric-panel {
  padding: 16px;
  background: linear-gradient(135deg, #f8fffb 0%, #ffffff 56%, #fbfdff 100%);
}

.catalog-v2 .catalog-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.catalog-v2 .catalog-metric-card {
  --metric-bg: #f0fbf5;
  --metric-color: #16834a;
  --metric-icon-bg: #e7f8ef;
  --metric-border: #c7ead5;
  --metric-blob: rgba(22, 131, 74, .12);
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 100px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e3edf0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--metric-bg) 0%, #ffffff 72%);
  color: var(--catalog-text);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.catalog-v2 .catalog-metric-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -34px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--metric-blob);
  pointer-events: none;
}

.catalog-v2 .catalog-metric-card.tone-blue {
  --metric-bg: #f3f7ff;
  --metric-color: #3b82f6;
  --metric-icon-bg: #eaf2ff;
  --metric-border: #c8dcff;
  --metric-blob: rgba(59, 130, 246, .12);
}

.catalog-v2 .catalog-metric-card.tone-cyan {
  --metric-bg: #effdfb;
  --metric-color: #14b8a6;
  --metric-icon-bg: #dcfaf6;
  --metric-border: #b8ece5;
  --metric-blob: rgba(20, 184, 166, .13);
}

.catalog-v2 .catalog-metric-card.tone-orange {
  --metric-bg: #fff8ed;
  --metric-color: #f59e0b;
  --metric-icon-bg: #fff1d6;
  --metric-border: #f8d49a;
  --metric-blob: rgba(245, 158, 11, .14);
}

.catalog-v2 .catalog-metric-card.tone-teal {
  --metric-bg: #effcf6;
  --metric-color: #10b981;
  --metric-icon-bg: #ddf8ec;
  --metric-border: #bdebd6;
  --metric-blob: rgba(16, 185, 129, .13);
}

.catalog-v2 .catalog-metric-card.tone-red {
  --metric-bg: #fff5f5;
  --metric-color: #f87171;
  --metric-icon-bg: #feeaea;
  --metric-border: #f6c6c6;
  --metric-blob: rgba(248, 113, 113, .13);
}

.catalog-v2 .catalog-metric-card:hover,
.catalog-v2 .catalog-metric-card.active {
  transform: translateY(-1px);
  border-color: var(--metric-border);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .075);
}

.catalog-v2 .catalog-metric-card.active {
  background: linear-gradient(135deg, var(--metric-bg) 0%, #ffffff 66%);
}

.catalog-v2 .catalog-metric-card.is-zero {
  opacity: .62;
}

.catalog-v2 .catalog-metric-icon {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--metric-icon-bg);
  color: var(--metric-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .68);
}

.catalog-v2 .catalog-metric-icon::before,
.catalog-v2 .catalog-metric-icon::after,
.catalog-v2 .catalog-metric-icon i {
  content: "";
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.catalog-v2 .catalog-metric-icon-all::before {
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 5px;
  top: 12px;
  left: 12px;
}

.catalog-v2 .catalog-metric-icon-all::after {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
  right: 11px;
  bottom: 11px;
  opacity: .42;
}

.catalog-v2 .catalog-metric-icon-paper::before,
.catalog-v2 .catalog-metric-icon-report::before {
  width: 20px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 5px;
  top: 10px;
  left: 13px;
}

.catalog-v2 .catalog-metric-icon-paper::after {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  top: 10px;
  right: 13px;
  opacity: .55;
}

.catalog-v2 .catalog-metric-icon-paper i,
.catalog-v2 .catalog-metric-icon-report i {
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  top: 20px;
  left: 17px;
  opacity: .55;
  box-shadow: 0 6px 0 currentColor;
}

.catalog-v2 .catalog-metric-icon-project::before {
  width: 24px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 5px;
  left: 11px;
  top: 18px;
}

.catalog-v2 .catalog-metric-icon-project::after {
  width: 11px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  left: 14px;
  top: 14px;
}

.catalog-v2 .catalog-metric-icon-project i {
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  left: 17px;
  top: 26px;
  opacity: .46;
}

.catalog-v2 .catalog-metric-icon-patent::before {
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 50%;
  top: 10px;
  left: 13px;
}

.catalog-v2 .catalog-metric-icon-patent::after {
  width: 11px;
  height: 15px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(42deg);
  top: 25px;
  left: 16px;
  opacity: .56;
}

.catalog-v2 .catalog-metric-icon-patent i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  top: 16px;
  left: 19px;
  opacity: .5;
}

.catalog-v2 .catalog-metric-icon-book::before {
  width: 22px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 5px;
  top: 10px;
  left: 12px;
}

.catalog-v2 .catalog-metric-icon-book::after {
  width: 2px;
  height: 20px;
  border-radius: 999px;
  background: currentColor;
  top: 12px;
  left: 22px;
  opacity: .45;
}

.catalog-v2 .catalog-metric-icon-book i {
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  top: 18px;
  left: 26px;
  opacity: .48;
  box-shadow: 0 6px 0 currentColor;
}

.catalog-v2 .catalog-metric-icon-report::after {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  top: 15px;
  left: 18px;
  opacity: .62;
}

.catalog-v2 .catalog-metric-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.catalog-v2 .catalog-metric-copy span,
.catalog-v2 .catalog-metric-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-v2 .catalog-metric-copy span {
  color: #223047;
  font-size: 13px;
  font-weight: 900;
}

.catalog-v2 .catalog-metric-copy strong {
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.catalog-v2 .catalog-metric-copy small {
  color: var(--catalog-muted);
  font-size: 12px;
  font-weight: 800;
}

.catalog-v2 .catalog-filter-card {
  padding: 12px 14px;
}

.catalog-v2 .catalog-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) 130px 130px 150px 150px minmax(230px, .9fr) auto auto;
  gap: 9px;
  align-items: center;
}

.catalog-v2 .catalog-search {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  border: 1.5px solid #cbd8e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.catalog-v2 .catalog-search:focus-within {
  border-color: #86cfa5;
  box-shadow: 0 0 0 3px rgba(22, 131, 74, .11);
}

.catalog-v2 .catalog-search-icon {
  position: relative;
  width: 32px;
  height: 100%;
  display: block;
  color: #7f96ad;
}

.catalog-v2 .catalog-search-icon::before,
.catalog-v2 .catalog-search-icon::after {
  content: "";
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.catalog-v2 .catalog-search-icon::before {
  width: 12px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  left: 11px;
  top: 11px;
}

.catalog-v2 .catalog-search-icon::after {
  width: 7px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  left: 21px;
  top: 23px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.catalog-v2 .catalog-search input,
.catalog-v2 .catalog-filter-form select,
.catalog-v2 .catalog-date-range input {
  min-width: 0;
  height: 38px;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #fff;
  color: #172033;
  font-size: 13px;
}

.catalog-v2 .catalog-search input {
  border: 0;
  padding: 0 10px 0 0;
}

.catalog-v2 .catalog-search input:focus,
.catalog-v2 .catalog-filter-form select:focus,
.catalog-v2 .catalog-date-range input:focus {
  outline: none;
  border-color: #86cfa5;
  box-shadow: 0 0 0 3px rgba(22, 131, 74, .1);
}

.catalog-v2 .catalog-search input:focus {
  box-shadow: none;
}

.catalog-v2 .catalog-filter-form select,
.catalog-v2 .catalog-date-range input {
  padding: 0 11px;
}

.catalog-v2 .catalog-date-range {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.catalog-v2 .catalog-date-range span {
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.catalog-v2 .catalog-table-card {
  overflow: hidden;
}

.catalog-v2 .catalog-table-head {
  min-height: 66px;
  padding: 14px 16px;
}

.catalog-v2 .catalog-table-head h3 {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--catalog-text);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 950;
}

.catalog-v2 .catalog-table-head h3 span,
.catalog-v2 .catalog-table-head p,
.catalog-v2 .catalog-pagination > span {
  color: var(--catalog-muted);
  font-size: 12px;
  font-weight: 850;
}

.catalog-v2 .catalog-table-head p {
  margin: 4px 0 0;
}

.catalog-v2 .catalog-page-size {
  padding: 3px;
  border: 1px solid #dce5ee;
  border-radius: 11px;
  background: #f8fafc;
}

.catalog-v2 .catalog-page-size a {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 8px;
  color: #526174;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.catalog-v2 .catalog-page-size a.active {
  background: #fff;
  color: var(--catalog-green);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .06);
}

.catalog-v2 .catalog-table-wrap {
  overflow: auto;
}

.catalog-v2 .catalog-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
  border-collapse: collapse;
}

.catalog-v2 .catalog-col-title { width: 30%; }
.catalog-v2 .catalog-col-type { width: 10%; }
.catalog-v2 .catalog-col-person { width: 14%; }
.catalog-v2 .catalog-col-relation { width: 19%; }
.catalog-v2 .catalog-col-date { width: 11%; }
.catalog-v2 .catalog-col-status { width: 10%; }
.catalog-v2 .catalog-col-actions { width: 12%; }

.catalog-v2 .catalog-table th,
.catalog-v2 .catalog-table td {
  height: 56px;
  padding: 9px 14px;
  border-top: 1px solid #eef2f6;
  color: #182235;
  font-size: 13px;
  vertical-align: middle;
}

.catalog-v2 .catalog-table th {
  height: 40px;
  background: #f8fafc;
  color: #526174;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
}

.catalog-v2 .catalog-table th:nth-child(2),
.catalog-v2 .catalog-table td:nth-child(2),
.catalog-v2 .catalog-table th:nth-child(5),
.catalog-v2 .catalog-table td:nth-child(5),
.catalog-v2 .catalog-table th:nth-child(6),
.catalog-v2 .catalog-table td:nth-child(6) {
  text-align: center;
}

.catalog-v2 .catalog-table th:last-child,
.catalog-v2 .catalog-table td:last-child {
  text-align: right;
}

.catalog-v2 .catalog-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-weight: 950;
  text-decoration: none;
}

.catalog-v2 .catalog-title:hover,
.catalog-v2 .catalog-relation a:hover {
  color: var(--catalog-green);
}

.catalog-v2 .catalog-meta {
  margin-top: 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #718096;
  font-size: 12px;
}

.catalog-v2 .catalog-badge {
  min-width: 74px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.catalog-v2 .catalog-badge.green { background: #e8f7ee; color: #16834a; }
.catalog-v2 .catalog-badge.gray { background: #f1f5f9; color: #64748b; }

.catalog-v2 .catalog-person {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalog-v2 .catalog-person > span:last-child {
  min-width: 0;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.catalog-v2 .catalog-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f7ee;
  color: #16834a;
  font-size: 12px;
  font-weight: 950;
}

.catalog-v2 .catalog-relation {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-v2 .catalog-relation a {
  color: #16834a;
  font-weight: 850;
  text-decoration: none;
}

.catalog-v2 .catalog-actions-mini {
  justify-content: flex-end;
}

.catalog-v2 .catalog-action-btn {
  min-width: 42px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.catalog-v2 .catalog-action-btn:hover {
  border-color: #bfd9ca;
  color: var(--catalog-green);
  background: #f8fffb;
}

.catalog-v2 .catalog-empty {
  padding: 34px 16px;
  color: #718096;
  font-size: 13px;
  text-align: center;
}

.catalog-v2 .catalog-pagination {
  min-height: 58px;
  padding: 12px 16px;
  border-top: 1px solid #eef2f6;
}

.catalog-v2 .catalog-pagination nav a,
.catalog-v2 .catalog-pagination nav span {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.catalog-v2 .catalog-pagination nav a.active {
  border-color: var(--catalog-green);
  background: var(--catalog-green);
  color: #fff;
}

.catalog-v2 .catalog-pagination nav span.disabled,
.catalog-v2 .catalog-pagination nav span.ellipsis {
  color: #a8b3c1;
  background: #f8fafc;
}

@media (max-width: 1500px) {
  .catalog-v2 .catalog-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-v2 .catalog-filter-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .catalog-v2 .catalog-topbar,
  .catalog-v2 .catalog-table-head,
  .catalog-v2 .catalog-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-v2 .catalog-actions,
  .catalog-v2 .catalog-table-tools,
  .catalog-v2 .catalog-pagination nav {
    justify-content: flex-start;
  }

  .catalog-v2 .catalog-metric-grid,
  .catalog-v2 .catalog-filter-form {
    grid-template-columns: 1fr;
  }

  .catalog-v2 .catalog-date-range {
    grid-template-columns: 1fr;
    height: auto;
  }

  .catalog-v2 .catalog-date-range span {
    display: none;
  }

  .catalog-v2 .catalog-date-range input {
    width: 100%;
  }
}
