/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    line-height: 1.6;
}

/* ヘッダー */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2563EB;
}

.help-link {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid #2563EB;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.help-link:hover {
    background-color: #2563EB;
    color: #ffffff;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ロゴ */
.logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo svg {
    display: inline-block;
}

/* ログインタイトル */
.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #1f2937;
}

.login-title::before {
    content: '■ ';
    margin-right: 0.5rem;
    color: #2563EB;
}

/* フォーム */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

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

/* パスワード入力 */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

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

.password-toggle {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.password-toggle:hover {
    opacity: 0.7;
}

.password-toggle:focus {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
    border-radius: 4px;
}

/* チェックボックス */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: #2563EB;
}

.checkbox-text {
    font-size: 0.875rem;
    color: #4b5563;
}

/* エラーメッセージ */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #991b1b;
    font-size: 0.875rem;
}

/* ログインボタン */
.login-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: #2563EB;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.login-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.login-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* リンク */
.links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.link {
    font-size: 0.875rem;
    color: #2563EB;
    text-decoration: none;
    transition: color 0.2s ease;
    text-align: right;
}

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

.link::after {
    content: ' →';
    margin-left: 0.25rem;
}

/* フッター */
.site-footer {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    text-align: center;
}

.footer-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.footer-link {
    color: #2563EB;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* レスポンシブデザイン */
@media (max-width: 640px) {
    .site-header {
        padding: 1rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .login-box {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.25rem;
    }
}

/* アクセシビリティ */
.form-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e3a8a 0%, #581c87 100%);
    }
}
