/* styles.css 定义协议调试器的暗色布局、组件和响应式样式。 */ :root { color-scheme: dark; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #171818; color: #dedfdd; font-synthesis: none; --surface-0: #171818; --surface-1: #1d1f1f; --surface-2: #242626; --surface-3: #2c2f2f; --border: #343737; --border-strong: #454949; --muted: #8d9390; --text: #dedfdd; --accent: #4ea58b; --accent-soft: #25473d; --cyan: #55a8ba; --orange: #c88762; --danger: #c56d65; --selection: #245b73; --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace; } * { box-sizing: border-box; } html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; } body { background: var(--surface-0); } button, input, select, a { font: inherit; letter-spacing: 0; } button, a { -webkit-tap-highlight-color: transparent; } button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -1px; } .app-shell { display: grid; grid-template-rows: 48px auto minmax(0, 1fr) 26px; min-width: 760px; background: var(--surface-0); } .topbar, .filterbar, .statusbar { display: flex; align-items: center; border-color: var(--border); background: var(--surface-1); } .topbar { justify-content: space-between; gap: 18px; padding: 0 14px; border-bottom: 1px solid var(--border); } .brand, .runtime-status, .toolbar-actions { display: flex; align-items: center; min-width: 0; } .brand { gap: 9px; white-space: nowrap; } .brand strong { font-size: 14px; font-weight: 650; } .brand-mark { width: 12px; height: 12px; border: 2px solid var(--accent); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--surface-1); background: var(--accent); } .runtime-status { justify-content: center; gap: 7px; min-width: 240px; color: #bec3c0; font-size: 12px; } .runtime-status code { overflow: hidden; max-width: 260px; color: var(--muted); font-family: var(--mono); text-overflow: ellipsis; white-space: nowrap; } .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #7d8380; } .status-dot.online { background: #42bd79; box-shadow: 0 0 0 3px rgb(66 189 121 / 14%); } .toolbar-actions { justify-content: flex-end; gap: 7px; } .locale-picker { display: flex; } .locale-picker select { width: 58px; height: 29px; border: 1px solid var(--border-strong); border-radius: 5px; padding: 0 6px; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 12px; } .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .button, .icon-button, .copy-button { height: 29px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; } .button { display: inline-flex; align-items: center; padding: 0 10px; font-size: 12px; } .button:hover, .icon-button:hover, .copy-button:hover { background: var(--surface-3); } .button.danger:hover { border-color: #744640; color: #f2b0aa; } .icon-button { width: 31px; padding: 0; font-family: var(--mono); font-weight: 700; } .icon-button.active { border-color: var(--orange); color: #f1bb98; } .filterbar { flex-wrap: wrap; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--border); } .search-box { display: flex; align-items: center; flex: 1; min-width: 260px; max-width: 640px; height: 31px; border: 1px solid var(--border); border-radius: 5px; background: #191b1b; color: var(--muted); } .search-box > span { padding-left: 9px; font-size: 17px; } .search-box input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0 9px; outline: 0; background: transparent; color: var(--text); font-size: 12px; } .search-box input::placeholder { color: #6f7572; } .url-filter { min-width: 280px; max-width: 420px; } .request-id-filter { flex: 0 1 320px; min-width: 220px; max-width: 340px; } .conversation-filter { flex: 0 1 300px; min-width: 190px; } .conversation-filter select { width: 100%; height: 31px; border: 1px solid var(--border); border-radius: 5px; padding: 0 28px 0 9px; background: #191b1b; color: var(--text); font-family: var(--mono); font-size: 11px; } .segmented-control { display: flex; height: 31px; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; } .segmented-control button { min-width: 62px; border: 0; border-right: 1px solid var(--border); padding: 0 10px; background: #1b1d1d; color: var(--muted); cursor: pointer; font-size: 12px; } .segmented-control button:last-child { border-right: 0; } .segmented-control button.active { background: var(--accent-soft); color: #bce8d9; } .sort-control button { min-width: 52px; } .checkbox-control { display: inline-flex; align-items: center; gap: 7px; height: 31px; border: 1px solid var(--border); border-radius: 5px; padding: 0 9px; background: #1b1d1d; color: var(--muted); cursor: pointer; font-size: 12px; white-space: nowrap; } .checkbox-control:has(input:checked) { border-color: #376858; background: var(--accent-soft); color: #bce8d9; } .checkbox-control input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); } .multi-select-filter { position: relative; flex: 0 0 170px; height: 31px; color: var(--text); font-size: 12px; } .multi-select-filter[hidden] { display: none; } .multi-select-filter summary { overflow: hidden; height: 31px; border: 1px solid var(--border); border-radius: 5px; padding: 7px 28px 0 9px; background: #191b1b; cursor: pointer; list-style: none; text-overflow: ellipsis; white-space: nowrap; } .multi-select-filter summary::-webkit-details-marker { display: none; } .multi-select-filter summary::after { position: absolute; top: 10px; right: 10px; content: ""; border: 4px solid transparent; border-top-color: var(--muted); } .multi-select-filter[open] summary { border-color: var(--border-strong); } .multi-select-menu { position: absolute; z-index: 20; top: 35px; right: 0; overflow: auto; width: 260px; max-height: 320px; border: 1px solid var(--border-strong); border-radius: 5px; padding: 4px; background: var(--surface-2); box-shadow: 0 8px 24px rgb(0 0 0 / 34%); } .multi-select-option { display: flex; align-items: center; gap: 8px; height: 29px; border-radius: 3px; padding: 0 7px; cursor: pointer; } .multi-select-option:hover { background: var(--surface-3); } .multi-select-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); } .multi-select-option span { overflow: hidden; font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; } .multi-select-option.all-option { border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 3px; } .request-count { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; white-space: nowrap; }