html, body { background: var(--bg); }
body { color: var(--text); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(32, 34, 32, .22); outline-offset: 2px; }
.app-shell { min-height: 100vh; grid-template-columns: 228px minmax(0, 1fr); gap: 8px; padding: 8px 8px 0; }
.sidebar { position: sticky; inset: 8px auto 0 8px; z-index: 30; width: 220px; height: calc(100vh - 8px); padding: 48px 12px 24px; border: 0; background: var(--sidebar); backdrop-filter: none; }
.brand { gap: 7px; min-height: 24px; padding: 0 8px; color: var(--text); }
.brand-mark { width: 20px; height: 20px; border: 0; border-radius: 0; color: var(--text); background: transparent; box-shadow: none; font-size: 19px; }
.brand > strong { font-size: 15px; font-weight: 700; letter-spacing: -.025em; }
.side-nav { display: grid; gap: 1px; margin-top: 44px; }
.nav-group-title { display: none; }
.nav-item { min-height: 36px; gap: 9px; padding: 0 8px; border-radius: 5px; color: #919590; font-size: 11px; font-weight: 500; }
.nav-item > .ti { width: 15px; color: #9b9f9a; font-size: 14px; text-align: center; }
.nav-item:hover, .nav-item.is-active { color: var(--text); background: transparent; }
.nav-item.is-active::before { display: none; }
.nav-item.is-active > .ti { color: var(--text); }
.sidebar-foot { gap: 3px; }
.runtime-card { padding: 8px; border: 0; border-radius: 0; background: transparent; }
.runtime-line { gap: 7px; color: var(--muted-strong); }
.runtime-line strong { color: var(--muted-strong); font-size: 10px; font-weight: 500; }
.runtime-card > small { margin-top: 5px; color: #a1a59f; font-size: 8px; }
.pulse-dot { width: 5px; height: 5px; background: var(--good); box-shadow: none; }
.pulse-dot.is-busy { background: var(--warn); box-shadow: none; }
.nav-item-foot { margin-top: 1px; }
.source-switcher { width: 100%; min-height: 38px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 2px 0 0; padding: 5px 7px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-soft); background: var(--surface); box-shadow: var(--shadow-xs); cursor: pointer; text-align: left; }
.source-switcher:hover { border-color: var(--border-strong); }
.source-logo { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--source-accent); font-size: 7px; font-weight: 700; }
.source-logo > .ti { font-size: 13px; }
.source-switcher-copy strong, .source-switcher-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-switcher-copy strong { font-size: 9px; font-weight: 600; }
.source-switcher-copy small { margin-top: 1px; color: var(--muted); font-size: 7px; }
.source-switcher > .ti { color: var(--muted); font-size: 12px; }
.user-button { grid-template-columns: 25px 1fr auto; min-height: 38px; gap: 8px; padding: 5px 7px; border-radius: 5px; color: var(--text-soft); }
.user-button:hover { background: rgba(255, 255, 255, .7); }
.user-button strong { font-size: 9px; font-weight: 600; }
.user-button small { margin-top: 1px; color: var(--muted); font-size: 7px; }
.user-button > .ti { color: var(--muted); font-size: 13px; }
.avatar { width: 25px; height: 25px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface); font-size: 8px; }
.main-area { grid-column: 2; width: 100%; min-height: calc(100vh - 8px); padding: 0; border-radius: 14px 14px 0 0; background: var(--surface); overflow: clip; }
.workspace-context { display: none; }
.page-canvas { width: 100%; min-height: calc(100vh - 8px); padding: 48px 36px 64px; }
.page-head { min-height: 40px; align-items: flex-start; margin: 0 0 30px; }
.page-head .kicker, .page-head > div > p:last-child { display: none; }
.page-head h1 { margin: 0; color: var(--text); font-size: 34px; font-weight: 500; line-height: 1.15; letter-spacing: -.04em; }
.page-tabs { min-height: 42px; display: flex; align-items: end; gap: 20px; margin: -4px 0 18px; border-bottom: 1px solid var(--border-soft); }
.page-tabs a { position: relative; padding: 0 0 11px; color: var(--muted); font-size: 9px; }
.page-tabs a:hover, .page-tabs a.is-active { color: var(--text); }
.page-tabs a.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: var(--text); }
.button { min-height: 34px; gap: 7px; padding: 0 12px; border-radius: 5px; font-size: 10px; font-weight: 600; }
.button:hover:not(:disabled) { transform: none; }
.button-primary { min-width: 0; color: #fff; background: var(--accent); box-shadow: none; }
.button-primary:hover:not(:disabled) { background: #303330; filter: none; }
.button-secondary { color: var(--text-soft); border-color: var(--border); background: var(--surface); }
.button-secondary:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.button-ghost { color: var(--muted-strong); border-color: transparent; background: transparent; }
.button-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-hover); }
.button-small { min-height: 28px; padding: 0 9px; border-radius: 4px; font-size: 8px; }
.text-link, .text-link span { color: var(--text-soft); font-size: 9px; }
.metric-grid, .compact-metrics { min-height: 40px; display: flex; align-items: stretch; gap: 20px; margin: 0 0 18px; padding: 0; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; background: transparent; box-shadow: none; }
.metric-card, .metric-card.metric-accent, .compact-metrics > div { position: relative; min-height: 40px; width: auto; display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin: 0; padding: 0 0 10px; border: 0; border-radius: 0; color: var(--muted); background: transparent; box-shadow: none; }
.metric-card:first-child::after, .compact-metrics > div:first-child::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: var(--text); }
.metric-top { color: var(--muted-strong); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.metric-icon, .metric-card > p { display: none; }
.metric-card > strong, .metric-card > strong.metric-word, .compact-metrics strong { min-width: 17px; margin: 0; padding: 2px 5px; border-radius: 999px; color: var(--text-soft); background: #f0f1ef; font-size: 8px; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.metric-card:first-child > strong, .compact-metrics > div:first-child strong { color: #fff; background: var(--text); }
.metric-card > strong small { margin: 0; color: inherit; font-size: inherit; }
.compact-metrics > div { border-left: 0; color: var(--muted); font-size: 10px; }
.mini-dot { display: none; }
.panel { border: 0; border-radius: 0; background: var(--surface); box-shadow: none; }
.overview-grid, .operation-grid, .detail-layout { gap: 24px; margin-top: 0; }
.overview-grid { grid-template-columns: minmax(0, 1fr); }
.activity-panel, .quick-panel, .history-panel, .operation-builder, .run-guide, .detail-card { padding: 0; }
.quick-panel, .history-panel { padding-top: 24px; border-top: 1px solid var(--border-soft); }
.panel-head { min-height: 40px; align-items: flex-start; margin: 0; padding: 0; }
.panel-head .kicker { display: none; }
.panel-head h2, .table-title { margin: 0; color: var(--text); font-size: 15px; font-weight: 500; letter-spacing: -.02em; }
.activity-row { min-height: 58px; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--border-soft); }
.activity-row:first-child { border-top: 1px solid var(--border-soft); }
.activity-row:hover { background: #fafbf9; }
.activity-symbol { width: 22px; height: 22px; border-radius: 50%; color: var(--muted); background: #f1f2f0; font-size: 8px; }
.activity-symbol[data-status="succeeded"] { color: var(--good); background: var(--good-soft); }
.activity-symbol[data-status="failed"] { color: var(--bad); background: var(--bad-soft); }
.activity-symbol[data-status="running"] { color: var(--warn); background: var(--warn-soft); }
.activity-title > strong { color: var(--text-soft); font-size: 10px; font-weight: 600; }
.activity-main > p, .activity-meta { color: var(--muted); font-size: 8px; }
.status-badge { gap: 4px; padding: 3px 6px; border-color: var(--border); color: var(--muted-strong); background: #f6f7f5; font-size: 7px; }
.status-badge[data-status="active"], .status-badge[data-status="healthy"], .status-badge[data-status="connected"], .status-badge[data-status="succeeded"], .status-badge[data-status="valid"], .status-badge[data-status="complete"] { color: var(--good); border-color: #cce9da; background: var(--good-soft); }
.status-badge[data-status="banned"], .status-badge[data-status="dead"], .status-badge[data-status="tls_error"], .status-badge[data-status="error"], .status-badge[data-status="failed"], .status-badge[data-status="closed"], .status-badge[data-status="unavailable"] { color: var(--bad); border-color: #f0d2d4; background: var(--bad-soft); }
.status-badge[data-status="challenge"], .status-badge[data-status="session_expired"], .status-badge[data-status="running"], .status-badge[data-status="limited"] { color: var(--warn); border-color: #eddfbf; background: var(--warn-soft); }
.status-badge[data-status="queued"] { color: var(--muted-strong); }
.icon-button { width: 28px; height: 28px; border-color: var(--border); border-radius: 4px; color: var(--muted-strong); background: var(--surface); }
.icon-button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.readiness-list li { min-height: 52px; padding: 9px 4px; border-color: var(--border-soft); }
.readiness-list li > span { border-color: var(--border); color: var(--muted); }
.readiness-list li.is-ready > span { color: var(--good); border-color: #cce9da; background: var(--good-soft); }
.readiness-list strong, .readiness-list a { color: var(--text-soft); font-size: 9px; }
.readiness-list p { color: var(--muted); font-size: 8px; }
.safe-note, .inline-alert { border-color: var(--border); border-radius: 6px; color: var(--muted-strong); background: #fafbf9; }
.safe-note strong, .inline-alert strong { color: var(--text-soft); }
.data-panel { overflow: hidden; box-shadow: none; }
.table-toolbar { min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.search-box { width: min(300px, 100%); height: 32px; padding: 0 9px; border-color: var(--border); border-radius: 5px; color: var(--muted); background: var(--surface); }
.search-box input { color: var(--text); font-size: 9px; }
.search-box input::placeholder { color: #a1a59f; }
.filter-pills { gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.filter-pills button, .filter-pills a { min-height: 30px; padding: 0 9px; border-radius: 4px; color: var(--muted); font-size: 8px; }
.filter-pills button.is-active, .filter-pills a.is-active { color: var(--text); background: #f1f2f0; box-shadow: none; }
.responsive-table { overflow: auto; }
table { border-collapse: collapse; }
th { height: 42px; padding: 0 12px; color: #777d77; background: transparent; font-size: 8px; font-weight: 500; letter-spacing: 0; text-transform: none; }
td { height: 60px; padding: 10px 12px; border-color: var(--border-soft); color: var(--text-soft); font-size: 9px; }
tbody tr:hover { background: #fafbf9; }
.identity-avatar { width: 25px; height: 25px; border-radius: 50%; color: var(--text-soft); background: #f0f1ef; font-size: 8px; }
.identity-cell strong, .proxy-address strong, .date-cell strong, .entity-primary strong, .result-counts strong { color: var(--text-soft); font-size: 9px; font-weight: 600; }
.identity-cell small, .proxy-address small, .date-cell small, .status-stack > small, .entity-primary small, .result-counts small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.status-stack { min-width: 150px; }
.table-foot { min-height: 39px; padding: 0 12px; border-color: var(--border-soft); color: var(--muted); font-size: 7px; }
.pagination a { color: var(--text-soft); }
.pagination strong, .protocol-badge { border-color: var(--border); border-radius: 4px; color: var(--text-soft); background: #f5f6f4; }
.id-code, .latency, .toolbar-note, .breadcrumbs, .group-subtitle { color: var(--muted); font-size: 8px; }
.profile-link { color: var(--text-soft); text-decoration: underline; text-underline-offset: 2px; }
.verified-mark { color: #fff; background: var(--text); }
.operation-grid { grid-template-columns: minmax(0, 1fr) minmax(250px, .36fr); }
.builder-step, .details-list > div, .detail-list > div, .detail-history > a { border-color: var(--border-soft); }
.step-number, .step-title small, .details-list dt, .detail-list dt, .detail-list dd small { color: var(--muted); }
.step-title strong, .details-list dd, .detail-list dd { color: var(--text-soft); }
.step-pill { padding: 4px 7px; border-color: var(--border); border-radius: 999px; color: var(--muted-strong); background: #f5f6f4; }
.field { gap: 6px; color: var(--text-soft); font-size: 9px; font-weight: 500; }
.field > span small { color: var(--muted); font-size: 7px; }
.field input, .field textarea, .field select, .compact-select select { border-color: var(--border); border-radius: 5px; color: var(--text); background: var(--surface-input); font-size: 9px; }
.field input, .field select { min-height: 34px; padding: 8px 9px; }
.field textarea { padding: 9px; }
.field input:focus, .field textarea:focus, .field select:focus, .compact-select select:focus { border-color: #9da19c; box-shadow: 0 0 0 2px rgba(32, 34, 32, .07); }
.field input::placeholder, .field textarea::placeholder { color: #a3a7a2; }
.switch-line { color: var(--text-soft); }
.switch-ui { background: #d2d5d1; }
.switch-line input:checked + .switch-ui { background: var(--text); }
.settings-grid { width: min(650px, 100%); display: block; }
.platform-settings { width: min(650px, 100%); margin: 0; padding: 0 0 22px; }
.platform-settings .panel-head, .settings-card .settings-title { min-height: 44px; align-items: center; border-bottom: 1px solid var(--border-soft); }
.platform-settings .panel-head p:last-child { display: none; }
.platform-settings-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.platform-settings-card { min-height: 62px; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; background: transparent; }
.platform-settings-card.is-active { border-color: var(--border-soft); background: transparent; }
.platform-settings-card strong { color: var(--text-soft); font-size: 9px; }
.platform-settings-card p { margin: 2px 0 0; color: var(--muted); font-size: 7px; }
.platform-settings-card .source-state { grid-column: auto; }
.source-logo-large { width: 28px; height: 28px; font-size: 7px; }
.source-state { color: var(--muted); font-size: 7px; }
.source-state.is-live { color: var(--good); }
.settings-card { min-height: 0; grid-template-columns: 28px 1fr; gap: 12px; padding: 22px 0; border-top: 1px solid var(--border-soft); }
.settings-card:first-child { border-top: 0; }
.settings-icon { width: 28px; height: 28px; border-color: var(--border); border-radius: 50%; color: var(--muted-strong); background: #f4f5f3; }
.settings-title h2 { margin: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.settings-body > p { margin: 12px 0; color: var(--muted); font-size: 8px; }
.balance-box { margin: 12px 0; padding: 10px; border-color: var(--border); border-radius: 5px; background: #fafbf9; }
.balance-box strong { color: var(--text); font-size: 20px; }
.config-note { width: min(650px, 100%); margin-top: 0; padding: 16px 0 0; border-top: 1px solid var(--border-soft); }
.dialog { color: var(--text); }
.dialog::backdrop { background: rgba(31, 34, 31, .22); backdrop-filter: blur(2px); }
.dialog-card, .drawer-card { border-color: var(--border); color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.dialog.drawer { position: fixed; inset: 18px 18px 18px auto; width: min(520px, calc(100vw - 36px)); max-width: calc(100vw - 36px); height: calc(100vh - 36px); max-height: calc(100vh - 36px); margin: 0; border-radius: 12px; }
.drawer-card { width: 100%; min-height: 100%; max-height: 100%; display: flex; flex-direction: column; padding: 0 24px 20px; border: 0; border-radius: 12px; }
form.drawer-card { display: flex; flex-direction: column; }
.dialog-head { min-height: 62px; align-items: flex-start; margin: 0 -24px 18px; padding: 26px 24px 6px; border-bottom: 1px solid var(--border-soft); }
.dialog-head .kicker { display: none; }
.dialog-head h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.dialog-head p:last-child { margin-top: 5px; color: var(--muted); font-size: 8px; }
.dialog-close { width: 24px; height: 24px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 15px; }
.dialog-close:hover { color: var(--text); background: #f2f3f1; }
.tabs { display: flex; gap: 18px; margin: 0 0 18px; padding: 0; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; background: transparent; }
.tabs button { position: relative; min-height: 34px; padding: 0; border-radius: 0; color: var(--muted); font-size: 8px; }
.tabs button.is-active { color: var(--text); background: transparent; box-shadow: none; }
.tabs button.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: var(--text); }
.form-stack { gap: 13px; }
.tab-panel.is-active { display: flex; flex: 1; flex-direction: column; }
.dialog-actions { margin-top: auto; padding-top: 18px; }
.format-hints code { border-color: var(--border); border-radius: 4px; color: var(--muted-strong); background: #f5f6f4; }
.upload-zone { min-height: 90px; border-color: var(--border-strong); border-radius: 6px; color: var(--text-soft); background: #fafbf9; }
.upload-zone:hover { border-color: #9da19c; background: #f6f7f5; }
.upload-icon, .inline-alert > span { color: var(--text-soft); }
.or-divider { color: var(--muted); }
.or-divider::before { background: var(--border-soft); }
.or-divider span { background: var(--surface); }
.log-view { border-color: var(--border); border-radius: 5px; }
.log-head { color: var(--text-soft); background: #f5f6f4; }
.log-view pre { color: #454a45; background: #fafbf9; }
.toast { top: auto; right: 18px; bottom: 18px; width: min(360px, calc(100% - 36px)); min-height: 44px; border-color: #cce9da; border-radius: 5px; color: var(--text-soft); background: #ecfbf2; box-shadow: var(--shadow-sm); }
.toast > span { color: var(--good); background: transparent; }
.source-dialog { width: min(560px, calc(100% - 28px)); }
.source-list { display: grid; gap: 0; }
.source-option { min-height: 58px; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; color: var(--text); background: transparent; }
.source-option.is-active { border-color: var(--border-soft); background: transparent; }
.source-option:disabled { opacity: .5; }
.source-option strong { font-size: 9px; }
.source-option small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.source-roadmap { margin-top: 14px; padding: 10px; border-radius: 5px; background: #f5f6f4; }
.live-progress-panel, .collection-groups-panel { margin-bottom: 18px; padding: 14px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: transparent; }
.job-progress-track { background: #eceeeb; box-shadow: none; }
.job-progress-track > span { background: var(--text); box-shadow: none; }
.collection-group-grid article { border-color: var(--border-soft); border-radius: 5px; background: #fafbf9; }
.collection-group-main strong, .collection-group-state > strong { color: var(--text-soft); }
.collection-group-main small, .collection-group-state > small { color: var(--muted); }
.login-page { background: var(--bg); }
.login-layout { gap: 8px; padding: 8px; }
.login-story { border: 0; border-radius: 14px; background: var(--sidebar); }
.login-story .brand, .login-story .brand-mark, .story-copy h1 { color: var(--text); }
.story-copy h1 { font-size: clamp(40px, 5vw, 68px); font-weight: 500; }
.story-copy > p:last-child, .security-strip { color: var(--muted); }
.login-orbit { display: none; }
.login-form-side { border-radius: 14px; background: var(--surface); }
.login-heading h2 { color: var(--text); font-weight: 500; }
.login-heading > p:last-child, .login-note { color: var(--muted); }
@media (max-width: 900px) { .app-shell { display: block; padding: 0; }
.sidebar { display: none; }
.main-area { min-height: 100vh; border-radius: 0; }
.page-canvas { min-height: calc(100vh - 54px); padding: 20px 20px 88px; }
.mobile-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 0 20px; border-bottom: 1px solid var(--border-soft); background: rgba(255, 255, 255, .96); }
.mobile-source-button { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.mobile-nav { position: fixed; z-index: 50; right: 10px; bottom: 10px; left: 10px; min-height: 58px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); }
.mobile-nav a { display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 6px; color: var(--muted); }
.mobile-nav a.is-active { color: var(--text); background: #f3f4f2; }
.mobile-nav small { font-size: 7px; }
 }
@media (max-width: 720px) { .page-canvas { padding-inline: 14px; }
.page-head { align-items: center; }
.page-head h1 { font-size: 25px; }
.page-head > .button > .ti { display: block; color: #fff; font-size: 20px; font-weight: 700; }
.metric-grid, .compact-metrics { gap: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.metric-grid::-webkit-scrollbar, .compact-metrics::-webkit-scrollbar { display: none; }
.metric-card, .compact-metrics > div { flex: 0 0 auto; }
.table-toolbar { align-items: stretch; flex-direction: column; }
.search-box { width: 100%; }
.filter-pills { overflow-x: auto; }
.filter-pills button, .filter-pills a { flex: 1; white-space: nowrap; }
.responsive-table { overflow: visible; padding: 0; }
table, thead, tbody, tr, th, td { display: block; }
thead { display: none; }
tbody { display: grid; gap: 8px; }
tbody tr { padding: 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
td { height: auto; min-height: 0; display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border-soft); text-align: right; }
td:first-child { border-top: 0; }
td::before { content: attr(data-label); color: var(--muted); font-size: 7px; text-align: left; }
.row-actions { width: 100%; justify-content: flex-end; }
.dialog.drawer { inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
.drawer-card { border-radius: 0; }
.operation-grid, .detail-layout { grid-template-columns: 1fr; }
.settings-grid, .platform-settings, .config-note { width: 100%; }
 }
