@import '../../styles/variables.scss'; @import '../../styles/mixins.scss'; .home-page { min-height: 100vh; background: $bg; padding: 20px 16px 100px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); } /* ─── 区域 1:问候 + 日期 + 铃铛 ─── */ .greeting-section { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; } .greeting-left { flex: 1; } .greeting-text { font-size: 24px; font-weight: 700; color: $tx; display: block; margin-bottom: 4px; } .greeting-date { font-size: 14px; color: $tx3; } .greeting-bell { position: relative; width: 40px; height: 40px; @include flex-center; flex-shrink: 0; &:active { opacity: 0.7; } } .greeting-bell-icon { font-size: 22px; } /* ─── 区域 2:今日体征完成度 ─── */ .checkin-card { background: $card; border-radius: $r; box-shadow: $shadow-sm; padding: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; &:active { opacity: 0.9; } } .checkin-left { flex-shrink: 0; position: relative; } .checkin-right { flex: 1; min-width: 0; } .checkin-title { font-size: 16px; font-weight: 600; color: $tx; display: block; margin-bottom: 8px; } .checkin-capsules { display: flex; flex-wrap: wrap; gap: 6px; } .capsule { font-size: 11px; padding: 3px 8px; border-radius: $r-pill; font-weight: 500; &.capsule-done { background: $acc-l; color: $acc; } &.capsule-pending { background: $surface-alt; color: $tx3; } } /* ─── 区域 3:今日体征 2x2 ─── */ .vitals-section { margin-bottom: 12px; } .section-title { @include section-title; } .vitals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .vital-card { background: $card; border-radius: $r; padding: 14px 16px; box-shadow: $shadow-sm; &:active { opacity: 0.7; } } .vital-label { font-size: 13px; color: $tx2; display: block; margin-bottom: 4px; } .vital-value-row { display: flex; align-items: baseline; margin-bottom: 4px; } .vital-value { @include serif-number; font-size: 32px; font-weight: 700; color: $tx; line-height: 1.1; } .vital-unit { font-size: 12px; color: $tx3; margin-left: 2px; } .vital-bottom { display: flex; align-items: center; gap: 0; } .vital-tag { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: $r-pill; display: inline-block; margin-top: 4px; &.tag-ok { background: $acc-l; color: $acc; } &.tag-warn { background: $wrn-l; color: $wrn; } &.tag-empty { background: $surface-alt; color: $tx3; } } /* ─── 区域 4:今日待办 ─── */ .todo-section { margin-bottom: 12px; } .todo-empty { background: $card; border-radius: $r; padding: 24px; text-align: center; box-shadow: $shadow-sm; } .todo-empty-text { font-size: 14px; color: $tx2; } .todo-list { background: $card; border-radius: $r; overflow: hidden; box-shadow: $shadow-sm; } .todo-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid $bd; &:last-child { border-bottom: none; } &:active { background: $bd-l; } } .todo-icon-wrap { width: 36px; height: 36px; border-radius: 10px; background: $pri-l; @include flex-center; flex-shrink: 0; } .todo-icon-char { font-size: 18px; font-weight: bold; color: $pri; } .todo-info { flex: 1; min-width: 0; } .todo-title { font-size: 15px; color: $tx; font-weight: 500; display: block; margin-bottom: 2px; } .todo-sub { font-size: 13px; color: $tx3; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .todo-arrow { font-size: 14px; color: $tx3; flex-shrink: 0; } /* ─── 区域 5:快捷操作 ─── */ .action-section { display: flex; gap: 10px; margin-top: 16px; } .action-btn { flex: 1; height: 52px; border-radius: 14px; font-size: 17px; font-weight: 600; @include flex-center; &:active { opacity: 0.85; } } .action-primary { background: $pri; color: #fff; } .action-outline { background: transparent; color: $pri; border: 2px solid $pri; } .action-btn-text { font-size: 17px; font-weight: 600; }