/* Dashboard components (Proxies, Connections, Rules, Core Logs) */

.dash-stopped {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.dash-ctrls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 40px;
}

.dash-ctrls-bar .spacer { flex: 1; }

.dash-icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dash-icon-btn svg {
    width: 16px;
    height: 16px;
}

.dash-icon-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.dash-subtabs {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.dash-subtabs button {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dash-subtabs button.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.dash-badge {
    font-size: 11px;
    background: var(--bg-surface-2);
    border-radius: 999px;
    padding: 1px 6px;
    color: var(--text-muted);
}

.dash-search {
    position: relative;
    min-width: 160px;
    max-width: 280px;
    flex: 1;
}

.dash-search input,
.dash-ctrls-bar select {
    height: var(--control-h-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 0 10px;
    font: inherit;
    font-size: 13px;
}

.dash-search input {
    width: 100%;
    padding-right: 30px;
    box-sizing: border-box;
}

.dash-search-clear {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-search-clear:hover {
    color: var(--text-primary);
    background: var(--bg-surface-2);
}

.dash-search-clear svg {
    width: 14px;
    height: 14px;
}

.dash-search-clear[hidden] { display: none; }

.dash-ctrls-bar select {
    width: auto;
    min-width: 96px;
    max-width: 220px;
    flex: 0 0 auto;
}

.dash-ctrls-bar select.dash-srcip {
    max-width: 320px;
}

.dash-stat {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.dash-shown {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dash-shown[hidden] { display: none; }

.dash-shown.is-filtered {
    background: var(--accent-soft);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 3px 8px;
}

.dash-shown b {
    font-weight: 600;
    color: var(--accent);
}

.dash-shown-rest {
    color: var(--text-muted);
}

/* Proxy group layout (single / two column) */
.dash-groups.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
    align-items: start;
}

.dash-groups-col { min-width: 0; }

/* Proxy groups */
.dash-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    background: var(--bg-surface);
}

.dash-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

.dash-group.open .dash-group-head { border-bottom: 1px solid var(--border-color); }

.dash-group-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-proxy-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    overflow: hidden;
}

.dash-proxy-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dash-proxy-icon-svg svg {
    display: block;
    width: 18px;
    height: 18px;
}

.dash-proxy-icon-text {
    font-size: 14px;
    line-height: 1;
}

.dash-group-head .dash-proxy-icon {
    width: 20px;
    height: 20px;
}

.dash-group-head .dash-proxy-icon-svg svg {
    width: 20px;
    height: 20px;
}

.dash-group-head .now {
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
}

.dash-group-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.dash-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text-muted) 40%, transparent);
    flex: none;
}

.dash-group-head .dash-group-type {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    text-transform: lowercase;
}

.dash-group-count {
    font-variant-numeric: tabular-nums;
}

.dash-group-head-end {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.dash-group-speed {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-group-head .chev {
    color: var(--text-muted);
    display: inline-flex;
    transition: transform .15s;
}

.dash-group.open .dash-group-head .chev { transform: rotate(90deg); }

.dash-preview {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
    min-width: 60px;
}

/* Preview row under a group/provider title, visible only when collapsed */
.dash-group-preview {
    display: flex;
    padding: 0 12px 10px;
    cursor: pointer;
}

.dash-group.open .dash-group-preview,
.dash-provider-block.open .dash-group-preview { display: none; }

.dash-group-preview:empty { display: none; }

.dash-preview-seg { height: 100%; }
.dash-preview-seg.lat-good { background: #98c379; }
.dash-preview-seg.lat-med { background: #e6c07b; }
.dash-preview-seg.lat-bad { background: #e06c75; }
.dash-preview-seg.lat-dead { background: var(--text-muted); opacity: .5; }

/* dot-style preview */
.dash-preview-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    justify-content: flex-start;
}

.dash-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .1s;
}

.dash-preview-dot:hover { transform: scale(1.2); }
.dash-preview-dot.lat-good { background: #98c379; }
.dash-preview-dot.lat-med { background: #e6c07b; }
.dash-preview-dot.lat-bad { background: #e06c75; }
.dash-preview-dot.lat-dead { background: var(--text-muted); opacity: .5; }
.dash-preview-dot.on::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
}

/* group-by-provider label inside a group body */
.dash-provider-label {
    margin: 8px 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.dash-proxy-name.nowrap-off {
    white-space: normal;
    overflow: hidden;
    word-break: break-all;
}

.dash-group-body { display: none; padding: 10px 12px 12px; }
.dash-group.open .dash-group-body { display: block; }

.dash-proxy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--dash-card-min, 140px), 100%), 1fr));
    gap: 8px;
}

.dash-proxy-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-proxy-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    background: var(--bg-surface-2);
    transition: border-color .12s, background .12s;
    min-width: 0;
    overflow: hidden;
}

.dash-proxy-card:hover { border-color: var(--accent); }
.dash-proxy-card.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.dash-proxy-card.dead { opacity: .45; }
.dash-proxy-card.sm { padding: 6px 8px; }
.dash-proxy-card.sm .dash-proxy-type { display: none; }

.dash-proxy-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.dash-proxy-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-proxy-type {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    min-height: 1.2em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-proxy-type.is-empty {
    visibility: hidden;
}

.dash-latency {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--bg-surface);
}

.dash-latency.lat-good { color: #98c379; }
.dash-latency.lat-med { color: #e6c07b; }
.dash-latency.lat-bad { color: #e06c75; }
.dash-latency.lat-dead { color: var(--text-muted); }

/* bouncing dots while a latency test is running */
.dash-latency.lat-testing {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dash-latency.lat-testing i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: dash-lat-bounce .9s infinite ease-in-out;
}

.dash-latency.lat-testing i:nth-child(2) { animation-delay: .15s; }
.dash-latency.lat-testing i:nth-child(3) { animation-delay: .3s; }

@keyframes dash-lat-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-3px); }
}

.dash-proxy-card .dash-latency { cursor: pointer; }

.dash-provider-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    padding: 10px 12px;
}

.dash-provider-block > :last-child { margin-bottom: 0; }

.dash-provider-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}

.dash-provider-head:last-child { margin-bottom: 0; }

.dash-provider-head .name {
    flex: 1;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-provider-head .chev {
    color: var(--text-muted);
    display: inline-flex;
    transition: transform .15s;
}

.dash-provider-block.open .dash-provider-head .chev { transform: rotate(90deg); }

/* Preview row inside a provider block sits flush with block padding */
.dash-provider-block .dash-group-preview { padding: 0 0 2px; }

.dash-usage {
    margin-bottom: 10px;
}

.dash-usage-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-muted, rgba(127, 127, 127, 0.2));
    overflow: hidden;
}

.dash-usage-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.2s ease;
}

.dash-usage-fill.usage-ok { background: var(--success, #98c379); }
.dash-usage-fill.usage-warn { background: var(--warning, #e5c07b); }
.dash-usage-fill.usage-critical { background: var(--danger, #e06c75); }

.dash-usage-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Connections table */
.dash-conn-view {
    min-height: 120px;
}

.dash-table-wrap {
    overflow-y: scroll;
    overflow-x: auto;
    max-height: calc(100vh - 220px);
}

/* Full-list height for card virtualization. Tables use spacer <tr> instead —
   tbody padding is ignored with border-collapse, and tbody transform breaks sticky columns. */
.dash-virt-sizer {
    position: relative;
    width: max-content;
    min-width: 100%;
}

.dash-table tr[data-virt-pad] td {
    padding: 0;
    border: 0;
    line-height: 0;
    font-size: 0;
}

.dash-table {
    width: max-content;
    border-collapse: collapse;
    font-size: 13px;
}

.dash-table th,
.dash-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.dash-table tbody tr:not([data-virt-pad]) {
    height: 44px;
    box-sizing: border-box;
    cursor: pointer;
}

.dash-table.sm tbody tr:not([data-virt-pad]) {
    height: 36px;
}

.dash-table tbody td {
    max-height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-table.sm tbody td {
    max-height: 36px;
}

.dash-table th {
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    font-weight: 600;
    color: var(--text-secondary);
    z-index: 1;
    cursor: pointer;
    user-select: none;
}

.dash-table th.sorted { color: var(--accent); }
.dash-table th[data-sort] { cursor: pointer; user-select: none; }

.dash-sort-rank {
    font-size: 10px;
    line-height: 1;
    opacity: .75;
    min-width: 10px;
}

.dash-sort-stack {
    font-size: .78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.dash-table tr:hover td { background: var(--bg-surface-2); }

/* Sticky pinned column (Host / Sniff host) — opt-in via header pin button */
.dash-th-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dash-table .dash-th-inner .dash-icon-btn {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0 1px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: .5;
    color: var(--text-muted);
}

.dash-table .dash-th-inner .dash-icon-btn:hover {
    opacity: .9;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.dash-table .dash-th-inner .dash-icon-btn.active {
    opacity: 1;
    color: var(--accent);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.dash-table .dash-th-inner .dash-icon-btn svg {
    width: 13px;
    height: 13px;
}

.dash-table[data-pinned-col="host"] th[data-col="host"],
.dash-table[data-pinned-col="host"] td[data-col="host"],
.dash-table[data-pinned-col="sniffHost"] th[data-col="sniffHost"],
.dash-table[data-pinned-col="sniffHost"] td[data-col="sniffHost"] {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-surface);
    box-shadow: 2px 0 6px rgba(0, 0, 0, .08);
}

.dash-table[data-pinned-col="host"] th[data-col="host"],
.dash-table[data-pinned-col="sniffHost"] th[data-col="sniffHost"] {
    z-index: 4;
}

.dash-table[data-pinned-col="host"] td[data-col="host"],
.dash-table[data-pinned-col="host"] th[data-col="host"] {
    min-width: 9rem;
    max-width: 14rem;
}

.dash-table[data-pinned-col="sniffHost"] td[data-col="sniffHost"],
.dash-table[data-pinned-col="sniffHost"] th[data-col="sniffHost"] {
    min-width: 8rem;
    max-width: 14rem;
}

.dash-table[data-pinned-col="host"] tr:hover td[data-col="host"],
.dash-table[data-pinned-col="sniffHost"] tr:hover td[data-col="sniffHost"] {
    background: var(--bg-surface-2);
}

.dash-table .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

.dash-table td[data-col="dlSpeed"],
.dash-table td[data-col="ulSpeed"],
.dash-table td[data-col="download"],
.dash-table td[data-col="upload"],
.dash-table td[data-col="connectTime"] {
    font-variant-numeric: tabular-nums;
    width: 6.5rem;
}

.dash-chain {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.dash-chain-arrow {
    display: inline-flex;
    vertical-align: middle;
    opacity: .6;
    margin: 0 2px;
}

.dash-chain-arrow svg { width: 14px; height: 14px; }

.dash-chain-node { white-space: nowrap; }

.dash-hl {
    background: rgba(255, 213, 79, .35);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* Connection cards */
.dash-conn-cards {
    overflow-y: scroll;
    max-height: calc(100vh - 220px);
}

.dash-virt-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-conn-cards .dash-virt-sizer {
    width: 100%;
}

.dash-conn-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    background: var(--bg-surface);
    margin-bottom: 8px;
}

.dash-conn-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dash-conn-card-head .host {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
}

.dash-conn-card {
    cursor: pointer;
}

.dash-conn-card:hover { border-color: var(--accent); }

.dash-conn-card-lines {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.dash-conn-card-lines .k { color: var(--text-muted); }

.dash-table.sm th,
.dash-table.sm td { padding: 4px 8px; font-size: 12px; }

/* Connection details modal */
.modal-body:has(.dash-detail) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.dash-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.dash-detail-tabs {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 12px;
    flex-shrink: 0;
    width: auto;
    align-self: flex-start;
}

.dash-detail-panes {
    flex: 1;
    min-height: 0;
    overflow: auto;
    align-self: stretch;
    width: 100%;
}

.dash-detail-tabs button {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.dash-detail-tabs button.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.dash-detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 14px;
    font-size: 13px;
}

.dash-detail-grid .k { color: var(--text-muted); white-space: nowrap; }
.dash-detail-grid .v { word-break: break-all; }

.dash-detail-raw {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    background: var(--bg-code);
    color: #e6e9ec;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Column picker + inline number pairs in settings modals */
.dash-col-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 12px;
}

.dash-col-picker label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

.dash-col-picker input { width: auto; height: auto; }

.modal-inline { display: flex; gap: 8px; }
.modal-inline input { flex: 1; }

/* Core logs — typography matches the System Log view (.logbox) */
.core-logbox {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: .82rem;
    line-height: 1.5;
    background: var(--bg-code);
    color: #e6e9ec;
    border-radius: var(--radius);
    padding: 12px;
    height: var(--editor-h);
    min-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.core-logbox .line { padding: 1px 0; }
.core-logbox .line-warn { color: #e6c07b; }
.core-logbox .line-err { color: #e06c75; }
.core-logbox .line-info { color: #98c379; }
.core-logbox mark.dash-hl { background: rgba(255, 213, 79, .25); color: inherit; }

/* Rules */
.dash-rule {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 12px;
}

.dash-rule:hover { background: var(--bg-surface-2); }

.dash-rule.disabled { opacity: .55; }

.dash-rule-head {
    display: grid;
    grid-template-columns: 48px 100px 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.dash-rule .idx { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.dash-rule-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dash-rule .type { font-weight: 600; }
.dash-rule .payload { word-break: break-all; color: var(--text-secondary); }
.dash-rule-proxy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-left: 48px;
    min-height: 28px;
    flex-wrap: wrap;
}

.dash-rule-expand-slot {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-rule-chain-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.dash-rule-chain-path {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 4px;
    color: var(--accent);
    font-size: 12px;
}

.dash-rule-chain-path .dash-chain-node {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-surface);
}

.dash-rule-chain-path .dash-chain-node.terminal {
    color: var(--text-secondary);
}

.dash-chain-node.dash-chain-pick {
    border: none;
    background: var(--bg-surface);
    color: var(--accent);
    font: inherit;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.dash-chain-node.dash-chain-pick:hover { background: var(--bg-surface-2); }

.dash-chain-node.dash-chain-pick.active {
    background: var(--accent);
    color: #fff;
}

.dash-rule-proxy-row .dash-latency { cursor: pointer; }

.dash-rule-info {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    cursor: help;
}

.dash-rule-info svg { width: 15px; height: 15px; }
.dash-rule-info:hover { color: var(--accent); }

.dash-rule-expand {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.dash-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.modal-field { margin-bottom: 12px; }
.modal-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.modal-field select,
.modal-field input[type="text"],
.modal-field input[type="number"] {
    width: 100%;
    height: var(--control-h-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 0 10px;
    font: inherit;
}

.modal-field .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 900px) {
    .dash-rule-head {
        grid-template-columns: 40px 1fr auto;
    }
    .dash-rule .type { grid-column: 2; }
    .dash-rule-proxy-row { padding-left: 40px; }
    .dash-group-speed { display: none !important; }
}
