/* ============================================================
   修改密码页样式（change-password.html）
   - 依赖 common.css（变量 / 按钮 / 表单基础类）与 user.css
     （auth 表单控件：form-input-wrap / pwd-toggle / btn-login / info-card）
   - 单套响应式布局：移动端全宽卡片，PC 端居中窄卡，
     随设备宽度自适应（断点与项目其他页面一致：768px）
   ============================================================ */

/* ---------- 页面标题栏（与签到页 sign-page-head 一致） ---------- */
.cp-page-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: 14px 16px;
}
.cp-page-head-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cp-page-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
}
.cp-back-btn {
    font-size: 12px;
    color: var(--c-primary);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--c-primary-light);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.cp-back-btn:hover {
    background: rgba(24, 144, 255, .18);
    color: var(--c-primary-dark);
}

/* ---------- 页面容器：移动端全宽 / PC 居中窄卡 ---------- */
.cp-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 12px 80px;
}

/* ---------- 表单卡片 ---------- */
.cp-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px 24px 24px;
    position: relative;
    overflow: hidden;
}
/* 顶部主色装饰条（与签到页卡片一致） */
.cp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1890ff, #36cfc9);
}

/* 卡片头部：锁形图标 + 标题 + 副标题 */
.cp-card-head {
    text-align: center;
    margin-bottom: var(--space-lg);
}
.cp-logo {
    display: inline-flex;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    border-radius: 14px;
    color: #fff;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    box-shadow:
        0 8px 20px rgba(24, 144, 255, 0.35),
        0 0 0 4px rgba(24, 144, 255, 0.08);
}
.cp-logo svg { width: 26px; height: 26px; }
.cp-card-head h2 {
    font-size: 20px;
    color: var(--c-text);
    margin-bottom: var(--space-xs);
    font-weight: 600;
}
.cp-card-head p {
    font-size: 13px;
    color: var(--c-text-3);
}

/* 底部辅助链接 */
.cp-footer-link {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 13px;
    color: var(--c-text-3);
}
.cp-footer-link a {
    color: var(--c-primary);
    margin-left: var(--space-xs);
}

/* ---------- PC 端适配（≥769px） ---------- */
@media (min-width: 769px) {
    .cp-wrap {
        padding-top: 32px;
        padding-bottom: 60px;
    }
    .cp-card {
        padding: 36px 36px 28px;
        border-radius: 20px;
    }
    .cp-card-head h2 { font-size: 22px; }
}

/* ---------- 小屏移动端适配（≤480px） ---------- */
@media (max-width: 480px) {
    .cp-card { padding: 24px 18px 20px; }
    .cp-logo { width: 50px; height: 50px; }
    .cp-card-head h2 { font-size: 18px; }
}

/* ============================================================
   暗黑模式适配
   说明：引用 var(--c-*) 主题变量的规则已随 common.css 暗黑
   变量自动适配，此处仅保留取值不同的覆盖项。
   ============================================================ */
html[data-theme="dark"] .cp-back-btn {
    background: rgba(24, 144, 255, .15);
    color: #40a9ff;
}
html[data-theme="dark"] .cp-back-btn:hover {
    background: rgba(24, 144, 255, .22);
}
html[data-theme="dark"] .cp-card {
    box-shadow:
        0 18px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
