:root { --bg: #0f1420; --panel: #171e2e; --panel2: #1e2740; --border: #2a3550; --text: #dbe4f5; --muted: #8b97b5; --accent: #4f8cff; --green: #37d39a; --red: #ff5d6c; --yellow: #ffc857; --purple: #a78bfa; --overlay: rgba(5, 8, 15, .72); --box-bg: #141b2b; --log-bg: #0b0f1a; --thumb: #2a3550; --preview-bg: #fff; } body[data-theme="light"] { --bg: #f2f5fa; --panel: #ffffff; --panel2: #eef1f7; --border: #d8e0ee; --text: #1b2436; --muted: #5d6b86; --accent: #2f6bff; --green: #0e9f6e; --red: #e04a5a; --yellow: #b8860b; --purple: #7c5cf0; --overlay: rgba(15, 23, 42, .35); --box-bg: #f7f9fd; --log-bg: #f4f6fa; --thumb: #cdd7e6; --preview-bg: #fff; } * { box-sizing: border-box; margin: 0; padding: 0; } body { background: var(--bg); color: var(--text); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 14px; min-height: 100vh; transition: background .25s, color .25s; } header { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; } .logo { font-size: 18px; font-weight: 700; letter-spacing: .5px; } .version { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; } .header-right { display: flex; align-items: center; gap: 10px; } .status-pill { background: var(--panel2); border: 1px solid var(--border); padding: 5px 12px; border-radius: 20px; font-size: 12px; color: var(--muted); } .status-pill.active { color: var(--green); border-color: var(--green); } main { padding: 20px 24px; max-width: 1500px; margin: 0 auto; } /* ---------- buttons ---------- */ .btn { background: var(--panel2); color: var(--text); border: 1px solid var(--border); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: .15s; white-space: nowrap; } .btn:hover { border-color: var(--accent); } .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { filter: brightness(1.1); } .btn.ghost { background: transparent; } .btn.danger:hover { border-color: var(--red); color: var(--red); } .btn.sm { padding: 3px 8px; font-size: 12px; border-radius: 6px; } .btn:disabled { opacity: .4; cursor: not-allowed; } /* ---------- 统计区 ---------- */ .stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; } .stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; } .stat-num { font-size: 24px; font-weight: 700; line-height: 1.2; } .stat-num.num-ok { color: var(--green); } .stat-num.num-fail { color: var(--red); } .stat-num.num-run { color: var(--accent); } .stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; } /* ---------- 分组展示 ---------- */ .group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; } .group-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .group-title { font-size: 16px; font-weight: 700; } .group-desc { font-size: 12px; color: var(--muted); } .group-count { font-size: 11px; padding: 2px 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--border); color: var(--muted); } /* ---------- task grid ---------- */ .task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; } .card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: .15s; } .card:hover { border-color: var(--accent); transform: translateY(-1px); } .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .card-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--border); color: var(--muted); } .badge.batch { color: var(--accent); border-color: var(--accent); } .badge.scheduled { color: var(--purple); border-color: var(--purple); } .badge.auto { color: var(--yellow); border-color: var(--yellow); } .badge.running { color: var(--green); border-color: var(--green); animation: pulse 1.6s infinite; } .badge.paused { color: var(--yellow); border-color: var(--yellow); } .badge.completed { color: var(--green); border-color: var(--green); } .badge.failed { color: var(--red); border-color: var(--red); } .badge.stopped { color: var(--muted); border-color: var(--border); } .badge.scheduled-wait { color: var(--purple); border-color: var(--purple); } @keyframes pulse { 50% { opacity: .5; } } .card-line { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .card-line b { color: var(--text); font-weight: 500; } .progress { height: 6px; background: var(--panel2); border-radius: 4px; overflow: hidden; } .progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width .5s; } .progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); } .stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); } .stats .ok { color: var(--green); } .stats .fail { color: var(--red); } .stats .img { color: var(--yellow); } .card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; } /* ---------- empty ---------- */ .empty { text-align: center; padding: 80px 0; color: var(--muted); } .empty-icon { font-size: 48px; margin-bottom: 12px; } .empty button { margin-top: 14px; } /* ---------- modal ---------- */ .modal-overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(3px); } .modal { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: 640px; max-width: 95vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); } .modal.wide { width: 1080px; } .modal.tall { width: 1000px; height: 88vh; } .modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600; flex-shrink: 0; } .modal-foot { display: flex; justify-content: flex-end; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); flex-shrink: 0; } .hint { color: var(--yellow); font-size: 12px; margin-right: auto; } .tabs { display: flex; gap: 6px; padding: 12px 18px 0; flex-shrink: 0; } #taskForm { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; } .tab { padding: 8px 16px; background: transparent; border: 1px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0; color: var(--muted); cursor: pointer; font-size: 13px; } .tab.active { background: var(--panel2); color: var(--text); border-color: var(--accent); } .tab:disabled { opacity: .4; cursor: not-allowed; } .form-body { padding: 16px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; } .field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; } .field label { font-size: 12px; color: var(--muted); } .field.check { flex-direction: row; align-items: center; gap: 8px; padding-top: 22px; } .field.check label { color: var(--text); font-size: 13px; display: flex; align-items: center; gap: 7px; cursor: pointer; } input, select, textarea { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; width: 100%; } input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); } textarea { resize: vertical; } input[type="checkbox"] { width: auto; accent-color: var(--accent); } input[type="datetime-local"] { color-scheme: light dark; } .row2 { display: flex; gap: 12px; } .box { border: 1px dashed var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--box-bg); } .hidden { display: none !important; } /* ---------- detail ---------- */ .detail-wrap { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; } .detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); } .detail-meta b { color: var(--text); font-weight: 500; } .detail-actions { display: flex; gap: 8px; flex-wrap: wrap; } .runs-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .run-chip { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel2); cursor: pointer; font-size: 12px; color: var(--muted); } .run-chip.active { border-color: var(--accent); color: var(--text); } .run-panel { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel2); } .run-stats { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; } .table-wrap { overflow: auto; max-height: 320px; border: 1px solid var(--border); border-radius: 8px; } table { width: 100%; border-collapse: collapse; font-size: 12px; } th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; } th { position: sticky; top: 0; background: var(--panel2); color: var(--muted); font-weight: 500; z-index: 1; } td.url-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; } td.title-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; } .t-ok { color: var(--green); } .t-fail { color: var(--red); } .file-link { color: var(--accent); cursor: pointer; text-decoration: underline; } .thumbs { display: flex; flex-wrap: wrap; gap: 8px; } .thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; } .logs { background: var(--log-bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; max-height: 220px; overflow-y: auto; line-height: 1.7; } .logs .info { color: var(--text); } .logs .warn { color: var(--yellow); } .logs .error { color: var(--red); } /* ---------- preview ---------- */ #previewFrame { flex: 1; border: none; background: var(--preview-bg); border-radius: 0 0 14px 14px; } /* ---------------- 回收站 ---------------- */ .search-box { display: flex; gap: 6px; align-items: center; } .search-box input { width: 250px; } .search-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; background: var(--panel2); } .search-item .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .search-item .title { font-weight: 600; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .search-item .url { color: var(--muted); word-break: break-all; font-size: 12px; } .trash-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 2px; } .trash-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--panel2); } .trash-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; } /* ---------- 试爬取结果 / 元数据 ---------- */ .probe-summary { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; } .probe-list { border: 1px solid var(--border); border-radius: 8px; max-height: 260px; overflow: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; background: var(--log-bg); } .probe-item { display: flex; gap: 10px; align-items: baseline; } .probe-item .u { color: var(--text); word-break: break-all; } .probe-item.included .u { color: var(--green); } .probe-item.excluded .u { color: var(--muted); text-decoration: line-through; } .probe-item .reason { color: var(--yellow); font-size: 11px; flex-shrink: 0; } .meta-table td { white-space: normal; word-break: break-all; } .meta-table td:first-child { width: 110px; color: var(--muted); } /* ---------- misc ---------- */ .toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--accent); color: var(--text); padding: 10px 20px; border-radius: 10px; z-index: 300; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: fadein .2s; } .toast.error { border-color: var(--red); } @keyframes fadein { from { opacity: 0; transform: translate(-50%, -8px); } } ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--thumb); border-radius: 4px; } /* 结果分页控件 */ .pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; } .pager-info { color: var(--text-dim, #999); font-size: 13px; } .pager .btn:disabled { opacity: 0.4; cursor: not-allowed; } .pager-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .pager-pages .page-btn { min-width: 30px; padding: 4px 6px; } .pager-pages .page-btn.active { background: var(--accent, #2d6cdf); color: #fff; border-color: var(--accent, #2d6cdf); font-weight: 600; } .pager-ellipsis { color: var(--text-dim, #999); padding: 0 2px; user-select: none; } .pager-jump { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim, #999); font-size: 13px; } .pager-jump input { width: 56px; padding: 3px 6px; text-align: center; } .pager-size { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim, #999); font-size: 13px; } .pager-size select { padding: 3px 4px; width: auto; }