/* ===================================================================== WebGIS Bürgerbeteiligungsportal — Unified Styles Single Stylesheet for all Pages: Portal, Moderation, Legal Pages. Organized in Sections: Tokens, Base, Shared, Portal, Admin, Legal. ===================================================================== */ /* ================================================================= SECTION 1: Design Tokens (CSS Custom Properties) Shared across all Pages. Overridden per Municipality via PHP. ================================================================= */ :root { /* Municipality Theme */ --color-primary: #00376D; --color-primary-light: #00376D22; /* Neutral Palette */ --color-bg: #f4f5f7; --color-surface: #ffffff; --color-text: #1a1a2e; --color-text-secondary: #5a5a7a; --color-border: #e0e0e0; /* Standardized Button Colors */ --color-approve: #28a745; --color-reject: #DC3545; --color-edit: #ffc107; --color-delete: #424242; --color-map-btn: #546E7A; --color-success: #2e7d32; --color-error: #c62828; --color-warning: #f57f17; /* Badge Colors */ --color-badge-pending-bg: #fff3cd; --color-badge-pending-text: #856404; --color-badge-approved-bg: #d4edda; --color-badge-approved-text: #155724; --color-badge-rejected-bg: #f8d7da; --color-badge-rejected-text: #721c24; /* Spacing Scale */ --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; /* Layout (Portal-specific, ignored by other Pages) */ --header-height: 56px; --footer-height: 40px; --map-side-padding: 0px; /* Typography */ --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif; /* Transitions */ --transition-fast: 150ms ease; --transition-normal: 250ms ease; } /* ================================================================= SECTION 2: Reset and Base Styles Applied to every Page. ================================================================= */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: var(--font-body); font-size: 15px; color: var(--color-text); background: var(--color-bg); } a { text-decoration: none; } /* ================================================================= SECTION 3: Shared Components Reusable across Portal, Admin, and Legal Pages. ================================================================= */ /* ----------------------------------------------------------------- 3.1 Page Header (Admin, Legal Pages) ----------------------------------------------------------------- */ .page-header { background: var(--color-primary); color: white; padding: 14px 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } .page-header-inner { max-width: 960px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; } .page-header h1 { font-size: 1.15rem; font-weight: 600; } .page-header-nav { display: flex; gap: 16px; align-items: center; } .page-header-nav a { color: white; opacity: 0.8; font-size: 0.85rem; transition: opacity var(--transition-fast); } .page-header-nav a:hover { opacity: 1; } /* ----------------------------------------------------------------- 3.2 Page Content Container (Admin, Legal Pages) ----------------------------------------------------------------- */ .page-container { max-width: 960px; margin: 24px auto; padding: 0 16px; } .page-content-box { padding: 32px; background: var(--color-surface); border-radius: 8px; border: 1px solid var(--color-border); line-height: 1.7; } .page-content-box h2 { font-size: 1.05rem; font-weight: 600; margin: 24px 0 8px 0; color: var(--color-primary); } .page-content-box h2:first-child { margin-top: 0; } .page-content-box p { margin-bottom: 12px; color: var(--color-text-secondary); } .page-content-box a { color: var(--color-primary); } /* ----------------------------------------------------------------- 3.3 Buttons (shared across all Pages) ----------------------------------------------------------------- */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: 8px 16px; border: none; border-radius: 6px; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: filter var(--transition-fast), transform var(--transition-fast); text-decoration: none; min-height: 40px; } .btn:hover { filter: brightness(1.1); } .btn:active { transform: scale(0.97); } .btn-primary { background: var(--color-primary); color: white; } .btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); } .btn-secondary:hover { background: var(--color-border); } .btn-approve { background: var(--color-approve); color: white; } .btn-reject { background: var(--color-reject); color: white; } .btn-edit { background: var(--color-edit); color: white; } .btn-delete { background: var(--color-delete); color: white; } .btn-map { background: var(--color-map-btn); color: white; } .btn-success { background: var(--color-success); color: white; } .btn-danger { background: var(--color-error); color: white; } .btn-reset { background: var(--color-warning); color: white; } /* ----------------------------------------------------------------- 3.4 Badges (shared across Portal and Admin) ----------------------------------------------------------------- */ .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-pending { background: var(--color-badge-pending-bg); color: var(--color-badge-pending-text); } .badge-approved { background: var(--color-badge-approved-bg); color: var(--color-badge-approved-text); } .badge-rejected { background: var(--color-badge-rejected-bg); color: var(--color-badge-rejected-text); } .badge-category { background: var(--color-border); color: var(--color-text-secondary); display: inline-flex; align-items: center; gap: 4px; } /* ----------------------------------------------------------------- 3.5 Form Elements (shared across Portal and Admin) ----------------------------------------------------------------- */ .form-group { margin-bottom: var(--space-md); } .form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: var(--space-xs); color: var(--color-text); } .form-input { width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 6px; font-family: var(--font-body); font-size: 0.9rem; color: var(--color-text); background: var(--color-surface); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); } .form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); } textarea.form-input { resize: vertical; } select.form-input { cursor: pointer; } /* ----------------------------------------------------------------- 3.6 SweetAlert2 Font Override ----------------------------------------------------------------- */ .swal2-input, .swal2-textarea, .swal2-select { font-family: var(--font-body) !important; } /* ----------------------------------------------------------------- 3.7 Warning Notices ----------------------------------------------------------------- */ .dev-warning { position: absolute; left: var(--space-md); font-size: 0.7rem; font-weight: 600; color: var(--color-badge-pending-text); white-space: nowrap; background: rgba(255, 243, 205, 0.8); padding: 4px 10px; border-radius: 8px; border: 1px solid var(--color-badge-pending-text); } .dev-notice { background: var(--color-badge-pending-bg); color: var(--color-badge-pending-text); padding: 12px 16px; border-radius: 8px; border: 1px solid #ffc107; font-size: 0.85rem; margin-bottom: 16px; } .dev-notice i { margin-right: 6px; } /* ----------------------------------------------------------------- 3.8 Empty State ----------------------------------------------------------------- */ .empty-state { text-align: center; padding: 40px; color: #999; font-size: 0.9rem; } /* ================================================================= SECTION 4: Portal-specific Styles (index.php) Fixed Layout with Header, Map, Sidebar, Footer. ================================================================= */ /* ----------------------------------------------------------------- 4.1 Portal Layout ----------------------------------------------------------------- */ .portal-page { height: 100%; overflow: hidden; } #app-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-md); background: var(--color-primary); color: white; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } .header-left { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; } .header-logo { height: 36px; width: auto; object-fit: contain; flex-shrink: 0; } .header-title { font-size: 1.15rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .header-nav { display: flex; gap: var(--space-xs); } .nav-btn { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border: none; background: rgba(255, 255, 255, 0.1); color: white; border-radius: 6px; cursor: pointer; font-size: 0.85rem; transition: background var(--transition-fast); text-decoration: none; } .nav-btn:hover { background: rgba(255, 255, 255, 0.25); } .nav-btn-admin { margin-left: var(--space-sm); background: rgba(255, 255, 255, 0.05); opacity: 0.6; font-size: 0.8rem; } .nav-btn-admin:hover { opacity: 1; background: rgba(255, 255, 255, 0.2); } .header-menu-toggle { display: none; border: none; background: none; color: white; font-size: 1.4rem; cursor: pointer; padding: var(--space-sm); } #app-main { position: fixed; top: var(--header-height); bottom: var(--footer-height); left: var(--map-side-padding); right: var(--map-side-padding); } #map { width: 100%; height: 100%; } #app-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; height: var(--footer-height); display: flex; align-items: center; justify-content: center; padding: 0 var(--space-md); background: var(--color-surface); border-top: 1px solid var(--color-border); font-size: 0.8rem; color: var(--color-text-secondary); } .footer-content { display: flex; align-items: center; gap: var(--space-sm); } /* ----------------------------------------------------------------- 4.2 Map Controls ----------------------------------------------------------------- */ .gps-control-button { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-size: 16px; } .mouse-position-display { background: rgba(255, 255, 255, 0.85); padding: 2px 8px; font-size: 0.75rem; border-radius: 4px; } /* ----------------------------------------------------------------- 4.3 Sidebar Overrides ----------------------------------------------------------------- */ .leaflet-sidebar { z-index: 999; top: var(--header-height); bottom: var(--footer-height); } .leaflet-sidebar-header { background: var(--color-primary); color: white; } .leaflet-sidebar-close { color: white; } .leaflet-sidebar-tabs > ul > li > a { color: var(--color-text-secondary); transition: color var(--transition-fast); } .leaflet-sidebar-tabs > ul > li.active > a { color: var(--color-primary); border-color: var(--color-primary); } .sidebar-body { padding: var(--space-md); } .sidebar-body h3 { font-size: 0.95rem; font-weight: 600; margin: var(--space-lg) 0 var(--space-sm) 0; color: var(--color-primary); } .sidebar-body h3:first-child { margin-top: 0; } .sidebar-body p { margin-bottom: var(--space-sm); line-height: 1.5; color: var(--color-text-secondary); } /* ----------------------------------------------------------------- 4.4 Sidebar Contributions List ----------------------------------------------------------------- */ .list-search { margin-bottom: var(--space-md); } .contribution-card { padding: var(--space-md); margin-bottom: var(--space-sm); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; cursor: pointer; transition: box-shadow var(--transition-fast), border-color var(--transition-fast); } .contribution-card:hover { border-color: var(--color-primary); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .contribution-card-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); } .contribution-card-category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-primary); } .contribution-card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: var(--space-xs); } .contribution-card-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--color-text-secondary); } .contribution-card-votes { display: flex; gap: var(--space-sm); } /* ----------------------------------------------------------------- 4.5 Sidebar News Items ----------------------------------------------------------------- */ .news-item { font-size: 0.8rem; padding: var(--space-md); margin-bottom: var(--space-sm); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; } .news-date { font-size: 0.8rem; color: var(--color-text-secondary); } .news-item h3 { font-size: 0.95rem; margin: var(--space-xs) 0; color: var(--color-text); } /* ----------------------------------------------------------------- 4.6 Modals ----------------------------------------------------------------- */ .modal-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); } .modal-content { background: var(--color-surface); border-radius: 12px; padding: var(--space-xl); max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); } .modal-small { max-width: 380px; } .modal-content h2 { font-size: 1.3rem; margin-bottom: var(--space-md); color: var(--color-primary); display: flex; align-items: center; gap: var(--space-sm); } .modal-content p { line-height: 1.6; margin-bottom: var(--space-sm); color: var(--color-text-secondary); } .modal-content ul { margin: var(--space-sm) 0 var(--space-md) var(--space-lg); line-height: 1.8; color: var(--color-text-secondary); } .modal-actions { display: flex; justify-content: flex-end; gap: var(--space-sm); margin-top: var(--space-lg); } /* ----------------------------------------------------------------- 4.7 Map Popup ----------------------------------------------------------------- */ .popup-detail { min-width: 220px; max-width: 300px; } .popup-detail-title { font-weight: 600; font-size: 1rem; margin-bottom: var(--space-xs); } .popup-detail-category { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px; background: var(--color-primary-light); color: var(--color-primary); margin-bottom: var(--space-sm); } .popup-detail-description { font-size: 0.85rem; line-height: 1.5; color: var(--color-text-secondary); margin-bottom: var(--space-sm); } .popup-detail-meta { font-size: 0.75rem; color: var(--color-text-secondary); margin-bottom: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--color-border); } .popup-detail-votes { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); } .popup-vote-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border: 1px solid var(--color-border); border-radius: 20px; background: var(--color-surface); cursor: pointer; font-size: 0.85rem; transition: all var(--transition-fast); } .popup-vote-btn:hover { border-color: var(--color-primary); background: var(--color-primary-light); } .popup-vote-btn.liked { border-color: var(--color-success); background: #e8f5e9; color: var(--color-success); } .popup-vote-btn.disliked { border-color: var(--color-error); background: #ffebee; color: var(--color-error); } .popup-detail-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); } .popup-detail-actions .btn { flex: 1; padding: 6px 12px; font-size: 0.8rem; min-height: 36px; } /* ----------------------------------------------------------------- 4.8 Popup Comments ----------------------------------------------------------------- */ .popup-comments { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--color-border); } .popup-comments-header { font-size: 0.8rem; font-weight: 600; color: var(--color-text-secondary); margin-bottom: var(--space-sm); } .popup-comments-list { max-height: 150px; overflow-y: auto; } .popup-comment { padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.8rem; } .popup-comment:last-child { border-bottom: none; } .popup-comment-meta { color: var(--color-text-secondary); font-size: 0.75rem; margin-bottom: 2px; } .popup-comment-text { color: var(--color-text); line-height: 1.4; } .popup-comment-delete { color: var(--color-error); font-size: 0.7rem; } .popup-comment-empty { font-size: 0.8rem; color: #bbb; font-style: italic; padding: 8px 0; } .popup-comment-form { display: flex; gap: 4px; margin-top: var(--space-sm); } .popup-comment-input { flex: 1; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 16px; font-size: 0.8rem; font-family: var(--font-body); outline: none; } .popup-comment-input:focus { border-color: var(--color-primary); } .popup-comment-submit { border: none; background: var(--color-primary); color: white; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; transition: filter var(--transition-fast); } .popup-comment-submit:hover { filter: brightness(1.15); } /* ================================================================= SECTION 5: Admin-specific Styles (admin.php) ================================================================= */ /* ----------------------------------------------------------------- 5.1 Statistics Cards ----------------------------------------------------------------- */ .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 28px; } .stat-card { background: var(--color-surface); border-radius: 8px; padding: 16px; text-align: center; border: 1px solid var(--color-border); } .stat-card .stat-number { font-size: 1.8rem; font-weight: 700; color: var(--color-primary); } .stat-card .stat-label { font-size: 0.8rem; color: var(--color-text-secondary); margin-top: 4px; } /* ----------------------------------------------------------------- 5.2 Page Navigation Tabs ----------------------------------------------------------------- */ .page-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--color-surface); padding: 4px; border-radius: 8px; border: 1px solid var(--color-border); } .page-tab { padding: 8px 16px; border: none; background: none; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; border-radius: 6px; transition: all var(--transition-fast); display: flex; align-items: center; gap: 6px; } .page-tab:hover { background: #f0f0f0; } .page-tab.active { background: var(--color-primary); color: white; } /* ----------------------------------------------------------------- 5.3 Status Filter Tabs ----------------------------------------------------------------- */ .filter-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--color-border); } .filter-tab { padding: 8px 16px; border: none; background: none; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color var(--transition-fast), border-color var(--transition-fast); } .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: var(--color-border); color: var(--color-text-secondary); font-size: 0.7rem; padding: 1px 6px; border-radius: 10px; margin-left: 4px; } .filter-tab.active .tab-count { background: var(--color-primary); color: white; } /* ----------------------------------------------------------------- 5.4 Sort Controls ----------------------------------------------------------------- */ .sort-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.85rem; color: var(--color-text-secondary); } .sort-controls select { padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 4px; font-family: var(--font-body); font-size: 0.85rem; cursor: pointer; } /* ----------------------------------------------------------------- 5.5 Collapsible Rows ----------------------------------------------------------------- */ .contribution-row { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; transition: border-color var(--transition-fast); } .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 var(--transition-fast); } .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-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 var(--color-border); flex-shrink: 0; background: #f0f0f0; } .detail-content { flex: 1; min-width: 0; } .detail-content .description { font-size: 0.85rem; line-height: 1.5; color: var(--color-text-secondary); 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 { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #f0f0f0; } /* ----------------------------------------------------------------- 5.6 Placeholder Tabs ----------------------------------------------------------------- */ .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; } /* ----------------------------------------------------------------- 5.7 Login Page ----------------------------------------------------------------- */ .login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; } .login-box { background: var(--color-surface); 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: var(--color-text-secondary); margin-bottom: 20px; } .login-box input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.9rem; margin-bottom: 12px; font-family: var(--font-body); } .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: var(--font-body); } .login-box button:hover { filter: brightness(1.15); } .login-error { color: var(--color-error); font-size: 0.85rem; margin-bottom: 12px; } .back-link { margin-top: 16px; font-size: 0.8rem; } .back-link a { color: var(--color-text-secondary); } /* ================================================================= SECTION 6: Responsive Overrides ================================================================= */ @media (max-width: 768px) { :root { --header-height: 48px; --footer-height: 32px; } /* Portal */ .header-title { font-size: 0.9rem; } .header-nav { display: none; position: absolute; top: var(--header-height); right: 0; background: var(--color-primary); flex-direction: column; padding: var(--space-sm); border-radius: 0 0 0 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } .header-nav.open { display: flex; } .header-menu-toggle { display: block; } .modal-content { padding: var(--space-lg); border-radius: 8px; } .dev-warning { font-size: 0.6rem; left: var(--space-sm); } .mouse-position-display { display: none; } /* Admin */ .page-header { padding: 12px 16px; } .page-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; } /* Legal */ .page-content-box { padding: 20px; } .page-container { padding: 0 8px; } } @media (min-width: 769px) { :root { --map-side-padding: 8px; } }