/* H5 版设计系统：大字版适老化 + 只用黑白灰（与小程序端保持一致的设计规范）
   换算基准：小程序 rpx → 这里直接用 px（38rpx ≈ 19px）。 */

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
/* 关键：hidden 属性必须能盖住带 display 的类，否则弹窗遮罩会一直显示 */
[hidden]{display:none !important}
html,body{margin:0;padding:0;background:#F2F2F2;color:#000000;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:19px;line-height:1.7;-webkit-text-size-adjust:100%}
html{-webkit-text-size-adjust:100%}
body{min-height:100vh}
a{color:#000000;text-decoration:underline}
img{max-width:100%}

.app{width:100%;min-height:100vh;padding:16px 16px 96px;max-width:720px;margin:0 auto}
.app.has-tabbar{padding-bottom:110px}

/* 登录页标题 */
.login-title{font-size:27px;font-weight:700;line-height:1.4;text-align:center;margin-top:8px}
.login-sub{font-size:18px;color:#333333;margin-top:10px;line-height:1.7;text-align:center}

/* 首页入口卡与任务卡 */
.quick{padding:16px;cursor:pointer}
.quick-list{display:grid;grid-template-columns:1fr;gap:10px}
.task{padding:16px}


/* 文字层级：纯黑 > 深灰 > 中灰 */
.muted{color:#333333}
.small{font-size:17px}
.tiny{font-size:16px}
.strong{font-weight:700}
.nowrap{white-space:nowrap}
.center{text-align:center}
.right{text-align:right}
.hidden{display:none !important}

/* 间距 */
.mt8{margin-top:4px}.mt16{margin-top:8px}.mt24{margin-top:12px}.mt32{margin-top:16px}
.mb8{margin-bottom:4px}.mb16{margin-bottom:8px}.mb24{margin-bottom:12px}

/* 布局 */
.row{display:flex;align-items:center}
.row-between{display:flex;align-items:center;justify-content:space-between}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.gap16{gap:8px}
.gap24{gap:12px}

/* 卡片与面板 */
.card{background:#FFFFFF;border:2px solid #8A8A8A;border-radius:6px}
.card-pad{padding:16px}
.card + .card{margin-top:10px}
.section-title{font-size:20px;font-weight:700;margin:22px 0 10px;display:flex;align-items:baseline;justify-content:space-between;gap:10px;line-height:1.5}
.section-title .note{font-size:16px;color:#333333;font-weight:400}
.divider{height:1px;background:#D0D0D0;margin:16px 0}
.footer-tip{text-align:center;color:#444444;font-size:16px;padding:20px 0 4px;line-height:1.7}

/* 表单 */
.field{margin-bottom:20px}
.field:last-child{margin-bottom:0}
.field-label{display:block;font-size:19px;font-weight:600;color:#000000;margin-bottom:10px;line-height:1.5}
.field-label .required{color:#000000;margin-left:3px;font-weight:700}
.field-hint{display:block;font-size:17px;color:#333333;margin-top:7px;line-height:1.7}
.field-error{display:block;font-size:17px;color:#000000;font-weight:700;margin-top:7px;line-height:1.6}
.field-invalid .input,.field-invalid .textarea,.field-invalid .select{border-color:#000000;border-width:3px;background:#EAEAEA}
.input,.textarea,.select{width:100%;background:#F2F2F2;border:2px solid #8A8A8A;border-radius:6px;padding:14px 15px;font-size:19px;line-height:1.6;min-height:54px;color:#000000;font-family:inherit}
.input::placeholder,.textarea::placeholder{color:#4A4A4A;opacity:1}
.textarea{min-height:120px;resize:vertical}
.textarea.short{min-height:90px}
.select{appearance:none;background-image:none}
.switch-row{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid #D0D0D0;gap:12px}
.switch-row:last-child{border-bottom:0}
.switch-row .label{font-size:19px;line-height:1.5;color:#000000}
.switch-row .desc{font-size:17px;color:#333333;margin-top:5px;line-height:1.7}
/* 原生开关放大（适老化） */
.switch{width:64px;height:36px;flex:0 0 auto;appearance:none;background:#8A8A8A;border-radius:18px;position:relative;transition:background .15s;border:0}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:30px;height:30px;border-radius:50%;background:#FFFFFF;transition:left .15s}
.switch:checked{background:#000000}
.switch:checked::after{left:31px}

/* 按钮 */
.btn{display:flex;align-items:center;justify-content:center;border-radius:6px;font-weight:700;font-size:19px;padding:0 16px;min-height:56px;border:2px solid transparent;line-height:1.5;background:#FFFFFF;color:#000000;cursor:pointer;user-select:none;text-align:center}
.btn-primary{background:#000000;color:#FFFFFF;border-color:#000000}
.btn-primary.disabled,.btn.disabled{background:#D9D9D9;color:#666666;border-color:#D9D9D9;pointer-events:none}
.btn-ghost{background:#FFFFFF;color:#000000;border-color:#000000}
.btn-danger{background:#FFFFFF;color:#000000;border-color:#000000;font-weight:700}
.btn-plain{background:#FFFFFF;color:#000000;border-color:#8A8A8A}
.btn-mini{min-height:46px;font-size:17px;padding:0 13px}
.btn-block{width:100%}
.btn + .btn{margin-top:10px}
.btn-row{display:flex;gap:10px}
.btn-row .btn{flex:1}
.btn-row .btn + .btn{margin-top:0}
.sticky-bar{position:fixed;left:0;right:0;bottom:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#FFFFFF;border-top:2px solid #8A8A8A;display:flex;gap:10px;z-index:20;max-width:720px;margin:0 auto}

/* 标签与选中态（反白） */
.badge{display:inline-block;font-size:16px;padding:4px 8px;border-radius:4px;background:#FFFFFF;color:#000000;line-height:1.5;border:2px solid #9A9A9A}
.badge.red{background:#000000;color:#FFFFFF;border-color:#000000}
.chip-group{display:flex;flex-wrap:wrap;gap:9px}
.chip{padding:11px 14px;border-radius:6px;background:#FFFFFF;color:#000000;font-size:18px;border:2px solid #8A8A8A;line-height:1.5;cursor:pointer}
.chip.active{background:#000000;color:#FFFFFF;border-color:#000000;font-weight:700}
.segmented{display:flex;background:#F2F2F2;border-radius:6px;padding:4px;gap:4px;border:2px solid #8A8A8A}
.segmented .seg{flex:1;text-align:center;padding:12px 4px;font-size:18px;color:#000000;border-radius:4px;line-height:1.4;cursor:pointer}
.segmented .seg.active{background:#000000;color:#FFFFFF;font-weight:700}

/* 列表 */
.list{border:2px solid #8A8A8A;border-radius:6px;background:#FFFFFF;overflow:hidden}
.list-row{display:flex;align-items:center;padding:16px;border-bottom:1px solid #D0D0D0;gap:10px}
.list-row:last-child{border-bottom:0}
.list-row .row-title{font-weight:700;font-size:19px;line-height:1.55;word-break:break-all}
.list-row .row-sub{font-size:17px;color:#333333;margin-top:5px;line-height:1.65;word-break:break-all}
.chevron{color:#000000;font-size:22px;flex:0 0 auto}
.icon-btn{width:48px;height:48px;line-height:44px;text-align:center;border-radius:6px;background:#FFFFFF;border:2px solid #8A8A8A;color:#000000;font-size:20px;flex:0 0 auto}
.icon-btn.danger{background:#000000;color:#FFFFFF;border-color:#000000}

/* 统计 */
.stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.stat{background:#F2F2F2;border-radius:6px;padding:14px 8px;text-align:center;border:1px solid #D0D0D0}
.stat .value{font-size:30px;font-weight:700;color:#000000;line-height:1.25}
.stat .label{font-size:16px;color:#333333;margin-top:4px;line-height:1.5}
.progress{height:12px;background:#C8C8C8;border-radius:2px;overflow:hidden}
.progress .bar{height:100%;background:#000000}
.bar-list{margin-top:6px}
.bar-item{margin-bottom:15px}
.bar-item .bar-head{display:flex;justify-content:space-between;font-size:17px;margin-bottom:6px;gap:10px;line-height:1.55}
.bar-track{height:14px;background:#C8C8C8;border-radius:2px;overflow:hidden}
.bar-fill{height:100%;background:#000000;min-width:3px}

/* 状态 */
.empty{text-align:center;padding:40px 18px}
.empty .empty-title{font-size:20px;font-weight:700;color:#000000;line-height:1.5}
.empty .empty-desc{display:block;color:#333333;font-size:17px;margin-top:8px;line-height:1.7}
.error{color:#000000;background:#F2F2F2;border-left:5px solid #000000;padding:13px 14px;border-radius:4px;font-size:17px;line-height:1.7;font-weight:700}
.error-box{margin-bottom:12px}
.notice{color:#000000;background:#F2F2F2;border-left:5px solid #000000;padding:13px 14px;border-radius:4px;font-size:17px;line-height:1.7;font-weight:700}
.notice-box{margin-bottom:12px}
.skeleton{background:#E6E6E6;border-radius:3px;height:18px;margin-bottom:10px}
.loading-line{text-align:center;color:#333333;font-size:17px;padding:14px 0}

/* 图片与二维码 */
.qr-image{width:240px;height:240px;margin:14px auto 0;display:block;border-radius:6px;background:#FFFFFF;border:2px solid #8A8A8A}
.thumb{width:72px;height:72px;object-fit:cover;border-radius:4px;border:2px solid #8A8A8A;background:#F2F2F2}
.file-name{word-break:break-all;flex:1;min-width:0}

/* 底部 tab */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:100;display:flex;gap:8px;background:#FFFFFF;border-top:2px solid #8A8A8A;padding:5px 8px calc(5px + env(safe-area-inset-bottom));max-width:720px;margin:0 auto}
.tab-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px 0 7px;min-height:63px;border-radius:7px;background:#FFFFFF;cursor:pointer}
.tab-item.active{background:#000000}
.tab-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center}
.tab-text{font-size:20px;line-height:1.4;margin-top:5px;color:#333333}
.tab-item.active .tab-text{color:#FFFFFF;font-weight:700}
.grid-icon{width:30px;height:30px;display:flex;flex-wrap:wrap;align-content:space-between;justify-content:space-between}
.grid-icon i{width:14px;height:14px;border-radius:3px;background:#6E6E6E;display:block}
.tab-item.active .grid-icon i{background:#FFFFFF}
.person-icon{width:30px;height:30px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}
.person-icon .head{width:14px;height:14px;border-radius:50%;background:#6E6E6E}
.person-icon .body{width:28px;height:13px;margin-top:2px;border-radius:14px 14px 0 0;background:#6E6E6E}
.tab-item.active .person-icon .head,.tab-item.active .person-icon .body{background:#FFFFFF}

/* 顶部栏 */
.topbar{padding:6px 0 15px;border-bottom:2px solid #9A9A9A;margin-bottom:6px}
.topbar-title{font-size:26px;font-weight:700;line-height:1.4}
.topbar-sub{font-size:18px;color:#333333;margin-top:7px;line-height:1.7}

/* 提示与弹窗 */
.toast{position:fixed;left:50%;bottom:15%;transform:translateX(-50%);background:#000000;color:#FFFFFF;font-size:18px;padding:12px 18px;border-radius:6px;z-index:200;max-width:80%;text-align:center;line-height:1.5}
.modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:300;display:flex;align-items:flex-end;justify-content:center}
.modal{width:100%;max-width:720px;background:#FFFFFF;border-radius:12px 12px 0 0;border-top:4px solid #000000;padding:16px 16px calc(20px + env(safe-area-inset-bottom));max-height:88vh;overflow-y:auto}
.modal-title{font-size:20px;font-weight:700;margin-bottom:10px}
.modal-body{font-size:18px;line-height:1.7;margin-bottom:14px}
.modal-actions{display:flex;gap:10px}
.modal-actions .btn{flex:1}

/* ============ 自适应：手机 / 平板 / 电脑 ============ */

/* 手机（默认）：单列、底部固定栏铺满 */
@media (max-width:599px){
  .app{padding:14px 14px 96px}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .modal{border-radius:12px 12px 0 0}
}

/* 平板：内容居中变宽一点，统计两列 */
@media (min-width:600px){
  .app{max-width:680px;padding:20px 20px 100px}
  .tabbar,.sticky-bar{max-width:680px}
  .modal{max-width:680px;border-radius:12px;margin-bottom:24px}
  .modal-mask{align-items:center}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
}

/* 电脑：更宽的多列布局，统计四列，入口两列 */
@media (min-width:960px){
  html,body{font-size:19px}
  .app{max-width:860px;padding:24px 28px 110px}
  .tabbar,.sticky-bar{max-width:860px}
  .modal{max-width:640px}
  .quick-list{grid-template-columns:1fr 1fr;gap:14px}
  .stat-grid{grid-template-columns:repeat(4,1fr)}
  .card-pad{padding:20px}
  .list-row{padding:18px 20px}
  /* 小按钮不要拉满整行（桌面端观感） */
  .btn-mini{display:inline-flex;width:auto;padding:0 18px}
  .btn-row .btn-mini{flex:0 0 auto}
  /* 电脑上鼠标悬停给个明确反馈（仍是黑白灰） */
  .btn:hover{background:#F2F2F2}
  .btn-primary:hover{background:#333333}
  .list-row:hover{background:#FAFAFA}
  .quick:hover,.task:hover{background:#FAFAFA}
  .chip:hover{border-color:#000000}
  .tab-item:hover{background:#F2F2F2}
  .tab-item.active:hover{background:#000000}
}

/* 超宽屏：不再继续变宽，保持阅读舒适 */
@media (min-width:1440px){
  .app{max-width:920px}
  .tabbar,.sticky-bar{max-width:920px}
}

/* 横屏手机：压缩纵向留白 */
@media (max-height:460px) and (orientation:landscape){
  .app{padding-top:10px}
  .tabbar .tab-item{min-height:52px}
  .tab-icon{width:26px;height:26px}
}

