/* ログインページ完全版 - モックアップ準拠CSS */

.login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #ec4899 75%, #f5576c 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 背景の装飾的な要素 */
.bg-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.bg-decoration:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.bg-decoration:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: -100px;
    animation-delay: 5s;
}

.bg-decoration:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(0) rotate(180deg); }
    75% { transform: translateY(20px) rotate(270deg); }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3); }
    50% { box-shadow: 0 10px 35px rgba(147, 51, 234, 0.5); }
    100% { box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3); }
}

.logo svg {
    width: 45px;
    height: 45px;
    color: white;
}

.brand-name {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.brand-tagline {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    background: white !important;
    color: #374151 !important;
    outline: none !important;
    box-shadow: none !important;
}

.form-input:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1) !important;
}

.form-input:focus + .input-icon {
    color: #a855f7;
}

.form-input::placeholder {
    color: #9ca3af;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    display: none !important;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* チェックボックス選択時のスタイル */
.checkbox-group:has(.checkbox-input input:checked) .checkbox-custom {
    background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
    border-color: transparent;
}

.checkbox-group:has(.checkbox-input input:checked) .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 14px;
    color: #4b5563;
}

.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.divider {
    margin: 32px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    position: relative;
    padding: 0 16px;
    background: white;
    color: #9ca3af;
    font-size: 13px;
}

.footer-links {
    text-align: center;
    margin-top: 24px;
}

.footer-link {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #9333ea;
    text-decoration: underline;
}

/* ローディングアニメーション */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .loading-spinner {
    display: block;
}

/* エラーメッセージ */
.error-message {
    display: none;
    padding: 12px 16px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 20px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message.show {
    display: block;
}

/* 成功メッセージ */
.success-message {
    display: none;
    padding: 12px 16px;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #059669;
    font-size: 14px;
    margin-bottom: 20px;
}

.success-message.show {
    display: block;
}

/* Dashコンポーネントのオーバーライド */
#login-form {
    width: 100%;
}

/* Dash Checklist のスタイル調整 */
.checkbox-input .form-check {
    display: none !important;
}

.checkbox-input input[type="checkbox"] {
    display: none !important;
}

/* レスポンシブ調整 */
@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }

    .brand-name {
        font-size: 24px;
    }

    .logo {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .logo svg {
        width: 35px;
        height: 35px;
    }
}