/* ============================================================
   ログインページ
   Figma: PC node-id=3042:45876 / SP node-id=3042:45923
   Colors: #0068ce primary, #ec0000 error, #333 text, #666 border
   Form bg: rgba(240,249,255,0.5)  PC padding: 80px  SP: 40px 16px
   ============================================================ */

.p-login {
    padding-bottom: 100px;
}

/* ========== メインコンテナ ========== */
/* Figma: max-width 1080px, pt-[48px], gap-[64px] */
.p-login__main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px var(--gutter, 24px) 0;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* ========== ページヘッダー ========== */
.p-login__header {
    padding-bottom: 16px;
}

/* Figma: "Log In" 18px bold #0068ce leading-[1.6] tracking-[0.36px] */
.p-login__en-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.6;
    letter-spacing: 0.36px;
    margin: 0;
}

/* Figma: 32px bold #333 leading-[1.5] tracking-[0.32px] */
.p-login__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.5;
    letter-spacing: 0.32px;
    margin: 0;
}

/* ========== フォームエリア ========== */
/* Figma: bg-rgba(240,249,255,0.5) p-[80px] gap-[48px] */
.p-login__wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.p-login__form {
    background-color: rgba(240, 249, 255, 0.5);
    padding: 80px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ========== 成功通知（パスワード変更後など） ========== */
.p-login__success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 24px;
}

.p-login__success svg {
    flex-shrink: 0;
    color: #16a34a;
}

/* ========== エラーブロック ========== */
.p-login__error {
    background-color: #fdeeee;
    border: 1px solid #ce0000;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 24px;
}

.p-login__error p {
    font-size: 1rem;
    color: #ce0000;
    line-height: 1.7;
    margin: 0;
}

/* ========== フィールド群 ========== */
/* Figma: gap-[32px] */
.p-login__fields {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ========== 各フィールド ========== */
.p-login__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p-login__field--error .p-login__input {
    border-color: #ec0000;
    outline-color: #ec0000;
}

/* Figma: ラベル行 gap-[8px] items-baseline */
.p-login__label-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* Figma: 17px bold #333 leading-[1.7] tracking-[0.34px] */
.p-login__label {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.7;
    letter-spacing: 0.34px;
}

/* Figma: ※必須 16px regular #ec0000 */
.p-login__required {
    font-size: 1rem;
    font-weight: 400;
    color: #ec0000;
    letter-spacing: 0.32px;
    white-space: nowrap;
}

/* Figma: h-[56px] bg-white border-#666 radius-[8px] px-[16px] */
.p-login__input {
    width: 100%;
    height: 56px;
    padding: 12px 16px;
    background-color: var(--color-white);
    border: 1px solid #666;
    border-radius: 8px;
    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.5;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.p-login__input:focus {
    outline: none;
    border-color: var(--color-link);
    box-shadow: 0 0 0 2px rgba(8, 119, 215, 0.2);
}

/* フィールドエラーメッセージ */
.p-login__field-error {
    font-size: 0.875rem;
    color: #ec0000;
    line-height: 1.5;
    margin: 0;
}

/* ========== パスワードグループ ========== */
/* Figma: パスワード入力 + 「パスワードをお忘れですか？」リンク gap-[16px] */
.p-login__password-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Figma: 16px bold #0877d7 underline text-center */
.p-login__forgot {
    margin: 0;
}

.p-login__forgot a {
    font-size: 1rem;
    font-weight: 700;
    color: #0877d7;
    text-decoration: underline;
    line-height: 1.2;
}

.p-login__forgot a:hover {
    opacity: 0.8;
}

/* ========== アクションボタン群 ========== */
/* Figma: gap-[24px] items-center */
.p-login__actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

/* Figma: PC ログインボタン min-h-[56px] bg-#0068ce rounded-full */
.p-login__submit-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.p-login__submit {
    min-height: 56px;
    padding: 16px 48px;
    font-size: 1.0625rem;
}

/* Figma: 「新規メンバー登録はこちら」16px bold #0877d7 underline + arrow */
.p-login__register-wrap {
    display: flex;
    justify-content: center;
}

.p-login__register-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #0877d7;
    text-decoration: underline;
    line-height: 1;
}

.p-login__register-link:hover {
    opacity: 0.8;
}

.p-login__register-link svg {
    flex-shrink: 0;
    text-decoration: none;
}

/* ========== レスポンシブ ========== */
@media (max-width: 768px) {
    .p-login__main {
        gap: 48px;
    }

    .p-login__form {
        padding: 40px 16px;
    }

    .p-login__title {
        font-size: 1.75rem;
    }

    /* Figma SP: ログインボタン full-width rounded-[8px] */
    .p-login__submit {
        width: 100%;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .p-login__title {
        font-size: 1.5rem;
    }
}
