/* 
 * 駒美会出欠管理システム - メインスタイルシート
 * Bootstrap 5 ベースのカスタムスタイル
 */

/* ===========================================
   共通スタイル
   =========================================== */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* カード共通スタイル */
.main-card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.glass-card {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ホバーエフェクト */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===========================================
   トップページ/ログインページスタイル
   =========================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.btn-hero {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.system-features {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* ===========================================
   管理者メニュー/ダッシュボードスタイル
   =========================================== */

.header-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.function-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
}

.function-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.function-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stats-card {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    border: none;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.quick-action-btn {
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
}

/* ===========================================
   ログインフォームスタイル
   =========================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
    background: white;
}

.form-floating {
    margin-bottom: 1rem;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* ===========================================
   管理機能ページ共通スタイル
   =========================================== */

.stat-card {
    border-radius: 10px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.csv-preview {
    max-height: 300px;
    overflow-y: auto;
}

.loading {
    display: none;
}

.error-details {
    background-color: #f8f9fa;
    border-left: 4px solid #dc3545;
    margin-top: 1rem;
}

/* ===========================================
   テーブルスタイル
   =========================================== */

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.table-responsive {
    border-radius: 8px;
}

/* ===========================================
   ボタンスタイル
   =========================================== */

.btn-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
}

.btn-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa085 100%);
    color: white;
}

/* ===========================================
   バッジ・ラベルスタイル
   =========================================== */

.status-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.branch-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
}

/* ===========================================
   アニメーション
   =========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===========================================
   レスポンシブ調整
   =========================================== */

@media (max-width: 768px) {
    .hero-card {
        margin: 1rem;
    }

    .function-card {
        margin-bottom: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .quick-action-btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .btn-hero {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .function-icon {
        font-size: 2.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }
}

/* ===========================================
   ユーティリティクラス
   =========================================== */

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-soft {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.shadow-strong {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}

/* ===========================================
   印刷対応
   =========================================== */

@media print {
    body {
        background: white !important;
    }

    .main-card, .hero-card, .glass-card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .btn, .navbar, .header-section {
        display: none !important;
    }
}

/* ===========================================
   ダークモード対応（将来拡張用）
   =========================================== */

@media (prefers-color-scheme: dark) {
    /* 将来的にダークモード対応を追加する場合のプレースホルダー */
}

/* ===========================================
   アクセシビリティ
   =========================================== */

/* フォーカス表示の改善 */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .main-card, .hero-card {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* 動きの少ない表示を好む場合 */
@media (prefers-reduced-motion: reduce) {

    .hover-lift,
    .function-card,
    .btn-hero,
    .stat-card {
        transition: none;
    }

    .fade-in-up,
    .pulse {
        animation: none;
    }
}