/* ========================================
   设备选型向导专用样式
   依赖：style.css（CSS Design Tokens v4.0 深色主题）
   ======================================== */

/* ---- 向导区容器 ---- */
.wizard-section {
    padding: 48px 0 80px;
    min-height: 60vh;
}

/* ---- 设备选择区 ---- */
.wizard-selector-header {
    text-align: center;
    margin-bottom: 32px;
}
.wizard-selector-header h2 {
    font-size: var(--text-2xl);
    color: var(--text);
    margin-bottom: 8px;
}
.wizard-selector-header p {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

.wizard-search {
    max-width: 480px;
    margin: 0 auto 24px;
}
.wizard-search input {
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: var(--text-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wizard-search input:focus {
    outline: none;
    border-color: var(--tech-cyan);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}
.wizard-search input::placeholder {
    color: var(--text-muted);
}

.wizard-category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 28px;
}
.wizard-category-tab {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    background: transparent;
    transition: all 0.2s ease;
}
.wizard-category-tab:hover {
    border-color: var(--text-muted);
    color: var(--text);
}
.wizard-category-tab.active {
    border-color: var(--tech-cyan);
    color: var(--tech-cyan);
    background: rgba(6,182,212,0.08);
}

.wizard-device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.wizard-device-card {
    padding: 20px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    background: var(--bg-section);
    transition: all 0.25s ease;
}
.wizard-device-card:hover {
    border-color: var(--tech-cyan);
    background: var(--bg-elevated);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(6,182,212,0.08);
}
.wizard-device-name {
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.4;
}

/* ---- 当前设备条 ---- */
.wizard-selected-device {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-section);
    border: 1px solid var(--border-accent);
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 28px;
}
.wizard-selected-device-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wizard-selected-device-label {
    color: var(--text-muted);
    font-size: var(--text-sm);
}
.wizard-selected-device-name {
    color: var(--accent);
    font-weight: 600;
    font-size: var(--text-lg);
}
.wizard-change-device-btn {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}
.wizard-change-device-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

/* ---- 进度条 ---- */
.wizard-progress {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: nowrap;
}
.wizard-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.wizard-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-muted);
    background: var(--bg-section);
    transition: all 0.25s ease;
}
.wizard-progress-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    transition: color 0.25s ease;
}
.wizard-progress-step.active .wizard-progress-dot {
    border-color: var(--tech-cyan);
    background: rgba(6,182,212,0.1);
    color: var(--tech-cyan);
}
.wizard-progress-step.active .wizard-progress-label {
    color: var(--tech-cyan);
}
.wizard-progress-step.completed .wizard-progress-dot {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #fff;
}
.wizard-progress-step.completed .wizard-progress-label {
    color: var(--color-success);
}
.wizard-progress-line {
    width: 48px;
    height: 2px;
    background: var(--border);
    margin-top: 17px;
    flex-shrink: 0;
    transition: background 0.25s ease;
}
.wizard-progress-line.completed {
    background: var(--color-success);
}

/* ---- 填写提示 ---- */
.wizard-fill-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: 28px;
    padding: 10px 16px;
    background: var(--color-info-bg);
    border-radius: 8px;
    border: 1px solid rgba(59,130,246,0.15);
}

/* ---- 步骤面板 ---- */
.wizard-steps {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}
.wizard-step-panel {
    display: none;
}
.wizard-step-panel.active {
    display: block;
    animation: wizardFadeIn 0.3s ease;
}
@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.wizard-step-title {
    font-size: var(--text-xl);
    color: var(--accent);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ---- 表单项 ---- */
.wizard-step-items {
    display: grid;
    gap: 20px;
}
.wizard-form-item {
    display: flex;
    flex-direction: column;
}
.wizard-form-item label {
    margin-bottom: 8px;
    color: var(--text);
    font-size: var(--text-base);
    font-weight: 500;
}
.wizard-form-item input[type="text"],
.wizard-form-item input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: var(--text-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wizard-form-item input[type="text"]:focus,
.wizard-form-item input[type="email"]:focus {
    outline: none;
    border-color: var(--tech-cyan);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}
.wizard-form-item input::placeholder {
    color: var(--text-muted);
}
.wizard-form-item select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: var(--text-base);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wizard-form-item select:focus {
    outline: none;
    border-color: var(--tech-cyan);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}

/* radio 组 */
.radio-group {
    display: flex;
    gap: 24px;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text);
    font-size: var(--text-base);
}
.radio-label input[type="radio"] {
    accent-color: var(--tech-cyan);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 单位后缀 */
.input-unit {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 400;
}

/* 必填标记 */
.required {
    color: var(--color-error);
}

/* 错误状态 */
.wizard-form-item.error input,
.wizard-form-item.error select {
    border-color: var(--color-error);
}
.field-error {
    color: var(--color-error);
    font-size: var(--text-xs);
    margin-top: 4px;
    min-height: 16px;
}

/* ---- 客户信息区 ---- */
.wizard-customer-info {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-deep);
    border: 1px solid var(--border-cyan);
    border-radius: 10px;
}
.wizard-customer-info h3 {
    color: var(--tech-cyan);
    font-size: var(--text-lg);
    margin-bottom: 8px;
}
.wizard-customer-hint {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: 20px;
}
.wizard-customer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ---- 步骤导航 ---- */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
}
.wizard-nav-btn {
    padding: 12px 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--text-base);
    transition: all 0.25s ease;
    border: none;
    font-weight: 500;
}
.wizard-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.wizard-nav-prev {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.wizard-nav-prev:not(:disabled):hover {
    border-color: var(--text-secondary);
    color: var(--text);
}
.wizard-nav-next,
.wizard-submit-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    font-weight: 600;
}
.wizard-nav-next:hover,
.wizard-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201,162,39,0.2);
}
.wizard-submit-btn {
    flex: 1;
    padding: 14px 48px;
    font-size: var(--text-lg);
}

/* ---- 成功页 ---- */
.wizard-success {
    display: none;
    text-align: center;
    padding: 80px 20px;
}
.wizard-success.visible {
    display: block;
    animation: wizardFadeIn 0.4s ease;
}
.wizard-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
    font-size: 40px;
    line-height: 80px;
    box-shadow: 0 0 32px rgba(34,197,94,0.3);
}
.wizard-success-title {
    font-size: var(--text-3xl);
    color: var(--accent);
    margin-bottom: 12px;
}
.wizard-success-text {
    color: var(--text-secondary);
    font-size: var(--text-base);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.wizard-success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.wizard-success-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
}
.wizard-success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201,162,39,0.2);
}
.wizard-success-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.wizard-success-btn-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text);
    box-shadow: none;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .wizard-section { padding: 32px 0 60px; }
    .wizard-device-grid { grid-template-columns: repeat(2, 1fr); }
    .wizard-steps { padding: 20px; }
    .wizard-customer-grid { grid-template-columns: 1fr; }
    .wizard-nav { flex-direction: column-reverse; }
    .wizard-nav-btn { width: 100%; }
    .wizard-progress-line { width: 20px; }
    .wizard-progress-dot { width: 28px; height: 28px; font-size: var(--text-xs); }
    .wizard-progress-label { font-size: 10px; }
    .wizard-selected-device { flex-direction: column; gap: 12px; align-items: flex-start; }
}
@media (max-width: 480px) {
    .wizard-device-grid { grid-template-columns: 1fr; }
    .wizard-progress-label { display: none; }
}
