/* 系统设置 → OpenClash 加速控制台的样式。紧跟在 wifi_admin.css 之后加载。 */

.openclash-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.openclash-status-item {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.openclash-status-item span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.openclash-status-item strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.openclash-status-item.is-online {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.openclash-status-item.is-maybe {
    border-color: #fde68a;
    background: #fffbeb;
}

.openclash-status-item.is-offline {
    border-color: #fecaca;
    background: #fff1f2;
}

.openclash-diagnostics {
    border-top: 1px solid #eef2f7;
    padding-top: 10px;
}

.openclash-diagnostics summary {
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.openclash-diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.openclash-diagnostics-grid .openclash-status-item {
    padding: 8px;
}

.openclash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.openclash-node-toolbar {
    align-items: center;
}

.openclash-node-search {
    width: min(260px, 100%);
    height: 34px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
}

.openclash-node-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    padding: 10px 12px;
}

.openclash-node-summary-main {
    min-width: 0;
}

.openclash-node-summary-title {
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

.openclash-node-summary-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.openclash-node-summary-meta {
    margin-top: 2px;
    color: #047857;
    font-size: 12px;
}

.openclash-node-list,
.openclash-node-groups {
    display: grid;
    gap: 10px;
}

.openclash-node-group {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.openclash-node-group.is-system {
    opacity: 0.82;
}

.openclash-node-group-head {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    background: #f9fafb;
    padding: 9px 10px;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.openclash-node-group-title {
    margin-right: 8px;
    font-size: 13px;
    font-weight: 900;
}

.openclash-node-group-meta,
.openclash-node-group-toggle {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.openclash-node-group-body {
    display: grid;
}

.openclash-compact-row {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #f3f4f6;
    padding: 8px 10px;
}

.openclash-compact-row.is-current {
    background: #f0fdf4;
}

.openclash-compact-row.is-unavailable {
    background: #fafafa;
    color: #6b7280;
}

.openclash-node-main {
    min-width: 0;
}

.openclash-node-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.openclash-node-sub {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.openclash-node-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
}

.openclash-mini-badge {
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
}

.openclash-switch-btn {
    min-height: 30px;
    padding: 5px 12px;
}

.openclash-empty-state {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    padding: 14px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 768px) {
    .openclash-actions button {
        width: 100%;
    }

    .openclash-node-toolbar {
        align-items: stretch;
    }

    .openclash-node-search {
        width: 100%;
    }

    .openclash-node-summary {
        align-items: flex-start;
    }
}
