/**app.wxss — 全局设计变量与通用卡片样式**/ page { /* 同同绿与功能色,与 ttstd_family_care/lib/core/widgets/feature_ui.dart 一致 */ --green: #07c160; --blue: #5b8def; --orange: #f5a623; --purple: #764ba2; --red: #ef4444; --teal: #0ea5e9; --gray: #94a3b8; --ink: #1f2733; --sub: #9aa3b2; --surface: #f5f7fa; --card: #ffffff; --divider: #f1f3f7; --track: #eef1f6; /* 统一留白:页面左右、上下与卡片间距全部使用该值 */ --gutter: 32rpx; /* 贴底 tabBar 高度,与 custom-tab-bar/index.wxss 的 .tab-inner 保持一致 */ --tabbar-h: 104rpx; /* 首卡统一高度:84rpx 图标 + 上下各 24rpx 内边距(与首页「切换设备」卡片一致) */ --hero-card-h: 132rpx; background: #ffffff; color: var(--ink); font-size: 28rpx; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; } /* 页面容器:顶部只留首卡阴影所需空间(不留视觉间隔),左右与下方沿用统一留白, 并为贴底 tabBar + 安全区预留空间 */ .page { padding: 12rpx var(--gutter) var(--gutter); padding-bottom: calc(var(--gutter) + var(--tabbar-h) + env(safe-area-inset-bottom)); box-sizing: border-box; } /* 最后一个块不再保留底部外边距:底部留白只由 .page 的 padding-bottom 决定, 与左右 --gutter 一致(否则 tab 页最后一卡的 margin 会让底部空白翻倍) */ .page > view:last-child { margin-bottom: 0; } /* 卡片:对应 Flutter CardBox(padding 16、圆角 18、轻阴影) 左右留白由 .page 的 padding 统一提供,卡片只负责纵向间距 */ .card { margin: 0 0 var(--gutter); padding: var(--gutter); background: var(--card); border-radius: 36rpx; box-shadow: 0 8rpx 32rpx rgba(20, 30, 60, 0.08); } /* 统一首卡:首页「切换设备」卡 / 管理页卡片 / 我的页头像卡 / 资料编辑页更换头像卡 一律通过该类保持同一高度,内部图标 84rpx、上下内边距 24rpx */ .hero-card { min-height: var(--hero-card-h); box-sizing: border-box; padding: 24rpx var(--gutter); } .hero-card .info-icon { width: 84rpx; height: 84rpx; border-radius: 26rpx; font-size: 38rpx; } .card-head { display: flex; align-items: center; padding-bottom: 24rpx; } .head-icon { width: 44rpx; height: 44rpx; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 14rpx; font-size: 26rpx; } .head-title { margin-left: 14rpx; font-size: 30rpx; font-weight: 700; color: var(--ink); } .head-badge { margin-left: 16rpx; padding: 4rpx 16rpx; border-radius: 40rpx; font-size: 22rpx; font-weight: 600; color: var(--sub); background: var(--surface); } .head-badge.ok { color: var(--green); background: rgba(7, 193, 96, 0.12); } .spacer { flex: 1; } .head-action { display: flex; align-items: center; font-size: 24rpx; font-weight: 600; color: var(--blue); padding: 8rpx 0; } .head-link { font-size: 24rpx; font-weight: 600; color: var(--green); } /* 更多/进入指示:统一使用图片箭头(禁止使用文字「›」), 灰色 /assets/chevron-right.png,蓝色 /assets/chevron-right-blue.png */ .chevron { width: 28rpx; height: 28rpx; margin-left: 8rpx; flex-shrink: 0; } /* 分区标题:左右留白由 .page 提供,纵向与后续卡片保持 --gutter 节奏 */ .section-title { margin: 0 0 8rpx; font-size: 26rpx; font-weight: 700; color: var(--sub); letter-spacing: 1rpx; } /* 全局开关统一尺寸:微信 switch 无尺寸属性,用缩放统一到同一视觉大小并保持右侧对齐 */ .app-switch { flex-shrink: 0; transform: scale(0.8); transform-origin: right center; } /* 开关行:标题占满剩余宽度,开关一律贴最右(与 app-switch 配套使用) */ .switch-row { justify-content: space-between; } .switch-row .list-title { flex: 1; min-width: 0; } /* 首卡新增入口:与首页「切换设备」卡同规格(图标 + 标题/说明 + 右侧箭头) */ .add-card { display: flex; align-items: center; } .add-body { flex: 1; min-width: 0; margin-left: 20rpx; display: flex; flex-direction: column; } .add-title { font-size: 30rpx; font-weight: 700; color: var(--ink); } .add-sub { margin-top: 6rpx; font-size: 22rpx; color: var(--sub); } /* 通用表单 / 详情列表样式,供新增页面共享 */ .form-item { margin-bottom: 24rpx; } .form-label { display: block; margin-bottom: 10rpx; font-size: 24rpx; font-weight: 600; color: var(--sub); } .form-input, .form-textarea { width: 100%; box-sizing: border-box; min-height: 88rpx; padding: 18rpx 24rpx; background: var(--surface); border-radius: 20rpx; font-size: 28rpx; color: var(--ink); } .form-textarea { min-height: 180rpx; } .form-row { display: flex; align-items: center; } .form-row .form-input { flex: 1; margin-right: 16rpx; } .form-btn { flex-shrink: 0; min-width: 180rpx; height: 88rpx; line-height: 88rpx; text-align: center; border-radius: 20rpx; background: rgba(7, 193, 96, 0.12); color: var(--green); font-size: 26rpx; font-weight: 600; } .form-btn.disabled { opacity: 0.55; } .primary-btn { width: 100%; height: 92rpx; line-height: 92rpx; text-align: center; border-radius: 24rpx; background: var(--green); color: #ffffff; font-size: 30rpx; font-weight: 700; } .primary-btn.disabled { opacity: 0.55; } .secondary-btn { width: 100%; height: 88rpx; line-height: 88rpx; text-align: center; border-radius: 22rpx; background: var(--surface); color: var(--ink); font-size: 28rpx; font-weight: 600; } .danger-btn { width: 100%; height: 88rpx; line-height: 88rpx; text-align: center; border-radius: 22rpx; background: rgba(239, 68, 68, 0.1); color: var(--red); font-size: 28rpx; font-weight: 600; } .list-row { display: flex; align-items: center; padding: 24rpx 0; border-bottom: 1rpx solid var(--divider); } .list-row:last-child { border-bottom: none; } .list-icon { width: 72rpx; height: 72rpx; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 22rpx; background: var(--surface); font-size: 32rpx; } .list-body { flex: 1; min-width: 0; margin-left: 20rpx; display: flex; flex-direction: column; } .list-title { font-size: 28rpx; font-weight: 600; color: var(--ink); } .list-sub, .list-meta { margin-top: 6rpx; font-size: 22rpx; color: var(--sub); } .list-meta { margin-top: 4rpx; } .list-action { margin-left: 14rpx; padding: 10rpx 18rpx; border-radius: 28rpx; background: var(--surface); font-size: 22rpx; font-weight: 600; color: var(--green); } .list-action.danger { color: var(--red); } .empty { padding: 64rpx 24rpx; text-align: center; font-size: 26rpx; color: var(--sub); } .legal-title { display: block; margin: 12rpx 0 24rpx; font-size: 34rpx; font-weight: 700; color: var(--ink); } .legal-h { display: block; margin: 28rpx 0 12rpx; font-size: 28rpx; font-weight: 700; color: var(--ink); } .legal-p { display: block; margin: 0 0 14rpx; font-size: 26rpx; line-height: 42rpx; color: #4b5563; } .info-hero { display: flex; align-items: center; } .info-icon { width: 96rpx; height: 96rpx; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 30rpx; background: var(--surface); font-size: 44rpx; } .info-text { margin-left: 24rpx; display: flex; flex-direction: column; } .info-title { font-size: 32rpx; font-weight: 700; color: var(--ink); } .info-sub { margin-top: 6rpx; font-size: 23rpx; color: var(--sub); } /* 页面顶部说明卡:提示色直接作为卡片底色,不再套一层白色卡片。 与 .card 同级使用,放在 .page 最上方。 */ .notice-card { margin: 0 0 var(--gutter); padding: var(--gutter); border-radius: 36rpx; background: rgba(245, 166, 35, 0.12); box-shadow: 0 8rpx 32rpx rgba(20, 30, 60, 0.08); font-size: 24rpx; line-height: 38rpx; color: #a16207; } /* 相册 / 截图:不加卡片背景的两列正方形图片列表,操作按钮浮在图片内 */ .photo-grid { display: flex; flex-wrap: wrap; justify-content: space-between; } .photo-tile { position: relative; width: calc((100% - 16rpx) / 2); aspect-ratio: 1; margin-bottom: 16rpx; border-radius: 24rpx; overflow: hidden; background: var(--track); } .photo-img { display: block; width: 100%; height: 100%; } .photo-actions { position: absolute; top: 12rpx; right: 12rpx; display: flex; } .photo-btn { width: 56rpx; height: 56rpx; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, 0.45); } .photo-btn + .photo-btn { margin-left: 10rpx; } .photo-icon { width: 32rpx; height: 32rpx; }