/* ページ全体 */
body {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
                 "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
}

/* ログインページ全体 */
.login-page {
    min-height: 100vh;
}

/* 中央寄せ用 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* フォーム本体 */
.form-wrapper {
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

/* ロゴ */
.logo {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 24px;
}

/* フォーム */
.login-form {
    width: 100%;
}

/* Django form の p や div に対応しやすくする */
.form-item {
    width: 100%;
}

.form-item label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="email"],
.form-item input[type="number"],
.form-item select,
.form-item textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Bootstrap form-controlの高さ微調整 */
.form-control {
    min-height: 44px;
    font-size: 16px; /* iPhoneで拡大されにくい */
    border-radius: 8px;
}

/* ボタンエリア */
.button-panel {
    margin-top: 20px;
}

/* ログインボタン */
.button {
    display: inline-block;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background-color: #0d6efd;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button:hover {
    background-color: #0b5ed7;
}

.button:active {
    background-color: #0a58ca;
}

/* 下部リンク */
.links {
    margin-top: 24px;
}

.links p {
    margin: 12px 0 0;
    text-align: center;
    line-height: 1.6;
}

.links a {
    color: #0d6efd;
    text-decoration: none;
    font-size: 14px;
}

.links a:hover {
    text-decoration: underline;
}

/* エラーメッセージ */
.text-danger.small {
    font-size: 12px;
}

/* タブレット以下 */
@media (max-width: 768px) {
    .login-container {
        padding: 20px 14px;
    }

    .form-wrapper {
        max-width: 100%;
        padding: 28px 20px;
    }

    .logo {
        margin-bottom: 20px;
    }
}

/* スマホ */
@media (max-width: 576px) {
    .login-container {
        align-items: flex-start;
        padding: 16px 12px;
    }

    .form-wrapper {
        margin-top: 24px;
        padding: 24px 16px;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .form-item label {
        font-size: 13px;
    }

    .form-control {
        min-height: 42px;
        font-size: 16px;
    }

    .button {
        min-height: 42px;
        font-size: 15px;
        padding: 10px 14px;
    }

    .links {
        margin-top: 20px;
    }

    .links a {
        font-size: 13px;
    }
}

/* 極小画面 */
@media (max-width: 360px) {
    .form-wrapper {
        padding: 20px 14px;
    }

    .button {
        font-size: 14px;
    }

    .links a {
        font-size: 12px;
    }
}
