
/* ACTIVE_PALETTE_TOKENS */
:root {
  /* Page / report tokens - Business Blue */
  --page-bg: #FFFFFF;
  --page-surface: #F6F8FA;
  --page-surface-muted: #EAEFF2;
  --page-text: #1F2328;
  --page-text-secondary: #424A53;
  --page-text-muted: #656D76;
  --page-text-disabled: #9AA0A6;
  --page-border: #D0D7DE;
  --page-brand: #0969DA;
  --page-brand-hover: #0860C7;
  --page-brand-active: #0550AE;
  --page-brand-soft: #E8F0FE;
  --page-brand-soft-strong: #D0E2FF;
  --page-brand-text: #0550AE;

  /* Sidebar tokens */
  --sidebar-bg: #0F1A2B;
  --sidebar-text: #C9D1D9;
  --sidebar-text-muted: #8B949E;
  --sidebar-hover: #162236;
  --sidebar-active: #1F6FEB;
  --sidebar-active-bg: rgba(31, 111, 235, 0.15);

  /* Backward-compatible report variables */
  --bg: #FFFFFF;
  --bg2: #F6F8FA;
  --rule: #D0D7DE;
  --ink: #1F2328;
  --muted: #656D76;
  --text-secondary: #424A53;
  --text-disabled: #9AA0A6;
  --accent: #0969DA;
  --accent-hover: #0860C7;
  --accent-active: #0550AE;
  --accent-soft: #E8F0FE;
  --accent2: #8250DF;

  /* Chart / data tokens - Business Blue palette */
  --chart-series-1: #0969DA;
  --chart-series-2: #8250DF;
  --chart-series-3: #06B6D4;
  --chart-series-4: #BF3989;
  --chart-other: #D0D7DE;
  --chart-accent: #8250DF;
  --chart-accent-2: #06B6D4;
  --chart-positive: #2DA44E;
  --chart-warning: #D4A72C;
  --chart-negative: #F85149;
  --chart-grid: rgba(31, 35, 40, 0.12);
  --chart-axis: #656D76;
  --chart-label: #656D76;
  --chart-tooltip-bg: #FFFFFF;

  /* Semantic compatibility tokens */
  --success: #2DA44E;
  --info: #0969DA;
  --reminder: #FF7A45;
  --warning: #D4A72C;
  --danger: #F85149;
  --positive: #2DA44E;
  --negative: #F85149;

  /* Layout tokens */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 56px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--page-text);
  background: var(--page-surface);
  overflow-x: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  z-index: 100;
  transition: width 0.25s ease;
  display: flex;
  flex-direction: column;
}

.sidebar__logo {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
}

.sidebar__logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--page-brand), var(--chart-series-2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar__logo-text {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.sidebar__nav-section {
  margin-bottom: 8px;
}

.sidebar__nav-label {
  padding: 8px 12px 4px;
  font-size: 11px;
  color: var(--sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--sidebar-text);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar__nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar__nav-item.active {
  background: var(--sidebar-active-bg);
  color: #fff;
  font-weight: 500;
}

.sidebar__nav-item.active .sidebar__nav-icon {
  color: var(--sidebar-active);
}

.sidebar__nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text-muted);
}

.sidebar__nav-item.active .sidebar__nav-icon,
.sidebar__nav-item:hover .sidebar__nav-icon {
  color: var(--sidebar-active);
}

.sidebar__footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
}

.sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--page-brand), var(--chart-series-3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar__user-info {
  overflow: hidden;
}

.sidebar__user-name {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  color: var(--sidebar-text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Topbar ===== */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--page-bg);
  border-bottom: 1px solid var(--page-border);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: left 0.25s ease;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--page-text-secondary);
  transition: all 0.15s ease;
}

.topbar__toggle:hover {
  background: var(--page-surface);
  color: var(--page-text);
}

.topbar__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--page-text);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__date {
  font-size: 13px;
  color: var(--page-text-muted);
}

.topbar__action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--page-text-secondary);
  transition: all 0.15s ease;
  position: relative;
}

.topbar__action:hover {
  background: var(--page-surface);
  color: var(--page-text);
}

.topbar__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--page-bg);
}

/* ===== Main Content ===== */
.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 24px;
  min-height: calc(100vh - var(--topbar-height));
  transition: margin-left 0.25s ease;
}

.module {
  display: none;
}

.module.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes kbReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes aiPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes aiTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes loginFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes loginRing {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0; }
}

/* ===== Module Header ===== */
.module__header {
  margin-bottom: 24px;
}

.module__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 6px;
}

.module__subtitle {
  font-size: 14px;
  color: var(--page-text-muted);
}

/* ===== Metric Grid ===== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
}

.metric-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.metric-card.clickable {
  cursor: pointer;
}

.metric-card.clickable:hover {
  border-color: var(--page-brand);
  box-shadow: 0 4px 16px rgba(9, 105, 218, 0.12);
}

.metric-card__action {
  font-size: 12px;
  color: var(--page-brand);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.metric-card__label {
  font-size: 13px;
  color: var(--page-text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--page-text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.metric-card__change {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-card__change.up {
  color: var(--positive);
}

.metric-card__change.down {
  color: var(--negative);
}

.metric-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.metric-card__icon.blue { background: var(--accent-soft); color: var(--page-brand); }
.metric-card__icon.purple { background: #F3EFFF; color: var(--chart-series-2); }
.metric-card__icon.cyan { background: #E6FFFB; color: var(--chart-series-3); }
.metric-card__icon.pink { background: #FFF0F6; color: var(--chart-series-4); }
.metric-card__icon.green { background: #E6FFED; color: var(--positive); }
.metric-card__icon.orange { background: #FFF7E6; color: var(--warning); }

/* ===== Chart Grid ===== */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.chart-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.chart-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.chart-card.full {
  grid-column: 1 / -1;
}

.chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--page-text);
}

.chart-card__subtitle {
  font-size: 12px;
  color: var(--page-text-muted);
  margin-top: 2px;
}

.chart-container {
  width: 100%;
  height: 280px;
}

.chart-container.tall {
  height: 360px;
}

/* ===== Table Card ===== */
.table-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.table-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.table-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--page-text);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--page-text-muted);
  background: var(--page-surface);
  border-bottom: 1px solid var(--page-border);
}

.data-table td {
  padding: 12px;
  font-size: 13px;
  color: var(--page-text-secondary);
  border-bottom: 1px solid var(--page-border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--page-surface);
}

/* ===== Tags ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 999px;
  font-weight: 500;
}

.tag.success {
  background: #E6FFED;
  color: var(--positive);
}

.tag.warning {
  background: #FFF7E6;
  color: var(--warning);
}

.tag.danger {
  background: #FFECEC;
  color: var(--negative);
}

.tag.info {
  background: var(--accent-soft);
  color: var(--page-brand);
}

.tag.default {
  background: var(--page-surface-muted);
  color: var(--page-text-secondary);
}

/* ===== Resource Map / Coverage ===== */
.coverage-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.coverage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coverage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--page-surface);
  border-radius: var(--radius-md);
}

.coverage-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.coverage-item__info {
  flex: 1;
}

.coverage-item__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--page-text);
}

.coverage-item__meta {
  font-size: 12px;
  color: var(--page-text-muted);
  margin-top: 2px;
}

.coverage-item__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--page-text);
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 6px;
  background: var(--page-surface-muted);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ===== Business Cards ===== */
.business-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.business-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.business-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--page-brand);
}

.business-card:nth-child(2)::before { background: var(--chart-series-2); }
.business-card:nth-child(3)::before { background: var(--chart-series-3); }

.business-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.business-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

.business-card:nth-child(1) .business-card__icon { background: var(--accent-soft); color: var(--page-brand); }
.business-card:nth-child(2) .business-card__icon { background: #F3EFFF; color: var(--chart-series-2); }
.business-card:nth-child(3) .business-card__icon { background: #E6FFFB; color: var(--chart-series-3); }

.business-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 4px;
}

.business-card__desc {
  font-size: 13px;
  color: var(--page-text-muted);
  margin-bottom: 16px;
}

.business-card__stats {
  display: flex;
  gap: 16px;
}

.business-card__stat {
  flex: 1;
}

.business-card__stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--page-text);
  font-variant-numeric: tabular-nums;
}

.business-card__stat-label {
  font-size: 12px;
  color: var(--page-text-muted);
  margin-top: 2px;
}

/* ===== Resource Management ===== */
.resource-summary {
  background: linear-gradient(135deg, var(--page-brand) 0%, var(--chart-series-2) 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: white;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.resource-summary__label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.resource-summary__value {
  font-size: 42px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.resource-summary__breakdown {
  display: flex;
  gap: 32px;
}

.resource-summary__item {
  text-align: center;
}

.resource-summary__item-value {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.resource-summary__item-label {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

.resource-section {
  margin-bottom: 24px;
}

.resource-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.resource-section__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--page-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-section__subtitle {
  font-size: 13px;
  color: var(--page-text-muted);
  margin-top: 4px;
}

.resource-section__count {
  font-size: 13px;
  color: var(--page-text-muted);
}

.resource-section__count strong {
  color: var(--page-brand);
  font-weight: 600;
  font-size: 16px;
}

/* Account cards */
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.account-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
}

.account-card:hover {
  border-color: var(--page-brand);
  box-shadow: 0 4px 12px rgba(9, 105, 218, 0.08);
}

.account-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.account-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.account-card__info {
  flex: 1;
}

.account-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--page-text);
}

.account-card__name-input {
  font-size: 15px;
  font-weight: 600;
  color: var(--page-text);
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 2px 0;
  transition: all 0.15s ease;
  font-family: inherit;
}

.account-card__name-input:hover {
  border-bottom-color: var(--page-border);
}

.account-card__name-input:focus {
  border-bottom-color: var(--page-brand);
  background: var(--page-surface);
  padding: 2px 6px;
  margin: 0 -6px;
  border-radius: 4px;
}

.account-card__type {
  font-size: 12px;
  color: var(--page-text-muted);
  margin-top: 2px;
}

.account-card__stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.account-card__stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--page-text);
  font-variant-numeric: tabular-nums;
}

.account-card__stat-unit {
  font-size: 13px;
  color: var(--page-text-muted);
}

.account-card__edit {
  display: flex;
  gap: 8px;
  align-items: center;
}

.account-card__input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--page-text);
  background: var(--page-surface);
  outline: none;
  transition: all 0.15s ease;
  font-variant-numeric: tabular-nums;
}

.account-card__input:focus {
  border-color: var(--page-brand);
  background: var(--page-bg);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--page-brand);
  color: white;
}

.btn-primary:hover {
  background: var(--page-brand-hover);
}

.btn-primary:active {
  background: var(--page-brand-active);
}

.btn-secondary {
  background: var(--page-surface);
  color: var(--page-text-secondary);
  border: 1px solid var(--page-border);
}

.btn-secondary:hover {
  background: var(--page-surface-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Group list */
.group-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.group-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.15s ease;
}

.group-card:hover {
  border-color: var(--page-brand);
  box-shadow: 0 2px 8px rgba(9, 105, 218, 0.06);
}

.group-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--page-text);
  margin-bottom: 8px;
}

.group-card__name-input {
  font-size: 13px;
  font-weight: 500;
  color: var(--page-text);
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 2px 0;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: center;
}

.group-card__name-input:hover {
  border-bottom-color: var(--page-border);
}

.group-card__name-input:focus {
  border-bottom-color: var(--page-brand);
  background: var(--page-surface);
  padding: 2px 4px;
  border-radius: 4px;
  text-align: left;
}

.group-card__input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--page-text);
  background: var(--page-surface);
  outline: none;
  transition: all 0.15s ease;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.group-card__input:focus {
  border-color: var(--page-brand);
  background: var(--page-bg);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.group-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--page-text-muted);
}

.group-card__saved {
  color: var(--positive);
  display: none;
  align-items: center;
  gap: 3px;
}

.group-card__saved.show {
  display: flex;
}

.group-card__actions {
  display: flex;
  gap: 4px;
}

.group-card__action-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: var(--page-surface);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--page-text-muted);
  transition: all 0.15s ease;
  font-size: 12px;
  padding: 0;
}

.group-card__action-btn:hover {
  background: var(--page-surface-muted);
  color: var(--page-text);
}

.group-card__action-btn.delete:hover {
  background: #FFECEC;
  color: var(--negative);
}

.resource-section__actions {
  display: flex;
  gap: 8px;
}

.btn-add {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--page-surface);
  color: var(--page-text-secondary);
  border: 1px dashed var(--page-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-add:hover {
  border-color: var(--page-brand);
  color: var(--page-brand);
  background: var(--accent-soft);
}

/* ===== Batch Selection Grid ===== */
.batch-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.batch-card {
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.batch-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--page-brand);
}

.batch-card__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.batch-card__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--page-text);
  margin-bottom: 6px;
}

.batch-card__desc {
  font-size: 13px;
  color: var(--page-text-secondary);
  margin-bottom: 20px;
}

.batch-card__stats {
  display: flex;
  gap: 24px;
}

.batch-card__stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--page-text);
  margin-bottom: 2px;
}

.batch-card__stat-label {
  font-size: 12px;
  color: var(--page-text-muted);
}

.batch-card__arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--page-text-muted);
  opacity: 0;
  transition: all 0.2s ease;
}

.batch-card:hover .batch-card__arrow {
  opacity: 1;
  right: 20px;
  color: var(--page-brand);
}

.batch-card--presale {
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%);
}

.batch-card--presale:hover {
  border-color: #f97316;
}

.batch-card--presale .batch-card__stat-value {
  color: #f97316;
}

.batch-card--autumn {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 60%);
}

.batch-card--autumn:hover {
  border-color: #10b981;
}

.batch-card--autumn .batch-card__stat-value {
  color: #10b981;
}

/* ===== Overall Dashboard Card ===== */
.overall-dashboard-card {
  margin-top: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.overall-dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.overall-dashboard-card__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.overall-dashboard-card__icon {
  font-size: 36px;
}

.overall-dashboard-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.overall-dashboard-card__desc {
  font-size: 13px;
  opacity: 0.85;
}

.overall-dashboard-card__stats {
  display: flex;
  gap: 32px;
  text-align: right;
}

.overall-dashboard-card__stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.overall-dashboard-card__stat-label {
  font-size: 12px;
  opacity: 0.8;
}

/* ===== Compare Stats ===== */
.compare-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.compare-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--page-surface-muted);
  border-radius: 8px;
}

.compare-stat__label {
  font-size: 12px;
  color: var(--page-text-secondary);
  margin-bottom: 4px;
}

.compare-stat__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--page-text);
}

/* ===== Todo Tab ===== */
.todo-tab {
  padding: 6px 14px;
  border: 1px solid var(--page-border);
  border-radius: 6px;
  background: var(--page-surface);
  color: var(--page-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.todo-tab:hover {
  background: var(--page-surface-muted);
}

.todo-tab.active {
  background: var(--page-brand);
  color: #fff;
  border-color: var(--page-brand);
}

/* ===== Finance Record Item ===== */
.fin-record {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--page-border);
  transition: background 0.15s;
}

.fin-record:hover {
  background: var(--page-surface-muted);
}

.fin-record:last-child {
  border-bottom: none;
}

.fin-record__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.fin-record__icon--income { background: rgba(16, 185, 129, 0.1); }
.fin-record__icon--expense { background: rgba(239, 68, 68, 0.1); }

.fin-record__info {
  flex: 1;
  min-width: 0;
}

.fin-record__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--page-text);
  margin-bottom: 2px;
}

.fin-record__meta {
  font-size: 12px;
  color: var(--page-text-secondary);
  display: flex;
  gap: 10px;
}

.fin-record__amount {
  font-size: 16px;
  font-weight: 700;
  margin-right: 12px;
}

.fin-record__amount--income { color: var(--positive); }
.fin-record__amount--expense { color: var(--negative); }

.fin-record__delete {
  color: var(--page-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.fin-record:hover .fin-record__delete {
  opacity: 1;
}

.fin-record__delete:hover {
  color: var(--negative);
}

/* ===== Category Bar ===== */
.cat-bar-item {
  margin-bottom: 12px;
}

.cat-bar-item:last-child {
  margin-bottom: 0;
}

.cat-bar-item__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}

.cat-bar-item__name {
  color: var(--page-text);
  font-weight: 500;
}

.cat-bar-item__amount {
  color: var(--page-text-secondary);
}

.cat-bar-item__bar {
  height: 6px;
  background: var(--page-surface-muted);
  border-radius: 3px;
  overflow: hidden;
}

.cat-bar-item__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ===== Todo Item ===== */
.todo-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--page-border);
  gap: 12px;
  transition: background 0.15s;
}

.todo-item:hover {
  background: var(--page-surface-muted);
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-item__check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--page-border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.todo-item__check:hover {
  border-color: var(--page-brand);
}

.todo-item--done .todo-item__check {
  background: var(--positive);
  border-color: var(--positive);
  color: #fff;
}

.todo-item__content {
  flex: 1;
  min-width: 0;
}

.todo-item__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--page-text);
  margin-bottom: 4px;
}

.todo-item--done .todo-item__title {
  text-decoration: line-through;
  color: var(--page-text-muted);
}

.todo-item__meta {
  font-size: 12px;
  color: var(--page-text-secondary);
  display: flex;
  gap: 12px;
  align-items: center;
}

.todo-item__priority {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.priority-high { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.priority-medium { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.priority-low { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.todo-item__overdue {
  color: var(--negative);
  font-weight: 500;
}

.todo-item__delete {
  color: var(--page-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.todo-item:hover .todo-item__delete {
  opacity: 1;
}

.todo-item__delete:hover {
  color: var(--negative);
}

.todo-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--page-text-secondary);
  font-size: 14px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--page-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 420px;
  max-width: 90vw;
  transform: translateY(20px);
  transition: transform 0.2s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--page-text);
}

.modal__field {
  margin-bottom: 16px;
}

.modal__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--page-text);
  margin-bottom: 6px;
}

.modal__input, .modal__select, .modal__textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--page-border);
  border-radius: 6px;
  background: var(--page-bg);
  color: var(--page-text);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.modal__input:focus, .modal__select:focus, .modal__textarea:focus {
  outline: none;
  border-color: var(--page-brand);
}

.modal__textarea {
  resize: vertical;
  min-height: 70px;
}

.modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-secondary {
  padding: 8px 16px;
  border: 1px solid var(--page-border);
  border-radius: 6px;
  background: var(--page-surface);
  color: var(--page-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--page-surface-muted);
}

/* ===== Settings Card ===== */
.settings-card {
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-top: 16px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tier-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-item__label {
  font-size: 12px;
  color: var(--page-text-secondary);
}

.tier-item__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--page-text);
}

.tier-item__value input {
  padding: 4px 8px;
  border: 1px solid var(--page-border);
  border-radius: 6px;
  background: var(--page-bg);
  color: var(--page-text);
  font-size: 14px;
}

.tier-item__value input:focus {
  outline: none;
  border-color: var(--page-brand);
}

/* ===== Seller Notes ===== */
.seller-notes-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--page-surface-muted);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--page-text-muted);
  transition: all 0.15s ease;
  opacity: 0;
}

.seller-mini-card:hover .seller-notes-btn {
  opacity: 1;
}

.seller-notes-btn:hover {
  background: var(--page-brand);
  color: #fff;
}

.seller-notes-btn.has-note {
  background: #fef3c7;
  color: #d97706;
  opacity: 1;
}

.seller-notes-modal {
  padding: 24px;
}

.seller-notes-modal h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.seller-notes-modal label {
  display: block;
  font-size: 13px;
  color: var(--page-text-secondary);
  margin: 12px 0 6px 0;
  font-weight: 500;
}

.seller-notes-modal input,
.seller-notes-modal textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--page-border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--page-surface);
  color: var(--page-text);
  box-sizing: border-box;
}

.seller-notes-modal textarea {
  resize: vertical;
  min-height: 80px;
}

.seller-notes-modal input:focus,
.seller-notes-modal textarea:focus {
  outline: none;
  border-color: var(--page-brand);
}

.seller-notes-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.seller-note-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  border-radius: 4px;
  background: var(--page-surface-muted);
  color: var(--page-text-secondary);
  margin-right: 4px;
}

/* ===== Batch Tabs ===== */
.batch-tab {
  padding: 8px 18px;
  border: 1px solid var(--page-border);
  background: var(--page-bg);
  color: var(--page-text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.batch-tab:hover {
  border-color: var(--page-brand);
  color: var(--page-brand);
}

.batch-tab.active {
  background: var(--page-brand);
  color: #fff;
  border-color: var(--page-brand);
}

/* ===== Captain Cards ===== */
.captain-card {
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
}

.captain-card__header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.captain-card__header:hover {
  background: var(--page-surface-muted);
}

.captain-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--page-brand), var(--chart-series-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.captain-card__info {
  flex: 1;
}

.captain-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 4px;
}

.captain-card__subtitle {
  font-size: 12px;
  color: var(--page-text-muted);
}

.captain-card__stats {
  display: flex;
  gap: 20px;
  text-align: right;
}

.captain-card__stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--page-text);
}

.captain-card__stat-label {
  font-size: 11px;
  color: var(--page-text-muted);
  margin-top: 2px;
}

.captain-card__arrow {
  color: var(--page-text-muted);
  transition: transform 0.2s ease;
  margin-left: 10px;
}

.captain-card.expanded .captain-card__arrow {
  transform: rotate(180deg);
}

.captain-card__body {
  display: none;
  border-top: 1px solid var(--page-border);
  background: var(--page-bg);
}

.captain-card.expanded .captain-card__body {
  display: block;
}

.captain-card__seller-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.seller-mini-card {
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seller-mini-card:hover {
  border-color: var(--page-brand);
  transform: translateY(-1px);
}

.seller-mini-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 6px;
}

.seller-mini-card__stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
}

.seller-mini-card__stat {
  color: var(--page-text-muted);
}

.seller-mini-card__stat b {
  color: var(--page-text);
}

/* ===== Card Detail Modal ===== */
.cc-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.cc-modal {
  background: var(--page-bg);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

.cc-modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--page-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--page-surface);
}

.cc-modal__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--page-text);
}

.cc-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--page-text-muted);
  transition: all 0.15s ease;
}

.cc-modal__close:hover {
  background: var(--page-surface-muted);
  color: var(--page-text);
}

.cc-modal__filters {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--page-border);
  flex-wrap: wrap;
  background: var(--page-bg);
}

.cc-modal__filter {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--page-border);
  border-radius: 20px;
  background: var(--page-bg);
  color: var(--page-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cc-modal__filter.active {
  background: var(--page-brand);
  color: #fff;
  border-color: var(--page-brand);
}

.cc-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.cc-modal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cc-modal__table th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 500;
  color: var(--page-text-secondary);
  background: var(--page-surface-muted);
  border-bottom: 1px solid var(--page-border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.cc-modal__table td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--page-border);
  color: var(--page-text);
}

.cc-modal__table tr:hover td {
  background: var(--page-surface);
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 500;
}

.status-badge.normal { background: #E6FFED; color: #10b981; }
.status-badge.unactivated { background: #FFF4E6; color: #f59e0b; }
.status-badge.cancelled { background: #FFECEC; color: #ef4444; }
.status-badge.owed { background: #FFF0F0; color: #ef4444; }
.status-badge.other { background: #F0F0F0; color: #6b7280; }

/* ===== Sub-page Navigation ===== */
.subpage {
  display: none;
}

.subpage.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--page-text-secondary);
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 16px;
}

.back-btn:hover {
  background: var(--page-surface-muted);
  color: var(--page-text);
}

/* Entry cards */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.entry-card {
  background: var(--page-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--page-brand);
}

.entry-card:nth-child(2)::before { background: var(--chart-series-2); }
.entry-card:nth-child(3)::before { background: var(--chart-series-3); }

.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--page-brand);
}

.entry-card:nth-child(2):hover { border-color: var(--chart-series-2); }
.entry-card:nth-child(3):hover { border-color: var(--chart-series-3); }

.entry-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.entry-card:nth-child(1) .entry-card__icon { background: var(--accent-soft); }
.entry-card:nth-child(2) .entry-card__icon { background: #F3EFFF; }
.entry-card:nth-child(3) .entry-card__icon { background: #E6FFFB; }

.entry-card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 6px;
}

.entry-card__desc {
  font-size: 13px;
  color: var(--page-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.entry-card__stats {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--page-border);
}

.entry-card__stat {
  flex: 1;
}

.entry-card__stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--page-text);
  font-variant-numeric: tabular-nums;
}

.entry-card__stat-label {
  font-size: 12px;
  color: var(--page-text-muted);
  margin-top: 2px;
}

.entry-card__arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--page-text-muted);
  opacity: 0;
  transition: all 0.2s ease;
}

.entry-card:hover .entry-card__arrow {
  opacity: 1;
  right: 16px;
}

/* Platform tag */
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 500;
}

.platform-tag.qq {
  background: #E8F0FF;
  color: #12B7F5;
}

.platform-tag.wechat {
  background: #E6FFED;
  color: #07C160;
}

/* Dorm group - extra info */
.dorm-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--page-text-muted);
  margin-top: 6px;
}

.dorm-info__remaining {
  color: var(--warning);
  font-weight: 500;
}

.dorm-info__remaining.high {
  color: var(--danger);
}

.dorm-info__remaining.low {
  color: var(--positive);
}

.dorm-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.dorm-input-row .group-card__input {
  flex: 1;
  font-size: 11px;
  padding: 4px 6px;
}

.dorm-input-label {
  font-size: 11px;
  color: var(--page-text-muted);
  white-space: nowrap;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-grid,
  .chart-grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .coverage-grid {
    grid-template-columns: 1fr;
  }
  .business-grid {
    grid-template-columns: 1fr;
  }
  .group-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .entry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar,
  .main {
    margin-left: 0;
    left: 0;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 16px;
  }
  .group-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .resource-summary {
    padding: 20px;
  }
  .resource-summary__value {
    font-size: 32px;
  }
  .resource-summary__breakdown {
    gap: 20px;
  }
  .resource-summary__item-value {
    font-size: 20px;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--page-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--page-text-muted);
}

.sidebar ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}


/* Workspace UI / 2026-09 — presentation only */
:root {
  --page-bg:#ffffff; --page-surface:#f4f7f7; --page-surface-muted:#eaf0ef;
  --page-text:#172e31; --page-text-secondary:#465e62; --page-text-muted:#667d80;
  --page-border:#dfe8e7; --page-brand:#157b75; --page-brand-hover:#116660;
  --page-brand-active:#105851; --page-brand-soft:#e9f5f2;
  --page-brand-soft-strong:#d1eae4; --page-brand-text:#116660;
  --sidebar-bg:#132c30; --sidebar-text:#c5d7d8; --sidebar-text-muted:#91abad;
  --sidebar-hover:#1d3a3e; --sidebar-active:#98ded0; --sidebar-active-bg:#244a4b;
  --bg:#fff; --bg2:#f4f7f7; --rule:#dfe8e7; --ink:#172e31; --muted:#667d80;
  --accent:#157b75; --accent-hover:#116660; --accent-active:#105851;
  --accent-soft:#e9f5f2; --accent2:#6579a5; --chart-series-1:#157b75;
  --chart-series-2:#6579a5; --chart-series-3:#4a9eae; --chart-series-4:#b88958;
  --sidebar-width:232px; --topbar-height:72px;
  --radius-sm:8px; --radius-md:10px; --radius-lg:16px;
}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
.sidebar{border-right:1px solid #244145;box-shadow:none}
.sidebar__logo{height:88px;border:0;padding:0 24px;gap:10px}
.sidebar__logo-icon{background:#b6e5d8;color:#173c3a;border-radius:11px;box-shadow:none}
.sidebar__logo-text{font-size:16px;letter-spacing:.4px}
.sidebar__nav{padding:4px 14px 20px}
.sidebar__nav-label{font-size:11px;letter-spacing:1.3px;padding:18px 14px 8px}
.sidebar__nav-item{min-height:44px;padding:11px 14px;margin-bottom:4px;font-size:13px;border:1px solid transparent}
.sidebar__nav-item.active{background:#244a4b;color:#d9f5ec;border-color:#345d5a;box-shadow:none}
.sidebar__nav-item.active::before{display:none}
.sidebar__footer{border-top:1px solid #2d4649;padding:10px 0}
.sidebar__footer span,.sidebar__footer button{color:#adc6c7!important}
.topbar{background:#fff;border-bottom:1px solid var(--page-border);box-shadow:none;padding:0 32px}
.topbar__title{font-size:14px;font-weight:600}
.topbar__date{font-size:12px;color:var(--page-text-muted)}
.topbar__toggle{border:1px solid var(--page-border);border-radius:9px}
.topbar__action{border-radius:9px}
.main{padding:32px 36px 76px}
.module__header{margin-bottom:26px}
.module__title{font-size:27px;line-height:1.35;letter-spacing:-.7px;font-weight:650}
.module__subtitle{font-size:13px;margin-top:8px}
.metric-grid,.chart-grid,.entry-grid,.batch-select-grid{gap:20px}
.metric-card,.chart-card,.table-card,.entry-card{border:1px solid var(--page-border);box-shadow:0 2px 4px #18363303}
.metric-card{padding:22px 24px}
.metric-card:not(.clickable):hover{transform:none;box-shadow:0 2px 4px #18363303}
.metric-card__value{font-size:32px;font-weight:600;line-height:1.25;letter-spacing:-1px;margin:12px 0 10px}
.metric-card__label{font-size:12px;letter-spacing:.1px}
.metric-card__icon{width:32px;height:32px;border-radius:9px}
.chart-card,.table-card{padding:24px}
.chart-card__title,.table-card__title{font-size:15px;font-weight:600}
.entry-card{padding:24px;border-radius:16px}
.entry-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px #173c3a0a;border-color:#b3d3cb}
.entry-card__title{font-size:17px}
.entry-card__icon{font-size:25px}
.entry-card__desc{font-size:12px;line-height:1.8}
.entry-card__stat-value{font-size:23px;letter-spacing:-.5px}
.batch-card{padding:28px!important;border:1px solid var(--page-border)!important;border-radius:18px!important;background:#fff!important;box-shadow:0 2px 4px #18363303!important;color:var(--page-text)!important}
.batch-card--presale{background:linear-gradient(135deg,#edf7f2,#fff 70%)!important}
.batch-card--autumn{background:linear-gradient(135deg,#f8f3eb,#fff 70%)!important}
.batch-card__icon{font-size:27px!important;margin-bottom:18px!important}
.batch-card__title{font-size:21px!important;color:var(--page-text)!important;letter-spacing:-.3px}
.batch-card__desc{color:var(--page-text-muted)!important;font-size:12px!important;line-height:1.8}
.batch-card__stats{margin-top:26px!important;padding-top:22px!important;border-top:1px solid var(--page-border)!important;gap:30px!important}
.batch-card__stat-value{font-size:29px!important;font-weight:600!important;color:var(--page-text)!important;font-variant-numeric:tabular-nums;letter-spacing:-.8px}
.batch-card__stat-label{font-size:11px!important;color:var(--page-text-muted)!important;margin-top:4px}
.batch-card__arrow{color:var(--page-brand)!important}
.batch-card:hover{transform:translateY(-2px)!important;border-color:#b3d3cb!important;box-shadow:0 8px 24px #173c3a0a!important}
.overall-dashboard-card{background:#173b3e!important;border:1px solid #25494b!important;border-radius:16px!important;box-shadow:none!important;padding:25px 28px!important}
.overall-dashboard-card__title,.overall-dashboard-card__stat-value{color:#eef8f5!important}
.overall-dashboard-card__desc,.overall-dashboard-card__stat-label{color:#b7d4ce!important}
.overall-dashboard-card__stat-value{font-size:25px!important}
.btn{min-height:38px;border-radius:9px;padding:9px 16px;font-weight:500;font-size:13px;box-shadow:none}
.btn-primary{background:var(--page-brand);border:1px solid var(--page-brand);color:#fff}
.btn-secondary{background:#fff;border:1px solid var(--page-border);color:var(--page-text-secondary)}
.btn:disabled{opacity:.6;cursor:wait}
.btn-sm{min-height:32px;padding:6px 11px;font-size:12px}
.modal{border:1px solid var(--page-border);border-radius:20px;box-shadow:0 24px 80px #142e3026;max-height:90dvh;overflow-y:auto}
.modal-overlay{backdrop-filter:blur(4px)}
.modal__input,.modal__select,.modal__textarea{border-radius:9px;min-height:42px;background:#fcfdfd;border-color:var(--page-border)}
.modal__label{font-size:12px;color:var(--page-text-secondary)}
table{font-variant-numeric:tabular-nums}
th{background:#f5f8f7!important;color:#647a7b!important;font-size:12px!important;font-weight:500!important;letter-spacing:.2px}
td{border-color:#edf1f0!important;padding-top:13px!important;padding-bottom:13px!important}
tbody tr:hover{background:#f6faf8}
.status-badge{border-radius:6px;padding:4px 8px;font-size:11px}
.todo-tab{border-radius:8px}
#sync-status{background:#fff!important;border-color:#dce7e3!important;border-radius:10px!important;box-shadow:0 4px 18px #123c3010;max-width:min(380px,calc(100vw - 32px))!important;font-size:12px!important}
#login-overlay{background:#102d31!important}
#login-particles{opacity:.15!important}
#login-submit{background:#187e75!important;box-shadow:none!important;letter-spacing:1px!important;border-radius:11px!important}
#login-username,#login-pwd{border-radius:11px!important}
:is(button,a,input,select,textarea,[role="button"]):focus-visible{outline:3px solid #65b8a5;outline-offset:3px}
@media(min-width:1500px){.main{padding-left:48px;padding-right:48px}.main>.module{max-width:1500px;margin:auto}}
@media(max-width:1100px){.main{padding:26px 24px 76px}.metric-grid{gap:14px}.batch-card{padding:22px!important}.batch-card__stats{gap:20px!important}}
@media(max-width:768px){:root{--topbar-height:64px}.topbar{padding:0 16px}.topbar__date{display:none}.main{padding:22px 16px 80px}.module__title{font-size:23px}.module__header{margin-bottom:20px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.metric-card{padding:17px}.metric-card__value{font-size:26px}.batch-select-grid,.entry-grid,.chart-grid{grid-template-columns:minmax(0,1fr)!important;gap:16px}.batch-card__stats{justify-content:space-between;gap:12px!important}.overall-dashboard-card{flex-wrap:wrap;gap:20px;padding:22px!important}.modal{width:calc(100% - 24px);padding:22px}.modal__row{flex-wrap:wrap}.modal__input,.modal__select,.modal__textarea{font-size:16px}.chart-card,.table-card{padding:18px}}
@media(max-width:380px){.metric-grid{grid-template-columns:minmax(0,1fr)}.batch-card__stat-value{font-size:24px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

