/**
 * login.css
 * ログインページ専用スタイル
 */

/* ========================================
   CSS変数定義
   ======================================== */
:root {
    /* メインカラー */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #2980b9;
    
    /* ステータスカラー */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    
    /* グレースケール */
    --gray-dark: #6c757d;
    --gray-medium: #dee2e6;
    --gray-light: #f8f9fa;
    
    /* 背景色 */
    --bg-white: #ffffff;
    --bg-light: #ecf0f1;
    
    /* テキストカラー */
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-white: #ffffff;
}

/* ========================================
   リセット・基本設定
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   ログインコンテナ
   ======================================== */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: slideUp 0.5s ease;
}

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

/* ========================================
   ヘッダー
   ======================================== */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.login-icon i {
    font-size: 36px;
    color: var(--text-white);
}

/* ========================================
   フォーム
   ======================================== */
.login-form {
    margin-top: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: var(--gray-dark);
}

/* ========================================
   ボタン
   ======================================== */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

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

.btn-login i {
    margin-right: 8px;
}

/* ========================================
   アラート・メッセージ
   ======================================== */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 16px;
}

.alert-error {
    background-color: #ffe6e6;
    color: var(--danger-color);
    border: 1px solid #ffcccc;
}

.alert-success {
    background-color: #e6f9e6;
    color: var(--success-color);
    border: 1px solid #ccf2cc;
}

.alert-warning {
    background-color: #fff8e6;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ========================================
   フッター
   ======================================== */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-medium);
    color: var(--text-secondary);
    font-size: 13px;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-icon {
        width: 60px;
        height: 60px;
    }
    
    .login-icon i {
        font-size: 28px;
    }
}

/* ========================================
   ローディング状態
   ======================================== */
.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid var(--text-white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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