/**
 * 管理者機能用スタイルシート
 * - 管理者パネル
 * - 削除ボタン
 * - 管理者インジケーター
 */

/* 管理者パネル */
.admin-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-panel h3 {
    color: white;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-panel h3 i {
    font-size: 1.2rem;
}

/* 管理者ログインセクション */
.admin-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-login input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.admin-login input:focus {
    outline: none;
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.admin-login button {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.admin-login button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* 管理者コントロールセクション */
.admin-controls {
    display: none; /* デフォルトは非表示 */
    flex-direction: column;
    gap: 0.75rem;
}

.admin-status {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem;
    border-radius: 6px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-status-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.admin-status-text i {
    color: #4ade80;
    font-size: 1.1rem;
}

.admin-logout-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* エクスポートボタングループ */
.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.export-btn {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.export-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.export-btn i {
    font-size: 1rem;
}

/* バックアップセクション */
.backup-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.backup-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.backup-btn:hover {
    background: linear-gradient(135deg, #e082ea 0%, #e4465b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

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

.backup-btn i {
    font-size: 1rem;
}

/* バックアッププログレス */
.backup-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.progress-text {
    color: white;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
}

/* 管理者インジケーター（ヘッダー内） */
.admin-indicator {
    display: none; /* デフォルトは非表示 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.admin-indicator i {
    margin-right: 0.3rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 2px 16px rgba(102, 126, 234, 0.6);
    }
}

/* 管理者削除ボタン（ポップアップ内） */
.admin-delete-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

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

/* モバイル対応 */
@media (max-width: 768px) {
    .admin-panel {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
    }
    
    .admin-panel h3 {
        font-size: 1rem;
    }
    
    .admin-login input,
    .admin-login button {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-btn {
        padding: 0.625rem;
        font-size: 0.85rem;
    }
    
    .admin-indicator {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .admin-delete-btn {
        padding: 0.625rem;
        font-size: 0.85rem;
    }
}

/* 小型デバイス対応 */
@media (max-width: 480px) {
    .admin-panel h3 {
        font-size: 0.95rem;
    }
    
    .admin-status {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .admin-logout-btn {
        width: 100%;
    }
    
    .backup-btn {
        padding: 0.625rem;
        font-size: 0.85rem;
    }
}
