/* Reset & Basic Styles */
/* login.css */
body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
}

/* Container */
.login-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background-image: 
        linear-gradient(135deg, #D9F2FF 0%, #D0E8F5 33%, #786988 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Left Side (Form) */
.login-form-side {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 40px 80px 40px 40px;
    background-color: transparent;
}

/* フォーム本体（カード：重複を排除し600pxに統一） */
.login-form {
    width: 100%;
    max-width: 800px; /* 一回り大きくしつつ、左側にスペースを広げる */
    background-color: #ffffff;
    border-radius: 16px;
    
    /* 左側のインサイド余白を「64px」にしっかりと広げ、右側を「44px」に調整して重心の偏りを解消 */
    padding: 40px 44px 40px 64px; 
    
    box-sizing: border-box;
    box-shadow: 0 10px 25px -5px rgba(50, 33, 82, 0.15),
                0 8px 10px -6px rgba(50, 33, 82, 0.05);
}

.logo-area {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important; /* 子要素のロゴを水平中央にロック */
    align-items: center;
    margin-bottom: 24px;
}

/* ロゴ画像自体のマージンをリセットして中央配置を保証
   ※ signup画面と共通クラス（.login-logo-img）を使っているため、ここでの
   サイズ調整はログイン・サインアップ両画面に反映される */
.login-logo-img {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto !important; /* 左右自動マージンで中央へ */
    object-fit: contain;
    transform: scale(0.75);
    transform-origin: center;
}

@media (max-width: 800px) {
    .login-logo-img {
        height: 48px;
        transform: none;
    }
}

.page-title {
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333333;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 15px;
    margin-bottom: 10px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-options {
    text-align: right;
    margin-bottom: 30px;
}

.forgot-password {
    font-size: 14px;
    color: #007bff;
    text-decoration: none;
}

.login-button {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background-color: #322152;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #4c327a;
}

.signup-prompt {
    margin-top: 30px;
    font-size: 14px;
    color: #666666;
    text-align: center;
}

@media (max-width: 800px) {
    .signup-prompt {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        font-size: 13px;
    }
}

.signup-link {
    color: #007bff;
    text-decoration: none;
}
.signup-link:hover {
    text-decoration: underline;
}

.error-message {
    color: var(--c-danger, #e53935);
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
}

/* Right Side (Graphic) */
.login-graphic-side {
    flex: 0.8;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: #fff;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 60px;
}

.grid-item {
    width: 100%;
    padding-bottom: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
}

.catchphrase-area {
    width: 100%;
    max-width: 500px;
}

.catchphrase {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.dummy-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.dummy-text-sub {
    margin-top: 16px;
    font-size: 13px;
    opacity: 0.8;
}

.item-1 {
    background-image: url('../images/login_graphics/graphic01.gif');
    background-size: cover;
    background-position: center;
}
.item-2 {
    background-image: url('../images/login_graphics/graphic02.gif');
    background-size: cover;
    background-position: center;
}
.item-3 {
    background-image: url('../images/login_graphics/graphic03.gif');
    background-size: cover;
    background-position: center;
}
.item-4 {
    background-image: url('../images/login_graphics/graphic04.gif');
    background-size: cover;
    background-position: center;
}

/* Media Queries */
@media (max-width: 800px) {
    .login-container {
        flex-direction: column;
        background-color: #fff;
    }

    .login-graphic-side {
        display: none;
    }

    .logo-area {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 36px;
        margin-bottom: 30px;
    }

    .signup-prompt {
        margin-top: 40px;
    }
    
    .login-container {
        align-items: center;
        justify-content: center;
    }

    .login-form-side {
        flex: none;
        width: 100%;
        box-sizing: border-box;
        align-items: center !important;
        padding: 16px !important;
    }
    
    .login-form {
        max-width: 340px !important;
        padding: 20px !important;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group input {
        padding: 14px;
    }

    .login-button {
        padding: 16px;
    }
}

.password-input-padded {
    padding-right: 45px !important;
    box-sizing: border-box;
}
.password-field-wrap {
    position: relative;
}
.password-field-wrap .password-toggle,
.password-field-wrap .password-toggle-confirm {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    z-index: 5;
}