/* ============================================================
 * Larevi UI — common.css
 * 公共模块：设计变量 / 手机框 / 通用组件（按钮、卡片、导航…）
 * ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  /* 品牌色板（自设计图取色） */
  --brand:        #0C6154;  /* 主青绿：按钮 / 选中态 */
  --brand-deep:   #085046;  /* 按下 */
  --brand-mid:    #1E8060;  /* 亮绿：打卡按钮 / 图标圆底 */
  --navy:         #16395A;  /* 标题深藏青 */
  --text:         #4A6679;  /* 正文灰蓝 */
  --text-soft:    #8299AC;  /* 弱文字 */
  --red:          #D6402F;  /* 警示红 */
  --line:         #E7EDF2;  /* 分隔线 */
  --green-tint:   #E9F4EE;  /* 浅绿底 */
  --blue-tint:    #EBF2FA;  /* 浅蓝底 */
  --warm-tint:    #FBF3EC;  /* 浅暖底(年费卡) */
  --bg-page:      #E6EEF4;  /* 手机外底色 */

  --radius-card: 0px;
  --shadow-card: 0 10px 26px rgba(22, 57, 90, .08);
  --font: 'Quicksand', 'Nunito', 'Segoe UI Rounded', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

html, body { height: 100%; }
body {
  font-family: var(--font);
  background: linear-gradient(165deg, #EBF2F7 0%, #DDE9F1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 手机框 ---------- */
.phone {
  width: 390px;
  height: min(844px, calc(100dvh - 32px));
  min-height: 620px;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 30px 70px rgba(22, 57, 90, .22), 0 0 0 1px rgba(22, 57, 90, .06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (max-width: 430px), (max-height: 700px) {
  body { padding: 0; }
  .phone { width: 100%; height: 100dvh; min-height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* 屏幕滚动区 */
.screen {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
}
.screen::-webkit-scrollbar { display: none; }

/* ---------- 图标 ---------- */
.icon { display: inline-flex; width: 1em; height: 1em; flex: none; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- 通用文字 ---------- */
.h1  { font-size: 26px; font-weight: 700; letter-spacing: -.2px; }
.h2  { font-size: 19px; font-weight: 700; }
.sub { font-size: 15px; color: var(--text); line-height: 1.45; }
.page-pad { padding-left: 20px; padding-right: 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .2px;
  transition: transform .12s ease, background .15s ease;
  user-select: none;
}
.btn:active { transform: scale(.975); background: var(--brand-deep); }
.btn--line {
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 0 0 1.5px #BCD9CF;
}
.btn--line:active { background: var(--green-tint); }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* 圆形图标按钮（如 + 、⋮ 底座） */
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.icon-btn--ghost { background: transparent; color: var(--navy); font-size: 22px; }

/* ---------- 顶栏（返回 / 关闭 行） ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex: none;
}
.topbar .icon-btn { font-size: 20px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  flex: none;
  height: 78px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: 6px;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #93A7B8;
  font-size: 11.5px;
  font-weight: 600;
}
.tab .icon { font-size: 24px; }
.tab .icon:nth-child(2) { display: none; }
.tab.is-active { color: var(--brand); }
.tab.is-active .icon:first-child { display: none; }
.tab.is-active .icon:nth-child(2) { display: inline-flex; }

/* ---------- 头像 ---------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

/* ---------- 徽章圆点（屏4 右侧状态） ---------- */
.dot-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}
