airpredict/apps/web/src/styles/source.css

123 lines
10 KiB
CSS

/* source.css — 污染源识别工具(暖绿杂志风),变量挂在 .s-app 上。 */
.s-app {
--bg: #f4f0e7; --panel: #fffdf8; --panel2: #f4efe3; --panel3: #ede6d8;
--border: #e9e1d2; --border2: #ded3bf;
--ink: #221d15; --sub: #6c6353; --faint: #a89c86;
--accent: #1f7a5a; --accent2: #2f9e74; --accent-soft: rgba(31,122,90,.12); --accent-deep: #165c43;
--good: #2f8f5b; --good-soft: rgba(47,143,91,.14);
--warn: #ca8326; --warn-soft: rgba(202,131,38,.16);
--bad: #bf4a30; --bad-soft: rgba(191,74,48,.13);
--track: #ebe3d4; --radius: 16px;
--serif: 'Songti SC','STSong',Georgia,'Times New Roman',serif;
background: var(--bg); color: var(--ink);
font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
font-size: 14px; letter-spacing: .1px;
height: 100vh; display: flex; flex-direction: column;
}
.s-app * { box-sizing: border-box; }
.s-top { flex: 0 0 64px; display: flex; align-items: center; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(255,253,248,.85); }
.s-back { display: flex; align-items: center; gap: 7px; color: var(--sub); font-size: 13px; font-weight: 500; cursor: pointer; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); white-space: nowrap; }
.s-back:hover { background: var(--panel2); }
.s-back svg { width: 15px; height: 15px; }
.s-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.s-logo svg { width: 19px; height: 19px; }
.s-tt { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.s-tt small { font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: 1px; margin-left: 8px; }
.s-spacer { flex: 1; }
.s-body { flex: 1; overflow-y: auto; padding: 22px 28px 30px; }
.s-grid { display: grid; gap: 18px; align-items: start; grid-template-columns: 400px 1fr; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-t { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-t .bar { width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.card-step { font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }
.muted { color: var(--faint); font-size: 11px; font-weight: 500; }
.fld { margin-bottom: 16px; }
.fld-lab { font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; }
.fld-lab .v { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 14px; }
.rooms { display: flex; flex-wrap: wrap; gap: 7px; }
.room-b { font-size: 12.5px; font-weight: 600; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--border2); background: var(--panel); color: var(--sub); cursor: pointer; transition: .12s; white-space: nowrap; }
.room-b:hover { border-color: var(--accent); color: var(--accent); }
.room-b.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.num { display: flex; align-items: center; background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.num input { flex: 1; min-width: 0; border: none; background: transparent; padding: 9px 11px; font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--ink); outline: none; }
.num .unit { font-size: 11px; color: var(--faint); padding: 0 11px; font-weight: 600; }
.slider { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 4px; background: var(--track); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); border: 3px solid #fff; }
.slider-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin-top: 4px; }
.mats { display: flex; flex-direction: column; gap: 8px; }
.mat { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel2); }
.mat.off { opacity: .42; }
.mat-chk { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border2); flex: 0 0 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--panel); }
.mat-chk.on { background: var(--accent); border-color: var(--accent); }
.mat-chk svg { width: 12px; height: 12px; color: #fff; }
.mat-main { flex: 1; min-width: 0; }
.mat-nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-cat { font-size: 10px; color: var(--faint); }
.mat-qty { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.mat-qty input { width: 52px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); padding: 5px 7px; font-family: var(--serif); font-weight: 700; font-size: 13px; text-align: right; color: var(--ink); outline: none; }
.mat-qty .u { font-size: 10px; color: var(--faint); }
.add-mat { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); border: 1px dashed var(--border2); border-radius: 11px; padding: 9px; cursor: pointer; background: transparent; width: 100%; }
.add-mat:hover { background: var(--accent-soft); }
.add-mat svg { width: 15px; height: 15px; flex: 0 0 15px; }
.verdict { display: flex; align-items: center; gap: 22px; }
.verd-num { font-family: var(--serif); font-weight: 800; letter-spacing: -1px; line-height: .9; }
.verd-num .big { font-size: 56px; }
.verd-num .u { font-size: 16px; color: var(--faint); margin-left: 4px; }
.verd-meta { display: flex; flex-direction: column; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; border-radius: 9px; padding: 6px 13px; width: fit-content; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-bad { color: var(--bad); background: var(--bad-soft); }
.chip-warn { color: var(--warn); background: var(--warn-soft); }
.chip-good { color: var(--good); background: var(--good-soft); }
.verd-sub { font-size: 12.5px; color: var(--sub); }
.verd-sub b { color: var(--ink); }
.gate { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; font-size: 12px; margin: 14px 0 0; }
.gate-step { text-align: center; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2); color: var(--sub); font-weight: 600; white-space: nowrap; font-size: 12px; }
.gate-step.act { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.gate-step.bad { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.gate-arrow { color: var(--faint); flex: 0 0 auto; display: flex; align-items: center; }
.formula { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-family: var(--serif); }
.formula .eq { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.formula .frac { display: inline-block; vertical-align: middle; }
.formula .frac .top { display: block; border-bottom: 2px solid currentColor; padding: 0 8px; font-size: 14px; }
.formula .frac .bot { display: block; padding: 2px 8px 0; font-size: 14px; text-align: center; }
.formula .plug { font-family: var(--sans, sans-serif); font-size: 12px; color: var(--sub); margin-top: 8px; line-height: 1.7; }
.formula .plug code { font-family: var(--serif); font-weight: 700; color: var(--accent-deep); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; }
.contrib { display: flex; flex-direction: column; gap: 11px; }
.cb { display: grid; grid-template-columns: 140px 1fr 92px; align-items: center; gap: 12px; }
.cb-nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-nm .rk { display: inline-block; width: 17px; height: 17px; border-radius: 5px; font-size: 10px; font-weight: 800; text-align: center; line-height: 17px; margin-right: 7px; color: #fff; }
.cb-track { height: 18px; background: var(--track); border-radius: 6px; overflow: hidden; }
.cb-fill { height: 100%; border-radius: 6px; transition: width .35s cubic-bezier(.3,.8,.3,1); }
.cb-val { text-align: right; font-size: 12px; }
.cb-val .c { font-family: var(--serif); font-weight: 800; }
.cb-val .p { font-size: 10.5px; color: var(--faint); }
.sugg { display: flex; gap: 13px; padding: 15px 17px; border-radius: 13px; background: linear-gradient(180deg, var(--accent-soft), rgba(31,122,90,.04)); border: 1px solid rgba(31,122,90,.18); }
.sugg-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.sugg-ic svg { width: 19px; height: 19px; }
.sugg-tt { font-size: 13px; font-weight: 700; font-family: var(--serif); margin-bottom: 4px; }
.sugg-tx { font-size: 12.5px; color: var(--sub); line-height: 1.6; }
.sugg-tx b { color: var(--accent-deep); }
.sugg-act { display: flex; gap: 9px; margin-top: 11px; }
.s-btn { font-size: 12.5px; font-weight: 600; border-radius: 9px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--border2); background: var(--panel); color: var(--ink); white-space: nowrap; }
.s-btn:hover { border-color: var(--accent); }
.s-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.s-btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 12px 20px; border-radius: 11px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 80; display: flex; align-items: center; gap: 9px; }
.toast svg { width: 16px; height: 16px; color: var(--accent2); }
@media(max-width:880px){ .s-grid { grid-template-columns: 1fr; } }