/* ═══════════════════════════════════════════
   小程序布局 — 手机壳 + 底部Tab
   学生端 & 教师小程序端
   ═══════════════════════════════════════════ */

/* ─── Body Centering ─── */
body.mobile-page {
  display: flex;
  justify-content: center;
  padding: 24px 0;
  min-height: 100vh;
}

/* ─── Phone Shell ─── */
.phone {
  width: var(--mobile-width);
  min-height: var(--mobile-height);
  background: var(--bg-page);
  border-radius: var(--radius-phone);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ─── Status Bar (iOS) ─── */
.status-bar {
  height: 44px;
  background: var(--bg-card);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 12px;
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
}

/* ─── Navigation Bar ─── */
.mobile-nav {
  background: var(--bg-card);
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-xl);
  font-weight: var(--fw-semibold);
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}
.mobile-nav .nav-back {
  font-size: 20px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
}
/* SVG back arrow */
.mobile-nav .nav-back svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 2;
}
.mobile-nav .nav-title {
  flex: 1;
}
.mobile-nav .nav-action {
  font-size: var(--font-md);
  color: var(--brand-primary);
  cursor: pointer;
  font-weight: var(--fw-medium);
}

/* ─── Scrollable Content ─── */
.mobile-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--space-xl);
}

/* ─── Bottom Tab Bar ─── */
.tab-bar {
  display: flex;
  background: var(--bg-card);
  border-top: 1px solid var(--divider);
  padding: 6px 0 24px; /* 24px for iPhone home indicator */
  flex-shrink: 0;
}
.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
}
.tab-bar-item.active { color: var(--brand-primary); }
.tab-bar-item .tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-bar-item .tab-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.tab-bar-item .tab-label { font-size: 10px; }

/* ─── Bottom Action Bar (Non-Tab Page) ─── */
.mobile-footer {
  background: var(--bg-card);
  padding: 12px 16px 28px;
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ─── Login Page Brand Header ─── */
.brand-header {
  padding: 60px 0 30px;
  text-align: center;
}
.brand-header .brand-logo {
  width: 64px;
  height: 64px;
  background: var(--brand-primary);
  border-radius: var(--radius-xl);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-header .brand-logo svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}
.brand-header .brand-name {
  font-size: var(--font-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}
.brand-header .brand-sub {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-top: 6px;
}

/* ─── Dashboard Card (大卡片入口) ─── */
.dash-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 0 var(--mobile-padding);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: box-shadow var(--transition-base);
}
.dash-card:hover { box-shadow: var(--shadow-md); }
.dash-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}
.dash-card-info { flex: 1; }
.dash-card-info .dash-card-title { font-size: var(--font-md); font-weight: var(--fw-semibold); }
.dash-card-info .dash-card-desc { font-size: var(--font-sm); color: var(--text-muted); margin-top: 2px; }
.dash-card-arrow { color: var(--text-muted); font-size: 18px; }

/* ─── Alert Card (任务告警) ─── */
.alert-card {
  background: linear-gradient(135deg, var(--danger-bg), #fff0f0);
  border: 1px solid #ffcdd2;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: var(--mobile-padding);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.alert-card-icon {
  width: 36px;
  height: 36px;
  background: var(--danger);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.alert-card-text { flex: 1; }
.alert-card-text .alert-title { font-size: var(--font-md); font-weight: var(--fw-semibold); color: var(--danger-text); }
.alert-card-text .alert-desc { font-size: var(--font-sm); color: var(--text-secondary); margin-top: 2px; }
