kaikai_test/public/mobile.css
2026-05-14 21:01:58 +08:00

830 lines
12 KiB
CSS

:root {
color-scheme: light;
--bg: #f5f7f8;
--panel: #ffffff;
--text: #17202a;
--muted: #687586;
--line: #d9e1e8;
--accent: #0f766e;
--accent-soft: #e5f4f2;
--ok: #16794c;
--warn: #9a640f;
--bad: #b42318;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
font-size: 15px;
line-height: 1.45;
}
.auth-gate {
position: fixed;
inset: 0;
z-index: 1000;
display: grid;
place-items: center;
padding: 18px;
background: rgba(245, 247, 248, 0.97);
}
.auth-card {
width: min(420px, 100%);
display: grid;
gap: 12px;
padding: 20px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: 0 12px 32px rgba(30, 41, 59, 0.12);
}
.auth-title {
font-size: 20px;
font-weight: 900;
}
.auth-card p {
margin: 0;
color: var(--muted);
}
.auth-card input,
.auth-card button {
width: 100%;
min-height: 44px;
border-radius: 6px;
}
.auth-card button {
border: 1px solid var(--accent);
background: var(--accent);
color: #fff;
font-weight: 800;
}
.auth-message {
min-height: 20px;
color: var(--bad);
font-weight: 700;
}
.mobile-shell {
min-height: 100vh;
padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
}
.mobile-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin-bottom: 12px;
}
h1 {
margin: 0;
font-size: 22px;
letter-spacing: 0;
}
.mobile-header p {
margin: 2px 0 0;
color: var(--muted);
}
.desktop-link,
.secondary {
min-height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid var(--line);
border-radius: 8px;
padding: 0 12px;
background: var(--panel);
color: var(--accent);
font-weight: 700;
text-decoration: none;
white-space: nowrap;
}
.collect-panel,
.notice,
.network,
.offline-panel,
.device-panel,
.app-settings-panel,
.device-settings-panel,
.batch-panel,
.history-strip,
.results {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 10px;
padding: 12px;
margin-bottom: 10px;
}
.device-panel {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
align-items: end;
}
.batch-panel {
display: grid;
gap: 10px;
}
.app-settings-panel {
display: grid;
gap: 10px;
}
.device-settings-panel {
padding: 0;
overflow: hidden;
}
.device-settings-panel > summary {
min-height: 46px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 0 12px;
color: var(--accent);
font-weight: 900;
cursor: pointer;
list-style: none;
}
.device-settings-panel > summary::-webkit-details-marker {
display: none;
}
.device-settings-panel > summary::before {
content: ">";
display: inline-grid;
place-items: center;
width: 20px;
height: 20px;
border-radius: 999px;
background: var(--accent-soft);
color: var(--accent);
transition: transform 0.16s ease;
}
.device-settings-panel[open] > summary::before {
transform: rotate(90deg);
}
.device-settings-panel > summary span:first-child {
margin-right: auto;
}
.device-settings-panel .device-panel,
.device-settings-panel .app-settings-panel,
.device-settings-panel .install-hint,
.device-settings-panel .network {
border: 0;
border-top: 1px solid var(--line);
border-radius: 0;
margin: 0;
background: transparent;
}
.settings-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 10px;
}
.settings-head p {
margin: 2px 0 0;
color: var(--muted);
font-size: 13px;
}
.app-state {
min-width: 54px;
border: 1px solid rgba(22, 121, 76, 0.24);
border-radius: 999px;
padding: 3px 9px;
background: #ecfdf3;
color: var(--ok);
font-size: 12px;
font-weight: 800;
text-align: center;
}
.app-state.offline {
border-color: rgba(154, 100, 15, 0.32);
background: #fff8eb;
color: var(--warn);
}
.setting-actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.binding-summary {
border-radius: 8px;
padding: 8px 10px;
background: #f8fafc;
color: var(--muted);
font-size: 13px;
}
#mobile-batch-text {
width: 100%;
min-height: 116px;
resize: vertical;
}
.field {
display: grid;
gap: 6px;
}
.field span,
.section-title,
.network-title {
color: var(--muted);
font-size: 13px;
font-weight: 700;
}
input,
textarea {
width: 100%;
border: 1px solid var(--line);
border-radius: 8px;
padding: 0 11px;
color: var(--text);
font: inherit;
outline: none;
}
input {
height: 42px;
}
textarea {
min-height: 72px;
padding-top: 9px;
resize: vertical;
}
input:focus,
textarea:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}
.note-field {
margin-top: 10px;
}
.url-box {
margin-top: 10px;
border-top: 1px solid var(--line);
padding-top: 10px;
}
.url-box summary {
color: var(--accent);
font-weight: 700;
cursor: pointer;
}
.url-fields {
display: grid;
gap: 8px;
margin-top: 10px;
}
.collect-platforms {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-top: 10px;
color: var(--muted);
font-size: 13px;
font-weight: 800;
}
.collect-platforms label {
display: inline-flex;
align-items: center;
gap: 5px;
min-height: 32px;
border: 1px solid var(--line);
border-radius: 999px;
padding: 0 10px;
background: #fff;
color: var(--muted);
}
.collect-platforms label.active {
border-color: var(--accent);
background: var(--accent-soft);
color: var(--accent);
}
.collect-platforms input {
width: auto;
height: auto;
}
.actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-top: 12px;
}
#collect-button {
grid-column: 1 / -1;
}
button {
height: 44px;
border: 1px solid var(--accent);
border-radius: 8px;
background: var(--accent);
color: #fff;
font: inherit;
font-weight: 800;
}
.secondary-button {
border-color: var(--line);
background: #fff;
color: var(--accent);
}
button:disabled,
.secondary[aria-disabled="true"] {
opacity: 0.55;
pointer-events: none;
}
.notice {
display: flex;
align-items: center;
gap: 8px;
color: var(--muted);
}
.mobile-status-stack {
display: grid;
gap: 8px;
margin-bottom: 10px;
}
.offline-status,
.install-hint {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 10px;
padding: 10px 12px;
margin-bottom: 10px;
color: var(--muted);
font-size: 13px;
}
.mobile-status-stack .offline-status {
margin-bottom: 0;
}
.install-hint {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
}
.install-hint strong,
.install-hint span {
display: block;
}
.install-hint strong {
color: var(--accent);
font-size: 14px;
}
.install-hint.install-ready {
border-color: rgba(15, 118, 110, 0.34);
background: #f2fbf8;
}
#install-app-button {
min-width: 74px;
}
.offline-status {
display: grid;
gap: 3px;
border-color: rgba(15, 118, 110, 0.28);
background: #f2fbf8;
}
.offline-status strong {
color: var(--accent);
font-size: 14px;
}
.offline-status.offline {
border-color: rgba(154, 100, 15, 0.32);
background: #fff8eb;
}
.offline-status.offline strong {
color: var(--warn);
}
.dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: #94a3b8;
flex: 0 0 auto;
}
.dot.busy {
background: var(--warn);
}
.dot.ok {
background: var(--ok);
}
.dot.error {
background: var(--bad);
}
.network {
display: grid;
gap: 8px;
}
.network a {
color: var(--accent);
word-break: break-all;
}
.network-help {
border-top: 1px solid var(--line);
padding-top: 8px;
}
.network-help summary {
color: var(--accent);
font-weight: 800;
}
.network-help p {
margin: 8px 0 0;
color: var(--muted);
font-size: 13px;
}
.offline-panel {
display: grid;
gap: 10px;
}
.offline-head {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: start;
}
.offline-head p {
margin: 4px 0 0;
color: var(--muted);
font-size: 13px;
}
#offline-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 34px;
height: 28px;
border-radius: 999px;
background: var(--accent-soft);
color: var(--accent);
}
.offline-list {
display: grid;
gap: 8px;
}
.offline-item {
display: grid;
gap: 6px;
border: 1px solid var(--line);
border-radius: 8px;
padding: 10px;
background: #fff;
}
.offline-item strong {
font-size: 15px;
}
.offline-item.synced {
background: #f8fafc;
}
.offline-title {
display: flex;
justify-content: space-between;
gap: 8px;
align-items: center;
}
.sync-status {
display: inline-flex;
align-items: center;
min-height: 22px;
border-radius: 999px;
padding: 0 8px;
background: #fff7ed;
color: var(--warn);
font-size: 12px;
font-weight: 800;
white-space: nowrap;
}
.sync-status.synced {
background: #e7f6ec;
color: var(--ok);
}
.offline-meta {
color: var(--muted);
font-size: 12px;
word-break: break-word;
}
.offline-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.offline-actions button {
min-height: 30px;
border: 1px solid var(--line);
border-radius: 6px;
padding: 0 10px;
background: #fff;
color: var(--accent);
font: inherit;
font-size: 13px;
font-weight: 800;
}
.draft-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
justify-content: flex-end;
}
.program-list {
display: flex;
gap: 8px;
overflow-x: auto;
padding-top: 8px;
}
.program-item {
min-height: 36px;
border: 1px solid var(--line);
border-radius: 999px;
padding: 0 12px;
background: #fff;
color: var(--text);
font: inherit;
white-space: nowrap;
}
.program-item.active {
background: var(--accent-soft);
border-color: var(--accent);
color: var(--accent);
font-weight: 800;
}
.result-head {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 10px;
margin-bottom: 10px;
}
.result-title {
min-width: 0;
font-size: 18px;
font-weight: 800;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.run-count {
color: var(--muted);
font-size: 13px;
font-weight: 700;
}
.cards {
display: grid;
gap: 10px;
}
.platform-card {
border: 1px solid var(--line);
border-radius: 8px;
padding: 10px;
background: #fff;
}
.platform-row {
display: flex;
justify-content: space-between;
gap: 10px;
align-items: center;
}
.platform-name {
font-weight: 800;
}
.metric {
color: var(--muted);
font-size: 13px;
}
.metric-help {
margin-top: 2px;
color: var(--muted);
font-size: 12px;
line-height: 1.35;
}
.latest-value {
margin-top: 8px;
font-size: 28px;
font-weight: 900;
color: var(--ok);
letter-spacing: 0;
}
.latest-value.warn {
color: var(--warn);
font-size: 18px;
}
.latest-value.bad {
color: var(--bad);
font-size: 18px;
}
.meta {
margin-top: 2px;
color: var(--muted);
font-size: 12px;
word-break: break-word;
}
.anomaly-badge {
display: inline-flex;
margin-left: 6px;
border-radius: 5px;
padding: 0 5px;
background: #fff3dc;
color: var(--warn);
font-size: 12px;
vertical-align: middle;
}
.credibility-badge {
display: inline-flex;
align-items: center;
min-height: 20px;
margin-top: 6px;
border-radius: 5px;
padding: 0 6px;
background: #edf6ff;
color: #175cd3;
font-size: 12px;
font-weight: 800;
}
.credibility-badge.high {
background: #e7f6ec;
color: var(--ok);
}
.credibility-badge.medium {
background: #edf6ff;
color: #175cd3;
}
.credibility-badge.low {
background: #fff3dc;
color: var(--warn);
}
.credibility-badge.rejected {
background: #fff1f0;
color: var(--bad);
}
.mini-history {
display: grid;
gap: 6px;
margin-top: 10px;
border-top: 1px solid var(--line);
padding-top: 8px;
}
.mini-row {
display: flex;
justify-content: space-between;
gap: 8px;
color: var(--muted);
font-size: 13px;
}
.mini-row strong {
color: var(--text);
}
.open-link {
color: var(--accent);
font-weight: 700;
text-decoration: none;
}
.empty {
color: var(--muted);
padding: 22px 4px;
text-align: center;
}
@media (max-width: 420px) {
.mobile-shell {
padding-left: 10px;
padding-right: 10px;
}
.mobile-header {
align-items: flex-start;
}
h1 {
font-size: 20px;
}
.actions,
.setting-actions,
.device-panel,
.install-hint {
grid-template-columns: 1fr;
}
.draft-actions {
display: grid;
grid-template-columns: 1fr;
}
.desktop-link,
.secondary,
button {
min-height: 42px;
}
}