/* ログイン画面 */

body.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

body.login-page::before {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: login-float 8s ease-in-out infinite;
}

body.login-page::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: login-float 10s ease-in-out infinite reverse;
}

@keyframes login-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* コンテナ */
.login-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
}

/* ロゴセクション */
.logo-section {
    text-align: center;
    margin-bottom: var(--space-8);
    animation: login-slideDown 0.6s ease-out;
}

@keyframes login-slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    font-size: var(--text-2xl);
}

.logo-text {
    height: 48px;
    width: auto;
    display: inline-block;
    filter: brightness(0) invert(1);
}

.logo-text-portal {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: white;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-xl);
    margin-top: var(--space-2);
    font-weight: var(--font-medium);
}

/* ログインカード */
.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    animation: login-slideUp 0.6s ease-out 0.2s backwards;
}

@keyframes login-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card .card-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-bottom: 0;
    border-bottom: none;
    display: block;
}

.login-card .card-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.login-card .card-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

/* フォーム */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    font-size: var(--text-base);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}

.form-input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) 3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* フォームオプション */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    font-size: var(--text-base);
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-link {
    font-size: var(--text-base);
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-semibold);
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ログインボタン */
.btn-login {
    width: 100%;
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-md);
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    font-family: var(--font-body);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
}

/* エラーメッセージ */
.login-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-6);
    font-size: var(--text-base);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 区切り線 */
.divider {
    display: flex;
    align-items: center;
    margin: var(--space-8) 0;
    color: var(--text-secondary);
    font-size: var(--text-base);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider::before { margin-right: var(--space-4); }
.divider::after { margin-left: var(--space-4); }

/* インフォセクション */
.info-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.info-title {
    font-weight: var(--font-bold);
    color: var(--primary);
    margin-bottom: var(--space-3);
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.info-list {
    list-style: none;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-list li {
    padding-left: var(--space-5);
    position: relative;
}

.info-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: var(--font-bold);
}

/* パスワードリセット - 送信完了/エラー */
.reset-sent-message {
    text-align: center;
    padding: var(--space-4) 0;
}

.reset-sent-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.reset-sent-desc {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ログインに戻る */
.back-to-login {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}

.back-to-login a {
    color: var(--primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    text-decoration: none;
}

.back-to-login a:hover {
    text-decoration: underline;
}

.back-separator {
    color: var(--border);
    margin: 0 var(--space-3);
}

/* パスワードヒント */
.password-hint {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    text-align: center;
}

/* フッター */
.login-footer {
    text-align: center;
    margin-top: var(--space-8);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-sm);
}

/* レスポンシブ */
@media (max-width: 640px) {
    .login-card {
        padding: var(--space-8) var(--space-6);
    }
    .logo-text {
        height: 40px;
    }
    .login-card .card-title {
        font-size: var(--text-2xl);
    }
}
