/* ======================================
   ログインページスタイル (login.css)
   ====================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    margin: 2rem;
    animation: fadeIn 0.6s ease;
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1877f2;
    margin-bottom: 0.5rem;
}

.logo-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #1877f2;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #f5c6cb;
}

.login-btn {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
}

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

/* デモアカウント */
.demo-accounts {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.demo-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.demo-account {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.demo-account:hover {
    background: #e3f2fd;
}

.demo-account:last-child {
    margin-bottom: 0;
}

.demo-user {
    font-weight: 600;
    color: #2c3e50;
    flex: 0 0 auto;
    min-width: 80px;
}

.demo-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex: 1;
}

.demo-email {
    color: #6c757d;
    font-family: monospace;
    font-size: 0.75rem;
}

.demo-password {
    color: #495057;
    font-size: 0.7rem;
    font-weight: 500;
}

.dept-section {
    margin-bottom: 1rem;
}

.dept-section:last-child {
    margin-bottom: 0;
}

.dept-header {
    font-weight: 700;
    color: #1877f2;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    border-radius: 6px;
    border-left: 3px solid #1877f2;
}

/* フッター */
.footer-text {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* パスワード表示切り替えボタン */
.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

/* 管理者リンク */
.admin-link {
    position: fixed;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-link:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.admin-link i {
    font-size: 1rem;
}

/* 管理リンクを一番上に配置 */
.admin-link:not(.admin-all-link) {
    bottom: 140px;
}

/* 総合管理リンクを管理リンクの下に配置 */
.admin-all-link {
    bottom: 80px;
    background: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.admin-all-link:hover {
    background: #1e7e34;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

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

/* レスポンシブデザイン */
@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
        margin: 1rem;
    }

    .logo-text {
        font-size: 1.5rem;
    }
}

/* レスポンシブ対応 */
@media (max-width: 575px) {
    .admin-link {
        right: 10px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .admin-link:not(.admin-all-link) {
        bottom: 110px;
    }

    .admin-all-link {
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    .admin-link:not(.admin-all-link) {
        bottom: 90px;
    }

    .admin-all-link {
        bottom: 45px;
    }

    .demo-account {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .demo-info {
        align-items: flex-start;
        width: 100%;
    }

    .demo-user {
        min-width: auto;
    }
}

/* ======================================
   パスワード忘れ関連スタイル
   ====================================== */

/* パスワード忘れリンク */
.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* 戻るリンク */
.back-link {
    margin-top: 1.5rem;
}

.back-link a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #667eea;
}

/* 会社選択リスト */
.company-select-list {
    margin: 20px 0;
}

.company-select-btn {
    text-align: left;
    padding: 15px;
    transition: all 0.2s;
}

.company-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.company-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.member-info {
    color: #666;
}