:root { color-scheme: light; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; color: #172033; background: #f4f7fb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: #2563eb; text-decoration: none; }
.mobile-header { min-height: 58px; padding: 0 max(18px, calc((100% - 900px) / 2)); display: flex; align-items: center; justify-content: space-between; color: white; background: #172c55; }
.mobile-header div { display: flex; gap: 10px; align-items: center; }
.mobile-header span { opacity: .72; font-size: 12px; }
.mobile-header a { color: white; font-size: 13px; }
.mobile-main { width: min(900px, calc(100% - 28px)); margin: 18px auto 36px; }
.mobile-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #e8edf6; border-radius: 13px; margin-bottom: 14px; }
.mobile-tabs a { text-align: center; padding: 10px; color: #64748b; border-radius: 9px; font-weight: 700; }
.mobile-tabs a.active { color: #172c55; background: white; box-shadow: 0 2px 7px rgba(23, 44, 85, .1); }
.mobile-panel { padding: 18px; margin-bottom: 14px; background: white; border: 1px solid #dce4ef; border-radius: 16px; box-shadow: 0 8px 24px rgba(23, 44, 85, .06); }
.mobile-view[hidden] { display: none; }
.mobile-login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #172c55, #31548f); }
.mobile-login-card { width: min(420px, calc(100% - 32px)); padding: 24px; background: white; border-radius: 16px; }
.mobile-login-card form, .mobile-login-card label { display: grid; gap: 8px; }
.mobile-login-card input, .mobile-login-card button { width: 100%; padding: 12px; border-radius: 10px; font: inherit; }
.mobile-login-card input { border: 1px solid #cbd5e1; }
.mobile-login-card button { margin-top: 8px; color: white; background: #172c55; border: 0; font-weight: 700; }
.mobile-login-card .error { color: #b42318; }
.login-switch { margin: 16px 0 0; text-align: center; }
.mobile-title-row, .section-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.mobile-title-row { flex-wrap: wrap; }
.mobile-title-row > :first-child { min-width: 0; flex: 1 1 180px; }
.eyebrow { margin: 0 0 5px; color: #64748b; font-size: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: 26px; }
h2 { margin-bottom: 0; font-size: 18px; }
.refresh-note, .muted { color: #718096; font-size: 12px; }
.refresh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.refresh-button { padding: 7px 9px; color: #172c55; background: #eef3fb; border: 1px solid #cbd7e8; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.refresh-button svg { display: block; }
.refresh-button:disabled { opacity: .65; cursor: wait; }
.refresh-button.refreshing svg { animation: mobile-refresh-spin 0.9s linear infinite; }
@keyframes mobile-refresh-spin { to { transform: rotate(360deg); } }
.task-picker { display: grid; gap: 6px; color: #53627a; font-size: 13px; font-weight: 700; }
select { width: 100%; padding: 10px 12px; color: #172033; background: white; border: 1px solid #cbd5e1; border-radius: 9px; font: inherit; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 14px; }
.metric { padding: 12px; background: #f4f7fb; border-radius: 11px; }
.metric span, .metric strong { display: block; }
.metric span { color: #718096; font-size: 11px; }
.metric strong { margin-top: 5px; color: #172c55; font-size: 20px; }
.task-cards, .client-list { display: grid; gap: 9px; margin-top: 14px; }
.mobile-panel > .muted { margin-top: 10px; margin-bottom: 0; }
.task-card, .client-card { padding: 13px; border: 1px solid #e3e8f0; border-radius: 12px; }
.task-card-head, .client-head, .client-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.task-card h3, .client-card h3 { margin: 0; font-size: 15px; }
.task-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.task-card-grid div { color: #718096; font-size: 11px; }
.task-card-grid b { display: block; color: #172033; font-size: 14px; margin-top: 3px; }
.task-state-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 10px; }
.task-state-card { min-width: 0; padding: 9px; border-radius: 9px; background: #f4f7fb; }
.task-state-card span, .task-state-card strong, .task-state-card small { display: block; }
.task-state-card span { color: #53627a; font-size: 11px; }
.task-state-card strong { margin-top: 3px; color: #172033; font-size: 18px; }
.task-state-card small { margin-top: 2px; color: #718096; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-state-card.status-published { background: #e9f8f0; }
.task-state-card.status-published strong { color: #18794e; }
.task-state-card.status-generated { background: #fff4e7; }
.task-state-card.status-generated strong { color: #b45309; }
.task-state-card.status-uploading { background: #e8f0ff; }
.task-state-card.status-uploading strong { color: #1d4ed8; }
.task-state-card.status-upload-failed { background: #fff0ed; }
.task-state-card.status-upload-failed strong { color: #c2410c; }
.task-state-card.status-failed { background: #f1f3f5; }
.task-state-card.status-failed strong { color: #667085; }
.client-events { margin-top: 10px; padding-top: 8px; border-top: 1px solid #edf0f5; color: #718096; font-size: 11px; }
.client-events ul { margin: 5px 0 0; padding: 0; list-style: none; }
.client-events li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; color: #4a5568; }
.status { display: inline-flex; align-items: center; gap: 5px; color: #24a06b; font-size: 12px; font-weight: 700; }
.status.offline { color: #9a6b1f; }
.status::before { width: 7px; height: 7px; content: ""; background: currentColor; border-radius: 50%; }
.client-summary { display: flex; gap: 7px; margin-top: 13px; }
.client-summary .metric { flex: 1; }
.client-meta { margin-top: 9px; color: #718096; font-size: 12px; line-height: 1.7; }
.empty { padding: 26px 8px; color: #718096; text-align: center; font-size: 13px; }
@media (max-width: 639px) { .task-state-grid { grid-template-columns: repeat(2, 1fr); } .task-state-card small { white-space: normal; } }
@media (min-width: 640px) { .metric-grid { grid-template-columns: repeat(4, 1fr); } .task-card-grid { grid-template-columns: repeat(3, 1fr); } }
