/* guzheng-h5/assets/css/shared.css — 全局样式（平移自小程序 app.wxss，rpx→rem） */
:root {
  --primary: #8B4513;
  --primary-2: #A0522D;
  --bg: #f5f0e8;
  --card: #fff;
  --text: #333;
  --text-2: #999;
  --green: #2E7D32;
  --blue: #1565C0;
  --orange: #E65100;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --safe-bottom: env(safe-area-inset-bottom);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* 通用容器 */
.container { padding: 12px; box-sizing: border-box; }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

/* 主按钮 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 15px;
  text-align: center;
  display: inline-block;
  cursor: pointer;
}
.btn-primary[disabled] { background: #ccc; color: #999; cursor: not-allowed; }

/* 次按钮 */
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 24px;
  padding: 9px 23px;
  font-size: 15px;
  text-align: center;
  display: inline-block;
  cursor: pointer;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 6px;
}
.tag-active { background: var(--primary); color: #fff; }
.tag-pending { background: #FFF3E0; color: var(--orange); }
.tag-done { background: #E8F5E9; color: var(--green); }

/* 标题 */
.section-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 10px; }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 0; color: var(--text-2); font-size: 14px; }

/* 加载中 */
.loading { text-align: center; padding: 20px; color: var(--text-2); font-size: 13px; }

/* 顶部导航条（小程序原生导航的 H5 替代） */
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
}
.appbar__title { font-size: 17px; font-weight: 600; flex: 1; }
.appbar__back {
  width: 32px; height: 32px; border-radius: 50%;
  background: #f5f0e8; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--primary); cursor: pointer;
}
.appbar__back:active { background: #e8e0d4; }

/* 底部 Tab（仅首页/课程/老师/我的 用） */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  padding-bottom: var(--safe-bottom);
}
.tabbar__item {
  flex: 1; text-align: center; padding: 6px 0 6px;
  color: var(--text-2); font-size: 11px; cursor: pointer;
}
.tabbar__item--active { color: var(--primary); }
.tabbar__icon { font-size: 20px; line-height: 1.2; }

/* 列表项通用 */
.list-item {
  background: #fff; border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: center;
}
.list-item__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; flex-shrink: 0;
}
.list-item__main { flex: 1; min-width: 0; }
.list-item__title { font-size: 15px; font-weight: 600; }
.list-item__sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* 表单 */
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd;
  border-radius: 8px; font-size: 14px; background: #fff; outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary);
}
