/* ============================================
   密码重置页面 - 极简商务大气风格
   设计定位：极简商务风，低饱和度浅白+静谧浅蓝主色调
   ============================================ */

/* === CSS 变量（设计令牌） === */
:root {
    /* 主色调 - 静谧浅蓝系 */
    --primary-blue: #3B82F6;
    --primary-blue-light: #60A5FA;
    --primary-blue-bg: #EFF6FF;
    --primary-blue-border: #BFDBFE;

    /* 文字色 - 商务深灰系 */
    --text-dark: #1E293B;
    --text-gray: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;

    /* 功能色 */
    --action-green: #22C55E;
    --action-green-hover: #16A34A;
    --danger-red: #EF4444;
    --warning-orange: #F59E0B;

    /* 边框与背景 */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --bg-page: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-gray: #F1F5F9;

    /* 字体 */
    --font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 阴影 - 极淡柔和 */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-btn: 0 2px 4px rgba(34, 197, 94, 0.2);

    /* 过渡 */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

/* === 页面主体 === */
.reset-pwd-page {
    min-height: 100vh;
    background: transparent;
    font-family: var(--font-family);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

/* === 页面标题栏 - 纯白扁平化 === */
.page-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header h1 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: 0.3px;
}

.page-header .header-time {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}

/* 顶部右侧区域：时间 + 语言切换器 */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 语言切换器 - 页面内（已废弃，保留兼容） */
.lang-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-gray);
    padding: 3px;
    border-radius: var(--radius-full);
}

/* 语言切换器 - 导航栏右上角 */
.lang-switcher-nav {
    display: flex;
    gap: 2px;
    background: var(--bg-gray);
    padding: 3px;
    border-radius: var(--radius-full);
}

.lang-switcher-nav button {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition-fast);
    font-family: var(--font-family);
    font-weight: 500;
}

.lang-switcher-nav button.active {
    background: var(--bg-white);
    color: var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.lang-switcher-nav button:hover:not(.active) {
    background: rgba(59, 130, 246, 0.06);
    color: var(--primary-blue);
}

.lang-switcher button {
    border: none;
    background: transparent;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition-fast);
    font-family: var(--font-family);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.lang-switcher button.active {
    background: var(--bg-white);
    color: var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.lang-switcher button:hover:not(.active) {
    background: rgba(59, 130, 246, 0.06);
    color: var(--primary-blue);
}

/* === 向导容器 === */
.wizard-container {
    max-width: 100%;
    margin: 24px auto;
    padding: 0 24px;
    width: 100%;
}

/* 大圆角白色悬浮卡片 */
.wizard-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: visible;
    border: 1px solid var(--border-light);
    transition: var(--transition-normal);
    position: relative;
    width: 100%;
}

.wizard-card:hover {
    box-shadow: var(--shadow-card-hover);
}

/* === 步骤条 - 极简扁平化 === */
.steps-bar {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 80px 20px;
    background: var(--bg-white);
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    justify-content: flex-start;
}

/* 步骤间连接线：连接圆圈中心（灰色背景线） */
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    top: 18px;
    height: 2px;
    background: var(--border-color);
    z-index: -1;
    border-radius: 1px;
}

.step-item.completed:not(:last-child)::after {
    background: var(--primary-blue);
}

/* 极简圆形步骤标识 */
.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-light);
    transition: var(--transition-normal);
    flex-shrink: 0;
    position: relative;
}

.step-label {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition-fast);
    text-align: center;
}

/* 当前步骤 - 品牌蓝色填充 */
.step-item.active .step-number {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--text-white);
    box-shadow: none;
}

.step-item.active .step-label {
    color: var(--text-dark);
    font-weight: 600;
}

/* 已完成步骤 - 浅灰描边 */
.step-item.completed .step-number {
    background: var(--bg-white);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.step-item.completed {
    cursor: pointer;
}

.step-item.completed .step-label {
    color: var(--text-gray);
}

/* === 步骤面板内容区 === */
.step-panel {
    display: none;
    padding: 32px 60px;
    animation: fadeSlideIn 0.35s ease;
}

.step-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === 表单样式 - 统一规范 === */
.form-group {
    margin-bottom: 28px;
}

/* 步骤1和步骤2的表单：form-group 宽度为面板一半，居中 */
.step1-form .form-group,
.step2-form .form-group {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--text-dark);
    transition: var(--transition-fast);
    outline: none;
    background: var(--bg-white);
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

/* === 密码输入框带眼睛图标 === */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition-fast);
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.06);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-blue);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2394A3B8' d='M7 9L2 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%233B82F6' d='M7 9L2 4h10z'/%3E%3C/svg%3E");
}

/* 验证码区域 - 左右布局 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.captcha-input {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
}

.captcha-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px; /* 和输入框一样高 */
}

.captcha-img {
    height: 44px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.captcha-img:hover {
    border-color: var(--primary-blue);
    opacity: 0.85;
}

.refresh-link {
    color: var(--primary-blue);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-fast);
    font-weight: 500;
}

.refresh-link:hover {
    color: var(--primary-blue-light);
    text-decoration: underline;
}

/* 发送验证码按钮行 */
.code-send-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-input {
    flex: 1;
}

.btn-send-code {
    height: 44px;
    padding: 0 24px;
    background: var(--primary-blue);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-family);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
    font-weight: 500;
}

.btn-send-code:hover:not(:disabled) {
    background: var(--primary-blue-light);
}

.btn-send-code:disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
}

.btn-send-code.counting {
    background: var(--bg-gray);
    color: var(--text-gray);
}

/* === 主操作按钮 - 高饱和度哑光绿色大圆角通栏 === */
.btn-action {
    width: 100%;
    height: 48px;
    background: var(--action-green);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    letter-spacing: 2px;
    margin-top: 12px;
    box-shadow: var(--shadow-btn);
}

/* 步骤1和步骤2的按钮：宽度为面板一半，居中 */
#btn-step1,
#btn-step2 {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.btn-action:hover {
    background: var(--action-green-hover);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.btn-action:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(34, 197, 94, 0.2);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === 步骤3 布局：左右分栏 === */
.step3-layout {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}

.step3-form {
    flex: 0 0 50%;
}

.step3-rules {
    flex: 1;
    padding-left: 32px;
    border-left: 1px solid var(--border-light);
}

/* 密码强度条 */
.strength-section {
    margin-bottom: 24px;
}

.strength-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.strength-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.strength-segment {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    transition: var(--transition-fast);
}

.strength-labels {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text-light);
    margin-top: 6px;
    padding: 0 2px;
}

.strength-labels span {
    flex: 1;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
    min-width: 32px;
}

.strength-segment.active.invalid { background: #FF0000; }
.strength-segment.active.weak { background: #FFFF00; }
.strength-segment.active.fair { background: #FF7F00; }
.strength-segment.active.medium { background: #00FFFF; }
.strength-segment.active.strong { background: #0088FF; }
.strength-segment.active.safe { background: #00FF00; }

.strength-labels span.active {
    font-weight: 600;
}

.strength-labels span.active.weak { color: #FFFF00; }
.strength-labels span.active.fair { color: #FF7F00; }
.strength-labels span.active.medium { color: #00FFFF; }
.strength-labels span.active.strong { color: #0088FF; }
.strength-labels span.active.safe { color: #00FF00; }

/* 规则说明文字 */
.rule-description {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-gray);
    background: #FFF0F0;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border-left: 3px solid #FFA0A0;
    white-space: pre-line;
}

/* 悬浮提示框（Toast） */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    max-width: 90vw;
    white-space: nowrap;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.toast-message.error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--danger-red);
}

.toast-message.success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}

.toast-message.info {
    background: var(--primary-blue-bg);
    border: 1px solid var(--primary-blue-border);
    color: var(--primary-blue);
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(2px);
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功结果页 */
.result-success {
    text-align: center;
    padding: 64px 20px;
}

.result-success .icon-success {
    width: 64px;
    height: 64px;
    background: var(--action-green);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-success .icon-success svg {
    width: 32px;
    height: 32px;
    stroke: white;
    stroke-width: 3;
}

@keyframes scaleIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.result-success h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.result-success p {
    color: var(--text-gray);
    font-size: 14px;
}

/* === 响应式适配 === */
@media (max-width: 768px) {
    .page-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .wizard-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .step-panel {
        padding: 32px 20px;
    }

    .steps-bar {
        padding: 28px 16px;
    }

    .steps-bar::before {
        left: 24px;
        right: 24px;
    }

    .step-label {
        font-size: 12px;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .step3-layout {
        flex-direction: column;
        gap: 28px;
    }

    .step3-form {
        flex: none;
        width: 100%;
    }

    .step3-rules {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-light);
        padding-top: 24px;
    }

    .captcha-row {
        flex-wrap: wrap;
    }

    .code-send-row {
        flex-wrap: wrap;
    }

    .btn-send-code {
        width: 100%;
    }

    .strength-labels {
        font-size: 10px;
    }
}

/* === 中等屏幕适配 === */
@media (max-width: 1024px) and (min-width: 769px) {
    .wizard-container {
        max-width: 92%;
    }

    .step-panel {
        padding: 48px 56px;
    }

    .steps-bar {
        padding: 36px 48px;
    }

    .steps-bar::before {
        left: 48px;
        right: 48px;
    }
}

/* 步骤未完成时的按钮禁用态 */
.btn-protected {
    opacity: 0.5;
    pointer-events: none;
}


