/* ui.css — 自 components.css 连续拆分（原 3230-3615 行）。保持级联顺序，勿随意重排各文件引入次序 */
/* 简化 tab：图标 + 短标签 */
.nav-ico {
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav-ico svg {
  width: 16px;
  height: 16px;
}

/* 设置面板 */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.settings-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  max-width: 90vw;
  height: 100vh;
  background: var(--color-background);
  border-left: 1px solid var(--color-border);
  z-index: 999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.settings-panel.open {
  right: 0;
}

.settings-body {
  padding: var(--spacing-md) var(--spacing-lg);
  overflow-y: auto;
  flex: 1;
}

.settings-section {
  margin-bottom: var(--spacing-lg);
}

.settings-section .section-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: var(--spacing-sm);
}

.settings-row:hover {
  border-color: var(--color-primary);
  background: rgba(94, 106, 210, 0.05);
}

.settings-row.danger {
  color: var(--status-red);
}

.settings-row.danger:hover {
  border-color: var(--status-red);
  background: rgba(239, 68, 68, 0.05);
}

.row-value {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.settings-tip {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin-top: var(--spacing-md);
}

/* 移动端：设置按钮常驻，隐藏文字标签只留图标 */
@media (max-width: 768px) {
  .nav-link {
    padding: var(--spacing-sm) var(--spacing-sm);
    font-size: var(--font-size-xs);
  }
}

/* ===== 移动端底部导航 + 首页二级 tab + 我的页（方案 A+B） ===== */
.bottom-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.bottom-tab .tab-ico {
  line-height: 1;
}

.bottom-tab .tab-ico svg {
  width: 20px;
  height: 20px;
}

.bottom-tab.active {
  color: var(--color-primary);
}

.home-subnav {
  display: none;
  gap: var(--spacing-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--spacing-sm) 0 var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border-subtle);
}

.home-subnav::-webkit-scrollbar {
  display: none;
}

.sub-tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-1);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sub-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 我的页 */
.profile-view {
  display: none;
  max-width: 720px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7C8CE8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
}

.profile-auth-btn {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.profile-auth-btn:hover {
  background: var(--color-primary-hover);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.profile-stat {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.profile-stat .stat-num {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

.profile-stat .stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.profile-section {
  margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
  .bottom-tabbar {
    display: flex;
  }
}

.logo {
  display: none;
}

.home-cards {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  max-width: 560px;
  margin: 0 auto;
}

.home-view.show-cards .home-cards {
  display: grid;
}

.home-card {
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-2xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2, #fff);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.home-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.home-card:active {
  transform: scale(.98);
}

.card-ico {
  line-height: 1;
}

.card-ico svg {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.home-view.show-cards .mode-content {
  display: none;
}

.home-hero {
  display: none;
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.home-view.show-cards .home-hero {
  display: block;
}

.home-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.home-welcome {
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xs);
}

.home-guide {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-lg);
}

.process-gate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  z-index: 900;
  padding: var(--spacing-xl);
}

.process-gate-box {
  max-width: 360px;
  text-align: center;
}

.process-gate-box h3 {
  margin-bottom: var(--spacing-sm);
}

.process-gate-box p {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

[data-theme="dark"] .process-gate {
  background: rgba(15, 16, 17, 0.94);
}
