/* =======================
   SAIYU Tool Navi - ログイン画面CSS
   認証システム専用スタイル
   ======================= */

/* ログイン画面専用ベーススタイル */
.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #bae6fd 75%, #7dd3fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 20px;
    animation: fadeInUp 0.6s ease-out;
}

/* ログインヘッダー */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.brand-info {
    text-align: left;
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

.login-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
}

/* ログインカード */
.login-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.login-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 32px 0;
    text-align: center;
    justify-content: center;
}

.title-icon-container {
    width: 28px;
    height: 28px;
}

/* フォームスタイル */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    fill: #9ca3af;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: #f9fafb;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input:focus + .input-icon {
    fill: #2563eb;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.password-toggle:hover {
    background-color: #f3f4f6;
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: #6b7280;
}

/* ボタンスタイル */
.form-actions {
    margin-top: 8px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

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

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ローディングスピナー（ボタン内） */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ボタンが無効化されている時 */
.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 入力フィールドエラー状態 */
.form-input.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.form-input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

/* ヘルプテキスト */
.login-help {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.help-text {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 4px 0;
}

.help-example {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.forgot-password-link {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* メッセージ表示（エラー・成功） */
.message {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.message.show {
    display: flex;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.message-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.message.error .message-icon path {
    fill: #dc2626;
}

.message.success .message-icon path {
    fill: #16a34a;
}

.message-text {
    font-size: 14px;
    font-weight: 500;
}

.message.error .message-text {
    color: #dc2626;
}

.message.success .message-text {
    color: #16a34a;
}

/* バックワードコンパティビリティ */
.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-top: 16px;
}

.error-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.error-text {
    font-size: 14px;
    color: #dc2626;
    font-weight: 500;
}

/* 管理者ログインリンク */
.admin-login-link {
    text-align: center;
}

.admin-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 12px 0;
}

.btn-admin {
    padding: 12px 24px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

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

/* ローディング画面オーバーライド */
.login-body .loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-text {
    color: white;
    font-weight: 600;
}

/* レスポンシブデザイン */
@media (max-width: 480px) {
    .login-container {
        margin: 16px;
    }
    
    .login-card {
        padding: 24px;
        border-radius: 20px;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .brand-info {
        text-align: center;
    }
    
    .brand-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 14px 14px 14px 44px;
    }
}