:root {
  --bg: #eef1f4;
  --card: #ffffff;
  --ink: #1b1f2a;
  --muted: #5f6c7b;
  --accent: #2f6fed;
  --border: #e5e7eb;
  --success: #22c55e;
  --idle: #9ca3af;
  --danger: #ef4444;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body.board-body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.board-header {
  background: #ffffff;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.board-brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.4px;
}

.board-nav {
  display: flex;
  gap: 12px;
}

.board-link {
  text-decoration: none;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
}

.board-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.board-title {
  margin: 0 0 4px;
  font-size: 20px;
}

.board-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.board-meta {
  font-size: 11px;
  color: var(--muted);
}

.board-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  align-items: start;
}

.board-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border-top: 3px solid rgba(47, 111, 237, 0.6);
  min-height: 210px;
}

.board-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
}

.card-metrics {
  font-size: 11px;
  color: var(--muted);
}

.card-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.card-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.staff-list {
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.staff-item {
  display: grid;
  grid-template-columns: 1fr 56px 56px;
  align-items: center;
  font-size: 12px;
  gap: 6px;
}

.staff-item:not(.staff-header) {
  padding: 2px 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.staff-name {
  font-weight: 600;
}

.staff-duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.staff-state {
  font-weight: 600;
  text-align: center;
}

.staff-state.online {
  color: var(--success);
}

.staff-state.offline {
  color: var(--idle);
}

.staff-header {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-dot.online {
  background: var(--success);
}

.status-dot.offline {
  background: var(--idle);
}

.board-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.board-panel + .board-panel {
  margin-top: 16px;
}

.board-panel-error {
  border-color: rgba(239, 68, 68, 0.4);
}

.board-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.board-input {
  flex: 1 1 240px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.board-button {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.board-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.board-button.secondary {
  background: #e2e8f0;
  color: var(--ink);
}

.board-message {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.board-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.board-alert {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.board-panel-table {
  padding: 0;
}

.board-stats {
  display: flex;
  gap: 12px;
  padding: 16px 18px 8px;
  font-size: 13px;
  color: var(--muted);
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.board-table th,
.board-table td {
  text-align: left;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.board-table th {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.board-empty {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .board-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .board-container {
    padding: 16px;
  }
  .board-form {
    flex-direction: column;
  }
  .board-button,
  .board-input {
    width: 100%;
  }
  .board-card {
    padding: 12px;
    min-height: auto;
  }
  .staff-item {
    grid-template-columns: 1fr 52px 52px;
  }
  .board-summary {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (min-width: 1200px) {
  .board-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .board-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
