* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; color: #1f2937; background: #f3f5f8; line-height: 1.6; }
a { color: #2563eb; text-decoration: none; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; flex-shrink: 0; background: #111827; color: #d1d5db; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px; font-size: 16px; font-weight: 500; color: #fff; border-bottom: 1px solid #1f2937; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: #2563eb; color: #fff; border-radius: 8px; font-size: 12px; font-weight: 500; }
.sidebar nav { padding: 12px 0; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: #9ca3af; font-size: 14px; }
.sidebar nav a:hover { background: #1f2937; color: #fff; }
.sidebar nav a.active { background: #1e3a5f; color: #fff; border-left: 3px solid #3b82f6; padding-left: 17px; }
.ico { width: 18px; text-align: center; opacity: .8; }
.side-footer { padding: 16px 20px; border-top: 1px solid #1f2937; }
.user-chip { color: #fff; margin-bottom: 8px; }
.logout { color: #9ca3af; font-size: 12px; }
.main { flex: 1; min-width: 0; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.crumb { color: #6b7280; font-size: 13px; }
.clock { color: #9ca3af; font-size: 12px; }
.content { padding: 24px 28px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.page-head h1 { font-size: 20px; font-weight: 500; }
.page-head .sub { color: #9ca3af; font-size: 13px; margin-left: 12px; }
.hint { color: #6b7280; font-size: 13px; margin-bottom: 16px; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.card h3 { font-size: 13px; font-weight: 500; margin: 14px 0 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; }
.stat-label { color: #6b7280; font-size: 13px; }
.stat-num { font-size: 28px; font-weight: 500; color: #111827; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 12px; background: #f9fafb; color: #6b7280; font-weight: 500; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .empty { text-align: center; color: #9ca3af; padding: 32px; }
.table .path { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280; font-family: monospace; font-size: 12px; }
.table code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.md5 { color: #9ca3af; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; background: #f3f4f6; color: #6b7280; }
.badge.success { background: #dcfce7; color: #166534; }
.badge.failed, .badge.error { background: #fee2e2; color: #991b1b; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.info { background: #dbeafe; color: #1e40af; }
.badge.pending, .badge.dispatched { background: #e0e7ff; color: #3730a3; }
.badge.running { background: #dbeafe; color: #1e40af; }
.badge.cancelled { background: #f3f4f6; color: #6b7280; }
.ops { white-space: nowrap; }
.ops button, .ops a { display: inline-block; background: none; border: none; color: #2563eb; cursor: pointer; font-size: 12px; margin-right: 10px; padding: 2px 0; }
.ops button.danger { color: #dc2626; }
.ops button:hover, .ops a:hover { text-decoration: underline; }
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn:hover { background: #f9fafb; }
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.block { width: 100%; }
.btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.filter-bar select { padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; }
.upload-form { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
textarea { resize: vertical; font-family: monospace; font-size: 12px; }
.modal { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-start; justify-content: center; padding-top: 60px; z-index: 100; }
.modal-box { background: #fff; border-radius: 12px; padding: 24px; width: 640px; max-width: 95vw; max-height: 85vh; overflow-y: auto; }
.modal-box.small { width: 480px; }
.modal-box.wide { width: 800px; }
.modal-box h2 { font-size: 17px; font-weight: 500; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.progress { display: inline-block; width: 70px; height: 6px; background: #e5e7eb; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.progress span { display: block; height: 100%; background: #3b82f6; }
.detail-meta { background: #f9fafb; padding: 10px 14px; border-radius: 6px; font-size: 13px; color: #4b5563; margin-bottom: 12px; }
.log-view { background: #111827; color: #d1d5db; border-radius: 8px; padding: 14px; font-family: monospace; font-size: 12px; max-height: 400px; overflow-y: auto; }
.log-line { padding: 3px 0; word-break: break-all; }
.log-line.err { color: #fca5a5; }
.log-line.warn { color: #fcd34d; }
.log-time { color: #6b7280; }
.log-step { color: #60a5fa; }
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 14px; z-index: 999; }
.toast.ok { background: #16a34a; }
.toast.err { background: #dc2626; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f3f5f8; }
.login-box { width: 380px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 36px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; margin-bottom: 24px; }
.login-box form label { margin-top: 14px; }
.login-box form button { margin-top: 22px; }
.login-tip { margin-top: 16px; font-size: 12px; color: #9ca3af; text-align: center; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert.err { background: #fee2e2; color: #991b1b; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2,1fr); } .grid-2 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }
