/**
 * 桌面首页共享卡片：教师与学生沿用同一套表面、层级和交互状态。
 */
.bento-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 164px;
  flex-direction: column;
  padding: clamp(17px, 2vw, 25px);
  overflow: visible;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, background 160ms ease;
}

.bento-card:hover { border-color: var(--border-strong); }

.bento-card.card-tools,
.bento-card.card-tasks { padding: 18px 20px; }

.card-preflight { min-height: 220px; }
.card-tools { min-height: 196px; }
.card-tasks { min-height: 132px; }

.card-header {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-header.tight { margin-bottom: 12px; }

.card-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.card-title i,
.card-title svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--accent);
}

.card-link {
  flex: 0 0 auto;
  padding: 4px 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

.hero-card {
  background:
    radial-gradient(ellipse at 88% 0%, var(--soft), transparent 48%),
    var(--bg-card);
}

.hero-content {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-left {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
}

.hero-left h1 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero-left p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.btn-primary {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary-btn);
  border: 0;
  border-radius: var(--radius-ctrl);
  box-shadow: var(--primary-shadow);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 150ms ease, filter 150ms ease;
}

.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-primary:active { transform: translateY(0); }

.btn-primary i,
.btn-primary svg { width: 17px; height: 17px; }

.next-class-box {
  display: flex;
  width: min(100%, 300px);
  min-width: 0;
  flex: 0 1 300px;
  flex-direction: column;
  padding: 17px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.nc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--accent);
  border-radius: 50%;
}

.next-class-box h2 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.next-class-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.preflight-desc {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.status-pending {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 4px 8px;
  color: var(--text-secondary);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.device-list {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
}

.device-item {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  font-size: 12px;
}

.device-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-weight: 600;
}

.device-name i,
.device-name svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--text-tertiary);
}

.device-val {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
}

.val-unchecked { color: var(--text-secondary); }
.val-ok { color: var(--accent-green); }

.dot-ok {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--accent-green);
  border-radius: 50%;
}

.tools-grid {
  display: grid;
  min-width: 0;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-card {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 118px;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  color: var(--text-primary);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.tool-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tool-icon {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--soft);
  border-radius: 10px;
}

.tool-icon.is-schedule { color: var(--gold); }
.tool-icon i,
.tool-icon svg { width: 17px; height: 17px; }

.tool-card h4 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tool-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task-list {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 11px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.t-icon {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--soft);
  border-radius: 10px;
}

.t-icon i,
.t-icon svg { width: 17px; height: 17px; }

.t-info { min-width: 0; flex: 1 1 auto; }

.t-info h4 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.t-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 30px;
}

.stat-num {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-num small {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
}

.stat-label {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

@media (max-width: 620px) {
  .hero-content { align-items: stretch; flex-direction: column; }
  .next-class-box { width: 100%; flex-basis: auto; }
  .tools-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
  .tool-card { min-height: 96px; }
}

@media (max-width: 380px) {
  .device-item { align-items: flex-start; flex-direction: column; gap: 5px; }
  .device-val { padding-left: 22px; text-align: left; }
  .stat-row { gap: 14px 20px; }
}
