/* ========================================
   Auth Pages Mobile - 認證頁面 RWD
   符合 CLAUDE.md 斷點規範 (xs: <= 639px)
   ======================================== */

/* ========================================
   Mobile RWD (<= 639px)
   ======================================== */

@media (max-width: 639px) {
    /* Main 容器調整 */
    .je-auth-main {
        padding-top: calc(var(--je-header-height-mobile) + var(--je-space-6));
        padding-left: var(--je-space-3);
        padding-right: var(--je-space-3);
    }

    /* 容器寬度調整 */
    .je-auth-container {
        max-width: 100%;
    }

    /* Card 調整 */
    .je-auth-card {
        border-radius: var(--je-radius-lg);
    }

    .je-auth-card-header {
        padding: var(--je-space-6) var(--je-space-5) var(--je-space-5);
    }

    .je-auth-card-body {
        padding: var(--je-space-6) var(--je-space-5);
    }

    /* Icon 縮小 */
    .je-auth-icon {
        width: var(--je-space-12);
        height: var(--je-space-12);
        font-size: var(--je-text-xl);
    }

    /* 標題縮小 */
    .je-auth-title {
        font-size: var(--je-text-xl);
        margin-bottom: var(--je-space-1);
    }

    .je-auth-subtitle {
        font-size: var(--je-text-xs);
    }

    /* 表單群組間距調整 */
    .je-auth-card .je-form-group {
        margin-bottom: var(--je-space-4);
    }

    /* 輸入框調整 */
    .je-auth-card .je-input-surface {
        height: var(--je-btn-height-md);
        font-size: var(--je-text-sm);
        padding-left: calc(var(--je-space-3) + 24px);
    }

    .je-form-input-icon {
        left: var(--je-space-3);
        font-size: var(--je-text-base);
    }

    /* Password Toggle 調整 */
    .je-password-toggle {
        right: var(--je-space-3);
    }

    /* 記住我 & 忘記密碼 */
    .je-form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--je-space-3);
        margin-bottom: var(--je-space-5);
    }

    .je-forgot-link {
        align-self: flex-end;
    }

    /* 按鈕調整 */
    .je-auth-card .je-btn-lg {
        height: var(--je-btn-height-md);
        font-size: var(--je-text-sm);
    }

    /* Switch Info 調整 */
    .je-form-switch-info,
    .je-back-link {
        margin-top: var(--je-space-5);
        padding-top: var(--je-space-5);
        font-size: var(--je-text-xs);
    }

    /* Terms 調整 */
    .je-form-terms {
        margin-bottom: var(--je-space-5);
    }

    .je-form-terms .je-form-check-label {
        font-size: var(--je-text-xs);
    }

    /* 背景裝飾調整 */
    .je-auth-bg-gradient {
        width: 400px;
        height: 400px;
        filter: blur(100px);
        opacity: 0.3;
    }

    .je-auth-bg-gradient-1 {
        top: -150px;
        right: -80px;
    }

    .je-auth-bg-gradient-2 {
        bottom: -150px;
        left: -80px;
    }

    /* Message 調整 */
    .je-auth-card .je-form-message {
        padding: var(--je-space-3);
        font-size: var(--je-text-sm);
    }

    /* Label 調整 */
    .je-form-label {
        font-size: var(--je-text-sm);
    }
}

/* ========================================
   極小螢幕 - iPhone SE 等（整合至 sm 斷點）
   ======================================== */

@media (max-width: 639px) /* sm 斷點 - 整合 iPhone SE */ {
    .je-auth-main {
        padding-left: var(--je-space-2);
        padding-right: var(--je-space-2);
    }

    .je-auth-card-header,
    .je-auth-card-body {
        padding-left: var(--je-space-4);
        padding-right: var(--je-space-4);
    }

    .je-auth-title {
        font-size: var(--je-text-lg);
    }
}
