/**
 * ユーザーログイン CSS
 * 新デザイン（Recoyaブランドカラー準拠）
 *
 * @package Recoya
 * @since 3.0.0
 */

/* ========================================
   カラー変数
======================================== */
:root {
    /* ベースカラー */
    --bg-primary: #1f1b18;
    --bg-secondary: #2a2520;
    --bg-card: #161310;

    /* アクセントカラー */
    --accent-coral: #c93f14;
    --accent-yellow: #f7e76f;
    --accent-pink: #f77a8a;
    --accent-blue: #6ec8dc;

    /* テキスト */
    --text-primary: #ffffff;
    --text-secondary: #a89f95;
    --text-muted: #6b635a;

    /* ボーダー */
    --border-color: #3a332d;
    --border-light: #4a433d;

    /* フォント */
    --font-heading: 'Poppins', 'Noto Sans JP', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;

    /* 状態 */
    --success: #4ade80;
    --error: #f87171;
}

/* ========================================
   ベースレイアウト
======================================== */
.user-login-page {
    padding: 0 20px 60px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', sans-serif;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 45px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ヘッダー
======================================== */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.login-header .logo svg {
    width: 40px;
    height: 40px;
    fill: var(--accent-coral);
}

.login-header .logo img {
    width: 40px;
    height: 40px;
}

.login-header h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   フォーム
======================================== */
.login-form {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    stroke: var(--text-muted);
    transition: stroke 0.2s;
}

.form-input {
    width: 100%;
    padding: 15px 18px 15px 48px;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px rgba(201, 63, 20, 0.15);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    stroke: var(--accent-coral);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* パスワード表示切替 */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    stroke: var(--text-muted);
    transition: stroke 0.2s;
}

.password-toggle:hover {
    stroke: var(--text-primary);
}

.password-toggle svg {
    stroke: inherit;
}

/* チェックボックス */
.checkbox-group {
    margin-top: 5px;
}

.login-form .checkbox-group label.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.checkbox-label .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-label input:checked + .checkmark {
    background: var(--accent-coral);
    border-color: var(--accent-coral);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--bg-primary);
    border-bottom: 2px solid var(--bg-primary);
    transform: rotate(-45deg) translateY(-1px);
}

/* ========================================
   送信ボタン
======================================== */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--bg-primary);
    background: var(--accent-coral);
    border: 2px solid var(--accent-coral);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    background: #d44535;
    border-color: #d44535;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 63, 20, 0.3);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   リンク
======================================== */
.login-links {
    text-align: center;
}

.login-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.login-links a:hover {
    color: var(--accent-coral);
}

.login-links a svg {
    transition: transform 0.2s;
}

.login-links a:hover svg {
    transform: translateX(-3px);
}

.login-links--multi {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-links--multi a {
    justify-content: center;
}

/* ========================================
   メッセージ
======================================== */
.message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message--error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.message--success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 480px) {
    .user-login-page {
        padding: 0 15px 40px;
    }

    .login-container {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .form-input {
        padding: 14px 16px 14px 44px;
        font-size: 14px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

/* ========================================
   アニメーション
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeInUp 0.5s ease;
}

/* ========================================
   ローディング
======================================== */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   新規登録リンク
======================================== */
.register-link {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.register-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.register-link a:hover {
    color: var(--accent-coral);
}
