:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", "Segoe UI", Helvetica, sans-serif;
  background-color: #eef2ff;
  color: #111;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef2ff;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
}

.app-header {
  padding: 0.8rem 1rem;
  background: #1f2a44;
  color: #f9fbff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0.6rem;
  z-index: 80;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.2);
}

.app-brand-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.78;
}

.app-title {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.app-nav {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-item {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
}

.nav-item.active,
.nav-item:hover {
  background: #fff;
  color: #1f2a44;
  border-color: rgba(255, 255, 255, 0.8);
  border-color: #fff;
}

.app-context-card {
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.75rem 1rem;
}

.app-context-title {
  margin: 0.2rem 0 0;
}

.app-workspace-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0.75rem;
}

.app-sidebar-card {
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.75rem;
  min-height: 0;
  overflow: auto;
}

.app-sidebar-title {
  margin: 0;
  font-size: 1rem;
}

.app-side-nav {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.side-nav-group {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 0.8rem;
  padding: 0.55rem;
  background: #f8f9ff;
}

.side-nav-group-title {
  margin: 0;
  font-size: 0.82rem;
  color: #4b5563;
}

.side-nav-group-body {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.side-nav-node {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.side-nav-children {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.side-nav-children.hidden {
  display: none;
}

.side-nav-item {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.55rem;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.side-nav-item:hover {
  border-color: rgba(79, 70, 229, 0.5);
}

.side-nav-item.expanded {
  background: #eef3ff;
}

.side-nav-item.active {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-color: #4338ca;
  color: #fff;
}

.side-nav-arrow {
  width: 0.9rem;
  flex: 0 0 0.9rem;
  text-align: center;
  opacity: 0.85;
}

.side-nav-label {
  min-width: 0;
}

.side-nav-node.depth-1 .side-nav-item {
  margin-left: 0.95rem;
  width: calc(100% - 0.95rem);
}

.side-nav-node.depth-2 .side-nav-item,
.side-nav-node.depth-3 .side-nav-item {
  margin-left: 1.85rem;
  width: calc(100% - 1.85rem);
}

.app-pages {
  min-width: 0;
}

.page-section {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 1px 35px rgba(15, 23, 42, 0.08);
  display: none;
}

.page-section.active-section {
  display: block;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-kicker {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #6b7280;
  letter-spacing: 0.2em;
}

.section-subtitle {
  margin: 0.35rem 0 0;
  color: #4b5563;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn.primary {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
}

.section-body {
  margin-top: 1.25rem;
}

.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.schedule-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.schedule-filter-bar {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.schedule-filter-bar--month-only {
  grid-template-columns: minmax(280px, 420px);
}

.schedule-quick-switch-card {
  margin-bottom: 0.72rem;
  padding: 0.82rem 0.92rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8faff;
}

.schedule-quick-switch-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.45rem;
}

.schedule-quick-class-row {
  margin-bottom: 0;
}

.schedule-current-class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.95rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8faff;
}

.schedule-current-class-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.18rem;
}

.schedule-current-class-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.schedule-current-class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  font-size: 0.82rem;
  color: #475569;
}

.schedule-current-class-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.filter-chip-row.secondary {
  margin-top: -0.2rem;
}

.placeholder-inline {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.student-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.schedule-student-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.student-summary-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
}

.student-summary-card.is-focused {
  border-color: rgba(201, 101, 43, 0.38);
  box-shadow: 0 10px 24px rgba(201, 101, 43, 0.1);
}

.student-summary-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.student-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.7rem;
}

.student-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.student-summary-metric span {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.2;
}

.student-summary-metric strong {
  font-size: 0.82rem;
  color: #0f172a;
  line-height: 1.25;
}

.student-summary-note {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: #64748b;
}

.student-focus-strip {
  border: 1px solid rgba(201, 101, 43, 0.18);
  background: rgba(201, 101, 43, 0.08);
  color: #8a3f14;
  border-radius: 0.9rem;
  padding: 0.78rem 0.95rem;
  font-size: 0.84rem;
  line-height: 1.6;
  margin: 1rem 0;
}

.student-progress {
  width: 100%;
  height: 0.42rem;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.55rem;
}

.student-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f5bd4 0%, #34d399 100%);
}

.info-strip {
  border: 1px solid rgba(15, 91, 212, 0.16);
  background: rgba(15, 91, 212, 0.06);
  color: #1e3a8a;
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.schedule-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.86rem;
  color: #374151;
  font-weight: 600;
}

.schedule-filters select,
.schedule-filters input {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 0.6rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.92rem;
  font-family: inherit;
}

.schedule-filter-bar label {
  gap: 0.2rem;
  font-size: 0.8rem;
}

.schedule-filter-bar select,
.schedule-filter-bar input {
  padding: 0.38rem 0.5rem;
  font-size: 0.86rem;
}

.schedule-status-row,
.schedule-student-row {
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.schedule-stats-row {
  gap: 0.7rem;
}

.schedule-stats-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.schedule-stats-row .stat-card {
  min-width: 118px;
  padding: 0.7rem 0.85rem;
}

.schedule-stats-row .stat-value {
  font-size: 1.2rem;
}

.stat-card {
  flex: 1;
  min-width: 130px;
  padding: 0.85rem 1rem;
  background: #f7f7ff;
  border-radius: 0.75rem;
  border: 1px solid rgba(74, 85, 104, 0.08);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.stat-value {
  margin: 0;
  font-size: 1.45rem;
}

.table-shell {
  margin-top: 1rem;
  overflow-x: auto;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tiny-btn {
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.tiny-btn.active {
  background: #0f5bd4;
  border-color: #0f5bd4;
  color: #fff;
}

.attendance-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.7rem;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #334155;
}

.attendance-chip.present,
.attendance-chip.late,
.attendance-chip.trial {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.2);
  color: #166534;
}

.attendance-chip.makeup {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
}

.attendance-chip.makeup-scheduled {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.attendance-chip.leave {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.attendance-chip.absent {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.2);
  color: #b91c1c;
}

.attendance-chip.transfer-in {
  background: rgba(14, 116, 144, 0.12);
  border-color: rgba(14, 116, 144, 0.22);
  color: #0e7490;
}

.attendance-chip.transfer-out {
  background: rgba(100, 116, 139, 0.14);
  border-color: rgba(100, 116, 139, 0.24);
  color: #475569;
}

.attendance-chip.unknown,
.attendance-chip.not-scheduled {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #64748b;
}

.schedule-ledger-table .student-col,
.schedule-ledger-table .ledger-student-cell {
  text-align: center;
  min-width: 5.6rem;
}

.schedule-table-shell {
  margin-top: 0.85rem;
}

.schedule-followup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.schedule-followup-panel .panel-header h3 {
  margin: 0;
}

.schedule-followup-panel .panel-header p {
  margin: 0.2rem 0 0;
  color: #6d7d99;
  font-size: 0.88rem;
}

.schedule-ledger-table {
  min-width: 1080px;
  font-size: 0.88rem;
}

.schedule-ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f6fb;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
}

.schedule-ledger-table th,
.schedule-ledger-table td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}

.schedule-ledger-table tbody td {
  line-height: 1.4;
}

.schedule-ledger-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 255, 0.72);
}

.schedule-ledger-table .student-col,
.schedule-ledger-table .ledger-student-cell {
  min-width: 4.8rem;
}

.schedule-ledger-table .schedule-date-cell {
  min-width: 120px;
  white-space: nowrap;
}

.schedule-ledger-table .schedule-class-cell {
  min-width: 140px;
}

.schedule-ledger-table .schedule-lesson-cell {
  min-width: 180px;
}

.schedule-ledger-table .schedule-alt-cell {
  min-width: 150px;
}

.schedule-ledger-table .schedule-status-cell {
  min-width: 138px;
}

.schedule-ledger-table .schedule-student-preview-cell {
  min-width: 170px;
}

.schedule-ledger-table .schedule-session-status-cell {
  min-width: 70px;
  white-space: nowrap;
}

.schedule-ledger-table .schedule-actions-cell {
  min-width: 96px;
}

.schedule-cell-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
}

.schedule-cell-text.muted {
  color: #64748b;
}

.schedule-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.schedule-status-summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}

.attendance-state-stack {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.attendance-chip.makeup-done {
  background: rgba(18, 140, 92, 0.1);
  border-color: rgba(18, 140, 92, 0.18);
  color: #128c5c;
}

.schedule-table-actions {
  gap: 0.25rem;
}

.schedule-table-actions .tiny-btn {
  padding: 0.16rem 0.48rem;
  font-size: 0.72rem;
}

.tiny-btn.danger {
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.tiny-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}

.data-table thead {
  background: #f5f6fb;
}

.class-table-cell-students {
  min-width: 560px;
}

.class-toolbar {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.class-toolbar-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.class-toolbar-row--compact {
  align-items: center;
}

.class-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.class-filter-grid {
  margin-bottom: 0;
  grid-template-columns: minmax(180px, 220px) minmax(220px, 1fr);
}

.class-stats-row {
  margin-top: 0;
}

.class-toolbar .filter-chip-row {
  margin-top: 0;
}

.class-table-shell {
  margin-top: 0.6rem;
}

.class-data-table {
  min-width: 1120px;
  font-size: 0.88rem;
}

.class-data-table th,
.class-data-table td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}

.class-data-table th {
  white-space: nowrap;
}

.class-table-cell-name {
  min-width: 180px;
  font-weight: 700;
}

.class-table-cell-time {
  min-width: 120px;
  white-space: nowrap;
}

.class-table-cell-course,
.class-table-cell-stage,
.class-table-cell-teacher,
.class-table-cell-status {
  white-space: nowrap;
}

.class-table-cell-course {
  min-width: 88px;
}

.class-table-cell-stage,
.class-table-cell-count,
.class-table-cell-status {
  min-width: 72px;
}

.class-table-cell-count {
  text-align: center;
  font-weight: 700;
}

.class-table-cell-actions {
  min-width: 218px;
}

.class-table-actions {
  gap: 0.3rem;
}

.class-table-actions .tiny-btn {
  padding: 0.18rem 0.5rem;
  font-size: 0.74rem;
}

.class-table-actions--compact {
  gap: 0.22rem;
  align-content: flex-start;
}

.class-table-actions--compact .tiny-btn {
  min-height: 26px;
  padding: 0.08rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.class-table-cell-actions--compact {
  min-width: 184px;
}

.finance-toolbar {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.95rem;
}

.finance-stats-row {
  gap: 0.75rem;
}

.finance-stats-row .stat-card {
  min-width: 120px;
  padding: 0.72rem 0.88rem;
}

.finance-stats-row .stat-value {
  font-size: 1.18rem;
}

.finance-filter-bar {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0;
}

.finance-filter-bar label {
  gap: 0.2rem;
  font-size: 0.8rem;
}

.finance-filter-bar select,
.finance-filter-bar input {
  padding: 0.38rem 0.5rem;
  font-size: 0.86rem;
}

.finance-table-shell {
  margin-top: 0;
}

.finance-data-table {
  min-width: 1100px;
  font-size: 0.88rem;
}

.finance-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f6fb;
  white-space: nowrap;
  font-size: 0.8rem;
}

.finance-data-table th,
.finance-data-table td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}

.finance-data-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 255, 0.72);
}

.finance-data-table td:nth-child(3),
.finance-data-table td:nth-child(5),
.finance-data-table td:nth-child(9) {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-table-actions {
  gap: 0.25rem;
}

.finance-table-actions .tiny-btn {
  padding: 0.16rem 0.48rem;
  font-size: 0.72rem;
}

.student-slot-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(58px, 1fr));
  gap: 0.22rem;
}

.student-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  border-radius: 999px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background: #fff;
  color: #4b5563;
  font-size: 0.74rem;
  padding: 0.12rem 0.34rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-slot.filled {
  border-style: solid;
  border-color: rgba(79, 70, 229, 0.28);
  background: #eef3ff;
  color: #1f2a44;
}

.student-slot.empty {
  color: #9ca3af;
}

.table-shell .placeholder {
  padding: 1rem;
  color: #6b7280;
  text-align: center;
}

.unassigned-panel {
  margin-bottom: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background: rgba(255, 252, 247, 0.82);
  padding: 0.9rem 1rem;
}

.unassigned-panel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.75rem;
}

.unassigned-panel .student-detail-note {
  margin: -0.15rem 0 0.8rem;
}

.unassigned-student-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.unassigned-student-card {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fffaf4;
  border: 1px solid rgba(18, 33, 58, 0.12);
  color: var(--ink-900);
  font-size: 0.82rem;
  font-weight: 600;
}

.unassigned-student-card .tiny-btn {
  padding: 0.16rem 0.5rem;
}

.modal-root {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  pointer-events: none;
}

.modal-root:not(.hidden) {
  pointer-events: auto;
}

.modal-root.hidden {
  visibility: hidden;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  pointer-events: all;
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  width: min(540px, 90vw);
  padding: 1.25rem 1.5rem 1rem;
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.25);
  z-index: 1;
  pointer-events: all;
}

.modal-card.modal-card-wide {
  width: min(880px, 94vw);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-form.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
  align-items: start;
}

.modal-form.modal-form-grid .modal-section,
.modal-form.modal-form-grid .modal-field-full {
  grid-column: 1 / -1;
}

.modal-section {
  margin-top: 0.2rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.modal-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-section-note {
  margin-top: 0.12rem;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.5;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-field.modal-field-half {
  min-width: 0;
}

.modal-field label {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.modal-field input,
.modal-field textarea,
.modal-field select {
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.modal-field textarea {
  resize: vertical;
}

.modal-radio-group,
.modal-checkbox-group {
  display: grid;
  gap: 0.55rem;
}

.modal-checkbox-group {
  max-height: 18rem;
  overflow: auto;
  padding: 0.15rem 0.1rem;
}

.modal-radio,
.modal-checkbox {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: #334155;
  font-weight: 500;
}

.modal-radio input,
.modal-checkbox input {
  width: auto;
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.modal-submit,
.modal-cancel {
  border-radius: 0.65rem;
  border: none;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
}

.modal-submit {
  background: #4f46e5;
  color: #fff;
}

.modal-cancel {
  background: #f0f2fb;
}

.toast-root {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.toast-item {
  min-width: 220px;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.35);
}

.toast-info {
  background: #1f2937;
}

.toast-success {
  background: #059669;
}

.toast-error {
  background: #dc2626;
}

.modal-open {
  overflow: hidden;
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.role-tab {
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #1f2a44;
  background: #fff;
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.role-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.permissions-layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1rem;
}

.permission-group {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.7rem;
}

.permission-group-header {
  margin-bottom: 0.55rem;
}

.permission-module-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.permission-items {
  display: grid;
  gap: 0.45rem;
}

.permission-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.92rem;
}

.permission-item code {
  color: #6b7280;
  font-size: 0.78rem;
}

.permission-role-summary {
  margin-bottom: 0.6rem;
}

.research-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.research-sidebar {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.8rem;
  padding: 0.85rem;
  background: #f8f9ff;
  max-height: 320px;
  overflow: auto;
}

.research-nav-title {
  margin: 0;
  font-size: 1.05rem;
}

.research-tree {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.research-type-node {
  border: 1px dashed rgba(79, 70, 229, 0.2);
  border-radius: 0.7rem;
  padding: 0.4rem;
  background: #fff;
}

.research-node-btn {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.6rem;
  background: #fff;
  color: #1f2a44;
  padding: 0.4rem 0.55rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
  margin: 0;
}

.research-node-btn:hover {
  border-color: rgba(79, 70, 229, 0.45);
}

.research-node-btn.expanded {
  background: #eef3ff;
}

.research-node-btn.level-course {
  margin-top: 0.35rem;
}

.research-node-btn.level-stage {
  margin-top: 0.3rem;
  margin-left: 1.4rem;
  width: calc(100% - 1.4rem);
  font-size: 0.86rem;
}

.research-node-btn.level-stage.active {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  border-color: #4f46e5;
}

.research-course-list,
.research-stage-list {
  margin-top: 0.35rem;
}

.research-course-list.hidden,
.research-stage-list.hidden {
  display: none;
}

.research-main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.research-main-top {
  display: grid;
  gap: 0.5rem;
}

.research-head-block {
  display: grid;
  gap: 0.26rem;
}

.research-head-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: nowrap;
}

.research-head-note {
  margin: 0 !important;
  flex: 1;
}

.research-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  flex: 0 0 auto;
}

.research-main-top h2 {
  margin: 0.15rem 0 0;
}

.research-table-shell {
  margin-top: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.8rem;
  overflow: hidden;
}

.task-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.task-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.86rem;
  color: #374151;
  font-weight: 600;
}

.task-filters input,
.task-filters select {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 0.6rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.92rem;
  font-family: inherit;
}

.task-filter-check {
  justify-content: flex-end;
  align-items: flex-start;
}

.task-filter-check input {
  width: auto;
  margin-right: 0.3rem;
}

.tasks-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0.9rem;
}

.task-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.8rem;
  padding: 0.8rem;
  background: #fff;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.panel-header h3 {
  margin: 0;
}

.stats-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #4b5563;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 560px;
  overflow: auto;
}

.notification-card {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 0.72rem;
  padding: 0.65rem;
  background: #fff;
}

.notification-card.is-read {
  opacity: 0.72;
}

.notification-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.notification-card p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.notification-card .meta {
  color: #6b7280;
  font-size: 0.8rem;
}

.workspace-filters,
.audit-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.workspace-filters label,
.audit-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.86rem;
  color: #374151;
  font-weight: 600;
}

.workspace-filters input,
.workspace-filters select,
.audit-filters input,
.audit-filters select {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 0.6rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.92rem;
  font-family: inherit;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.workspace-panel,
.audit-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.8rem;
  padding: 0.8rem;
  background: #fff;
  margin-top: 0.9rem;
}

.workspace-subgrid,
.audit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.audit-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.audit-json {
  margin: 0.3rem 0 0;
  background: #f8f9ff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.7rem;
  padding: 0.6rem;
  font-size: 0.8rem;
  max-height: 300px;
  overflow: auto;
}

@media (max-width: 1100px) {
  .app-shell {
    padding: 0.55rem;
  }

  .app-header {
    top: 0.4rem;
    padding: 0.7rem 0.75rem;
  }

  .app-workspace-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar-card {
    max-height: none;
  }

  .page-section {
    padding: 1rem;
  }

  .permissions-layout {
    grid-template-columns: 1fr;
  }

  .research-layout {
    display: flex;
    flex-direction: column;
  }

  .task-filters {
    grid-template-columns: 1fr;
  }

  .schedule-filters {
    grid-template-columns: 1fr;
  }

  .modal-form.modal-form-grid {
    grid-template-columns: 1fr;
  }

  .schedule-current-class-card {
    grid-template-columns: 1fr;
  }

  .schedule-current-class-actions {
    justify-content: flex-start;
  }

  .class-toolbar-row {
    align-items: stretch;
  }

  .class-toolbar-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .tasks-layout {
    grid-template-columns: 1fr;
  }

  .workspace-filters,
  .audit-filters {
    grid-template-columns: 1fr;
  }

  .workspace-layout,
  .workspace-subgrid,
  .audit-layout,
  .audit-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Formal shell refresh */
:root {
  --shell-bg: #ece7dd;
  --shell-bg-soft: #f6f1e8;
  --panel-bg: rgba(255, 252, 247, 0.94);
  --panel-bg-strong: #fffdf8;
  --panel-muted: #f2ece1;
  --panel-line: rgba(75, 60, 44, 0.12);
  --panel-line-strong: rgba(17, 33, 58, 0.12);
  --ink-900: #12213a;
  --ink-700: #38506c;
  --ink-500: #6e7e90;
  --accent: #c9652b;
  --accent-strong: #a94f1c;
  --accent-soft: #f4dfd2;
  --shadow-soft: 0 22px 60px rgba(35, 33, 28, 0.08);
  --shadow-float: 0 20px 45px rgba(18, 33, 58, 0.16);
}

html {
  background:
    radial-gradient(circle at top left, rgba(201, 101, 43, 0.1), transparent 26%),
    radial-gradient(circle at right 20%, rgba(18, 33, 58, 0.1), transparent 24%),
    linear-gradient(180deg, #f7f2e9 0%, #ece7dd 100%);
}

body {
  min-height: 100vh;
  background: transparent;
  color: var(--ink-900);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 101, 43, 0.13), transparent 68%);
}

body::after {
  left: -160px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 33, 58, 0.08), transparent 70%);
}

#app {
  position: relative;
  z-index: 1;
}

.app-shell {
  width: min(1800px, calc(100vw - 24px));
  margin: 0 auto;
  min-height: 100vh;
  gap: 1rem;
  padding: 1rem 0 1.1rem;
}

.app-header {
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(135deg, #13233b 0%, #16304e 58%, #27496e 100%);
  box-shadow: var(--shadow-float);
  gap: 1rem;
  top: 0.7rem;
  backdrop-filter: blur(14px);
}

.app-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-brand {
  min-width: 0;
}

.app-brand-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  opacity: 0.72;
}

.app-title {
  margin: 0.15rem 0 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.app-brand-subtitle {
  margin: 0.45rem 0 0;
  font-size: 0.94rem;
  color: rgba(247, 249, 252, 0.78);
}

.app-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 220px;
}

.app-release-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-release-hint {
  color: rgba(240, 243, 247, 0.78);
  font-size: 0.8rem;
  text-align: right;
}

.app-nav {
  gap: 0.55rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-item {
  padding: 0.62rem 1.05rem;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f7fbff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
}

.nav-item.active {
  background: linear-gradient(135deg, #d87935, #c35d24);
  color: #fffaf3;
  border-color: rgba(255, 232, 214, 0.48);
}

.app-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--panel-bg);
  border-radius: 1.2rem;
  border: 1px solid var(--panel-line);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.app-context-main {
  min-width: 0;
}

.app-context-title {
  margin: 0.16rem 0 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}

.app-context-note {
  flex: 0 0 auto;
  min-width: 240px;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff7ee, #f3eadf);
  border: 1px solid rgba(201, 101, 43, 0.16);
}

.app-context-note-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-500);
}

.app-context-note-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.96rem;
  color: var(--ink-900);
}

.app-workspace-shell {
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.app-sidebar-card {
  position: sticky;
  top: 8.35rem;
  background: var(--panel-bg);
  border-radius: 1.2rem;
  border: 1px solid var(--panel-line);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.app-sidebar-title {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.app-side-nav {
  margin-top: 0.8rem;
  gap: 0.8rem;
}

.side-nav-group {
  border: 1px solid rgba(18, 33, 58, 0.08);
  border-radius: 1rem;
  padding: 0.72rem;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(246, 240, 231, 0.92));
}

.side-nav-group-title {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.side-nav-item {
  border-radius: 0.8rem;
  border: 1px solid rgba(18, 33, 58, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-900);
  padding: 0.6rem 0.72rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.side-nav-item:hover {
  transform: translateX(2px);
  border-color: rgba(201, 101, 43, 0.34);
  background: #fffdfa;
}

.side-nav-item.expanded {
  background: #f7f1e7;
  border-color: rgba(18, 33, 58, 0.14);
}

.side-nav-item.active {
  background: linear-gradient(135deg, #13233b, #23415f);
  border-color: rgba(18, 33, 58, 0.8);
  color: #fffaf4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.page-section {
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-radius: 1.25rem;
  padding: 1.35rem 1.45rem 1.45rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.section-header {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(18, 33, 58, 0.08);
}

.section-kicker {
  color: var(--ink-500);
  letter-spacing: 0.16em;
}

.section-header h2,
.modal-title,
.panel-header h3 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  color: var(--ink-900);
  letter-spacing: -0.03em;
}

.section-subtitle {
  color: var(--ink-700);
}

.btn {
  padding: 0.62rem 1.15rem;
  border: 1px solid rgba(18, 33, 58, 0.1);
  background: #fffaf4;
  color: var(--ink-900);
  box-shadow: 0 8px 20px rgba(18, 33, 58, 0.04);
}

.btn.primary,
.modal-submit {
  background: linear-gradient(135deg, #d87935, #c35d24);
  color: #fff9f2;
  border: none;
  box-shadow: 0 12px 24px rgba(195, 93, 36, 0.22);
}

.btn:hover,
.tiny-btn:hover,
.modal-submit:hover,
.modal-cancel:hover {
  transform: translateY(-1px);
}

.stat-card {
  min-width: 160px;
  padding: 1rem 1rem 0.95rem;
  background: linear-gradient(180deg, #fffdf8, #f6f0e6);
  border-radius: 1rem;
  border: 1px solid rgba(18, 33, 58, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.stat-label {
  color: var(--ink-500);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.65rem;
  color: var(--ink-900);
}

.table-shell,
.task-panel,
.workspace-panel,
.audit-panel,
.permission-group,
.research-sidebar,
.research-table-shell {
  border-radius: 1rem;
  border-color: rgba(18, 33, 58, 0.08);
  background: rgba(255, 252, 247, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.data-table {
  font-size: 0.93rem;
}

.data-table thead {
  background: linear-gradient(180deg, #f7f1e8, #f0e8dd);
}

.data-table th {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.data-table tbody tr:hover {
  background: rgba(18, 33, 58, 0.03);
}

.tiny-btn {
  background: #fffaf4;
  border-color: rgba(18, 33, 58, 0.12);
  color: var(--ink-900);
  padding: 0.28rem 0.7rem;
  font-weight: 700;
}

.tiny-btn.danger {
  background: #fff1ef;
  border-color: rgba(185, 28, 28, 0.18);
}

.student-slot {
  min-height: 1.85rem;
  background: #fffaf4;
  border-color: rgba(18, 33, 58, 0.12);
}

.student-slot.filled {
  background: #f4e8db;
  border-color: rgba(201, 101, 43, 0.22);
  color: var(--ink-900);
}

.modal-overlay {
  background: rgba(18, 24, 36, 0.42);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(720px, 92vw);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(248, 242, 234, 0.96));
  box-shadow: 0 28px 60px rgba(18, 33, 58, 0.24);
}

.modal-header {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(18, 33, 58, 0.08);
}

.modal-close {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: rgba(18, 33, 58, 0.05);
  color: var(--ink-700);
}

.modal-form {
  margin-top: 0.95rem;
  gap: 0.9rem;
}

.modal-field label {
  gap: 0.35rem;
}

.modal-field input,
.modal-field textarea,
.modal-field select,
.workspace-filters input,
.workspace-filters select,
.audit-filters input,
.audit-filters select,
.task-filters input,
.task-filters select,
.schedule-filters input,
.schedule-filters select {
  border-radius: 0.82rem;
  border: 1px solid rgba(18, 33, 58, 0.12);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink-900);
  padding: 0.68rem 0.78rem;
}

.modal-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fffaf4;
  border: 1px solid rgba(18, 33, 58, 0.1);
  font-weight: 600;
}

.modal-cancel {
  background: #ede6da;
  color: var(--ink-900);
}

.toast-root {
  top: 1.1rem;
  right: 1.1rem;
  bottom: auto;
}

.toast-item {
  min-width: 260px;
  border-radius: 1rem;
}

.toast-info {
  background: #173252;
}

.toast-success {
  background: #25644d;
}

.toast-error {
  background: #b33b28;
}

@media (max-width: 1100px) {
  .app-shell {
    width: calc(100vw - 14px);
    padding: 0.45rem 0 0.7rem;
  }

  .app-header-main,
  .app-context-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-header-meta,
  .app-context-note {
    min-width: 0;
    width: 100%;
    align-items: flex-start;
  }

  .app-release-hint {
    text-align: left;
  }

  .app-sidebar-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-header {
    padding: 0.95rem 0.9rem 0.9rem;
  }

  .app-title {
    font-size: 1.55rem;
  }

  .app-brand-subtitle {
    font-size: 0.86rem;
  }

  .app-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .page-section {
    padding: 1rem 0.95rem 1.05rem;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .btn,
  .modal-submit,
  .modal-cancel {
    width: 100%;
    justify-content: center;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 24%),
    linear-gradient(180deg, #eef2ff 0%, #e5ecfb 100%);
}

.login-card {
  width: min(460px, 100%);
  padding: 2rem 1.9rem;
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.14);
}

.login-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}

.login-title {
  margin: 0.25rem 0 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 2rem;
  color: #12213a;
}

.login-subtitle {
  margin: 0.55rem 0 0;
  color: #475569;
  line-height: 1.6;
}

.login-form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: #334155;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f8fafc;
  padding: 0.82rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.login-error {
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.16);
  color: #b91c1c;
  font-size: 0.86rem;
}

.login-submit {
  border: none;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0f5bd4, #2563eb);
  color: #fff;
  padding: 0.88rem 1rem;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Shell restore: keep three zones only */
body {
  background: #eef2ff;
  color: #111827;
}

.app-shell {
  width: calc(100vw - 24px);
  max-width: none;
  padding: 0.75rem 0 1rem;
  gap: 0.75rem;
}

.app-header {
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1f2a44;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.18);
  top: 0.55rem;
}

.app-header-main {
  align-items: flex-start;
}

.app-title {
  font-size: 1.95rem;
  color: #f8fbff;
}

.app-brand-subtitle {
  color: rgba(248, 251, 255, 0.76);
  font-size: 0.92rem;
}

.app-header-meta {
  min-width: 200px;
  align-items: flex-end;
}

.app-auth-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.38rem;
}

.app-auth-user {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.94rem;
}

.app-auth-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.app-auth-role {
  color: rgba(248, 251, 255, 0.72);
  font-size: 0.8rem;
}

.app-auth-logout {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #f8fbff;
  border-radius: 999px;
  padding: 0.38rem 0.82rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.app-nav {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-item {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f8fbff;
  padding: 0.48rem 0.95rem;
  font-size: 0.9rem;
}

.nav-item:hover,
.nav-item.active {
  background: #ffffff;
  color: #1f2a44;
  border-color: #ffffff;
  transform: none;
}

.app-workspace-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0.75rem;
}

.app-sidebar-card {
  top: 6.55rem;
  padding: 0.85rem;
  border-radius: 0.95rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.page-section {
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: 0.95rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.section-header {
  padding-bottom: 0.8rem;
}

.research-main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.research-inline-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.research-inline-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: #374151;
  font-weight: 600;
}

.research-inline-filters select {
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f8fafc;
  padding: 0.62rem 0.72rem;
  font-size: 0.92rem;
  font-family: inherit;
}

@media (max-width: 1100px) {
  .app-shell {
    width: calc(100vw - 12px);
  }

  .app-sidebar-card {
    top: auto;
  }
}

@media (max-width: 760px) {
  .app-header-meta,
  .app-auth-panel {
    width: 100%;
    align-items: flex-start;
  }

  .app-auth-row {
    flex-wrap: wrap;
  }

  .login-card {
    padding: 1.5rem 1.2rem;
  }

  .login-title {
    font-size: 1.55rem;
  }
}

/* Fine-tune old-theme rollback */
.app-shell {
  gap: 0.8rem;
}

.app-nav {
  flex-wrap: wrap;
}

.app-workspace-shell {
  align-items: start;
}

.app-sidebar-card {
  max-height: calc(100vh - 7.2rem);
  overflow: auto;
}

.app-side-nav {
  display: grid;
  gap: 0.6rem;
}

.side-nav-node.depth-1 .side-nav-item,
.side-nav-node.depth-2 .side-nav-item,
.side-nav-node.depth-3 .side-nav-item {
  margin-left: 0;
  width: 100%;
}

.side-nav-node.depth-1 .side-nav-item {
  padding-left: 1.2rem;
  font-size: 0.79rem;
  background: #f3f8ff;
  border-style: dashed;
}

.side-nav-node.depth-2 .side-nav-item {
  padding-left: 1.55rem;
  font-size: 0.77rem;
  background: #f8fbff;
}

.side-nav-node.depth-3 .side-nav-item {
  padding-left: 1.85rem;
  font-size: 0.76rem;
  background: #fbfdff;
}

.app-pages {
  display: grid;
}

.section-body {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.85rem;
}

.table-shell,
.research-table-shell,
.task-panel,
.workspace-panel,
.audit-panel,
.permission-group {
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 0.68rem 0.78rem;
  border-bottom: 1px solid #e6eef8;
}

.info-strip,
.student-focus-strip {
  border-radius: 0.9rem;
  padding: 0.8rem 0.95rem;
}

@media (max-width: 1100px) {
  .app-sidebar-card {
    max-height: none;
  }
}

/* Header layout finalization: single-row top bar, centered module nav, text-only auth */
.app-header {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
}

.app-brand {
  min-width: 0;
}

.app-brand-kicker {
  margin: 0 0 0.12rem;
}

.app-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.05;
}

.app-brand-subtitle {
  margin: 0.28rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.app-nav {
  justify-self: center;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.55rem;
  padding: 0 0.35rem;
  min-width: 0;
}

.nav-item {
  flex: 0 0 auto;
}

.app-header-meta {
  justify-self: end;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.app-auth-panel {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.app-auth-user {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

.app-auth-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

.app-auth-role {
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-auth-logout {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.app-auth-logout:hover {
  background: transparent;
  color: #0c4ea6;
  text-decoration: underline;
}

@media (max-width: 1280px) {
  .app-header {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) auto;
  }

  .app-brand-subtitle {
    font-size: 0.74rem;
  }
}

@media (max-width: 1024px) {
  .app-header {
    grid-template-columns: 1fr;
    justify-items: start;
    align-items: start;
  }

  .app-nav {
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 0;
  }

  .app-header-meta {
    justify-self: stretch;
    align-self: start;
    align-items: flex-start;
  }

  .app-auth-inline {
    justify-content: flex-start;
  }
}

.research-side-filter-group {
  margin-top: 0.2rem;
}

.research-sidebar-filters {
  display: grid;
  gap: 0.65rem;
}

.research-sidebar-field {
  display: grid;
  gap: 0.35rem;
  color: #46627f;
  font-size: 0.81rem;
  font-weight: 600;
}

.research-sidebar-field select {
  width: 100%;
  border: 1px solid #dbe7fb;
  border-radius: 0.8rem;
  background: #f9fbff;
  color: var(--ink);
  min-height: 2.55rem;
  padding: 0.5rem 0.75rem;
}

.student-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}

.student-detail-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: #ffffff;
  padding: 0.95rem 1rem;
  scroll-margin-top: 1rem;
}

.student-detail-card--wide {
  grid-column: span 2;
}

.student-detail-title {
  margin-bottom: 0.8rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.student-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.student-detail-title-row .student-detail-title {
  margin-bottom: 0;
}

.student-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
}

.student-detail-list div {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
  border-bottom: 1px solid #eef4fb;
  padding-bottom: 0.4rem;
}

.student-detail-list span,
.student-detail-metric span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.student-detail-list strong,
.student-detail-metric strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.student-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.student-detail-metric {
  border: 1px solid #e6eef8;
  border-radius: 0.85rem;
  background: #f8fbff;
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.25rem;
}

.student-detail-note {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.student-detail-placeholder {
  border: 1px dashed #dbe7fb;
  border-radius: 0.85rem;
  background: #f9fbff;
  padding: 0.85rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.65;
}

.student-detail-text {
  border: 1px solid #e4ecfb;
  border-radius: 0.85rem;
  background: #ffffff;
  padding: 0.85rem 0.9rem;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.7;
  min-height: 5.5rem;
}

.student-detail-structured {
  display: grid;
  gap: 0.75rem;
}

.student-detail-structured-item {
  border: 1px solid #e4ecfb;
  border-radius: 0.85rem;
  background: #ffffff;
  padding: 0.8rem 0.9rem;
}

.student-detail-structured-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.student-detail-structured-value {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.7;
}

.student-detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.student-detail-subsection-title {
  margin: 0.9rem 0 0.55rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.student-detail-history {
  display: grid;
  gap: 0.6rem;
}

.student-detail-history-item {
  border: 1px solid #e4ecfb;
  border-radius: 0.85rem;
  background: #ffffff;
  padding: 0.8rem 0.9rem;
}

.student-detail-history-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.student-detail-history-body {
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.65;
}

.student-table-shell {
  overflow-x: auto;
}

.student-data-table {
  min-width: 1140px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.student-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4ff;
  white-space: nowrap;
}

.student-data-table td {
  vertical-align: top;
}

.student-data-table th:nth-child(1),
.student-data-table td:nth-child(1),
.student-data-table th:nth-child(2),
.student-data-table td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
}

.student-data-table th:nth-child(2),
.student-data-table td:nth-child(2) {
  left: 7rem;
}

.student-data-table thead th:nth-child(1),
.student-data-table thead th:nth-child(2) {
  z-index: 3;
  background: #eef4ff;
}

.student-data-table th:nth-child(1),
.student-data-table td:nth-child(1) {
  width: 7rem;
}

.student-data-table th:nth-child(2),
.student-data-table td:nth-child(2) {
  width: 6.5rem;
}

.student-data-table th:nth-child(5),
.student-data-table td:nth-child(5) {
  width: 10rem;
}

.student-data-table td:nth-child(5) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-data-table th.student-table-cell-actions,
.student-data-table td.student-table-cell-actions {
  width: 10.5rem;
}

.student-data-table td.student-table-cell-actions {
  white-space: normal;
  vertical-align: middle;
}

.student-table-actions--compact {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: end;
  gap: 0.28rem 0.38rem;
}

.student-table-actions--compact .tiny-btn {
  min-height: 26px;
  padding: 0.08rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.student-table-pagination {
  margin-top: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
}

.student-table-pagination-info {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.student-table-pagination-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.student-table-pagination-controls .tiny-btn {
  min-width: 1.9rem;
  padding: 0.08rem 0.4rem;
}

.student-table-pagination-controls .tiny-btn.active {
  border-color: #2f6fdc;
  background: #2f6fdc;
  color: #ffffff;
}

.student-page-ellipsis {
  color: var(--ink-soft);
  font-size: 0.78rem;
  padding: 0 0.2rem;
}

.student-detail-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: -0.2rem 0 0.9rem;
}

@media (max-width: 1080px) {
  .student-detail-grid {
    grid-template-columns: 1fr;
  }

  .student-detail-card--wide {
    grid-column: span 1;
  }

  .student-detail-list {
    grid-template-columns: 1fr;
  }

  .student-order-meta {
    grid-template-columns: 1fr 1fr;
  }
}

.followup-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid #dbe7fb;
  background: #eef5ff;
  color: #35518a;
}

.followup-pill.need {
  border-color: #ffd7b3;
  background: #fff2e6;
  color: #b85c00;
}

.followup-pill.scheduled {
  border-color: #cde3ff;
  background: #edf5ff;
  color: #2059b0;
}

.followup-pill.none {
  border-color: #e6ebf5;
  background: #f7f9fc;
  color: #77839b;
}

.student-detail-service-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.student-learning-groups {
  display: grid;
  gap: 0.65rem;
}

.student-learning-group {
  border: 1px solid #dde8f8;
  border-radius: 0.9rem;
  background: #f7faff;
  overflow: hidden;
}

.student-learning-group > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: 0.45rem;
  padding: 0.72rem 3.4rem 0.78rem 0.85rem;
  position: relative;
}

.student-learning-group > summary::-webkit-details-marker {
  display: none;
}

.student-learning-group > summary::after {
  content: "展开";
  color: #5d79a3;
  font-size: 0.76rem;
  position: absolute;
  top: 0.78rem;
  right: 0.86rem;
}

.student-learning-group[open] > summary {
  border-bottom: 1px dashed #dbe7fb;
  background: #f2f7ff;
}

.student-learning-group[open] > summary::after {
  content: "收起";
}

.student-learning-group-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.student-learning-group-main strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.student-learning-group-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem 0.8rem;
}

.student-learning-group-fields span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.student-learning-group-fields em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.student-learning-group-fields b {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-learning-records {
  display: grid;
  gap: 0.65rem;
}

.student-learning-group .student-learning-records {
  padding: 0 0.78rem 0.78rem;
}

@media (max-width: 1360px) {
  .student-learning-group-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .student-learning-group > summary {
    padding-right: 0.85rem;
  }

  .student-learning-group > summary::after {
    position: static;
    justify-self: start;
    margin-top: 0.15rem;
  }

  .student-learning-group-fields {
    grid-template-columns: 1fr;
  }
}

.student-order-list {
  display: grid;
  gap: 0.7rem;
}

.student-order-item {
  border: 1px solid #e4ecfb;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0.9rem 1rem;
}

.student-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.student-order-head strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
}

.student-order-head span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.student-order-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.9rem;
  color: var(--ink);
  font-size: 0.83rem;
}

.student-order-meta span {
  display: block;
  min-width: 0;
}

.student-transfer-list {
  display: grid;
  gap: 0.65rem;
}

.student-transfer-item {
  border: 1px solid #e4ecfb;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.student-transfer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.transfer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #eef5ff;
  color: #35518a;
  font-size: 0.75rem;
  font-weight: 700;
}

.transfer-pill.transfer {
  border-color: #cce0ff;
  background: #eef5ff;
  color: #1f58a8;
}

.transfer-pill.in {
  border-color: #c9ebd5;
  background: #eaf9ef;
  color: #1f8753;
}

.transfer-pill.out {
  border-color: #ffe0cc;
  background: #fff3e9;
  color: #b6611f;
}

.student-transfer-route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.student-transfer-route span {
  color: var(--ink-soft);
  font-weight: 500;
}

.student-transfer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.95rem;
}

.student-transfer-meta span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.student-learning-record {
  border: 1px solid #e6eef8;
  border-radius: 0.85rem;
  background: #f8fbff;
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.35rem;
}

.student-learning-group .student-learning-record {
  background: #ffffff;
}

.student-learning-record-main,
.student-learning-record-meta,
.student-learning-record-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.student-learning-record-main strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.student-learning-record-main span,
.student-learning-record-meta span,
.student-learning-record-extra span {
  color: var(--ink-soft);
  font-size: 0.79rem;
}

/* Style rollback: match ETSGOA_beifen visual direction */
:root {
  --ink: #172033;
  --ink-soft: #4d5b75;
  --surface: #f4f7fb;
  --surface-strong: #ffffff;
  --brand: #0f5cc0;
  --brand-deep: #0c4b9b;
  --brand-soft: #eaf2ff;
  --line: #dce5f2;
  --good: #1d9b55;
  --warn: #cc7a00;
  --bad: #d43a3a;
  --shadow: 0 10px 28px rgba(12, 29, 61, 0.1);
}

body {
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, #eff6ff 0%, transparent 32%),
    radial-gradient(circle at 92% 16%, #f0fdf4 0%, transparent 24%),
    linear-gradient(180deg, #f3f6fb 0%, #eef2f8 100%);
}

.app-shell {
  gap: 0.8rem;
  padding: 0.75rem;
}

.app-header {
  position: sticky;
  top: 0.5rem;
  z-index: 40;
  margin: 0;
  padding: 0.45rem 0.85rem 0.7rem;
  border-radius: 1rem;
  display: grid;
  gap: 0.55rem 0.9rem;
  align-items: start;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(210, 222, 242, 0.92);
  box-shadow: 0 14px 30px rgba(12, 29, 61, 0.08);
  backdrop-filter: blur(14px);
}

.app-header-main {
  justify-content: space-between;
  gap: 1rem;
}

.app-brand-kicker {
  margin: 0 0 0.25rem;
  color: #4d6a92;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 1;
}

.app-title {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(1.6rem, 1vw + 1rem, 2.1rem);
  line-height: 1.05;
  letter-spacing: 0.2px;
  color: var(--ink);
}

.app-brand-subtitle {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.app-header-meta {
  min-width: 260px;
}

.app-auth-panel {
  width: 100%;
  align-items: flex-start;
  gap: 0.4rem;
  border: 1px solid #dbe6f7;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(243, 248, 255, 0.92));
  padding: 0.75rem 0.85rem;
}

.app-auth-user {
  color: var(--ink);
  font-size: 0.94rem;
}

.app-auth-row {
  width: 100%;
  justify-content: space-between;
}

.app-auth-role {
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.app-auth-logout {
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #284872;
  padding: 0.34rem 0.72rem;
}

.app-nav {
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e0e8f6;
}

.nav-item {
  min-width: 82px;
  text-align: center;
  background: transparent;
  border: 1px solid var(--line);
  color: #25426a;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.nav-item:hover {
  background: #f8fbff;
  border-color: #bfd5f7;
  color: #25426a;
}

.nav-item.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.app-workspace-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 0.8rem;
}

.app-sidebar-card {
  top: 6.2rem;
  padding: 0.8rem;
  border-radius: 1rem;
  border: 1px solid #dbe6f7;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.app-sidebar-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.side-nav-group {
  display: grid;
  gap: 0.45rem;
  border: 1px solid #dbe6f7;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(243, 248, 255, 0.92));
  padding: 0.7rem;
}

.side-nav-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a678d;
  letter-spacing: 0.2px;
}

.side-nav-item {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe7fb;
  border-radius: 0.72rem;
  background: #f9fbff;
  color: #284872;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.side-nav-item:hover {
  transform: none;
  background: #edf5ff;
  border-color: #b8cdef;
}

.side-nav-item.expanded {
  background: #f3f8ff;
  border-style: dashed;
}

.side-nav-item.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: none;
}

.side-nav-arrow {
  opacity: 0.8;
}

.page-section {
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(210, 222, 242, 0.92);
  box-shadow: var(--shadow);
}

.section-header {
  padding: 0 0 0.9rem;
  border-bottom: 1px solid #e3ebf8;
}

.section-kicker {
  margin: 0 0 0.25rem;
  color: #4d6a92;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-subtitle {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.section-header h2,
.modal-title,
.panel-header h3 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  color: var(--ink);
}

.btn {
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #284872;
  border-radius: 999px;
  padding: 0.48rem 0.92rem;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: none;
}

.btn.primary,
.modal-submit {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: none;
}

.stats-row {
  gap: 0.8rem;
}

.stat-card {
  padding: 0.8rem 0.9rem;
  background: #f8fbff;
  border-radius: 0.9rem;
  border: 1px solid #dbe7fb;
  box-shadow: none;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.stat-value {
  font-size: 1.45rem;
  color: var(--ink);
}

.table-shell,
.research-table-shell,
.task-panel,
.workspace-panel,
.audit-panel,
.permission-group {
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: #ffffff;
  box-shadow: none;
}

.data-table {
  font-size: 0.88rem;
}

.data-table thead {
  background: #f5f8fd;
}

.data-table th {
  color: #49647f;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.tiny-btn {
  background: #f8fbff;
  border: 1px solid #dbe7fb;
  color: #284872;
  padding: 0.24rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.tiny-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tiny-btn.danger {
  background: #fff4f4;
  border-color: #f0caca;
  color: #c13636;
}

.schedule-filters label,
.research-inline-filters label,
.workspace-filters label,
.audit-filters label,
.task-filters label {
  color: #46627f;
  font-size: 0.82rem;
  font-weight: 600;
}

.schedule-filters select,
.schedule-filters input,
.research-inline-filters select,
.workspace-filters input,
.workspace-filters select,
.audit-filters input,
.audit-filters select,
.task-filters input,
.task-filters select,
.modal-field input,
.modal-field textarea,
.modal-field select {
  border: 1px solid #dbe7fb;
  border-radius: 0.8rem;
  background: #f9fbff;
  color: var(--ink);
}

.info-strip,
.student-focus-strip {
  border: 1px solid #dbe7fb;
  background: #f8fbff;
  color: #2b4a75;
}

.student-summary-card,
.unassigned-panel {
  border: 1px solid #dbe7fb;
  background: #ffffff;
  box-shadow: none;
}

.student-summary-card.is-focused {
  border-color: #b8cdef;
  box-shadow: 0 6px 18px rgba(15, 92, 192, 0.08);
}

.student-progress {
  background: #eaf2ff;
}

.student-progress-bar {
  background: linear-gradient(90deg, #0f5cc0 0%, #60a5fa 100%);
}

.unassigned-student-card,
.student-slot {
  background: #f9fbff;
  border-color: #dbe7fb;
  color: #284872;
}

.student-slot.filled {
  background: #eaf2ff;
  border-color: #bfd5f7;
}

.modal-overlay {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(720px, 92vw);
  border-radius: 1.1rem;
  border: 1px solid rgba(210, 222, 242, 0.95);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 44px rgba(12, 29, 61, 0.14);
}

.modal-header {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #e3ebf8;
}

.modal-cancel {
  background: #eef4fb;
  color: #2b4a75;
}

.modal-card {
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.modal-form {
  overflow-y: auto;
  padding-right: 0.2rem;
}

.modal-actions {
  flex-shrink: 0;
  margin-top: 0.8rem;
}

.toast-item {
  border-radius: 0.9rem;
}

.toast-info {
  background: #284872;
}

.toast-success {
  background: #1d9b55;
}

.toast-error {
  background: #d43a3a;
}

.login-shell {
  background:
    radial-gradient(circle at 8% 8%, #eff6ff 0%, transparent 32%),
    radial-gradient(circle at 92% 16%, #f0fdf4 0%, transparent 24%),
    linear-gradient(180deg, #f3f6fb 0%, #eef2f8 100%);
}

.login-card {
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(210, 222, 242, 0.92);
  box-shadow: 0 18px 44px rgba(12, 29, 61, 0.12);
}

.login-kicker {
  color: #4d6a92;
  font-size: 0.68rem;
}

.login-title {
  color: var(--ink);
}

.login-subtitle {
  color: var(--ink-soft);
}

.login-field {
  color: #46627f;
}

.login-field input {
  border: 1px solid #dbe7fb;
  background: #f9fbff;
}

.login-submit {
  background: var(--brand);
}

.finance-quick-row {
  gap: 0.45rem;
  margin-bottom: 0;
}

.task-quick-row {
  gap: 0.45rem;
  margin: 0.45rem 0 0.7rem;
  flex-wrap: wrap;
}

.task-toolbar {
  margin-bottom: 0.85rem;
}

.task-summary-row {
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.task-summary-row .stat-card {
  min-width: 120px;
  padding: 0.72rem 0.88rem;
}

.task-summary-row .stat-value {
  font-size: 1.18rem;
}

.panel-header-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.notification-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #35557f;
  background: #eef4ff;
  border: 1px solid #d7e4ff;
}

.task-badge.is-high {
  color: #9a4b00;
  background: #fff3d9;
  border-color: #ffd99a;
}

.task-toolbar {
  margin-bottom: 0.85rem;
}

.task-filters {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0;
  align-items: end;
}

.task-filters label {
  gap: 0.2rem;
  font-size: 0.8rem;
}

.task-filters input,
.task-filters select {
  min-height: 38px;
}

.task-filter-check {
  min-height: 38px;
  justify-content: center;
  padding: 0.4rem 0.65rem;
  border-radius: 0.95rem;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
}

.audit-toolbar {
  margin-bottom: 0.85rem;
}

.audit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0;
}

.audit-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.audit-filters input,
.audit-filters select {
  min-height: 38px;
  border-radius: 0.95rem;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  padding: 0.55rem 0.82rem;
}

.audit-summary-row {
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.audit-summary-row .stat-card {
  min-width: 120px;
  padding: 0.72rem 0.88rem;
}

.audit-summary-row .stat-value {
  font-size: 1.18rem;
}

.audit-quick-row {
  gap: 0.45rem;
  margin: 0.45rem 0 0.7rem;
  flex-wrap: wrap;
}

.audit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.audit-panel {
  min-width: 0;
}

.audit-json {
  margin: 0;
  padding: 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid #dbe7fb;
  background: #f8fbff;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow: auto;
  max-height: 480px;
}

.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.system-toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.system-account-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.system-account-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.system-account-filters input,
.system-account-filters select {
  min-height: 38px;
  border-radius: 0.95rem;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  padding: 0.55rem 0.82rem;
}

.system-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.system-summary-row {
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.system-summary-row .stat-card {
  min-width: 120px;
  padding: 0.72rem 0.88rem;
}

.system-summary-row .stat-value {
  font-size: 1.18rem;
}

.system-quick-row {
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.permissions-toolbar {
  margin-bottom: 0.85rem;
}

.permissions-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.permissions-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.permissions-filters input,
.permissions-filters select {
  min-height: 38px;
  border-radius: 0.95rem;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  padding: 0.55rem 0.82rem;
}

.permissions-summary-row {
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.permissions-summary-row .stat-card {
  min-width: 120px;
  padding: 0.72rem 0.88rem;
}

.permissions-summary-row .stat-value {
  font-size: 1.18rem;
}

.permissions-quick-row {
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

/* Final global normalization layer */
.section-header {
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.8rem;
}

.section-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1.36rem;
  line-height: 1.18;
  color: #17365f;
}

.section-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6c84a5;
}

.section-subtitle {
  margin: 0.28rem 0 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #607793;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.stats-row {
  gap: 0.75rem;
}

.stat-card {
  min-width: 122px;
  padding: 0.78rem 0.92rem;
  border-radius: 1rem;
  border: 1px solid #dbe7fb;
  background: rgba(249, 251, 255, 0.96);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.stat-label {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.73rem;
  color: #6b7f99;
}

.stat-value {
  font-size: 1.14rem;
  line-height: 1.2;
  color: #18395f;
}

.table-shell,
.workspace-panel,
.task-panel,
.audit-panel,
.permission-group {
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.panel-header {
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.panel-header h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  color: #1b3555;
}

.panel-header-meta {
  font-size: 0.8rem;
  color: #70839e;
}

.btn {
  min-height: 38px;
  padding: 0.44rem 0.92rem;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #284872;
  font-size: 0.83rem;
  font-weight: 600;
  box-shadow: none;
}

.btn.primary {
  border-color: #1f5fbf;
  background: #1f5fbf;
  color: #fff;
}

.btn:hover,
.tiny-btn:hover {
  filter: none;
  transform: none;
}

.tiny-btn {
  min-height: 30px;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.74rem;
  border: 1px solid #dbe7fb;
  background: #f7fbff;
  color: #31527d;
}

.tiny-btn.active {
  border-color: #1f5fbf;
  background: #1f5fbf;
  color: #fff;
}

.filter-chip-row,
.role-tabs {
  gap: 0.45rem;
  flex-wrap: wrap;
}

.role-tab {
  min-height: 36px;
  padding: 0.32rem 0.82rem;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #fff;
  color: #26466e;
  font-size: 0.8rem;
  font-weight: 600;
}

.role-tab.active {
  border-color: #1f5fbf;
  background: #1f5fbf;
  color: #fff;
}

.workspace-filters label,
.task-filters label,
.finance-filter-bar label,
.audit-filters label,
.system-account-filters label,
.permissions-filters label {
  font-size: 0.8rem;
  color: #667c98;
}

.workspace-filters input,
.workspace-filters select,
.task-filters input,
.task-filters select,
.finance-filter-bar input,
.finance-filter-bar select,
.audit-filters input,
.audit-filters select,
.system-account-filters input,
.system-account-filters select,
.permissions-filters input,
.permissions-filters select {
  min-height: 38px;
  border-radius: 0.95rem;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  padding: 0.55rem 0.82rem;
}

.data-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  background: #f7fbff;
}

.data-table th,
.data-table td {
  padding: 0.68rem 0.78rem;
  vertical-align: middle;
  border-bottom: 1px solid #e8effa;
}

.data-table th {
  font-size: 0.74rem;
  font-weight: 700;
  color: #5f7592;
  letter-spacing: 0.01em;
  background: #f7fbff;
}

.data-table tbody tr:hover {
  background: rgba(237, 244, 255, 0.72);
}

.modal-card,
.modal-card.modal-card-wide {
  border-radius: 1.08rem;
  border: 1px solid #dbe7fb;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.modal-field.is-readonly {
  opacity: 0.78;
}

.modal-field.is-readonly input,
.modal-field.is-readonly textarea,
.modal-field.is-readonly select {
  background: #f3f6fb;
  color: #5a6780;
}

.finance-carryover-table td:nth-child(9) {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-form,
.modal-form.modal-form-grid {
  gap: 0.82rem;
}

/* Global Finish Layer v2 */
.app-header {
  display: grid;
  grid-template-columns: minmax(250px, 320px) 1fr minmax(220px, 280px);
  align-items: end;
  gap: 1rem;
  padding: 1.1rem 1.25rem 1rem;
  border: 1px solid #dbe7fb;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(16, 40, 80, 0.06);
}

.app-brand {
  min-width: 0;
}

.app-title {
  margin: 0.16rem 0 0;
  font-size: 1.95rem;
  line-height: 1.08;
  color: #17345c;
}

.app-brand-subtitle {
  margin: 0.38rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #5f7695;
}

.app-nav {
  justify-content: center;
  align-items: center;
  gap: 0.52rem;
}

.nav-item {
  min-height: 38px;
  padding: 0.42rem 0.96rem;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #ffffff;
  color: #23456f;
  font-size: 0.83rem;
  font-weight: 700;
  box-shadow: none;
}

.nav-item.active {
  border-color: #245ec7;
  background: linear-gradient(135deg, #2f6fdc 0%, #245ec7 100%);
  color: #ffffff;
}

.app-header-meta {
  justify-self: end;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.app-auth-user {
  font-size: 0.9rem;
  font-weight: 700;
  color: #17345c;
}

.app-auth-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-auth-role {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f86a5;
}

.app-auth-logout {
  padding: 0;
  border: 0;
  background: transparent;
  color: #245ec7;
  font-size: 0.82rem;
  font-weight: 700;
}

.app-workspace-shell {
  gap: 1rem;
  align-items: start;
}

.app-sidebar-card {
  border-radius: 1.1rem;
  border: 1px solid #dbe7fb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(16, 40, 80, 0.05);
}

.page-section {
  display: none;
  flex-direction: column;
  gap: 0.95rem;
}

.page-section.active-section {
  display: flex;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.8rem;
}

.section-header h2 {
  margin: 0.14rem 0 0;
  font-size: 1.38rem;
  line-height: 1.2;
  color: #17345c;
}

.section-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6c82a3;
}

.section-subtitle {
  margin: 0.24rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #5d7596;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.finance-toolbar,
.task-toolbar,
.audit-toolbar,
.system-toolbar,
.permissions-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.workspace-filters,
.finance-filter-bar,
.task-filters,
.audit-filters,
.system-account-filters,
.permissions-filters,
.schedule-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem 0.8rem;
}

.workspace-filters label,
.task-filters label,
.finance-filter-bar label,
.audit-filters label,
.system-account-filters label,
.permissions-filters label,
.schedule-filter-bar label {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.79rem;
  color: #667d99;
}

.workspace-filters input,
.workspace-filters select,
.task-filters input,
.task-filters select,
.finance-filter-bar input,
.finance-filter-bar select,
.audit-filters input,
.audit-filters select,
.system-account-filters input,
.system-account-filters select,
.permissions-filters input,
.permissions-filters select,
.schedule-filter-bar input,
.schedule-filter-bar select {
  width: 100%;
  min-height: 38px;
  border-radius: 0.95rem;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  padding: 0.55rem 0.82rem;
  color: #284872;
}

.stats-row,
.finance-stats-row,
.task-summary-row,
.audit-summary-row,
.system-summary-row,
.permissions-summary-row {
  gap: 0.75rem;
}

.stat-card {
  flex: 1;
  min-width: 120px;
  padding: 0.76rem 0.9rem;
  background: #f8fbff;
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  box-shadow: none;
}

.stat-label {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.73rem;
  color: #6f84a1;
}

.stat-value {
  font-size: 1.14rem;
  line-height: 1.2;
  color: #17345c;
}

.filter-chip-row,
.role-tabs,
.finance-quick-row,
.task-quick-row,
.audit-quick-row,
.system-quick-row,
.permissions-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.table-shell,
.workspace-panel,
.task-panel,
.audit-panel,
.permission-group {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(16, 40, 80, 0.05);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid #edf2fc;
}

.panel-header h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  color: #17345c;
}

.panel-header-meta {
  font-size: 0.8rem;
  color: #7085a3;
}

.data-table {
  width: 100%;
  font-size: 0.81rem;
}

.data-table thead {
  background: #f7fbff;
}

.data-table th,
.data-table td {
  padding: 0.68rem 0.78rem;
  vertical-align: middle;
  border-bottom: 1px solid #e6eefb;
}

.data-table th {
  font-size: 0.74rem;
  font-weight: 700;
  color: #5d7391;
  background: #f7fbff;
}

.data-table tbody tr:hover {
  background: rgba(236, 244, 255, 0.72);
}

.btn {
  min-height: 38px;
  padding: 0.44rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #284872;
  font-size: 0.83rem;
  font-weight: 600;
  box-shadow: none;
}

.btn.primary {
  border-color: #245ec7;
  background: linear-gradient(135deg, #2f6fdc 0%, #245ec7 100%);
  color: #fff;
}

.tiny-btn {
  min-height: 30px;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #284872;
  font-size: 0.74rem;
  font-weight: 600;
}

.tiny-btn.active {
  border-color: #245ec7;
  background: #2f6fdc;
  color: #fff;
}

.side-nav-node.depth-1 .side-nav-item.active,
.side-nav-node.depth-2 .side-nav-item.active,
.side-nav-node.depth-3 .side-nav-item.active {
  background: #2f6fdc;
  border-color: #245ec7;
  color: #ffffff;
}

.side-nav-node.depth-1 .side-nav-item.active .side-nav-label,
.side-nav-node.depth-2 .side-nav-item.active .side-nav-label,
.side-nav-node.depth-3 .side-nav-item.active .side-nav-label,
.side-nav-node.depth-1 .side-nav-item.active .side-nav-arrow,
.side-nav-node.depth-2 .side-nav-item.active .side-nav-arrow,
.side-nav-node.depth-3 .side-nav-item.active .side-nav-arrow {
  color: #ffffff;
  opacity: 1;
}

.tiny-btn.danger {
  border-color: #f2c6c6;
  background: #fff7f7;
  color: #b42318;
}

.modal-card,
.modal-card.modal-card-wide {
  border-radius: 1.08rem;
  border: 1px solid #dbe7fb;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

@media (max-width: 1220px) {
  .app-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-nav {
    justify-content: flex-start;
  }

  .app-header-meta {
    justify-self: start;
    align-items: flex-start;
  }
}

.recruit-toolbar {
  display: grid;
  gap: 0.9rem;
}

.recruit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.recruit-filters label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #53627f;
}

.recruit-filters input,
.recruit-filters select {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #d8e1f2;
  border-radius: 14px;
  background: #fff;
  color: #1f2d4d;
}

.recruit-summary-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.recruit-quick-row {
  flex-wrap: wrap;
}

.recruit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.recruit-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(16, 40, 80, 0.05);
  padding: 1rem;
}

.recruit-panel + .recruit-panel {
  margin-top: -0.1rem;
}

.lead-table-shell .data-table {
  min-width: 1220px;
}

.lead-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #eef3ff;
  color: #2d5cc9;
  font-size: 0.78rem;
  font-weight: 700;
}

.lead-badge.is-today {
  background: #fff4d6;
  color: #9a6b00;
}

.lead-badge.is-converted {
  background: #e8f7ed;
  color: #257347;
}

.lead-badge.is-closed {
  background: #f3f4f7;
  color: #7a8499;
}

.recruit-detail-actions {
  margin-bottom: 0.8rem;
}

.lead-detail-grid {
  display: grid;
  gap: 0.85rem;
}

.lead-detail-card {
  border: 1px solid #e4ebf8;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: #fbfcff;
}

.lead-detail-card h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #20304d;
}

.lead-detail-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lead-detail-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.lead-detail-items div {
  display: grid;
  gap: 0.2rem;
}

.lead-detail-items span {
  font-size: 0.75rem;
  color: #70809e;
}

.lead-detail-items strong {
  color: #20304d;
  font-size: 0.92rem;
}

.lead-detail-card-wide {
  grid-column: 1 / -1;
}

.lead-detail-note {
  margin: 0;
  color: #32435f;
  line-height: 1.7;
  white-space: pre-wrap;
}

.lead-log-list {
  display: grid;
  gap: 0.75rem;
}

.lead-log-item {
  border: 1px solid #e7eefb;
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  background: #fff;
}

.lead-log-head,
.lead-log-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lead-log-head {
  margin-bottom: 0.45rem;
}

.lead-log-item p {
  margin: 0 0 0.45rem;
  color: #2e405f;
  line-height: 1.65;
  white-space: pre-wrap;
}

.lead-log-meta,
.lead-log-plan {
  color: #6f7f9b;
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .lead-detail-items {
    grid-template-columns: 1fr;
  }
}

.finance-attribution {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 180px;
}

.finance-attribution-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 79, 181, 0.14);
  background: rgba(36, 79, 181, 0.05);
  font-size: 0.73rem;
  line-height: 1;
  color: #2d416c;
}

.finance-attribution-label {
  color: #1d4ed8;
  font-weight: 700;
}

.finance-attribution-value {
  color: #415574;
  font-weight: 600;
}

.finance-owner-summary {
  display: grid;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e4ebf7;
  border-radius: 18px;
  background: #fbfcff;
}

.finance-owner-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: #60708d;
  font-size: 0.82rem;
}

.finance-owner-summary-head strong {
  color: #20304d;
  font-size: 0.92rem;
}

.finance-owner-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.finance-owner-summary-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e7eefb;
  border-radius: 14px;
  background: #fff;
}

.finance-owner-summary-name {
  color: #20304d;
  font-weight: 700;
}

.finance-owner-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  color: #60708d;
  font-size: 0.78rem;
}

.finance-owner-summary-empty {
  color: #70809e;
  font-size: 0.84rem;
  padding: 0.2rem 0;
}

.finance-pending-enrollment {
  border: 1px solid rgba(88, 116, 184, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(247, 250, 255, 0.96);
  display: grid;
  gap: 10px;
}

.finance-pending-enrollment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.finance-pending-enrollment-head span {
  color: #6c7b98;
  font-size: 12px;
}

.finance-pending-enrollment-list {
  display: grid;
  gap: 10px;
}

.finance-pending-enrollment-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px dashed rgba(88, 116, 184, 0.22);
  border-radius: 14px;
  background: #fff;
}

.finance-pending-enrollment-main,
.finance-pending-enrollment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.finance-pending-enrollment-main strong {
  color: #143062;
}

.finance-pending-enrollment-main span,
.finance-pending-enrollment-meta span,
.finance-pending-enrollment-empty {
  color: #6c7b98;
  font-size: 12px;
}

.finance-pending-enrollment-actions {
  display: flex;
  justify-content: flex-end;
}

.finance-performance-table th:nth-child(1),
.finance-performance-table td:nth-child(1) {
  min-width: 110px;
}

.finance-performance-table th:nth-child(2),
.finance-performance-table td:nth-child(2) {
  min-width: 120px;
}

.finance-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.finance-performance-detail {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.9rem;
  border: 1px solid #e5ecfb;
  border-radius: 18px;
  background: #fbfcff;
}

.finance-performance-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.finance-performance-detail-head strong {
  color: #20304d;
  font-size: 0.96rem;
}

.finance-performance-detail-head span {
  color: #64748b;
  font-size: 0.82rem;
}

.finance-performance-table th:last-child,
.finance-performance-table td:last-child {
  min-width: 96px;
}

.finance-performance-detail-table th:last-child,
.finance-performance-detail-table td:last-child {
  min-width: 96px;
}

/* research structure reset */
.research-tree-panel .side-nav-group-body {
  display: grid;
  gap: 0.75rem;
}

.research-side-tree-host {
  margin-top: 0.5rem;
  padding-left: 0.35rem;
}

.research-side-tree-embedded {
  display: grid;
  gap: 0.65rem;
}

.research-tree-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #5b6c8b;
}

.research-tree {
  margin-top: 0;
  display: grid;
  gap: 0.7rem;
}

.research-tree-section,
.research-course-node {
  display: grid;
  gap: 0.35rem;
}

.research-node-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.research-node-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.research-node-arrow {
  width: 0.9rem;
  color: #6b7b99;
  flex: 0 0 0.9rem;
}

.research-node-label {
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-node-meta {
  font-size: 0.72rem;
  color: #6b7b99;
  white-space: nowrap;
}

.research-node-btn.is-current {
  background: #eef3ff;
  border-color: rgba(79, 70, 229, 0.32);
}

.research-node-btn.level-type {
  font-weight: 600;
}

.research-course-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 0.8rem;
}

.research-stage-list {
  display: grid;
  gap: 0.35rem;
  padding-left: 1.2rem;
}

.research-info-strip {
  margin-bottom: 0.15rem;
}

.research-unit-panel {
  padding: 1rem 1.15rem;
}

.research-unit-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.research-unit-panel-head h3 {
  margin: 0 0 0.2rem;
}

.research-unit-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.research-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.research-head-actions .tiny-btn,
.research-inline-actions .tiny-btn {
  min-height: 30px;
  padding: 0.22rem 0.72rem;
  font-size: 0.74rem;
}

.research-unit-chip {
  min-width: 0;
}

.research-unit-chip.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
}

.confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 1200;
}

.confirm-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid rgba(161, 180, 209, 0.35);
  border-radius: 1rem;
  box-shadow: 0 18px 42px rgba(21, 34, 56, 0.18);
  padding: 1.1rem 1.1rem 1rem;
}

.confirm-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #18212f;
}

.confirm-message {
  margin: 0;
  color: #4f607d;
  line-height: 1.7;
}

.confirm-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.confirm-btn {
  min-width: 5.5rem;
  border-radius: 999px;
  border: 1px solid rgba(161, 180, 209, 0.5);
  background: #fff;
  color: #24324a;
  font-weight: 600;
  padding: 0.52rem 1rem;
  cursor: pointer;
}

.confirm-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.confirm-btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.research-table-shell .data-table th,
.research-table-shell .data-table td {
  vertical-align: middle;
}

.research-table-shell .data-table td:first-child,
.research-table-shell .data-table td:nth-child(2),
.research-table-shell .data-table th:first-child,
.research-table-shell .data-table th:nth-child(2) {
  white-space: nowrap;
}

.research-table-shell .row-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.research-lesson-title,
.research-alt-lesson {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-lesson-title {
  color: #18212f;
  font-weight: 600;
}

.research-alt-lesson {
  color: #5b6c8b;
}

@media (max-width: 1024px) {
  .research-course-list,
  .research-stage-list {
    padding-left: 0.55rem;
  }

  .research-unit-panel-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1180px) {
  .schedule-followup-grid {
    grid-template-columns: 1fr;
  }
}

/* teaching consumption dashboard */
.consumption-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.consumption-header-panel {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(520px, 1.3fr);
  gap: 0.8rem;
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  background: #fbfdff;
  padding: 0.9rem;
}

.consumption-season-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 168px));
  gap: 0.65rem;
  align-content: start;
  justify-content: start;
}

.consumption-season-fields label {
  display: grid;
  gap: 0.22rem;
  font-size: 0.8rem;
  color: #5f7595;
}

.consumption-season-fields input {
  width: 100%;
  min-height: 38px;
  border-radius: 0.9rem;
  border: 1px solid #dbe7fb;
  background: #fff;
  padding: 0.5rem 0.7rem;
  color: #284872;
}

.consumption-note {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: #5e7492;
  line-height: 1.55;
}

.consumption-trend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 0.55rem;
}

.consumption-trend-card {
  display: grid;
  gap: 0.5rem;
  min-height: 96px;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(239, 244, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
}

.consumption-trend-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.consumption-trend-card__head strong {
  font-size: 0.95rem;
  color: #16345d;
}

.consumption-trend-card__head span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4c6890;
}

.consumption-trend-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.28rem;
}

.consumption-trend-card__metrics span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.36rem 0.32rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(219, 231, 251, 0.9);
}

.consumption-trend-card__metrics em {
  font-style: normal;
  font-size: 0.62rem;
  color: #6e84a5;
  white-space: nowrap;
}

.consumption-trend-card__metrics strong {
  font-size: 0.92rem;
  line-height: 1;
  color: #183761;
  white-space: nowrap;
}

.consumption-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.consumption-overview-card {
  min-height: 96px;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.04);
}

.consumption-overview-card .stat-value {
  margin-top: 0.38rem;
}

.consumption-object-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.consumption-panel {
  margin-top: 0;
  padding: 0.85rem;
}

.consumption-object-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(219, 231, 251, 0.9);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  grid-column: 1 / -1;
}

.consumption-object-toolbar label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.78rem;
  color: #5f7695;
}

.consumption-object-toolbar input {
  min-width: 180px;
}

.consumption-object-toolbar__hint {
  font-size: 0.8rem;
  color: #6d84a5;
  text-align: right;
}

.consumption-entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.65rem;
}

.consumption-entity-card {
  display: grid;
  gap: 0.6rem;
  min-height: 196px;
  padding: 0.82rem 0.88rem;
  border: 1px solid #dbe7fb;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.04);
}

.consumption-entity-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.consumption-entity-card__head h4 {
  margin: 0;
  font-size: 0.96rem;
  color: #15325b;
  line-height: 1.2;
}

.consumption-entity-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #4e6d99;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.consumption-entity-card__summary {
  font-size: 0.82rem;
  font-weight: 700;
  color: #29466f;
}

.consumption-entity-card__summary--plain {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4f6482;
  padding-bottom: 0.1rem;
}

.consumption-entity-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem 0.6rem;
  font-size: 0.75rem;
  color: #637997;
}

.consumption-entity-card__meta--strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: #29466f;
}

.consumption-entity-card__metrics-strong {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1d4270;
}

.consumption-entity-card__metrics-strong span {
  white-space: nowrap;
}

.consumption-entity-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(219, 231, 251, 0.85);
  color: #607793;
  font-size: 0.74rem;
}

.consumption-entity-card__foot strong {
  font-size: 0.86rem;
  color: #15325b;
}

.consumption-entity-card__section {
  display: grid;
  gap: 0.42rem;
  padding: 0.62rem 0.68rem;
  border: 1px solid rgba(219, 231, 251, 0.82);
  border-radius: 0.9rem;
  background: rgba(248, 251, 255, 0.92);
}

.consumption-entity-card__section--month {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(241, 247, 255, 0.95) 100%);
}

.consumption-entity-card__section--season {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(244, 248, 254, 0.94) 100%);
}

.consumption-entity-card__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  color: #607793;
  font-size: 0.78rem;
}

.consumption-entity-card__section-head strong {
  font-size: 1rem;
  color: #183761;
}

.consumption-entity-card__meta--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 0.9rem;
}

.consumption-entity-card__meta--grid span {
  white-space: nowrap;
}

.consumption-empty-card {
  border: 1px dashed #dbe7fb;
  border-radius: 0.95rem;
  padding: 0.95rem;
  background: #fbfdff;
  color: #7187a8;
  font-size: 0.82rem;
}

.consumption-table {
  min-width: 760px;
  font-size: 0.82rem;
}

.consumption-table th,
.consumption-table td {
  white-space: nowrap;
}

.consumption-warning-counter {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  color: #5e7492;
  font-size: 0.79rem;
  padding: 0.25rem 0.45rem;
}

.consumption-warning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.consumption-warning-card {
  position: relative;
  display: grid;
  gap: 0.28rem;
  min-height: 82px;
  padding: 0.5rem 0.6rem 0.52rem 0.78rem;
  border: 1px solid #dbe7fb;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.05);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.consumption-warning-card::before {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 4px;
  border-radius: 999px;
  background: #9fb7dd;
}

.consumption-warning-card.is-medium::before {
  background: #f59e0b;
}

.consumption-warning-card.is-high::before {
  background: #f97316;
}

.consumption-warning-card.is-danger::before {
  background: #dc2626;
}

.consumption-warning-card:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 14px 28px rgba(30, 64, 175, 0.1);
}

.consumption-warning-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.3rem;
}

.consumption-warning-card__name {
  display: block;
  max-width: 5.8rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #15325b;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consumption-warning-card__follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.08rem 0.36rem;
  background: #eef4ff;
  color: #547099;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.consumption-warning-card__follow.is-contacted {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.consumption-warning-card__follow.is-scheduled {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.consumption-warning-card__follow.is-completed {
  background: rgba(34, 197, 94, 0.13);
  color: #15803d;
}

.consumption-warning-card__follow.is-paused {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.consumption-warning-card__course {
  font-size: 0.72rem;
  color: #5e7492;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consumption-warning-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.22rem;
  margin-top: auto;
}

.consumption-warning-card__stats span {
  display: grid;
  justify-items: center;
  gap: 0.02rem;
  padding: 0.2rem 0.14rem;
  border-radius: 0.55rem;
  background: rgba(241, 245, 255, 0.92);
}

.consumption-warning-card__stats strong {
  font-size: 0.76rem;
  font-weight: 700;
  color: #173560;
  line-height: 1;
}

.consumption-warning-card__stats em {
  font-style: normal;
  font-size: 0.63rem;
  color: #7086a6;
  line-height: 1;
}

.consumption-warning-empty {
  border: 1px dashed #dbe7fb;
  border-radius: 0.9rem;
  padding: 0.9rem;
  text-align: center;
  color: #7187a8;
  font-size: 0.82rem;
  background: #fbfdff;
}

.consumption-warning-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.consumption-warning-dialog-root.hidden {
  display: none;
}

.consumption-warning-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(2px);
}

.consumption-warning-dialog-card {
  position: relative;
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7fb;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
  overflow: auto;
}

.consumption-warning-dialog-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #f8fbff;
  color: #37517a;
  cursor: pointer;
}

.consumption-warning-dialog-body {
  display: grid;
  gap: 0.8rem;
}

.consumption-warning-dialog-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6980a3;
  font-weight: 700;
}

.consumption-warning-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.consumption-warning-dialog-head h3 {
  margin: 0.1rem 0 0;
  font-size: 1.28rem;
  color: #15325b;
}

.consumption-warning-dialog-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.consumption-warning-dialog-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: #eef4ff;
  color: #547099;
  font-size: 0.73rem;
  font-weight: 700;
}

.consumption-warning-dialog-status.is-contacted {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.consumption-warning-dialog-status.is-scheduled {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.consumption-warning-dialog-status.is-completed {
  background: rgba(34, 197, 94, 0.13);
  color: #15803d;
}

.consumption-warning-dialog-status.is-paused {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.consumption-warning-dialog-grid,
.consumption-warning-dialog-followup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.consumption-warning-dialog-field {
  display: grid;
  gap: 0.18rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e3ecfb;
  border-radius: 0.9rem;
  background: rgba(248, 251, 255, 0.92);
}

.consumption-warning-dialog-field--full {
  grid-column: 1 / -1;
}

.consumption-warning-dialog-field span {
  font-size: 0.72rem;
  color: #6d83a5;
}

.consumption-warning-dialog-field strong {
  font-size: 0.9rem;
  color: #183761;
}

.consumption-warning-dialog-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.consumption-warning-dialog-metric {
  display: grid;
  gap: 0.18rem;
  padding: 0.82rem 0.8rem;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #eff4ff 0%, #f8fbff 100%);
  border: 1px solid #dbe7fb;
}

.consumption-warning-dialog-metric span {
  font-size: 0.72rem;
  color: #6d83a5;
}

.consumption-warning-dialog-metric strong {
  font-size: 1.28rem;
  line-height: 1;
  color: #173560;
}

.consumption-warning-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e3ecfb;
}

.warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.7rem;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  border: 1px solid #dbe7fb;
  background: #f8fbff;
  color: #4a6283;
  font-size: 0.74rem;
  font-weight: 700;
}

.warning-badge.is-medium {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(217, 119, 6, 0.12);
  color: #a16207;
}

.warning-badge.is-high {
  border-color: rgba(219, 39, 119, 0.25);
  background: rgba(219, 39, 119, 0.12);
  color: #be185d;
}

.warning-badge.is-danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

@media (max-width: 1320px) {
  .consumption-header-panel {
    grid-template-columns: 1fr;
  }

  .consumption-trend-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .consumption-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .consumption-object-grid {
    grid-template-columns: 1fr;
  }

  .consumption-object-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .consumption-object-toolbar__hint {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .consumption-season-fields {
    grid-template-columns: 1fr;
  }

  .consumption-trend-grid {
    grid-template-columns: 1fr 1fr;
  }

  .consumption-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .consumption-warning-counter {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
  }

  .consumption-warning-grid {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  }

  .consumption-warning-dialog-card {
    width: min(100vw - 24px, 720px);
    margin: 12px auto;
    padding: 0.85rem;
  }

  .consumption-warning-dialog-grid,
  .consumption-warning-dialog-followup,
  .consumption-warning-dialog-metrics {
    grid-template-columns: 1fr;
  }
}
/* workspace timeline v1 */
.app-shell.workspace-focus-mode .app-workspace-shell {
  grid-template-columns: 1fr;
}

.app-shell.workspace-focus-mode .app-sidebar-card {
  display: none;
}

.app-shell.workspace-focus-mode .app-pages {
  width: 100%;
}

.page-section[data-page-section="workspace"].active-section {
  padding: 0.95rem 1rem;
}

.timeline-workbench {
  display: grid;
  gap: 0.75rem;
}

.timeline-now-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 0.65rem;
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: linear-gradient(135deg, #1e2d4a, #263f66);
  color: #e9f1ff;
  padding: 0.72rem 0.9rem;
}

.timeline-now-left {
  display: grid;
  gap: 0.15rem;
}

.timeline-now-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

.timeline-now-left strong {
  font-size: 1.06rem;
  font-weight: 700;
}

.timeline-now-left span {
  font-size: 0.78rem;
  opacity: 0.88;
}

.timeline-now-right {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.timeline-now-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  padding: 0.42rem 0.55rem;
  display: grid;
  gap: 0.05rem;
}

.timeline-now-item span {
  font-size: 0.7rem;
  opacity: 0.82;
}

.timeline-now-item strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

.timeline-now-item em {
  font-style: normal;
  font-size: 0.74rem;
  opacity: 0.9;
}

.timeline-control-strip {
  display: grid;
  gap: 0.6rem;
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: #fff;
  padding: 0.72rem 0.85rem;
  position: sticky;
  top: 4.5rem;
  z-index: 15;
}

.timeline-control-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.timeline-level-group,
.timeline-scope-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.timeline-level-btn,
.timeline-scope-chip {
  border: 1px solid #dbe7fb;
  background: #f7faff;
  color: #2f4d78;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.timeline-level-btn.active,
.timeline-scope-chip.active {
  background: #2f6fdc;
  border-color: #2f6fdc;
  color: #fff;
}

.timeline-shift-group {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

.timeline-control-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  gap: 0.6rem;
  align-items: end;
}

.timeline-control-filters label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.76rem;
  color: #667d99;
}

.timeline-control-filters select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #dbe7fb;
  border-radius: 0.7rem;
  background: #f9fbff;
  color: #284872;
  padding: 0.42rem 0.55rem;
}

.timeline-filter-actions {
  display: flex;
  gap: 0.45rem;
}

.timeline-overview-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.timeline-overview-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.48rem 0.58rem;
  cursor: pointer;
  display: grid;
  gap: 0.4rem;
}

.timeline-overview-card header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
}

.timeline-overview-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #eff4ff;
  color: #1d4ed8;
  font-size: 0.66rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.timeline-overview-card strong {
  font-size: 0.78rem;
  color: #17345c;
}

.timeline-overview-card small {
  display: block;
  font-size: 0.68rem;
  color: #6f84a1;
}

.timeline-overview-card em {
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 700;
  color: #17345c;
}

.timeline-overview-card.is-focused {
  border-color: #2f6fdc;
  background: #f3f7ff;
}

.timeline-overview-bar {
  height: 5px;
  border-radius: 999px;
  background: #edf2fc;
  overflow: hidden;
}

.timeline-overview-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6fdc, #5f97eb);
}

.timeline-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.timeline-canvas {
  display: grid;
  gap: 0.7rem;
}

.timeline-level-stack {
  display: grid;
  gap: 0.65rem;
}

.timeline-level-panel {
  border: 1px solid #dbe7fb;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.58rem 0.65rem;
}

.timeline-level-panel.is-focused {
  border-color: #2f6fdc;
  box-shadow: 0 0 0 2px rgba(47, 111, 220, 0.08);
}

.timeline-level-panel.is-moment {
  background: #fbfdff;
}

.timeline-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.48rem;
}

.timeline-level-head p {
  margin: 0;
  font-size: 0.69rem;
  color: #6f84a1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-level-head h3 {
  margin: 0.14rem 0 0;
  font-size: 0.92rem;
  color: #17345c;
}

.timeline-level-head span {
  font-size: 0.8rem;
  color: #5a708f;
  font-weight: 700;
}

.timeline-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.48rem;
}

.timeline-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.75rem;
  background: #fff;
  color: #1f355a;
  padding: 0.5rem 0.56rem;
  display: grid;
  gap: 0.34rem;
  text-align: left;
  cursor: pointer;
}

.timeline-card.selected,
.timeline-lane-card.selected {
  border-color: #2f6fdc;
  box-shadow: 0 0 0 2px rgba(47, 111, 220, 0.09);
}

.timeline-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
}

.timeline-card-head strong {
  font-size: 0.82rem;
  line-height: 1.35;
}

.timeline-status {
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #f7faff;
  color: #2f4d78;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.42rem;
  white-space: nowrap;
}

.timeline-card-sub {
  margin: 0;
  color: #627b9d;
  font-size: 0.74rem;
}

.timeline-card-meta {
  display: grid;
  gap: 0.08rem;
  color: #6a819f;
  font-size: 0.7rem;
}

.timeline-card.is-delayed,
.timeline-lane-card.is-delayed {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.05);
}

.timeline-card.is-blocked,
.timeline-lane-card.is-blocked {
  border-color: rgba(123, 97, 255, 0.32);
  background: rgba(123, 97, 255, 0.07);
}

.timeline-card.is-active,
.timeline-lane-card.is-active {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.06);
}

.timeline-card.is-completed,
.timeline-lane-card.is-completed {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.06);
}

.timeline-card.is-upcoming,
.timeline-lane-card.is-upcoming {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.08);
}

.timeline-lane-board {
  border: 1px solid #dbe7fb;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.62rem 0.68rem;
}

.timeline-lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.48rem;
}

.timeline-lane-head h3 {
  margin: 0;
  font-size: 0.96rem;
  color: #17345c;
}

.timeline-lane-head span {
  font-size: 0.72rem;
  color: #6880a0;
}

.timeline-lane-list {
  display: grid;
  gap: 0.45rem;
}

.timeline-lane-row {
  border: 1px solid #e2ebfa;
  border-radius: 0.75rem;
  padding: 0.45rem 0.52rem;
  background: #fbfdff;
}

.timeline-lane-row > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.38rem;
}

.timeline-lane-row > header strong {
  font-size: 0.78rem;
  color: #23406a;
}

.timeline-lane-row > header span {
  font-size: 0.72rem;
  color: #6982a3;
}

.timeline-lane-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.4rem;
}

.timeline-lane-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.68rem;
  background: #fff;
  color: #203a61;
  padding: 0.42rem 0.5rem;
  display: grid;
  gap: 0.08rem;
  text-align: left;
  cursor: pointer;
}

.timeline-lane-card strong {
  font-size: 0.78rem;
}

.timeline-lane-card small {
  font-size: 0.69rem;
  color: #6b84a4;
}

.timeline-empty {
  border: 1px dashed #dbe7fb;
  border-radius: 0.64rem;
  background: #f9fbff;
  color: #6b84a4;
  font-size: 0.72rem;
  padding: 0.45rem;
  text-align: center;
}

.timeline-detail-drawer {
  border: 1px solid #dbe7fb;
  border-radius: 0.92rem;
  background: #fff;
  padding: 0.72rem 0.78rem;
  position: sticky;
  top: 8.8rem;
}

.timeline-detail-empty h3,
.timeline-detail-content h3 {
  margin: 0;
  color: #17345c;
}

.timeline-detail-empty p {
  margin: 0.48rem 0 0;
  font-size: 0.78rem;
  color: #6880a0;
  line-height: 1.6;
}

.timeline-detail-head {
  display: grid;
  gap: 0.32rem;
  margin-bottom: 0.56rem;
}

.timeline-detail-kicker {
  margin: 0;
  font-size: 0.69rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b84a4;
}

.timeline-detail-grid {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.timeline-detail-grid div {
  display: grid;
  gap: 0.1rem;
  border: 1px solid #e7eefb;
  border-radius: 0.58rem;
  padding: 0.38rem 0.5rem;
  background: #fbfdff;
}

.timeline-detail-grid dt {
  font-size: 0.68rem;
  color: #6c84a4;
}

.timeline-detail-grid dd {
  margin: 0;
  font-size: 0.76rem;
  color: #1f355a;
}

.timeline-detail-note {
  margin-top: 0.52rem;
  border: 1px dashed #dbe7fb;
  border-radius: 0.68rem;
  padding: 0.45rem 0.52rem;
  color: #617b9d;
  font-size: 0.74rem;
  line-height: 1.5;
}

.timeline-detail-actions {
  margin-top: 0.56rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
}

@media (max-width: 1360px) {
  .timeline-now-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-control-main {
    grid-template-columns: 1fr;
  }

  .timeline-shift-group {
    justify-content: flex-start;
  }

  .timeline-main-grid {
    grid-template-columns: 1fr;
  }

  .timeline-detail-drawer {
    position: static;
  }
}

@media (max-width: 960px) {
  .timeline-control-filters {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-card-list,
  .timeline-lane-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .timeline-now-strip {
    grid-template-columns: 1fr;
  }

  .timeline-control-filters {
    grid-template-columns: 1fr;
  }

  .timeline-overview-strip {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   Unified Button System V1
   - Primary nav / Secondary filter / State tags
   ============================== */
:root {
  --btn-radius-primary: 999px;
  --btn-radius-secondary: 999px;
  --btn-border-soft: #bdd0f3;
  --btn-bg-soft: #f4f8ff;
  --btn-text-soft: #234268;
  --btn-active-bg: #2e67dc;
  --btn-active-bg-2: #214fb8;
  --btn-active-text: #ffffff;
  --btn-active-soft-bg: #e8f1ff;
  --btn-active-soft-border: #87acec;
  --btn-active-soft-text: #1c4a9e;
}

/* 一级：顶部模块导航 */
.app-nav {
  gap: 0.55rem;
  align-items: center;
}

.app-nav .nav-item {
  min-height: 40px;
  padding: 0.34rem 1.05rem;
  border-radius: var(--btn-radius-primary);
  border: 1px solid var(--btn-border-soft);
  background: #f7faff;
  color: #2a4973;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-nav .nav-item:hover {
  background: #edf4ff;
  border-color: #aac4f2;
  color: #1d4fae;
  transform: translateY(-1px);
}

.app-nav .nav-item.active {
  background: linear-gradient(135deg, var(--btn-active-bg), var(--btn-active-bg-2));
  border-color: #1f4fae;
  color: var(--btn-active-text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 16px rgba(33, 79, 184, 0.26);
}

/* 二级：筛选/标签按钮（信息层，不抢主导航） */
.page-section .filter-chip-row .tiny-btn,
.page-section .role-tabs .tiny-btn,
.page-section .finance-quick-row .tiny-btn,
.page-section .task-quick-row .tiny-btn,
.page-section .audit-quick-row .tiny-btn,
.page-section .system-quick-row .tiny-btn,
.page-section .permissions-quick-row .tiny-btn,
.page-section .timeline-level-btn,
.page-section .timeline-scope-chip {
  min-height: 34px;
  padding: 0.22rem 0.76rem;
  border-radius: var(--btn-radius-secondary);
  border: 1px solid var(--btn-border-soft);
  background: var(--btn-bg-soft);
  color: var(--btn-text-soft);
  font-size: 0.83rem;
  font-weight: 650;
  transition: all 0.14s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-section .filter-chip-row .tiny-btn:hover,
.page-section .role-tabs .tiny-btn:hover,
.page-section .finance-quick-row .tiny-btn:hover,
.page-section .task-quick-row .tiny-btn:hover,
.page-section .audit-quick-row .tiny-btn:hover,
.page-section .system-quick-row .tiny-btn:hover,
.page-section .permissions-quick-row .tiny-btn:hover,
.page-section .timeline-level-btn:hover,
.page-section .timeline-scope-chip:hover {
  border-color: #a8c4f1;
  background: #edf4ff;
  color: #1f4fa9;
}

.page-section .filter-chip-row .tiny-btn.active,
.page-section .role-tabs .tiny-btn.active,
.page-section .finance-quick-row .tiny-btn.active,
.page-section .task-quick-row .tiny-btn.active,
.page-section .audit-quick-row .tiny-btn.active,
.page-section .system-quick-row .tiny-btn.active,
.page-section .permissions-quick-row .tiny-btn.active,
.page-section .timeline-level-btn.active,
.page-section .timeline-scope-chip.active {
  background: var(--btn-active-soft-bg);
  border-color: var(--btn-active-soft-border);
  color: var(--btn-active-soft-text);
  box-shadow: inset 0 0 0 1px rgba(36, 94, 199, 0.08);
}

.page-section .filter-chip-row .tiny-btn.active::before,
.page-section .role-tabs .tiny-btn.active::before,
.page-section .finance-quick-row .tiny-btn.active::before,
.page-section .task-quick-row .tiny-btn.active::before,
.page-section .audit-quick-row .tiny-btn.active::before,
.page-section .system-quick-row .tiny-btn.active::before,
.page-section .permissions-quick-row .tiny-btn.active::before,
.page-section .timeline-level-btn.active::before,
.page-section .timeline-scope-chip.active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #2f6fdc;
  vertical-align: middle;
}

/* 三级：状态/危险按钮保持轻量，避免与主导航冲突 */
.tiny-btn.danger {
  background: #fff8f8;
  border-color: #f5c9c9;
  color: #b42318;
}

/* ==============================
   Global Visual Harmonization V2
   - Keep logic unchanged
   - Unify spacing / button language / side nav polish
   ============================== */
:root {
  --ui-primary-700: #1f4fae;
  --ui-primary-600: #2e67dc;
  --ui-primary-500: #3f7be3;
  --ui-primary-100: #eaf2ff;
  --ui-border-soft: #d6e3fb;
  --ui-text-main: #183153;
  --ui-text-sub: #56729a;
}

.app-shell {
  gap: 0.62rem;
  padding: 0.62rem;
}

.page-section {
  border: 1px solid #dce8ff;
  box-shadow: 0 10px 26px rgba(30, 73, 149, 0.09);
}

.section-header {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e8f0ff;
  margin-bottom: 0.72rem;
}

.section-kicker {
  color: #6a84ad;
}

.section-subtitle {
  color: var(--ui-text-sub);
}

.section-actions {
  gap: 0.42rem;
}

.btn,
.tiny-btn {
  min-height: 34px;
  padding: 0.22rem 0.82rem;
  border-radius: 999px;
  border: 1px solid #bfd3f8;
  background: #f5f9ff;
  color: var(--ui-text-main);
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: all 0.14s ease;
}

.btn:hover,
.tiny-btn:hover {
  border-color: #9fbdf0;
  background: #edf4ff;
  color: #1b4da6;
  transform: translateY(-1px);
}

.btn.primary,
.tiny-btn.primary {
  background: linear-gradient(135deg, var(--ui-primary-600), var(--ui-primary-700));
  border-color: #1f55b8;
  color: #fff;
  box-shadow: 0 7px 16px rgba(33, 79, 184, 0.24);
}

.btn.primary:hover,
.tiny-btn.primary:hover {
  background: linear-gradient(135deg, var(--ui-primary-500), var(--ui-primary-700));
  color: #fff;
}

.side-nav-group {
  border: 1px solid #dbe7ff;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
}

.side-nav-group-title {
  color: #4c6793;
  font-weight: 700;
}

.side-nav-item {
  min-height: 36px;
  border-color: #c9dbfb;
  color: #27466e;
}

.side-nav-item:hover {
  background: #eef5ff;
  border-color: #9fbdf0;
}

.side-nav-item.active {
  background: linear-gradient(135deg, var(--ui-primary-600), var(--ui-primary-700));
  border-color: #1f55b8;
  color: #fff;
  box-shadow: 0 8px 16px rgba(33, 79, 184, 0.24);
}

/* ==============================
   Header & Layout Polish V3
   - 3-column header
   - tighter vertical rhythm
   ============================== */
.app-header {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(520px, 1fr) minmax(190px, 260px);
  align-items: end;
  column-gap: 0.9rem;
  row-gap: 0.45rem;
  padding: 0.68rem 1rem;
}

.app-brand {
  min-width: 0;
}

.app-brand-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.04rem;
}

.app-title {
  margin: 0;
  color: #10294b;
  font-size: clamp(2.15rem, 2.8vw, 2.95rem);
  font-weight: 800;
  line-height: 1.03;
}

.app-brand-subtitle {
  margin: 0.1rem 0 0;
  color: #4e6d98;
  font-size: 0.9rem;
  line-height: 1.2;
}

.app-nav {
  justify-content: center;
  align-self: center;
}

.app-header-meta {
  justify-self: end;
  align-self: end;
  text-align: right;
  min-width: 170px;
  gap: 0.12rem;
}

.app-auth-user {
  font-weight: 750;
  color: #183b71;
}

.app-auth-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.app-auth-role {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c87af;
  font-size: 0.78rem;
  font-weight: 700;
}

.app-auth-logout {
  border: none;
  background: transparent;
  padding: 0;
  color: #1f4fae;
  font-weight: 750;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-auth-logout:hover {
  color: #153e92;
}

.app-workspace-shell {
  gap: 0.62rem;
}

.app-sidebar-card {
  border-radius: 0.88rem;
  padding: 0.65rem;
}

.page-section {
  border-radius: 0.88rem;
  padding: 1rem 1.15rem;
}

@media (max-width: 1360px) {
  .app-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-nav {
    justify-content: flex-start;
  }

  .app-header-meta {
    justify-self: start;
    text-align: left;
  }

  .app-auth-inline {
    justify-content: flex-start;
  }
}

/* ==============================
   Module Rhythm V4
   - unify non-workspace page density
   - keep business logic untouched
   ============================== */
.page-section:not([data-page-section="workspace"]) > .section-header {
  min-height: 86px;
  align-items: center;
  padding-bottom: 0.38rem;
  margin-bottom: 0.58rem;
}

.page-section:not([data-page-section="workspace"]) > .section-header h2 {
  margin: 0.08rem 0 0;
  line-height: 1.12;
}

.page-section:not([data-page-section="workspace"]) > .section-header .section-subtitle {
  margin-top: 0.24rem;
}

.page-section:not([data-page-section="workspace"]) .section-actions {
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.page-section:not([data-page-section="workspace"]) .stats-row {
  margin: 0.52rem 0;
  gap: 0.5rem;
}

.page-section:not([data-page-section="workspace"]) .stat-card {
  min-height: 78px;
  padding: 0.5rem 0.72rem;
  border-radius: 0.78rem;
}

.page-section:not([data-page-section="workspace"]) .stat-label {
  font-size: 0.79rem;
  line-height: 1.22;
}

.page-section:not([data-page-section="workspace"]) .stat-value {
  margin-top: 0.12rem;
  line-height: 1.05;
}

.page-section:not([data-page-section="workspace"]) .filter-chip-row {
  margin: 0.4rem 0;
  gap: 0.4rem;
}

.page-section:not([data-page-section="workspace"]) .workspace-filters,
.page-section:not([data-page-section="workspace"]) .finance-filter-bar,
.page-section:not([data-page-section="workspace"]) .task-filters,
.page-section:not([data-page-section="workspace"]) .audit-filters,
.page-section:not([data-page-section="workspace"]) .system-account-filters,
.page-section:not([data-page-section="workspace"]) .permissions-filters,
.page-section:not([data-page-section="workspace"]) .schedule-filter-bar,
.page-section:not([data-page-section="workspace"]) .recruit-filters,
.page-section:not([data-page-section="workspace"]) .research-inline-filters {
  margin: 0.45rem 0;
  gap: 0.48rem;
}

.page-section:not([data-page-section="workspace"]) .panel-card {
  margin-top: 0.46rem;
  border-radius: 0.8rem;
}

.page-section:not([data-page-section="workspace"]) table th,
.page-section:not([data-page-section="workspace"]) table td {
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

@media (max-width: 1080px) {
  .page-section:not([data-page-section="workspace"]) > .section-header {
    min-height: auto;
    align-items: flex-start;
  }
}

/* ==============================
   Navigation & First-Screen V5
   - unify sidebar visual height
   - compress first-screen stack on business modules
   ============================== */
.app-workspace-shell {
  align-items: start;
}

.app-sidebar-card {
  position: sticky;
  top: 5.25rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
}

.page-section.active-section:not([data-page-section="workspace"]) {
  min-height: calc(100vh - 8.2rem);
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.page-section:not([data-page-section="workspace"]) .research-main-top,
.page-section:not([data-page-section="workspace"]) .class-toolbar,
.page-section:not([data-page-section="workspace"]) .recruit-filters,
.page-section:not([data-page-section="workspace"]) .finance-filter-bar,
.page-section:not([data-page-section="workspace"]) .task-filters,
.page-section:not([data-page-section="workspace"]) .audit-filters,
.page-section:not([data-page-section="workspace"]) .system-account-filters,
.page-section:not([data-page-section="workspace"]) .permissions-filters,
.page-section:not([data-page-section="workspace"]) .research-inline-filters,
.page-section:not([data-page-section="workspace"]) .schedule-filter-bar {
  margin-top: 0.18rem;
  margin-bottom: 0.42rem;
}

.page-section:not([data-page-section="workspace"]) .class-toolbar-row {
  gap: 0.42rem;
  margin: 0;
}

.page-section:not([data-page-section="workspace"]) .class-toolbar-row--compact {
  padding-top: 0.05rem;
  padding-bottom: 0.05rem;
}

.page-section:not([data-page-section="workspace"]) .research-main-top {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #e8f0ff;
}

.page-section:not([data-page-section="workspace"]) .research-main-top .section-subtitle {
  margin: 0.14rem 0 0;
}

.page-section:not([data-page-section="workspace"]) .info-strip {
  margin: 0.25rem 0 0.4rem;
  padding: 0.42rem 0.58rem;
}

@media (max-width: 1360px) {
  .app-sidebar-card {
    position: static;
    top: auto;
    max-height: none;
  }

  .page-section.active-section:not([data-page-section="workspace"]) {
    min-height: auto;
  }
}

/* ==============================
   Table Visual V6
   - unified head height / row rhythm / action columns
   - keep each module data structure unchanged
   ============================== */
.page-section .table-shell {
  border: 1px solid #dce8ff;
  border-radius: 0.86rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(26, 72, 152, 0.06);
  overflow: auto;
}

.page-section .table-shell .data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.page-section .table-shell .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.58rem 0.62rem;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf4ff 100%);
  color: #23446d;
  font-size: 0.79rem;
  font-weight: 750;
  white-space: nowrap;
  border-bottom: 1px solid #d7e5ff;
}

.page-section .table-shell .data-table tbody td {
  padding: 0.56rem 0.62rem;
  vertical-align: middle;
  border-bottom: 1px solid #edf3ff;
  color: #1c3356;
  font-size: 0.84rem;
}

.page-section .table-shell .data-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.page-section .table-shell .data-table tbody tr:hover td {
  background: #f2f7ff;
}

.page-section .table-shell .data-table tbody tr:last-child td {
  border-bottom: none;
}

.page-section .table-shell .data-table th:last-child,
.page-section .table-shell .data-table td:last-child {
  min-width: 150px;
}

.page-section .table-shell .table-actions,
.page-section .table-shell .class-table-actions,
.page-section .table-shell .finance-table-actions,
.page-section .table-shell .schedule-table-actions,
.page-section .table-shell .row-action-group {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.page-section .table-shell .table-actions .tiny-btn,
.page-section .table-shell .class-table-actions .tiny-btn,
.page-section .table-shell .finance-table-actions .tiny-btn,
.page-section .table-shell .schedule-table-actions .tiny-btn,
.page-section .table-shell .row-action-group .tiny-btn {
  min-height: 30px;
  padding: 0.16rem 0.58rem;
  font-size: 0.76rem;
}

.page-section .table-shell .placeholder {
  margin: 0.46rem;
  padding: 0.62rem 0.76rem;
  border-radius: 0.7rem;
  border: 1px dashed #cbdcfb;
  color: #6a83a7;
  background: #f9fbff;
}

@media (max-width: 1180px) {
  .page-section .table-shell .data-table thead th,
  .page-section .table-shell .data-table tbody td {
    padding: 0.5rem 0.52rem;
  }

  .page-section .table-shell .data-table th:last-child,
  .page-section .table-shell .data-table td:last-child {
    min-width: 132px;
  }
}

/* ==============================
   Modal Visual V7
   - unified header / form spacing / sticky actions
   - logic unchanged
   ============================== */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-root.hidden {
  display: none !important;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 27, 50, 0.28);
  backdrop-filter: blur(4px);
}

.modal-card,
.modal-card.modal-card-wide {
  position: relative;
  width: min(920px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 1px solid #d7e4fb;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 22px 58px rgba(17, 44, 88, 0.24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.modal-card.modal-card-wide {
  width: min(1080px, calc(100vw - 2rem));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.9rem 1rem 0.7rem;
  border-bottom: 1px solid #e4edff;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  color: #17365e;
  font-weight: 780;
}

.modal-close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #c9dcfb;
  background: #f5f9ff;
  color: #1e4fa7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.modal-close:hover {
  background: #ecf4ff;
  border-color: #a8c3ef;
}

.modal-form,
.modal-form.modal-form-grid {
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1rem 0.9rem;
  display: grid;
  gap: 0.58rem;
}

.modal-form.modal-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem 0.8rem;
}

.modal-form.modal-form-grid .modal-section,
.modal-form.modal-form-grid .modal-field-full,
.modal-form.modal-form-grid .modal-field-span-2 {
  grid-column: 1 / -1;
}

.modal-section {
  border: 1px solid #e2ebff;
  border-radius: 0.8rem;
  background: #f8fbff;
  padding: 0.56rem 0.66rem;
}

.modal-section-title {
  margin: 0;
  color: #284971;
  font-size: 0.86rem;
  font-weight: 720;
}

.modal-section-note {
  margin-top: 0.26rem;
  color: #5f7ea7;
  font-size: 0.78rem;
}

.modal-field {
  min-width: 0;
}

.modal-field label {
  display: grid;
  gap: 0.26rem;
  font-size: 0.82rem;
  color: #3b5c84;
  font-weight: 620;
}

.modal-field input,
.modal-field textarea,
.modal-field select {
  width: 100%;
  border: 1px solid #c9dbfa;
  border-radius: 0.72rem;
  background: #fff;
  color: #17365e;
  min-height: 2.2rem;
  padding: 0.42rem 0.6rem;
  font-size: 0.88rem;
  outline: none;
}

.modal-field textarea {
  min-height: 5.2rem;
  resize: vertical;
}

.modal-field input:focus,
.modal-field textarea:focus,
.modal-field select:focus {
  border-color: #80a6ea;
  box-shadow: 0 0 0 3px rgba(46, 103, 220, 0.12);
}

.modal-field.is-readonly input,
.modal-field.is-readonly textarea,
.modal-field.is-readonly select,
.modal-field input[readonly],
.modal-field textarea[readonly],
.modal-field select:disabled,
.modal-field input:disabled,
.modal-field textarea:disabled {
  background: #f4f8ff;
  color: #5d769a;
}

.modal-radio-group,
.modal-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.modal-radio,
.modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #c8daf9;
  background: #f7faff;
  color: #23446d;
  font-size: 0.8rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.48rem;
  padding: 0.68rem 1rem 0.84rem;
  border-top: 1px solid #e4edff;
  background: #fff;
}

.modal-submit,
.modal-cancel {
  min-height: 2.15rem;
  border-radius: 999px;
  padding: 0.32rem 0.9rem;
  border: 1px solid #bfd3f8;
  font-size: 0.85rem;
  font-weight: 720;
  cursor: pointer;
}

.modal-cancel {
  background: #f4f8ff;
  color: #2e527d;
}

.modal-submit {
  background: linear-gradient(135deg, #2e67dc, #1f4fae);
  border-color: #1f55b8;
  color: #fff;
}

.modal-cancel:hover {
  background: #ecf4ff;
}

.modal-submit:hover {
  background: linear-gradient(135deg, #3f7be3, #1f4fae);
}

@media (max-width: 980px) {
  .modal-card,
  .modal-card.modal-card-wide {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 0.86rem;
  }

  .modal-form.modal-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   Non-Workspace Rhythm V8
   - 统一非工作台页面的间距比例
   - 工作台保持不变
   ============================== */
.page-section.active-section:not([data-page-section="workspace"]) {
  gap: 0.62rem;
  padding: 1rem 1.25rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-header {
  margin-bottom: 0.45rem;
  gap: 0.72rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-body {
  gap: 0.62rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .finance-stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .task-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .audit-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .system-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-summary-row {
  gap: 0.56rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .filter-chip-row,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-status-row,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-student-row {
  margin-bottom: 0.52rem;
  gap: 0.5rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .schedule-filters,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-filter-bar,
.page-section.active-section:not([data-page-section="workspace"]) .finance-filter-bar,
.page-section.active-section:not([data-page-section="workspace"]) .task-filters,
.page-section.active-section:not([data-page-section="workspace"]) .audit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .system-account-filters,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-filters,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-filters {
  gap: 0.56rem 0.64rem;
  margin-bottom: 0.56rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .student-summary-grid,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-student-summary-grid {
  gap: 0.62rem;
  margin-bottom: 0.62rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .workspace-panel,
.page-section.active-section:not([data-page-section="workspace"]) .task-panel,
.page-section.active-section:not([data-page-section="workspace"]) .audit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-panel {
  padding: 0.72rem 0.86rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell {
  margin-top: 0.56rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .info-strip,
.page-section.active-section:not([data-page-section="workspace"]) .student-focus-strip {
  margin-bottom: 0.6rem;
  padding: 0.64rem 0.84rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .panel-header {
  margin-bottom: 0.46rem;
}

@media (max-width: 980px) {
  .page-section.active-section:not([data-page-section="workspace"]) {
    padding: 0.85rem 0.85rem;
    gap: 0.56rem;
  }
}

/* ==============================
   Non-Workspace Rhythm V9
   - final override for business pages
   - compress vertical gaps to workspace-like density
   ============================== */
.page-section.active-section:not([data-page-section="workspace"]) {
  gap: 0.62rem !important;
  padding: 0.96rem 1.16rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-header {
  margin-bottom: 0.34rem !important;
  gap: 0.72rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-subtitle {
  margin-top: 0.14rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .research-main-top,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .finance-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .task-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .audit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .system-toolbar {
  gap: 0.66rem !important;
  margin: 0.14rem 0 0.42rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar-row {
  gap: 0.62rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .filter-chip-row,
.page-section.active-section:not([data-page-section="workspace"]) .filter-chip-row.secondary,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-status-row,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-student-row,
.page-section.active-section:not([data-page-section="workspace"]) .finance-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .task-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .audit-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .system-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-quick-row {
  margin: 0 !important;
  gap: 0.48rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .schedule-filters,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-filter-bar,
.page-section.active-section:not([data-page-section="workspace"]) .finance-filter-bar,
.page-section.active-section:not([data-page-section="workspace"]) .task-filters,
.page-section.active-section:not([data-page-section="workspace"]) .audit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .system-account-filters,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-filters,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .research-inline-filters,
.page-section.active-section:not([data-page-section="workspace"]) .workspace-filters {
  gap: 0.56rem 0.68rem !important;
  margin: 0.12rem 0 0.36rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .finance-stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .task-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .audit-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .system-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .class-stats-row {
  margin: 0.14rem 0 0.3rem !important;
  gap: 0.56rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .stat-card {
  padding: 0.68rem 0.82rem !important;
  min-height: 74px !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .info-strip,
.page-section.active-section:not([data-page-section="workspace"]) .student-focus-strip {
  margin: 0.16rem 0 0.36rem !important;
  padding: 0.6rem 0.76rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .workspace-panel,
.page-section.active-section:not([data-page-section="workspace"]) .task-panel,
.page-section.active-section:not([data-page-section="workspace"]) .audit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .unassigned-panel {
  margin-top: 0.22rem !important;
  padding: 0.82rem 0.94rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .panel-header {
  margin-bottom: 0.42rem !important;
}

@media (max-width: 980px) {
  .page-section.active-section:not([data-page-section="workspace"]) {
    padding: 0.84rem 0.84rem !important;
    gap: 0.5rem !important;
  }
}

/* ==============================
   Page-Specific Topbar Repair V10
   - 修复班级/学员/财务顶部筛选区挤在一起的问题
   - 只调分组感，不把页面重新拉高
   ============================== */
.class-toolbar {
  padding: 0.5rem 0 0.1rem;
}

.class-toolbar-note {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #5f739a;
  padding: 0.12rem 0 0.1rem;
}

.class-toolbar > .class-toolbar-row.class-toolbar-row--compact {
  margin-bottom: 0.18rem;
}

.class-toolbar > .filter-chip-row.secondary {
  padding: 0.16rem 0 0.02rem;
}

.class-toolbar > .filter-chip-row.secondary + .filter-chip-row.secondary {
  margin-top: 0.06rem !important;
}

.class-toolbar > .stats-row.class-stats-row {
  margin-top: 0.22rem !important;
}

.class-toolbar > .filter-chip-row:last-child {
  margin-top: 0.14rem !important;
  padding-top: 0.28rem;
  border-top: 1px dashed #d9e5fa;
}

.table-shell.workspace-panel {
  padding: 0.78rem 0.9rem !important;
}

.table-shell.workspace-panel .panel-header {
  margin-bottom: 0.38rem !important;
}

.table-shell.workspace-panel .schedule-filters {
  margin: 0.08rem 0 0.34rem !important;
}

.table-shell.workspace-panel .filter-chip-row + .filter-chip-row {
  margin-top: 0.12rem !important;
}

.finance-toolbar {
  gap: 0.5rem !important;
}

.finance-toolbar > .finance-inline-actions {
  margin-top: -0.04rem;
}

.finance-toolbar > .finance-filter-bar {
  margin-top: 0.04rem !important;
}

.finance-toolbar > .finance-owner-summary {
  margin-top: 0.1rem;
  padding-top: 0.18rem;
}

/* ==============================
   Page-Specific Rhythm Final V11
   - 以工作台的节奏为参考，修正业务页顶部区域
   - 不再继续全局硬压，只收口高频页面的顶部工具区
   ============================== */
.page-section.active-section:not([data-page-section="workspace"]) .section-body {
  display: grid;
  gap: 0.78rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-header {
  margin-bottom: 0.28rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-header + .section-body {
  margin-top: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .finance-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .task-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .audit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .system-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .research-main-top {
  display: grid;
  gap: 0.56rem !important;
  margin: 0.06rem 0 0.22rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .class-toolbar-row.class-toolbar-row--compact {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .class-toolbar-note {
  margin: 0 !important;
  padding: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .filter-chip-row,
.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .filter-chip-row.secondary {
  margin: 0 !important;
  padding: 0 !important;
  gap: 0.44rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .filter-chip-row.secondary + .filter-chip-row.secondary {
  margin-top: 0.12rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .stats-row.class-stats-row {
  margin: 0.18rem 0 0.08rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar > .filter-chip-row:last-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .finance-stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .task-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .audit-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .system-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-summary-row {
  margin: 0.14rem 0 0.18rem !important;
  gap: 0.56rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .stat-card {
  padding: 0.64rem 0.82rem !important;
  min-height: 70px !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .workspace-panel,
.page-section.active-section:not([data-page-section="workspace"]) .task-panel,
.page-section.active-section:not([data-page-section="workspace"]) .audit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .unassigned-panel {
  margin-top: 0.12rem !important;
  padding: 0.8rem 0.9rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell.workspace-panel .panel-header {
  margin-bottom: 0.34rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell.workspace-panel .schedule-filters,
.page-section.active-section:not([data-page-section="workspace"]) .finance-filter-bar,
.page-section.active-section:not([data-page-section="workspace"]) .task-filters,
.page-section.active-section:not([data-page-section="workspace"]) .audit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .system-account-filters,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-filters,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-filters {
  margin: 0 0 0.26rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell.workspace-panel .filter-chip-row + .filter-chip-row {
  margin-top: 0.08rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .finance-toolbar > .finance-inline-actions,
.page-section.active-section:not([data-page-section="workspace"]) .finance-toolbar > .finance-owner-summary {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ==============================
   Module Top-Area Unification V12
   - 收掉各模块遗留的独立 margin-bottom
   - 让业务页顶部节奏跟工作台一致：紧凑、分组清楚、不过高
   ============================== */
.page-section.active-section:not([data-page-section="workspace"]) .recruit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .task-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .audit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .system-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .research-main-top {
  margin-bottom: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .recruit-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .task-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .audit-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .system-summary-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-summary-row {
  margin-bottom: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .recruit-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .audit-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .system-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-quick-row {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .tasks-layout,
.page-section.active-section:not([data-page-section="workspace"]) .audit-layout,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-layout {
  gap: 0.72rem !important;
  margin: 0.08rem 0 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .recruit-panel + .recruit-panel {
  margin-top: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .research-unit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group {
  margin-top: 0.08rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .research-unit-panel-head,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group-header {
  margin-bottom: 0.38rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .research-unit-chip-row,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-quick-row,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-quick-row {
  gap: 0.42rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .task-filters,
.page-section.active-section:not([data-page-section="workspace"]) .audit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .system-account-filters,
.page-section.active-section:not([data-page-section="workspace"]) .permissions-filters,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-filters {
  gap: 0.52rem 0.64rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .task-panel,
.page-section.active-section:not([data-page-section="workspace"]) .audit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group {
  padding: 0.82rem 0.92rem !important;
}

/*
   Unified Business Page Skeleton V13
*/
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame {
  display: grid;
  gap: 0.72rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-head,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-stats,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-main,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-aside {
  display: grid;
  gap: 0.46rem;
  min-width: 0;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-head > *,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools > *,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-stats > *,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-main > *,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-aside > * {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-stats > .stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-stats > .finance-stats-row,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-stats > .class-stats-row {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .filter-chip-row,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .finance-filter-bar,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .task-filters,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .audit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .system-account-filters,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .permissions-filters,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .recruit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-tools .research-unit-chip-row {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-main > .table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-main > .research-table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-main > .workspace-panel {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .finance-section-body {
  gap: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .finance-list-root {
  display: grid;
  gap: 0.72rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--recruit .recruit-layout,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--tasks .tasks-layout,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--audit .audit-layout,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permissions-layout {
  margin: 0 !important;
  gap: 0.72rem !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--recruit .recruit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--tasks .task-panel,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--audit .audit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permissions-main,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permissions-side {
  margin: 0 !important;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--system .module-page-main {
  gap: 0.72rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--system .system-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--recruit .recruit-filters,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--tasks .task-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--audit .audit-toolbar,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permissions-toolbar {
  margin: 0 !important;
}

/*
   Business Header & Button System V14
*/
.page-section.active-section:not([data-page-section="workspace"]) .section-header {
  align-items: end;
  gap: 0.95rem;
  margin-bottom: 0.62rem;
  padding-bottom: 0.74rem;
  border-bottom: 1px solid rgba(194, 210, 238, 0.72);
}

.page-section.active-section:not([data-page-section="workspace"]) .section-header h2 {
  margin: 0.08rem 0 0;
  font-size: 1.62rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #16345a;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #6d83a6;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-subtitle {
  margin-top: 0.3rem;
  max-width: 52rem;
  font-size: 0.9rem;
  line-height: 1.52;
  color: #597192;
}

.page-section.active-section:not([data-page-section="workspace"]) .section-actions {
  gap: 0.52rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .btn,
.page-section.active-section:not([data-page-section="workspace"]) .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .role-tab {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.page-section.active-section:not([data-page-section="workspace"]) .btn {
  min-height: 40px;
  padding: 0.62rem 1.18rem;
  border: 1px solid #c9d8f3;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #244572;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.page-section.active-section:not([data-page-section="workspace"]) .btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2d6cdf 0%, #1f56c8 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px -16px rgba(31, 86, 200, 0.95);
}

.page-section.active-section:not([data-page-section="workspace"]) .btn:hover,
.page-section.active-section:not([data-page-section="workspace"]) .tiny-btn:hover,
.page-section.active-section:not([data-page-section="workspace"]) .role-tab:hover {
  transform: translateY(-1px);
  border-color: #9fbff3;
  box-shadow: 0 10px 24px -22px rgba(23, 52, 90, 0.55);
}

.page-section.active-section:not([data-page-section="workspace"]) .btn.primary:hover {
  border-color: transparent;
  box-shadow: 0 12px 24px -18px rgba(31, 86, 200, 0.95);
}

.page-section.active-section:not([data-page-section="workspace"]) .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .role-tab {
  min-height: 34px;
  padding: 0.42rem 0.92rem;
  border: 1px solid #c8d7f1;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  color: #34537f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.page-section.active-section:not([data-page-section="workspace"]) .tiny-btn.active,
.page-section.active-section:not([data-page-section="workspace"]) .role-tab.active {
  border-color: #2d6cdf;
  background: linear-gradient(135deg, #2d6cdf 0%, #1f56c8 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px -16px rgba(31, 86, 200, 0.92);
}

.page-section.active-section:not([data-page-section="workspace"]) .tiny-btn.danger {
  border-color: #efc5c5;
  background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
  color: #c85656;
}

.page-section.active-section:not([data-page-section="workspace"]) .tiny-btn:disabled,
.page-section.active-section:not([data-page-section="workspace"]) .btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-table-cell-actions--compact {
  min-width: 184px;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-table-actions--compact {
  gap: 0.22rem;
  align-content: flex-start;
}

.page-section.active-section:not([data-page-section="workspace"]) .class-table-actions--compact .tiny-btn {
  min-height: 26px;
  padding: 0.08rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.page-section.active-section:not([data-page-section="workspace"]) .student-data-table th.student-table-cell-actions,
.page-section.active-section:not([data-page-section="workspace"]) .student-data-table td.student-table-cell-actions {
  width: 10.5rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .student-data-table td.student-table-cell-actions {
  white-space: normal;
  vertical-align: middle;
}

.page-section.active-section:not([data-page-section="workspace"]) .student-table-actions--compact {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: end;
  gap: 0.28rem 0.38rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .student-table-actions--compact .tiny-btn {
  min-height: 26px;
  padding: 0.08rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.page-section.active-section:not([data-page-section="workspace"]) .research-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  flex: 0 0 auto;
}

.page-section.active-section:not([data-page-section="workspace"]) .research-head-actions .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .research-inline-actions .tiny-btn {
  min-height: 30px;
  padding: 0.22rem 0.72rem;
  font-size: 0.74rem;
  line-height: 1.12;
}

/* 教务页面按钮按场景分层，不走全局一刀切 */
.page-section.active-section:not([data-page-section="workspace"]) .class-toolbar-actions .btn {
  min-height: 36px;
  padding: 0.42rem 0.98rem;
  font-size: 0.82rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .student-table-shell .panel-header .table-actions .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .student-detail-card .table-actions .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .student-detail-title-row .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .student-detail-shortcuts .tiny-btn {
  min-height: 28px;
  padding: 0.14rem 0.58rem;
  font-size: 0.72rem;
  line-height: 1.1;
}

.page-section.active-section:not([data-page-section="workspace"]) .schedule-current-class-actions .tiny-btn {
  min-height: 28px;
  padding: 0.14rem 0.6rem;
  font-size: 0.72rem;
  line-height: 1.1;
}

.page-section.active-section:not([data-page-section="workspace"]) .schedule-table-actions .tiny-btn,
.page-section.active-section:not([data-page-section="workspace"]) .schedule-followup-panel .table-actions .tiny-btn {
  min-height: 25px;
  padding: 0.06rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.08;
}

.page-section.active-section:not([data-page-section="workspace"]) .unassigned-student-card .tiny-btn {
  min-height: 26px;
  padding: 0.08rem 0.44rem;
  font-size: 0.68rem;
  line-height: 1.08;
}

.page-section.active-section:not([data-page-section="workspace"]) .filter-chip-row,
.page-section.active-section:not([data-page-section="workspace"]) .role-tabs {
  gap: 0.5rem 0.56rem;
}

/*
   Navigation / Table / Card Polish V15
*/
.page-section.active-section:not([data-page-section="workspace"]) .side-nav-group {
  padding: 0.62rem;
  border-radius: 1rem;
  border: 1px solid #d6e3f8;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.page-section.active-section:not([data-page-section="workspace"]) .side-nav-group + .side-nav-group {
  margin-top: 0.72rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .side-nav-group-title {
  margin-bottom: 0.42rem;
  font-size: 0.86rem;
  color: #4a658f;
}

.page-section.active-section:not([data-page-section="workspace"]) .side-nav-group-body {
  display: grid;
  gap: 0.46rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .side-nav-item {
  min-height: 39px;
  padding: 0.5rem 0.84rem;
  border-radius: 0.9rem;
  border: 1px solid #cdddff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.page-section.active-section:not([data-page-section="workspace"]) .side-nav-item.active {
  box-shadow: 0 10px 20px -18px rgba(31, 86, 200, 0.92);
}

.page-section.active-section:not([data-page-section="workspace"]) .table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell,
.page-section.active-section:not([data-page-section="workspace"]) .workspace-panel,
.page-section.active-section:not([data-page-section="workspace"]) .task-panel,
.page-section.active-section:not([data-page-section="workspace"]) .audit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .permission-group,
.page-section.active-section:not([data-page-section="workspace"]) .recruit-panel,
.page-section.active-section:not([data-page-section="workspace"]) .unassigned-panel,
.page-section.active-section:not([data-page-section="workspace"]) .lead-detail-card,
.page-section.active-section:not([data-page-section="workspace"]) .finance-owner-summary,
.page-section.active-section:not([data-page-section="workspace"]) .finance-pending-enrollment,
.page-section.active-section:not([data-page-section="workspace"]) .research-unit-panel {
  border-radius: 1.08rem;
  border: 1px solid #d6e4f8;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 16px 28px -30px rgba(18, 43, 75, 0.32);
}

.page-section.active-section:not([data-page-section="workspace"]) .panel-header {
  align-items: end;
  margin-bottom: 0.42rem !important;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid rgba(213, 226, 247, 0.8);
}

.page-section.active-section:not([data-page-section="workspace"]) .panel-header h3 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: #18365c;
}

.page-section.active-section:not([data-page-section="workspace"]) .panel-header-meta {
  color: #6c84a5;
}

.page-section.active-section:not([data-page-section="workspace"]) .page-shell .table-shell .data-table thead th,
.page-section.active-section:not([data-page-section="workspace"]) .table-shell .data-table thead th,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell .data-table thead th {
  padding-top: 0.88rem;
  padding-bottom: 0.88rem;
  border-bottom: 1px solid #d8e5fa;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
  color: #597295;
  font-size: 0.8rem;
  font-weight: 700;
}

.page-section.active-section:not([data-page-section="workspace"]) .page-shell .table-shell .data-table tbody td,
.page-section.active-section:not([data-page-section="workspace"]) .table-shell .data-table tbody td,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell .data-table tbody td {
  padding-top: 0.88rem;
  padding-bottom: 0.88rem;
  vertical-align: middle;
}

.page-section.active-section:not([data-page-section="workspace"]) .page-shell .table-shell .data-table tbody tr:hover td,
.page-section.active-section:not([data-page-section="workspace"]) .table-shell .data-table tbody tr:hover td,
.page-section.active-section:not([data-page-section="workspace"]) .research-table-shell .data-table tbody tr:hover td {
  background: #f8fbff;
}

.schedule-month-control{display:flex;gap:.5rem;align-items:center}.schedule-month-control input{flex:1 1 auto}
.schedule-filter-bar--month-only {
  margin-bottom: 10px;
}

.schedule-filter-bar--month-only .schedule-month-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: stretch;
}

.schedule-filter-bar--month-only .schedule-month-control input,
.schedule-filter-bar--month-only .schedule-month-control .tiny-btn {
  height: 40px;
}

.schedule-filter-bar--month-only .schedule-month-control .tiny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 0.75rem;
  line-height: 1;
}

.schedule-quick-switch-card {
  margin-bottom: 10px;
}

.schedule-quick-class-row {
  gap: 10px;
}

.schedule-stats-stack {
  gap: 10px;
  margin-bottom: 10px;
}

.schedule-stats-stack .stats-grid {
  gap: 10px;
}

.schedule-current-class-card {
  margin-bottom: 10px;
}

.schedule-student-summary-grid {
  gap: 10px;
  margin-bottom: 10px;
}

.schedule-table-shell {
  margin-top: 10px;
}

.schedule-followup-grid {
  gap: 10px;
  margin-top: 10px;
}

/* 单班课节台账页面局部节奏收紧 */
.schedule-filter-bar--month-only {
  margin-bottom: 10px !important;
}

.schedule-filter-bar--month-only .schedule-month-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 10px;
  align-items: stretch;
}

.schedule-filter-bar--month-only .schedule-month-control input,
.schedule-filter-bar--month-only .schedule-month-control .tiny-btn {
  height: 40px;
}

.schedule-filter-bar--month-only .schedule-month-control .tiny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 0.8rem;
}

.schedule-quick-switch-card,
.schedule-current-class-card,
.schedule-stats-stack,
.schedule-student-summary-grid,
.schedule-table-shell {
  margin-bottom: 10px !important;
}

.schedule-stats-stack,
.schedule-followup-grid,
.schedule-student-summary-grid {
  gap: 10px !important;
}

.schedule-table-shell {
  margin-top: 10px !important;
}

.schedule-followup-grid {
  margin-top: 10px !important;
}

/* Permissions Matrix UI Refinement (2026-03-17) */
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permissions-bulk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-group-header-left {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item {
  border: 1px solid #d9e6f8;
  border-radius: 0.78rem;
  padding: 0.35rem 0.5rem;
  background: #fbfdff;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item.permission-item--added {
  border-color: #b7e6c8;
  background: #f2fbf6;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item.permission-item--missing {
  border-color: #f4c7c7;
  background: #fff7f7;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item-label {
  min-width: 0;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.36rem;
  min-width: 0;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-diff-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid #dbe7fb;
  color: #5a7095;
  background: #f6f9ff;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-diff-badge.is-added {
  border-color: #9adab3;
  color: #1e8c4f;
  background: #ecf9f0;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-diff-badge.is-missing {
  border-color: #efb4b4;
  color: #c74646;
  background: #fff0f0;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .role-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .role-tab-meta,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .role-tab-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(120, 147, 186, 0.35);
  background: rgba(248, 251, 255, 0.86);
  color: #56739a;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .role-tab.active .role-tab-meta,
.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .role-tab.active .role-tab-pending {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .stat-card.stat-card-warning {
  border-color: #f0c8c8;
  background: linear-gradient(180deg, #fffaf9 0%, #fff2f1 100%);
}

@media (max-width: 960px) {
  .page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-group-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-group-actions {
    justify-content: flex-start;
  }

  .page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "check label"
      "meta meta";
    row-gap: 0.3rem;
  }

  .page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item input[type="checkbox"] {
    grid-area: check;
  }

  .page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item-label {
    grid-area: label;
  }

  .page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--permissions .permission-item-meta {
    grid-area: meta;
    justify-content: space-between;
  }
}

.page-section.active-section:not([data-page-section="workspace"]) .module-page-frame--tutorials tr.is-selected td {
  background: #eaf2ff;
}

.module-page-frame--tasks .task-board-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.module-page-frame--tasks .task-category-card {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  text-align: left;
  border: 1px solid #d7e5fb;
  background: #f9fbff;
  color: #1f3555;
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.module-page-frame--tasks .task-category-card:hover {
  border-color: #93b4ef;
  box-shadow: 0 8px 20px rgba(28, 78, 158, 0.14);
  transform: translateY(-1px);
}

.module-page-frame--tasks .task-category-card.active {
  border-color: #2b5fc7;
  background: linear-gradient(180deg, #eff5ff 0%, #e5efff 100%);
  box-shadow: inset 0 0 0 1px rgba(43, 95, 199, 0.18);
}

.module-page-frame--tasks .task-category-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e3150;
}

.module-page-frame--tasks .task-category-meta {
  font-size: 0.78rem;
  color: #5b6f8d;
}

.module-page-frame--tasks .task-category-kpis {
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: #2d4f7a;
}

.module-page-frame--tasks .task-category-kpis span {
  border: 1px solid #dbe7fb;
  background: #f4f8ff;
  border-radius: 999px;
  padding: 0.08rem 0.42rem;
}

.module-page-frame--tasks .task-category-progress {
  height: 0.36rem;
  border-radius: 999px;
  background: #e5eefb;
  overflow: hidden;
}

.module-page-frame--tasks .task-category-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2b5fc7 0%, #4b8ee8 100%);
}

.module-page-frame--tasks .task-category-focus-panel {
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
  padding: 0.68rem 0.8rem;
  margin-bottom: 0.7rem;
}

.module-page-frame--tasks .task-category-focus-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: #33557f;
}

.module-page-frame--tasks .task-category-focus-meta span {
  border: 1px solid #dbe7fb;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.12rem 0.46rem;
}

.module-page-frame--tasks .task-planning-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.72rem;
  padding: 0.55rem 0.62rem;
  border: 1px dashed #d1e2fb;
  border-radius: 0.82rem;
  background: #f6faff;
}

.module-page-frame--tasks .task-board-main {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.module-page-frame--tasks .task-board-main.task-board-main--planning {
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
}

.module-page-frame--tasks .task-board-plan-list,
.module-page-frame--tasks .task-board-plan-detail,
.module-page-frame--tasks .task-board-pool {
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: #ffffff;
  padding: 0.8rem;
}

.module-page-frame--tasks .task-board-plan-list {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  max-height: 480px;
  overflow: auto;
}

.module-page-frame--tasks .task-board-plan-list.task-board-plan-list--cards {
  max-height: none;
  overflow: visible;
}

.module-page-frame--tasks .task-board-plan-list.task-board-plan-list--categories {
  max-height: none;
  overflow: visible;
  grid-auto-rows: max-content;
}

.module-page-frame--tasks .task-board-plan-list.task-board-plan-list--categories .task-category-card {
  width: 100%;
}

.module-page-frame--tasks .task-board-section-title {
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #2a466f;
}

.module-page-frame--tasks .task-plan-item {
  display: grid;
  gap: 0.18rem;
  text-align: left;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #1f3555;
  border-radius: 0.75rem;
  padding: 0.52rem 0.62rem;
}

.module-page-frame--tasks .task-plan-item span {
  font-size: 0.75rem;
  color: #5b6f8d;
}

.module-page-frame--tasks .task-plan-item.active {
  border-color: #2b5fc7;
  background: linear-gradient(180deg, #edf4ff 0%, #e1ecff 100%);
}

.module-page-frame--tasks .task-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.module-page-frame--tasks .task-plan-toolbar-current {
  font-size: 0.78rem;
  color: #4f6f98;
  font-weight: 700;
}

.module-page-frame--tasks .task-plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}

.module-page-frame--tasks .task-plan-card {
  display: grid;
  gap: 0.34rem;
  text-align: left;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #1f3555;
  border-radius: 0.8rem;
  padding: 0.6rem 0.68rem;
}

.module-page-frame--tasks .task-plan-card-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.module-page-frame--tasks .task-plan-card-kpis span {
  border: 1px solid #dbe7fb;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.06rem 0.34rem;
  font-size: 0.72rem;
  color: #4f6f98;
}

.module-page-frame--tasks .task-plan-card.active {
  border-color: #2b5fc7;
  background: linear-gradient(180deg, #edf4ff 0%, #e1ecff 100%);
}

.module-page-frame--tasks .task-plan-empty {
  border: 1px dashed #d7e5fb;
  border-radius: 0.7rem;
  background: #f8fbff;
  color: #6880a3;
  font-size: 0.8rem;
  padding: 0.7rem 0.75rem;
}

.module-page-frame--tasks .task-board-plan-detail .table-shell,
.module-page-frame--tasks .task-board-pool .table-shell {
  margin-top: 0.25rem;
}

@media (max-width: 1040px) {
  .module-page-frame--tasks .task-board-main {
    grid-template-columns: 1fr;
  }

  .module-page-frame--tasks .task-board-main.task-board-main--planning {
    grid-template-columns: 1fr;
  }
}

/* Tasks M1-M5 Layout (2026-03-18) */
.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-toolbar {
  margin-bottom: 0.75rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-filters {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-summary-row {
  margin-bottom: 0.7rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .tasks-layout {
  gap: 0.75rem;
  align-items: start;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-panel {
  border-radius: 0.95rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .panel-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-categories {
  margin-bottom: 0.72rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-main {
  margin-bottom: 0;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  margin: 0.5rem 0 0.8rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-rule-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.85rem;
  background: #f8fbff;
  padding: 0.68rem 0.74rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-rule-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  color: #1f3f6c;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-rule-card p {
  margin: 0;
  color: #4c6487;
  line-height: 1.5;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-filters {
    grid-template-columns: 1fr;
  }

  .page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .tasks-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Tasks Visual Refinement (2026-03-22) */
.page-section.active-section[data-page-section="tasks"] .task-mode-roadmap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.52rem;
  margin-bottom: 0.72rem;
}

.page-section.active-section[data-page-section="tasks"] .task-mode-chip {
  appearance: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid #d9e6fb;
  border-radius: 0.9rem;
  background: #f8fbff;
  padding: 0.42rem 0.56rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-height: 44px;
}

.page-section.active-section[data-page-section="tasks"] .task-mode-chip p {
  display: none;
}

.page-section.active-section[data-page-section="tasks"] .task-mode-chip strong {
  font-size: 0.8rem;
  color: #1f3a63;
  font-weight: 700;
}

.page-section.active-section[data-page-section="tasks"] .task-mode-chip span {
  display: none;
}

.page-section.active-section[data-page-section="tasks"] .task-mode-chip.active {
  border-color: #2f6fdc;
  background: linear-gradient(180deg, #eef5ff 0%, #e4efff 100%);
  box-shadow: 0 8px 18px rgba(34, 95, 198, 0.16);
}

.page-section.active-section[data-page-section="tasks"] .task-mode-chip:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip {
  border: 1px solid #d7e5fb;
  border-radius: 0.82rem;
  background: #f8fbff;
  padding: 0.56rem 0.65rem;
  margin-bottom: 0.58rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.32rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip header strong {
  font-size: 0.84rem;
  color: #1f3d66;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip header small {
  font-size: 0.73rem;
  color: #5e7da4;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip li {
  display: flex;
  align-items: flex-start;
  gap: 0.32rem;
  border: 1px solid #dfebff;
  border-radius: 0.72rem;
  background: #ffffff;
  padding: 0.34rem 0.4rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip li span {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid #ccddfb;
  background: #f2f7ff;
  color: #2a57ab;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip li p {
  margin: 0;
  font-size: 0.73rem;
  color: #4f6f98;
  line-height: 1.4;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-filter-hint {
  border: 1px dashed #cddffb;
  border-radius: 0.74rem;
  background: #f4f8ff;
  color: #496a94;
  font-size: 0.79rem;
  padding: 0.42rem 0.56rem;
  margin-bottom: 0.5rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-categories {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card {
  gap: 0.44rem;
  padding: 0.78rem 0.88rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.52rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-rate {
  border: 1px solid #bdd4fb;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  font-size: 0.74rem;
  color: #2a5bb5;
  font-weight: 700;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card--teaching {
  background: linear-gradient(180deg, #f6fbff 0%, #eef7ff 100%);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card--marketing {
  background: linear-gradient(180deg, #fffaf5 0%, #fff2e6 100%);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card--enrollment {
  background: linear-gradient(180deg, #f9fff6 0%, #effbe8 100%);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card--operations {
  background: linear-gradient(180deg, #f8f8ff 0%, #f0f1ff 100%);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card--finance {
  background: linear-gradient(180deg, #f8fffc 0%, #edfbf5 100%);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-card--hr {
  background: linear-gradient(180deg, #fff9fd 0%, #fff0f7 100%);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-plan-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-plan-item-head em {
  font-style: normal;
  border: 1px solid #d4e2fa;
  border-radius: 999px;
  background: #ffffff;
  color: #3a5f8e;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.04rem 0.36rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-plan-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -0.08rem 0 0.45rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-plan-detail-meta span {
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #f7faff;
  color: #3b5f8f;
  font-size: 0.75rem;
  padding: 0.09rem 0.44rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-source-quick-row,
.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-category-filter-row {
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.46rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-source-label {
  font-size: 0.76rem;
  color: #4f6f98;
  font-weight: 700;
  margin-right: 0.12rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-scope-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
  border: 1px solid #dbe7fb;
  border-radius: 0.8rem;
  background: #f7faff;
  padding: 0.5rem 0.58rem;
  margin-bottom: 0.45rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-scope-hint strong {
  color: #1f3d66;
  font-size: 0.76rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-scope-hint span {
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #ffffff;
  color: #44658f;
  font-size: 0.72rem;
  padding: 0.06rem 0.36rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-v2 {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(280px, 320px) minmax(0, 1fr);
  gap: 0.75rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-v2-col {
  border: 1px solid #dbe7fb;
  border-radius: 0.95rem;
  background: #ffffff;
  padding: 0.76rem;
  min-height: 0;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-v2-stack {
  display: grid;
  gap: 0.5rem;
  max-height: 620px;
  overflow: auto;
  padding-right: 0.2rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-type-row {
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-card {
  display: grid;
  gap: 0.32rem;
  text-align: left;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  color: #1f3555;
  border-radius: 0.8rem;
  padding: 0.6rem 0.65rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-card:hover {
  border-color: #95b9f2;
  box-shadow: 0 8px 20px rgba(28, 78, 158, 0.14);
  transform: translateY(-1px);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-card.active {
  border-color: #2b5fc7;
  background: linear-gradient(180deg, #edf4ff 0%, #e1ecff 100%);
  box-shadow: inset 0 0 0 1px rgba(43, 95, 199, 0.2);
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.42rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-head strong {
  font-size: 0.86rem;
  color: #1f3d66;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-head span {
  border: 1px solid #c4d8fb;
  border-radius: 999px;
  background: #ffffff;
  color: #2a5bb5;
  font-size: 0.72rem;
  padding: 0.06rem 0.34rem;
  font-weight: 700;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-meta {
  font-size: 0.74rem;
  color: #5a7499;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-kpis span {
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #ffffff;
  color: #42648f;
  font-size: 0.7rem;
  padding: 0.06rem 0.34rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-object-deadline {
  font-size: 0.72rem;
  color: #4e6f99;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-plan-cards-grid--packages {
  max-height: 220px;
  overflow: auto;
  padding-right: 0.2rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-checklist-grid {
  display: grid;
  gap: 0.4rem;
  max-height: 180px;
  overflow: auto;
  padding-right: 0.2rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-checklist-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.46rem 0.56rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-checklist-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f3d66;
  margin-bottom: 0.2rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-checklist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-checklist-meta span {
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #ffffff;
  color: #4a678f;
  font-size: 0.7rem;
  padding: 0.05rem 0.33rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-card {
  border: 1px solid #dbe7fb;
  border-radius: 0.85rem;
  background: #f8fbff;
  padding: 0.55rem 0.62rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-card header {
  display: grid;
  gap: 0.12rem;
  margin-bottom: 0.32rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-card header strong {
  font-size: 0.82rem;
  color: #1f3d66;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-card header span {
  font-size: 0.72rem;
  color: #4e6f99;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-pool-group-kpis span {
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #ffffff;
  color: #44658f;
  font-size: 0.7rem;
  padding: 0.05rem 0.34rem;
}

@media (max-width: 1120px) {
  .page-section.active-section[data-page-section="tasks"] .task-mode-roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-board-v2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-section.active-section[data-page-section="tasks"] .task-mode-roadmap {
    grid-template-columns: 1fr;
  }

  .page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip ol {
    grid-template-columns: 1fr;
  }

  .page-section.active-section[data-page-section="tasks"] .module-page-frame--tasks .task-guide-strip header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Task Board V3 */
.tasks-v3-root {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.tasks-v3-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-color);
  border-radius: 14px;
  background: #fff;
}

.tasks-v3-top h2 {
  margin: 0;
  font-size: 20px;
}

.tasks-v3-top p {
  margin: 2px 0 0;
  color: var(--muted-text);
  font-size: 13px;
}

.tasks-v3-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.tasks-v3-mode {
  border: 1px solid var(--line-color);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-color);
  flex: 0 1 220px;
  min-width: 170px;
}

.tasks-v3-mode strong {
  font-size: 11px;
  color: var(--muted-text);
}

.tasks-v3-mode em {
  margin-left: auto;
  min-width: 28px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--line-color);
  background: #f6f9ff;
  color: var(--muted-text);
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
}

.tasks-v3-mode.active {
  border-color: var(--brand);
  background: rgba(46, 99, 196, 0.08);
  color: var(--brand);
}

.tasks-v3-mode.active em {
  border-color: rgba(46, 99, 196, 0.35);
  background: rgba(46, 99, 196, 0.16);
  color: var(--brand);
}

.tasks-v3-filters {
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
}

.tasks-v3-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tasks-v3-search {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
}

.tasks-v3-search input {
  min-width: 260px;
  max-width: 520px;
  width: auto;
  flex: 1 1 360px;
  border: 1px solid var(--line-color);
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(18, 44, 84, 0.04);
  padding: 10px 12px;
}

.tasks-v3-mini-stats {
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-text);
  font-size: 13px;
}

.tasks-v3-scope-line {
  border: 1px dashed var(--line-color);
  border-radius: 12px;
  background: #fafcff;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-text);
  font-size: 12px;
}

.tasks-v3-scope-line span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-color);
  padding: 3px 8px;
}

.tasks-v3-panel {
  border: 1px solid var(--line-color);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.tasks-v3-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tasks-v3-panel-head h3,
.tasks-v3-panel-head h4 {
  margin: 0;
}

.tasks-v3-grid {
  display: grid;
  gap: 10px;
}

.tasks-v3-grid.planning,
.tasks-v3-grid.pool,
.tasks-v3-grid.execution {
  grid-template-columns: 240px 240px minmax(0, 1fr);
}

.tasks-v3-grid.pool,
.tasks-v3-grid.execution {
  grid-template-columns: 280px minmax(0, 1fr);
}

.tasks-v3-grid aside,
.tasks-v3-grid section {
  border: 1px solid var(--line-color);
  border-radius: 12px;
  padding: 10px;
  min-width: 0;
}

.tasks-v3-grid h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.tasks-v3-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 64vh;
  overflow: auto;
}

.tasks-v3-pack {
  max-height: 180px;
}

.tasks-v3-card {
  width: 100%;
  border: 1px solid #c9d9fb;
  border-radius: 10px;
  background: #f9fbff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  color: var(--text-color);
}

.tasks-v3-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.tasks-v3-card small {
  color: var(--muted-text);
  display: block;
  line-height: 1.4;
}

.tasks-v3-card.active {
  border-color: var(--brand);
  background: rgba(46, 99, 196, 0.1);
}

.tasks-v3-empty {
  padding: 12px;
  text-align: center;
  color: var(--muted-text);
  border: 1px dashed var(--line-color);
  border-radius: 10px;
}

.tasks-v3-task-name {
  font-weight: 600;
  line-height: 1.35;
}

.tasks-v3-task-sub {
  font-size: 12px;
  color: var(--muted-text);
  margin-top: 2px;
}

.tasks-v3-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #cfe0ff;
  background: #f5f8ff;
  color: #284d8e;
}

.tasks-v3-status-delayed,
.tasks-v3-status-overdue {
  border-color: #ffc9c9;
  background: #fff3f3;
  color: #a84545;
}

.tasks-v3-status-blocked,
.tasks-v3-status-blocked_by_dependency {
  border-color: #ffdca7;
  background: #fff8ee;
  color: #8d5d19;
}

.tasks-v3-status-completed {
  border-color: #bfe9d2;
  background: #f0fbf5;
  color: #2e7c4a;
}

.tasks-v3-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tasks-v3-tip {
  color: var(--muted-text);
  font-size: 13px;
}

.tasks-v3-day-wrap {
  display: grid;
  gap: 8px;
}

.tasks-v3-day {
  border: 1px solid var(--line-color);
  border-radius: 10px;
  padding: 8px;
}

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

.tasks-v3-day-list {
  display: grid;
  gap: 6px;
}

.tasks-v3-day-list article {
  border: 1px solid #d9e6ff;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fafcff;
}

.tasks-v3-day-list article div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tasks-v3-day-list article small {
  color: var(--muted-text);
}

.tasks-v3-wf {
  border: 1px solid var(--line-color);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.tasks-v3-rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.tasks-v3-rule-card {
  border: 1px solid #d6e3ff;
  border-radius: 10px;
  padding: 8px;
  background: #fbfdff;
  display: grid;
  gap: 4px;
}

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

.tasks-v3-rule-card small {
  color: var(--muted-text);
}

.tasks-v3-error {
  border: 1px solid #ffc9c9;
  background: #fff4f4;
  color: #a64343;
  border-radius: 8px;
  padding: 8px 10px;
}

.tasks-v3-empty-board {
  border: 1px dashed #c8d9f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.tasks-v3-empty-board h4 {
  margin: 0;
  font-size: 16px;
}

.tasks-v3-empty-board p {
  margin: 0;
  color: var(--muted-text);
  line-height: 1.6;
}

@media (max-width: 1200px) {
  .tasks-v3-filters {
    grid-template-columns: 1fr;
  }

  .tasks-v3-grid.planning,
  .tasks-v3-grid.pool,
  .tasks-v3-grid.execution {
    grid-template-columns: 1fr;
  }

  .tasks-v3-stack {
    max-height: none;
  }

  .tasks-v3-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tasks-v3-mode {
    min-width: 0;
  }

  .tasks-v3-search {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .tasks-v3-search input {
    flex: 1 1 280px;
    min-width: 240px;
  }
}

/* App brand: keep only one-line name with sized parts */
.app-title.app-title--brand {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.12em;
  line-height: 1.04;
  font-size: 0;
}

.app-title--brand .app-title-main {
  font-size: clamp(2.35rem, 3vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-title--brand .app-title-sep {
  font-size: clamp(2.35rem, 3vw, 3.1rem);
  font-weight: 700;
  opacity: 0.9;
}

.app-title--brand .app-title-sub {
  font-size: clamp(1.42rem, 1.9vw, 1.88rem);
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.92;
}

@media (max-width: 760px) {
  .app-title--brand .app-title-main,
  .app-title--brand .app-title-sep {
    font-size: clamp(1.9rem, 9vw, 2.25rem);
  }

  .app-title--brand .app-title-sub {
    font-size: clamp(1.22rem, 6vw, 1.45rem);
  }
}

.research-stage-group {
  display: grid;
  gap: 0.38rem;
}

.research-stage-group-title {
  appearance: none;
  width: 100%;
  border: 1px dashed #d5e2f8;
  border-radius: 10px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.36rem 0.5rem;
  cursor: pointer;
  text-align: left;
}

.research-stage-group-title:hover {
  border-color: #b8ccf5;
}

.research-stage-group-title.is-current {
  border-color: #3b6fd8;
  background: #edf4ff;
}

.research-phase-plan-list {
  display: grid;
  gap: 0.34rem;
}

.research-level-frame .research-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
}

.research-level-panel {
  display: grid;
  gap: 0.88rem;
}

.research-level-panel h3 {
  margin: 0;
}

.research-level-guides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.research-level-guides article {
  border: 1px solid #d7e4fa;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.78rem 0.9rem;
  display: grid;
  gap: 0.42rem;
}

.research-level-guides article p {
  margin: 0;
  color: var(--muted-text);
  line-height: 1.45;
}

.research-level-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.76rem;
}

.research-level-card {
  border: 1px solid #d7e4fa;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.82rem 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.research-level-card h4 {
  margin: 0;
  font-size: 1rem;
}

.research-level-card p {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.9rem;
}

.research-level-card.is-current {
  border-color: #3b6fd8;
  background: #eef4ff;
}

.research-resource-empty {
  color: var(--ink-soft);
}

.research-resource-text {
  display: inline-block;
  max-width: 12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.research-resource-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.research-resource-link:hover {
  text-decoration: underline;
}

.schedule-resource-cell {
  min-width: 13rem;
}

.schedule-resource-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
}

.schedule-resource-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
  background: #f5f9ff;
  color: #49628c;
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.12rem 0.46rem;
  white-space: nowrap;
}

.schedule-resource-pill.has-value {
  border-color: #b7d2fb;
  background: #ebf3ff;
  color: #1f4b8f;
}

.schedule-resource-pill.is-empty {
  border-style: dashed;
  color: #90a2be;
}

/* layout width guard:
   avoid app-pages shrink-to-content (left packed / right empty) in any ui mode */
.app-pages {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.app-pages > .page-section.active-section {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.app-shell.workspace-focus-mode .app-workspace-shell {
  grid-template-columns: minmax(0, 1fr) !important;
}

.app-shell.workspace-focus-mode .app-pages {
  width: 100%;
  max-width: none;
}

/* workspace section guard:
   legacy .page-section.active-section uses flex row and can shrink child by content width */
.page-section.active-section[data-page-section="workspace"] {
  display: block !important;
  width: 100% !important;
}

.page-section.active-section[data-page-section="workspace"] > * {
  width: 100% !important;
  min-width: 0;
}
