/* ======= 雷达图生成器 radar-chart-generator ======= */

.tool-page .tool-container {
    max-width: 1200px;
}

.tool-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}

.tool-title-wrapper i {
    font-size: 2rem;
    color: var(--primary-color);
}

.tool-title-wrapper .tool-title {
    margin-bottom: 0;
    border-bottom: none;
}

/* ---------- 提示条 ---------- */
.rc-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    background: #f0f7ff;
    border: 1px solid #cfe4ff;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.75;
    color: #1a4b7a;
}

.rc-warning i {
    color: var(--primary-color);
    font-size: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* ---------- 布局 ---------- */
.rc-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.rc-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.rc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rc-field > label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rc-field > label span {
    font-weight: 500;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.rc-panel input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
}

.rc-panel .form-input {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-primary);
}

/* 分段按钮组 */
.rc-seg {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.rc-seg-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 6px;
    font-size: 12.5px;
    color: var(--text-secondary);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    text-align: center;
}

.rc-seg-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.rc-seg-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.rc-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.rc-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.rc-check input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 14px;
    height: 14px;
}

/* ---------- 画布 ---------- */
.rc-stage {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rc-canvas-wrap {
    padding: 10px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

#rcCanvas {
    display: block;
    width: 100%;
    height: auto;
}

.rc-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rc-actions select {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
}

.rc-spacer {
    flex: 1 1 auto;
}

/* ---------- 数据表 ---------- */
.rc-data {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--border-color);
}

.rc-data-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rc-data-head h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.rc-data-head .rc-spacer {
    flex: 1 1 auto;
}

.rc-data-head .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.rc-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 13px;
}

.rc-table th,
.rc-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}

.rc-table thead th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.rc-table tbody tr:last-child td {
    border-bottom: none;
}

.rc-table .rc-th-dim {
    min-width: 118px;
}

.rc-table .rc-th-op,
.rc-table .rc-td-op {
    width: 34px;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.rc-ser-head {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 132px;
}

.rc-color {
    width: 24px;
    height: 24px;
    padding: 0;
    flex: 0 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.rc-ser-name {
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
}

.rc-dim,
.rc-val {
    padding: 4px 6px;
    font-size: 12.5px;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.rc-dim {
    width: 100%;
}

.rc-val {
    width: 76px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.rc-ser-name:hover,
.rc-dim:hover {
    border-color: var(--border-color);
}

.rc-ser-name:focus,
.rc-dim:focus,
.rc-val:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
}

.rc-x {
    width: 22px;
    height: 22px;
    padding: 0;
    line-height: 1;
    font-size: 17px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.rc-x:hover {
    background: #ffecec;
    color: #e64545;
}

.rc-hint {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* ---------- 速查表 ---------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.data-table th,
.data-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    color: var(--text-secondary);
}

.data-table thead th {
    background: var(--bg-light);
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.table-note {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .rc-layout {
        grid-template-columns: 1fr;
    }

    .rc-stage {
        order: -1;
    }
}

@media (max-width: 560px) {
    .rc-actions {
        justify-content: center;
    }

    .rc-spacer {
        display: none;
    }

    .rc-checks {
        grid-template-columns: 1fr;
    }

    .rc-data-head {
        justify-content: center;
    }
}
