/* ================== 移动端优先布局 (mobile-first, antd-mobile) ================== */ /* 主题变量: 与 antd-mobile 的 --adm-* 保持一致, 便于组件统一 */ :root { --color-bg: #f5f5f5; --color-card: #ffffff; --color-text: #333333; --color-muted: #666666; --color-border: #eeeeee; --color-primary: #1677ff; --color-accent: #1677ff; --color-danger: #ff3141; --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px); --tabbar-h: 72px; } * { box-sizing: border-box; margin: 0; padding: 0; } html, body, #root { height: 100%; background: var(--color-bg); color: var(--color-text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif; font-size: 14px; overscroll-behavior-y: contain; } a { color: inherit; text-decoration: none; cursor: pointer; } button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; } input, textarea, select { font: inherit; } /* 应用主框架: 全屏 flex 列布局, 不再 max-width 居中 (解决"左右不贴边") */ .app-root { display: flex; flex-direction: column; height: 100vh; height: 100dvh; width: 100%; max-width: 100%; background: var(--color-bg); position: relative; padding-left: var(--safe-left); padding-right: var(--safe-right); } .app-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); -webkit-overflow-scrolling: touch; } /* 页面切换动画: pathname 变化时整页淡入 + 轻微上移 (由 MobileShell 控制 class) */ .page-transition.active { animation: page-in 0.28s ease; } @keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } } /* 带有 antd-mobile NavBar 的页面 (Home/Monitor/Macro/Article) */ /* height:100% 让页面占满 app-main 高度, 内部 tab-content 独立滚动, 头部 NavBar 与分类 tab 固定在顶部不上滚 */ .page-with-navbar { display: flex; flex-direction: column; height: 100%; min-height: 0; } .page-with-navbar .adm-error-block { flex: 1; } /* 底部 antd-mobile TabBar 定位 */ .app-tabbar.adm-tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--color-border); } .app-tabbar.adm-tab-bar .adm-tab-bar-wrap { min-height: var(--tabbar-h); } .app-tabbar.adm-tab-bar .adm-tab-bar-item { /* 调高 padding, 把文字在 TabBar 中向上推, 避免下半部被裁切 */ padding: 8px 8px 4px; } .tab-icon { display: inline-flex; } /* 宏观页 SwipeTabs */ .swipe-tabs-wrap { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; } .tab-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; } .tab-pane[hidden] { display: none; } /* ================== 通用组件辅助类 ================== */ /* 文章详情 */ .article-page { display: flex; flex-direction: column; min-height: 100%; } .article-page .adm-nav-bar { background: #fff; border-bottom: 1px solid var(--color-border); } .article-detail { background: #fff; padding: 18px 16px 24px; } .article-detail h1 { font-size: 20px; line-height: 1.35; margin-bottom: 8px; } .article-detail .meta { font-size: 12px; color: var(--color-muted); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); } .article-content { font-size: 15px; line-height: 1.75; color: #333; } .article-content h1, .article-content h2, .article-content h3 { margin: 1.2em 0 0.6em; line-height: 1.3; } .article-content p { margin-bottom: 0.9em; } .article-content ul, .article-content ol { margin: 0 0 1em 1.4em; } .article-content img { max-width: 100%; border-radius: 6px; margin: 0.6em 0; } /* 文章列表项 (用于 ArticlesView) */ .articles-list .adm-list-item-description { color: var(--color-muted); } .list-item-meta { font-size: 12px; color: var(--color-muted); margin-bottom: 4px; } .list-item-excerpt { font-size: 13px; color: var(--color-muted); line-height: 1.5; } /* ================== 列表视图 (DataView/StrategyView 列表态) ================== */ .list-page { padding: 0 0 16px; } .list-page .page-title { padding: 14px 16px 4px; } .list-page .adm-list { margin: 0 12px; background: transparent; } .list-page .adm-list .adm-list-item { background: #fff; border-radius: 10px; margin-bottom: 10px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); } .list-page .adm-list .adm-list-item:last-child { margin-bottom: 0; } .list-page .adm-list-item-title { font-size: 15px; font-weight: 600; color: var(--color-text); } .list-page .adm-list-item-description { color: var(--color-muted); margin-top: 4px; } .list-page .row-meta { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; } .list-page .row-change { font-size: 12px; color: var(--color-muted); } /* 趋势徽标: 上升(绿) / 下降(红) / 持平(灰) / 震荡(橙) */ .trend-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 500; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.04); white-space: nowrap; } .trend-badge .trend-icon { font-weight: 700; } .trend-up { color: #00b578; background: rgba(0,181,120,.1); } .trend-down { color: #ff3141; background: rgba(255,49,65,.1); } .trend-flat { color: #666; background: rgba(0,0,0,.05); } .trend-volatile { color: #ff8f1f; background: rgba(255,143,31,.12); } /* 详情页 (DataView/StrategyView 详情态) */ .detail-page { display: flex; flex-direction: column; min-height: 100%; } .detail-page .adm-nav-bar { background: #fff; border-bottom: 1px solid var(--color-border); } .detail-card.adm-card { margin: 12px; border-radius: 10px; } .detail-card.adm-card .adm-card-body { padding: 12px; } .detail-meta { font-size: 12px; color: var(--color-muted); margin-bottom: 8px; } /* 图表 / 表格 */ .chart-wrap { background: #fafafa; border-radius: 8px; padding: 8px; margin: 8px 0 16px; } .data-table { width: 100%; border-collapse: collapse; font-size: 13px; } .data-table th, .data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--color-border); } .data-table th { background: #f8f8f8; font-weight: 600; } .data-table-wrap { position: relative; } .data-table-wrap.scroll { max-height: 300px; overflow: auto; } .table-more { text-align: center; padding: 10px 0 2px; font-size: 13px; color: var(--color-primary); cursor: pointer; } /* 页面标题 */ .page-title { font-size: 20px; font-weight: 700; padding: 14px 16px 4px; } /* 通用状态 */ .loading, .page-loading { padding: 40px; text-align: center; color: var(--color-muted); } .empty { padding: 40px; text-align: center; color: var(--color-muted); font-size: 13px; } .error-banner { background: #fef2f2; color: var(--color-danger); padding: 10px 14px; font-size: 13px; border-radius: 6px; margin: 12px; } /* ================== 登录页 (独立全屏, 未走 MobileShell) ================== */ .login-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(180deg, #1f2937 0%, #1f2937 38%, #f5f5f5 38%); } .login-form { width: 100%; max-width: 380px; } .login-brand { color: #fff; font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 4px; } .login-subtitle { color: rgba(255,255,255,.7); text-align: center; margin-bottom: 16px; font-size: 13px; } .login-card.adm-card { border-radius: 14px; } .login-card.adm-card .adm-card-body { padding: 22px 18px; } .login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; } .login-field label { font-size: 12px; color: var(--color-muted); } .login-field .adm-input { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; } .login-field .adm-input:focus-within { border-color: var(--color-primary); } .login-options { margin-bottom: 18px; } .login-hint { text-align: center; font-size: 12px; color: var(--color-muted); margin-top: 14px; line-height: 1.6; } .login-error { background: #fef2f2; color: var(--color-danger); padding: 10px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; } /* ================== 我的页 ================== */ .me-page { display: flex; flex-direction: column; min-height: 100%; background: var(--color-bg); } .me-navbar.adm-nav-bar { background: #fff; border-bottom: 1px solid var(--color-border); } .me-profile { background: linear-gradient(135deg, #1677ff, #4096ff); color: #fff; padding: 24px 16px 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; } .me-avatar { background: rgba(255,255,255,.2); color: #fff; font-size: 28px; } .me-name { font-size: 18px; font-weight: 600; } .me-email { font-size: 13px; opacity: .85; } .me-list { margin-top: 12px; } .me-list .adm-list-item { padding-left: 16px; padding-right: 16px; } .me-logout { color: var(--color-danger); } .me-version { text-align: center; font-size: 12px; color: var(--color-muted); padding: 18px 0 8px; } /* 首页模块: 报警 + 新闻 */ .home-content { padding: 0 0 16px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; } .home-content .adm-tabs-content { --content-padding: 0; } .home-content .tab-label { display: inline-flex; align-items: center; gap: 4px; } .home-section { padding: 0 12px 16px; } .section-title { font-size: 16px; font-weight: 700; padding: 14px 4px 8px; color: var(--color-text); } .section-list { display: flex; flex-direction: column; gap: 8px; } .alert-card.adm-card { border-radius: 10px; margin: 0; } .alert-card .adm-card-body { padding: 10px 12px; } .alert-title { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; } .alert-name { color: var(--color-danger); } .alert-period { color: var(--color-muted); font-weight: 400; } .alert-diff { font-size: 12px; color: var(--color-text); margin-top: 4px; } .alert-ratio { color: var(--color-danger); font-weight: 600; margin-left: 6px; } .alert-time { font-size: 11px; color: var(--color-muted); margin-top: 4px; } .news-card.adm-card { border-radius: 10px; margin: 0; } .news-card .adm-card-body { padding: 10px 12px; } .news-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--color-text); } .news-summary { font-size: 12px; color: var(--color-muted); margin-top: 4px; line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; } .news-meta { display: flex; gap: 10px; font-size: 11px; color: var(--color-muted); margin-top: 6px; } .news-rank { color: var(--color-primary); font-weight: 600; } .news-card:active .adm-card-body { background: #f5f5f5; } /* 新闻详情页 */ .news-detail { background: #fff; padding: 18px 16px 24px; } .news-detail h1 { font-size: 20px; line-height: 1.35; margin-bottom: 8px; } .news-detail .meta { font-size: 12px; color: var(--color-muted); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .news-origin { color: var(--color-primary); margin-left: auto; } .news-content { font-size: 15px; line-height: 1.75; color: #333; white-space: pre-wrap; word-break: break-word; } .news-content-empty { margin-top: 12px; font-size: 12px; color: var(--color-muted); } /* ================== 监控页 ================== */ .monitor-content { padding: 0 0 16px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; } .monitor-content .adm-tabs-content { --content-padding: 0; } .monitor-tip { font-size: 11px; color: var(--color-muted); padding: 8px 14px 2px; } .monitor-loading { padding: 40px 0; text-align: center; color: var(--color-muted); font-size: 13px; } .monitor-empty { padding: 48px 0; } .retry-link { color: var(--color-primary); margin-left: 8px; } .server-list { padding: 0 12px; } .server-card.adm-card { border-radius: 10px; margin: 0; } .server-card:active .adm-card-body { background: #f5f5f5; } .server-card .adm-card-body { padding: 12px; } .server-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .server-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--color-text); } .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .status-dot.on { background: #00b578; box-shadow: 0 0 0 3px rgba(0, 181, 120, 0.15); } .status-dot.off { background: #ff3141; box-shadow: 0 0 0 3px rgba(255, 49, 65, 0.15); } .server-update { font-size: 11px; color: var(--color-muted); } .server-metrics { display: flex; flex-direction: column; gap: 6px; } .metric { display: grid; grid-template-columns: 34px 1fr 96px; align-items: center; gap: 8px; } .metric-label { font-size: 12px; color: var(--color-muted); } .metric-value { font-size: 11px; color: var(--color-text); text-align: right; font-variant-numeric: tabular-nums; } .meter { height: 6px; border-radius: 3px; background: #f0f0f0; overflow: hidden; } .meter-fill { height: 100%; border-radius: 3px; background: var(--color-primary); transition: width 0.4s ease; } .meter-fill.warn { background: #ff3141; } .server-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--color-border); font-size: 11px; color: var(--color-muted); } /* 节点详情图表 */ .server-detail { padding: 10px 12px 20px; display: flex; flex-direction: column; gap: 10px; } .chart-card.adm-card { border-radius: 10px; margin: 0; } .chart-card .adm-card-body { padding: 12px 8px 8px; } .chart-title { font-size: 13px; font-weight: 600; color: var(--color-text); padding: 0 4px 6px; } .scroll-sentinel { text-align: center; padding: 14px 0 4px; color: var(--color-muted); font-size: 12px; } /* ===== 环境监控 (米家温湿度) ===== */ .env-view { padding-bottom: 16px; } .env-auth-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 10px 14px; border-radius: 8px; background: #fff7e6; color: #ad6800; font-size: 13px; } .env-auth-btn { color: var(--color-primary); font-weight: 600; cursor: pointer; flex-shrink: 0; } .env-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .env-homes { padding: 4px 12px 0; } .env-homes .adm-collapse-panel-header { font-size: 14px; font-weight: 600; } .env-home-title { display: inline-flex; align-items: center; gap: 8px; } .env-home-count { font-size: 11px; font-weight: 400; color: var(--color-muted); } .env-devices { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; } .env-device-card.adm-card { border-radius: 10px; margin: 0; } .env-device-card .adm-card-body { padding: 12px; } .env-device-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; } .env-device-title { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; } .env-device-name { font-weight: 600; font-size: 15px; color: var(--color-text); } .env-device-batt { font-size: 11px; color: var(--color-muted); border: 1px solid var(--color-border); padding: 1px 6px; border-radius: 10px; } .env-device-edit { font-size: 11px; color: var(--color-primary); cursor: pointer; } .env-missing-badge { flex-shrink: 0; font-size: 11px; color: #fff; background: #c0392b; border-radius: 10px; padding: 2px 8px; } .env-device-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 10px; font-size: 13px; color: var(--color-text); } .env-device-meta em { font-style: normal; color: var(--color-muted); font-size: 11px; } .env-muted { color: var(--color-muted); font-size: 12px; } .env-range { margin: 0 0 6px; } .env-chart-loading, .env-chart-empty { padding: 30px 0; text-align: center; color: var(--color-muted); font-size: 12px; } .env-chart-err { color: var(--color-danger); font-size: 12px; padding: 10px; } .env-qr { text-align: center; } .env-qr-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; } .env-qr-img { width: 200px; height: 200px; border-radius: 8px; border: 1px solid var(--color-border); } .env-qr-wait { height: 200px; line-height: 200px; color: var(--color-muted); font-size: 13px; } .env-qr-err { color: var(--color-danger); font-size: 12px; margin-top: 8px; } .env-qr-tip { font-size: 12px; color: var(--color-muted); margin: 10px 0 14px; } .env-qr-actions { display: flex; justify-content: center; gap: 12px; } /* ================== OTA 升级区 (MePage) ================== */ .me-ota-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .me-ota-actions .adm-button { --adm-button-border-radius: 6px; min-width: 84px; } .me-ota-progress { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; } .me-ota-progress-text { font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; } .me-ota-error { color: var(--color-danger); font-size: 12px; word-break: break-word; } /* ================== 油价页 (Macro/Oil) ================== */ .oil-page { padding: 0 0 16px; display: flex; flex-direction: column; gap: 12px; } .oil-card { margin: 0 12px; border-radius: 10px; } .oil-card .adm-card-body { padding: 12px; } .oil-card-title { font-size: 15px; font-weight: 600; color: var(--color-text); margin-bottom: 8px; } .oil-card-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .oil-card-title-row .oil-card-title { margin-bottom: 0; } .oil-fuel-picker { font-size: 13px; color: var(--color-primary); text-decoration: none; } .oil-crude { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; } .oil-crude-item { background: #f7f8fa; border-radius: 8px; padding: 10px; text-align: center; } .oil-crude-label { font-size: 12px; color: var(--color-muted); } .oil-crude-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; } .oil-crude-value.up { color: #ff3141; } .oil-crude-value.down { color: #00b578; } .oil-crude-unit { font-size: 12px; font-weight: 400; color: var(--color-muted); margin-left: 2px; } .oil-crude-change { font-size: 12px; font-variant-numeric: tabular-nums; } .oil-crude-change.up { color: #ff3141; } .oil-crude-change.down { color: #00b578; } .oil-prediction { border-top: 1px solid var(--color-border); padding-top: 8px; } .oil-pred-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; } .oil-pred-label { color: var(--color-muted); min-width: 76px; } .oil-pred-value { color: var(--color-text); flex: 1; font-weight: 600; } .oil-pred-sub { color: var(--color-muted); font-weight: 400; } .oil-pred-tag { font-size: 11px; background: #f0f5ff; color: var(--color-primary); padding: 2px 6px; border-radius: 4px; } .oil-pred-direction { font-weight: 600; font-size: 14px; } .oil-pred-direction.上涨 { color: #ff3141; } .oil-pred-direction.下跌 { color: #00b578; } .oil-pred-direction.搁浅 { color: #888; } .oil-pred-analysis { margin-top: 6px; font-size: 12px; color: var(--color-muted); line-height: 1.55; background: #f7f8fa; padding: 8px 10px; border-radius: 6px; } .oil-chart { margin: 0 -4px; } .oil-chart-tip { font-size: 11px; color: var(--color-muted); text-align: center; margin-top: 4px; } .oil-year-tabs { display: flex; gap: 4px; } .oil-year-tab { border: 1px solid var(--color-border); background: #fff; color: var(--color-text); padding: 4px 10px; border-radius: 14px; font-size: 12px; cursor: pointer; } .oil-year-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); } .oil-cache-hint { font-size: 11px; color: #00b578; background: #e6f7ee; padding: 4px 8px; border-radius: 4px; margin-bottom: 8px; } .oil-schedule-meta { font-size: 13px; color: var(--color-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .oil-schedule-list { display: flex; flex-direction: column; gap: 10px; } .oil-month-label { font-size: 12px; font-weight: 600; color: var(--color-text); margin-bottom: 4px; } .oil-month-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; } .oil-day { border-radius: 6px; padding: 6px 4px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; } .oil-day-date { font-weight: 600; font-size: 13px; } .oil-day-status { color: var(--color-muted); margin-top: 2px; } .oil-day.past { background: #f5f5f5; color: #999; } .oil-day.future { background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%); color: #fff; } .oil-day.future .oil-day-status { color: rgba(255,255,255,.85); } /* ================== 打卡 / 日历 / 清单 (V0.2) ================== */ .checkin-content { padding: 0 0 16px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; } .checkin-content .adm-tabs-content { --content-padding: 0; } /* ----- 环形进度 ----- */ .ring-wrap { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; } .ring-wrap.clickable { cursor: pointer; } .ring-wrap.disabled { opacity: .5; } .ring-svg { display: block; } .ring-bar { transition: stroke-dashoffset 0.45s cubic-bezier(0.4, 0, 0.2, 1); } .ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; } .ring-num em { font-style: normal; font-size: 10px; color: var(--color-muted); font-weight: 400; } .ring-check { animation: ring-check-in 0.32s ease; } @keyframes ring-check-in { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } } .ring-over { position: absolute; right: -2px; bottom: -2px; font-size: 10px; font-weight: 600; color: #fff; background: #ff8f1f; border-radius: 8px; padding: 0 4px; line-height: 14px; } /* ----- 完成特效 ----- */ .celebrate { position: absolute; inset: 0; pointer-events: none; z-index: 6; } .celebrate i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; animation: burst-fly 0.7s ease-out forwards; } @keyframes burst-fly { 0% { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d)) scale(0.3); opacity: 0; } } .celebrate-ring { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 2px solid var(--color-primary); animation: ring-pulse 0.7s ease-out forwards; } @keyframes ring-pulse { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } } /* ----- 打卡视图 ----- */ .habit-view { padding: 0 12px 20px; } .habit-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding: 10px 2px; } .habit-date { font-size: 18px; font-weight: 700; color: var(--color-text); } .habit-summary { font-size: 12px; color: var(--color-muted); margin-top: 2px; } .habit-summary strong { color: var(--color-primary); font-size: 14px; } .habit-badge { margin-left: 6px; font-size: 11px; color: #ad6800; background: #fff7e6; border-radius: 4px; padding: 1px 5px; } .habit-head-right { display: flex; gap: 6px; flex-shrink: 0; } .checkin-empty { padding: 48px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; } .habit-list { display: flex; flex-direction: column; gap: 10px; } .habit-card { position: relative; background: #fff; border-radius: 10px; padding: 12px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ring main actions" "foot foot foot"; gap: 8px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: background 0.2s ease; } .habit-card:active { background: #fafafa; } .habit-card.done { background: #f7fbf8; } .habit-card .ring-wrap { grid-area: ring; } .habit-main { grid-area: main; min-width: 0; } .habit-actions { grid-area: actions; display: flex; align-items: center; } .habit-foot { grid-area: foot; display: flex; gap: 14px; padding-top: 8px; border-top: 1px dashed var(--color-border); } .habit-name { font-size: 15px; font-weight: 600; color: var(--color-text); word-break: break-all; } .habit-meta { font-size: 12px; color: var(--color-muted); margin-top: 3px; } .habit-streak { margin-left: 8px; color: #ff8f1f; background: rgba(255,143,31,.12); border-radius: 4px; padding: 1px 6px; } .habit-note { font-size: 11px; color: var(--color-muted); margin-top: 3px; } .habit-range { font-size: 11px; color: var(--color-muted); margin-top: 3px; font-variant-numeric: tabular-nums; } .habit-over { margin-left: 8px; color: #ff8f1f; } .habit-link { font-size: 12px; color: var(--color-primary); cursor: pointer; } .habit-link.danger { color: var(--color-danger); } /* ----- 日历视图 ----- */ .calendar-view { padding: 0 12px 20px; } .cal-month-bar { display: flex; align-items: center; gap: 10px; padding: 8px 2px; } .cal-month { font-size: 16px; font-weight: 700; color: var(--color-text); } .cal-arrow { font-size: 20px; color: var(--color-muted); cursor: pointer; padding: 0 4px; line-height: 1; } .cal-today-btn { margin-left: auto; font-size: 12px; color: var(--color-primary); cursor: pointer; } .cal-quick { padding: 2px 0 10px; } .cal-grid { background: #fff; border-radius: 10px; padding: 8px 6px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); } .cal-weekday, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); } .cal-weekday span { text-align: center; font-size: 11px; color: var(--color-muted); padding: 4px 0; } .cal-day { position: relative; height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; } .cal-day-num { font-size: 13px; color: var(--color-text); font-variant-numeric: tabular-nums; } .cal-day.out .cal-day-num { color: #c8c8c8; } .cal-day.future .cal-day-num { color: #b0b0b0; } .cal-day.today .cal-day-num { color: var(--color-primary); font-weight: 700; } .cal-day.selected { background: var(--color-primary); } .cal-day.selected .cal-day-num { color: #fff; font-weight: 600; } .cal-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 3px; } .cal-dot.partial { background: #ffc53d; } .cal-dot.full { background: #00b578; } .cal-dot.over { background: #a855f7; } .cal-day.selected .cal-dot { background: #fff; } .cal-rate { font-size: 12px; color: var(--color-muted); padding: 8px 2px; } .cal-rate strong { color: var(--color-primary); } .cal-detail { margin-top: 6px; } .cal-detail-title { font-size: 14px; font-weight: 600; color: var(--color-text); padding: 6px 2px 8px; } .cal-item { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04); } .cal-item.done { background: #f7fbf8; } .cal-item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .cal-item-name { font-size: 14px; font-weight: 600; color: var(--color-text); } .cal-item-meta { font-size: 11px; color: var(--color-muted); flex: 1; text-align: right; font-variant-numeric: tabular-nums; } .cal-item-right { flex-shrink: 0; } .cal-item-plan { font-size: 12px; color: var(--color-muted); } /* ----- 清单视图 ----- */ .list-view { padding: 0 12px 20px; } .list-view-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 10px; } .list-view-head .adm-segmented { flex: 1; } .checklist-wrap { display: flex; flex-direction: column; gap: 10px; } .checklist-card { position: relative; background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); } .checklist-card.done { background: #f7fbf8; } .checklist-head { cursor: pointer; } .checklist-title-row { display: flex; align-items: center; gap: 8px; } .checklist-title { font-size: 15px; font-weight: 600; color: var(--color-text); } .checklist-scene { font-size: 11px; color: var(--color-primary); background: #f0f5ff; border-radius: 4px; padding: 1px 6px; } .checklist-progress-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; } .checklist-bar { flex: 1; height: 6px; border-radius: 3px; background: #f0f0f0; overflow: hidden; } .checklist-bar-fill { height: 100%; border-radius: 3px; background: #00b578; transition: width 0.4s ease; } .checklist-count { font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; } .checklist-arrow { color: var(--color-muted); transition: transform 0.2s ease; } .checklist-arrow.open { transform: rotate(90deg); } .checklist-body { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--color-border); } .checklist-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; } .check-box { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d0d0d0; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; } .check-box svg { opacity: 0; transition: opacity 0.15s ease; } .checklist-item.done .check-box { background: #00b578; border-color: #00b578; } .checklist-item.done .check-box svg { opacity: 1; } .checklist-item-title { flex: 1; font-size: 14px; color: var(--color-text); cursor: pointer; } .checklist-item-title em { display: block; font-style: normal; font-size: 11px; color: var(--color-muted); margin-top: 2px; } .checklist-item.done .checklist-item-title { color: #a0a0a0; text-decoration: line-through; } .checklist-item-del { color: #ccc; font-size: 18px; line-height: 1; padding: 0 4px; cursor: pointer; } .checklist-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; } .checklist-add .adm-input { flex: 1; border: 1px solid var(--color-border); border-radius: 6px; padding: 6px 8px; } .checklist-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; } /* ----- 表单弹窗 (打卡项 / 清单) ----- */ .form-popup { padding: 16px 16px 8px; } .form-title { font-size: 16px; font-weight: 700; color: var(--color-text); margin-bottom: 12px; } .form-field { margin-bottom: 14px; } .form-field > label { display: block; font-size: 12px; color: var(--color-muted); margin-bottom: 6px; } .form-field .adm-input { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; } .form-actions { margin-top: 18px; } .color-row { display: flex; gap: 10px; flex-wrap: wrap; } .color-dot { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: inline-block; border: 2px solid transparent; transition: transform 0.15s ease; } .color-dot.active { border-color: rgba(0,0,0,.25); transform: scale(1.12); }