diff --git a/public/admin.css b/public/admin.css deleted file mode 100644 index a8347e2..0000000 --- a/public/admin.css +++ /dev/null @@ -1,547 +0,0 @@ -/* ===================================================================== - Moderation Page — Styles - Separate Stylesheet for the Admin Moderation Interface. - ===================================================================== */ - - -/* ----------------------------------------------------------------- - Base - ----------------------------------------------------------------- */ -* { box-sizing: border-box; margin: 0; padding: 0; } - -body { - font-family: 'Segoe UI', system-ui, sans-serif; - background: #f4f5f7; - color: #1a1a2e; - font-size: 15px; -} - - -/* ----------------------------------------------------------------- - Header - ----------------------------------------------------------------- */ -.admin-header { - background: var(--color-primary); - color: white; - padding: 14px 24px; - display: flex; - justify-content: space-between; - align-items: center; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); -} - -.admin-header h1 { - font-size: 1.15rem; - font-weight: 600; -} - -.admin-nav { - display: flex; - gap: 16px; - align-items: center; -} - -.admin-nav a { - color: white; - text-decoration: none; - opacity: 0.8; - font-size: 0.85rem; - transition: opacity 150ms ease; -} - -.admin-nav a:hover { opacity: 1; } - - -/* ----------------------------------------------------------------- - Container - ----------------------------------------------------------------- */ -.admin-container { - max-width: 960px; - margin: 24px auto; - padding: 0 16px; -} - - -/* ----------------------------------------------------------------- - Statistics Cards - ----------------------------------------------------------------- */ -.stats-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); - gap: 12px; - margin-bottom: 28px; -} - -.stat-card { - background: white; - border-radius: 8px; - padding: 16px; - text-align: center; - border: 1px solid #e0e0e0; -} - -.stat-card .stat-number { - font-size: 1.8rem; - font-weight: 700; - color: var(--color-primary); -} - -.stat-card .stat-label { - font-size: 0.8rem; - color: #5a5a7a; - margin-top: 4px; -} - - -/* ----------------------------------------------------------------- - Filter Tabs - ----------------------------------------------------------------- */ -.filter-tabs { - display: flex; - gap: 4px; - margin-bottom: 20px; - border-bottom: 2px solid #e0e0e0; - padding-bottom: 0; -} - -.filter-tab { - padding: 8px 16px; - border: none; - background: none; - font-family: inherit; - font-size: 0.85rem; - font-weight: 600; - color: #5a5a7a; - cursor: pointer; - border-bottom: 2px solid transparent; - margin-bottom: -2px; - transition: color 150ms ease, border-color 150ms ease; -} - -.filter-tab:hover { - color: var(--color-primary); -} - -.filter-tab.active { - color: var(--color-primary); - border-bottom-color: var(--color-primary); -} - -.filter-tab .tab-count { - background: #e0e0e0; - color: #5a5a7a; - font-size: 0.7rem; - padding: 1px 6px; - border-radius: 10px; - margin-left: 4px; -} - -.filter-tab.active .tab-count { - background: var(--color-primary); - color: white; -} - - -/* ----------------------------------------------------------------- - Sort Controls - ----------------------------------------------------------------- */ -.sort-controls { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 16px; - font-size: 0.85rem; - color: #5a5a7a; -} - -.sort-controls select { - padding: 4px 8px; - border: 1px solid #e0e0e0; - border-radius: 4px; - font-family: inherit; - font-size: 0.85rem; - cursor: pointer; -} - - -/* ----------------------------------------------------------------- - Collapsible Contribution Rows - ----------------------------------------------------------------- */ -.contribution-row { - background: white; - border: 1px solid #e0e0e0; - border-radius: 8px; - margin-bottom: 10px; - overflow: hidden; - transition: border-color 150ms ease; -} - -.contribution-row:hover { - border-color: #bbb; -} - -.contribution-row-header { - padding: 12px 16px; - display: flex; - justify-content: space-between; - align-items: center; - cursor: pointer; - transition: background 150ms ease; -} - -.contribution-row-header:hover { - background: #f8f9fa; -} - -.contribution-row-summary { - display: flex; - align-items: center; - gap: 10px; - flex: 1; - min-width: 0; -} - -.contribution-row-summary .title { - font-weight: 600; - font-size: 0.95rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.collapse-icon { - color: #999; - font-size: 0.75rem; - flex-shrink: 0; - transition: transform 200ms ease; -} - -.contribution-row.open .collapse-icon { - transform: rotate(180deg); -} - - -/* ----------------------------------------------------------------- - Contribution Detail View (expanded) - ----------------------------------------------------------------- */ -.contribution-row-detail { - padding: 0 16px 16px 16px; - border-top: 1px solid #f0f0f0; - display: none; -} - -.contribution-row.open .contribution-row-detail { - display: block; -} - -.detail-layout { - display: flex; - gap: 16px; - margin-top: 12px; - margin-bottom: 12px; -} - -.detail-map { - width: 220px; - height: 170px; - border-radius: 6px; - border: 1px solid #e0e0e0; - flex-shrink: 0; - background: #f0f0f0; -} - -.detail-content { - flex: 1; - min-width: 0; -} - -.detail-content .description { - font-size: 0.85rem; - line-height: 1.5; - color: #5a5a7a; - margin-bottom: 10px; -} - -.detail-content .description.empty { - color: #bbb; - font-style: italic; -} - -.detail-meta { - font-size: 0.8rem; - color: #999; - display: flex; - flex-direction: column; - gap: 4px; -} - -.detail-meta span { - display: flex; - align-items: center; - gap: 6px; -} - - -/* ----------------------------------------------------------------- - Action Buttons - ----------------------------------------------------------------- */ -.action-buttons { - display: flex; - gap: 8px; - flex-wrap: wrap; - padding-top: 12px; - border-top: 1px solid #f0f0f0; -} - -.btn { - padding: 7px 14px; - border: none; - border-radius: 6px; - font-size: 0.82rem; - font-weight: 600; - cursor: pointer; - display: inline-flex; - align-items: center; - gap: 5px; - font-family: inherit; - transition: filter 150ms ease; - text-decoration: none; -} - -.btn:hover { filter: brightness(1.1); } - -.btn-approve { background: #28a745 ; color: white; } -.btn-reject { background: #DC3545; color: white; } -.btn-edit { background: #ffc107; color: white; } -.btn-delete { background: #424242; color: white; } -.btn-map { background: #546E7A; color: white; } - - -/* ----------------------------------------------------------------- - Badges - ----------------------------------------------------------------- */ -.badge { - display: inline-block; - padding: 2px 8px; - border-radius: 4px; - font-size: 0.7rem; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - flex-shrink: 0; -} - -.badge-category { - background: #e0e0e0; - color: #5a5a7a; - display: inline-flex; - align-items: center; - gap: 4px; -} - -.badge-pending { background: #fff3cd; color: #856404; } -.badge-approved { background: #d4edda; color: #155724; } -.badge-rejected { background: #f8d7da; color: #721c24; } - - -/* ----------------------------------------------------------------- - Empty State - ----------------------------------------------------------------- */ -.empty-state { - text-align: center; - padding: 40px; - color: #999; - font-size: 0.9rem; -} - - -/* ----------------------------------------------------------------- - Section Spacing - ----------------------------------------------------------------- */ -.section { margin-bottom: 32px; } - - -/* ----------------------------------------------------------------- - Placeholder Tabs (future Features) - ----------------------------------------------------------------- */ -.placeholder-content { - text-align: center; - padding: 60px 20px; - color: #bbb; -} - -.placeholder-content i { - font-size: 2.5rem; - margin-bottom: 12px; - display: block; -} - -.placeholder-content p { - font-size: 0.9rem; -} - - -/* ----------------------------------------------------------------- - Navigation Tabs (Page Sections) - ----------------------------------------------------------------- */ -.page-tabs { - display: flex; - gap: 4px; - margin-bottom: 24px; - background: white; - padding: 4px; - border-radius: 8px; - border: 1px solid #e0e0e0; -} - -.page-tab { - padding: 8px 16px; - border: none; - background: none; - font-family: inherit; - font-size: 0.85rem; - font-weight: 600; - color: #5a5a7a; - cursor: pointer; - border-radius: 6px; - transition: all 150ms ease; - display: flex; - align-items: center; - gap: 6px; -} - -.page-tab:hover { background: #f0f0f0; } - -.page-tab.active { - background: var(--color-primary); - color: white; -} - - -/* ----------------------------------------------------------------- - Login Page - ----------------------------------------------------------------- */ -.login-wrapper { - display: flex; - align-items: center; - justify-content: center; - min-height: 100vh; -} - -.login-box { - background: white; - border-radius: 12px; - padding: 32px; - max-width: 380px; - width: 90%; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); - text-align: center; -} - -.login-box h1 { - font-size: 1.3rem; - margin-bottom: 8px; -} - -.login-box p { - font-size: 0.85rem; - color: #5a5a7a; - margin-bottom: 20px; -} - -.login-box input[type="password"] { - width: 100%; - padding: 10px 12px; - border: 1px solid #e0e0e0; - border-radius: 6px; - font-size: 0.9rem; - margin-bottom: 12px; - font-family: inherit; -} - -.login-box input:focus { - outline: none; - border-color: var(--color-primary); - box-shadow: 0 0 0 3px rgba(0, 55, 109, 0.1); -} - -.login-box button { - width: 100%; - padding: 10px; - background: var(--color-primary); - color: white; - border: none; - border-radius: 6px; - font-size: 0.9rem; - font-weight: 600; - cursor: pointer; - font-family: inherit; -} - -.login-box button:hover { filter: brightness(1.15); } - -.login-error { - color: #c62828; - font-size: 0.85rem; - margin-bottom: 12px; -} - -.back-link { - margin-top: 16px; - font-size: 0.8rem; -} - -.back-link a { color: #5a5a7a; } - - -/* ----------------------------------------------------------------- - SweetAlert2 Font Override - ----------------------------------------------------------------- */ -.swal2-input, -.swal2-textarea, -.swal2-select { - font-family: 'Segoe UI', system-ui, sans-serif !important; -} - - -/* ----------------------------------------------------------------- - Mobile Responsive - ----------------------------------------------------------------- */ -@media (max-width: 768px) { - .admin-header { - flex-direction: column; - gap: 8px; - padding: 12px 16px; - } - - .admin-header h1 { font-size: 1rem; } - - .detail-layout { - flex-direction: column; - } - - .detail-map { - width: 100%; - height: 180px; - } - - .contribution-row-summary .title { - max-width: 200px; - } - - .action-buttons { - flex-direction: column; - } - - .action-buttons .btn { - justify-content: center; - } - - .filter-tabs { - overflow-x: auto; - } - - .page-tabs { - overflow-x: auto; - } -} \ No newline at end of file diff --git a/public/admin.php b/public/admin.php index 84aba59..ce77702 100644 --- a/public/admin.php +++ b/public/admin.php @@ -123,7 +123,7 @@ $counts['total'] = count($all_contributions); - + @@ -140,15 +140,17 @@ $counts['total'] = count($all_contributions); -