/**
 * 認証ページ用スタイル
 *
 * ログイン・登録画面で使用される共通スタイル
 */

/* ==========================================
   認証カード
   ========================================== */
.auth-card {
    max-width: 500px;
    margin: 60px auto;
}

.auth-subtitle {
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* ==========================================
   パスワード表示/非表示トグル
   ========================================== */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.password-toggle:focus {
    outline: none;
    background: rgba(102, 126, 234, 0.15);
}

.password-toggle-icon {
    font-size: 1.25rem;
    line-height: 1;
    user-select: none;
}

/* ==========================================
   研修情報表示
   ========================================== */
.training-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.training-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.training-name,
.period-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.period-name {
    margin-bottom: 0;
}

/* ==========================================
   パスワード表示エリア
   ========================================== */
.password-display {
    margin-top: 24px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.password-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.password-container .form-input {
    flex: 1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: white;
    border: 2px solid #cbd5e0;
}

.password-container .btn {
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 0;
}

.password-warning {
    display: block;
    margin-top: 12px;
    color: #e53e3e;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
}

/* ==========================================
   認証フッター（登録リンク等）
   ========================================== */
.auth-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ==========================================
   ローディングスピナー（認証ページ用）
   ========================================== */
.btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ==========================================
   レスポンシブデザイン
   ========================================== */

/* タブレット */
@media (max-width: 1023px) {
    .auth-card {
        margin: 48px auto;
    }
}

/* モバイル */
@media (max-width: 767px) {
    .auth-card {
        margin: 32px auto;
        padding: 24px 20px;
    }

    .auth-subtitle {
        font-size: 0.875rem;
    }

    .password-toggle-icon {
        font-size: 1.125rem;
    }

    /* 登録画面用スタイル */
    .training-name,
    .period-name {
        font-size: 1.125rem;
    }

    .password-container {
        flex-direction: column;
    }

    .password-container .btn {
        width: 100%;
    }

    .password-container .form-input {
        font-size: 1rem;
        letter-spacing: 1px;
    }
}
