Files
webgis-poverty-pontianak/assets/css/style.css
T

831 lines
15 KiB
CSS

/* Reset & Base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body, html {
height: 100%;
font-family: 'Google Sans Flex', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
overflow: hidden;
}
/* Map Container */
#map {
width: 100vw;
height: 100vh;
z-index: 1;
}
/* Custom UI Container over Map */
.ui-container {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 100%;
max-width: 400px;
display: flex;
flex-direction: column;
gap: 10px;
padding: 0 15px;
}
/* Search Bar */
.search-bar {
display: flex;
align-items: center;
background-color: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
overflow: hidden;
height: 48px;
transition: box-shadow 0.3s;
}
.search-bar:focus-within {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.search-icon {
padding: 0 15px;
color: #666;
display: flex;
align-items: center;
justify-content: center;
}
.search-input {
flex: 1;
border: none;
outline: none;
font-size: 16px;
padding: 10px 0;
color: #333;
}
.search-clear {
padding: 0 15px;
color: #999;
cursor: pointer;
background: none;
border: none;
display: flex;
align-items: center;
justify-content: center;
visibility: hidden;
}
.search-clear:hover {
color: #333;
}
/* Custom Layer Control Button */
.custom-layer-btn {
position: absolute;
top: 20px;
right: 20px;
z-index: 1000;
background-color: white;
border-radius: 8px;
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
cursor: pointer;
border: none;
color: #333;
}
.custom-layer-btn:hover {
background-color: #f8f9fa;
}
.custom-layer-panel {
position: absolute;
top: 80px;
right: 20px;
z-index: 1000;
background-color: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 15px;
width: 250px;
display: none;
}
.custom-layer-panel h3 {
margin-bottom: 10px;
font-size: 16px;
border-bottom: 1px solid #eee;
padding-bottom: 5px;
}
.layer-option {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
font-size: 14px;
}
/* ===== Sidebar Toggle Button ===== */
.sidebar-toggle-btn {
position: absolute;
left: 20px;
top: 90px;
z-index: 1001;
width: 36px;
height: 36px;
background: white;
border: none;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.15);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #6366f1;
font-size: 13px;
transition: all 0.2s;
}
.sidebar-toggle-btn:hover {
background: #6366f1;
color: white;
box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}
.sidebar-toggle-btn.open {
background: #6366f1;
color: white;
}
/* ===== Left Sidebar ===== */
.left-sidebar {
position: absolute;
left: 20px;
top: 136px; /* di bawah toggle button */
z-index: 1000;
display: flex;
flex-direction: column;
gap: 8px;
}
.sidebar-btn {
width: 60px;
height: 60px;
background: white;
border: none;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0,0,0,0.12);
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
transition: all 0.2s ease;
padding: 6px 4px;
}
.sidebar-btn:hover {
transform: translateX(3px);
box-shadow: 0 6px 18px rgba(0,0,0,0.18);
background: #f8f9fa;
}
.sidebar-btn.active {
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: white;
box-shadow: 0 6px 18px rgba(99,102,241,0.4);
transform: translateX(4px);
}
.sidebar-emoji {
font-size: 22px;
line-height: 1;
}
.sidebar-label {
font-size: 9px;
font-weight: 600;
letter-spacing: 0.3px;
color: #555;
text-transform: uppercase;
}
.sidebar-btn.active .sidebar-label {
color: rgba(255,255,255,0.85);
}
/* ===== Right Panel ===== */
.right-panel {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 320px;
background: #f8f9fb;
z-index: 999;
box-shadow: -4px 0 20px rgba(0,0,0,0.12);
display: flex;
flex-direction: column;
transform: translateX(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
/* shift layer control when panel open */
}
.right-panel.open {
transform: translateX(0);
}
.right-panel-header {
padding: 16px 16px 12px;
background: white;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
padding-top: 26px;
}
.right-panel-header h3 {
font-size: 15px;
font-weight: 700;
color: #1e1e2e;
}
.right-panel-close {
width: 30px;
height: 30px;
border: none;
background: #f3f4f6;
border-radius: 8px;
cursor: pointer;
color: #555;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
transition: background 0.2s;
}
.right-panel-close:hover {
background: #e5e7eb;
color: #333;
}
.right-panel-actions {
padding: 12px 14px;
background: white;
border-bottom: 1px solid #eee;
display: flex;
gap: 8px;
flex-shrink: 0;
}
.right-panel-actions button {
flex: 1;
padding: 9px 10px;
border: none;
border-radius: 8px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
transition: all 0.2s;
}
.btn-panel-add {
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: white;
box-shadow: 0 3px 10px rgba(99,102,241,0.3);
}
.btn-panel-add:hover {
box-shadow: 0 5px 14px rgba(99,102,241,0.45);
transform: translateY(-1px);
}
.btn-panel-import {
background: #f0fdf4;
color: #16a34a;
border: 1px solid #bbf7d0 !important;
}
.btn-panel-import:hover {
background: #dcfce7;
}
.right-panel-body {
flex: 1;
overflow-y: auto;
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
}
/* Panel Section Heading */
.panel-section-title {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #9ca3af;
padding: 4px 2px 6px;
border-bottom: 1px solid #e5e7eb;
margin-top: 4px;
}
/* Panel Empty State */
.panel-empty {
text-align: center;
color: #aaa;
font-size: 13px;
padding: 40px 10px;
}
/* ===== Data Card ===== */
.data-card {
background: white;
border-radius: 12px;
padding: 12px 12px 10px;
box-shadow: 0 1px 4px rgba(0,0,0,0.07);
transition: box-shadow 0.2s;
cursor: pointer;
}
.data-card:hover {
box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}
.data-card-main {
display: flex;
align-items: center;
gap: 10px;
}
.data-card-icon {
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
flex-shrink: 0;
}
.card-icon-spbu { background: #f0fdf4; }
.card-icon-jalan { background: #eff6ff; }
.card-icon-parsil { background: #fefce8; }
.card-icon-ibadah { background: #fff7ed; }
.card-icon-miskin-out { background: #f0fdf4; }
.card-icon-miskin-in { background: #fef2f2; }
.data-card-info {
flex: 1;
min-width: 0;
}
.data-card-name {
font-size: 13px;
font-weight: 600;
color: #1e1e2e;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.data-card-sub {
font-size: 11px;
color: #6b7280;
margin-top: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.data-card-badge {
font-size: 10px;
font-weight: 600;
padding: 2px 7px;
border-radius: 99px;
margin-top: 4px;
display: inline-block;
}
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-yellow { background: #fef9c3; color: #ca8a04; }
.data-card-actions {
display: flex;
gap: 6px;
flex-shrink: 0;
align-items: center;
}
.btn-card-action {
width: 30px;
height: 30px;
border: none;
border-radius: 7px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
transition: all 0.15s;
}
.btn-card-edit {
background: #eff6ff;
color: #3b82f6;
}
.btn-card-edit:hover {
background: #3b82f6;
color: white;
}
.btn-card-delete {
background: #fef2f2;
color: #ef4444;
}
.btn-card-delete:hover {
background: #ef4444;
color: white;
}
/* Expandable card (miskin) */
.data-card-expand {
overflow: hidden;
max-height: 0;
transition: max-height 0.3s ease, padding 0.2s;
border-top: 0px solid #f3f4f6;
}
.data-card.expanded .data-card-expand {
max-height: 400px;
border-top: 1px solid #f3f4f6;
margin-top: 10px;
padding-top: 10px;
}
.expand-row {
display: flex;
justify-content: space-between;
font-size: 12px;
color: #6b7280;
padding: 3px 0;
}
.expand-row span:first-child {
font-weight: 500;
color: #374151;
}
.btn-log-bantuan {
margin-top: 10px;
width: 100%;
padding: 8px;
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: white;
border: none;
border-radius: 8px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
transition: all 0.2s;
}
.btn-log-bantuan:hover {
box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
/* Log Bantuan Item */
.log-item {
background: #f8f9fb;
border-radius: 8px;
padding: 10px 12px;
display: flex;
gap: 10px;
align-items: flex-start;
}
.log-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #6366f1;
flex-shrink: 0;
margin-top: 5px;
}
.log-info {
flex: 1;
}
.log-type {
font-size: 12px;
font-weight: 600;
color: #1e1e2e;
}
.log-meta {
font-size: 11px;
color: #9ca3af;
margin-top: 2px;
}
.log-keterangan {
font-size: 11px;
color: #6b7280;
margin-top: 3px;
font-style: italic;
}
/* Popup Form */
.popup-form {
display: flex;
flex-direction: column;
gap: 10px;
width: 200px;
}
.popup-form label {
font-size: 12px;
font-weight: bold;
color: #555;
}
.popup-form input[type="text"],
.popup-form input[type="number"] {
width: 100%;
padding: 6px;
border: 1px solid #ccc;
border-radius: 4px;
}
.popup-form .radio-group {
display: flex;
gap: 10px;
}
.popup-form button {
padding: 8px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
}
.popup-form button.btn-danger {
background-color: #dc3545;
}
.popup-form button:hover {
opacity: 0.9;
}
/* Unified Modal */
.unified-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
z-index: 2000;
align-items: center;
justify-content: center;
}
.unified-modal.show {
display: flex;
}
.modal-content {
background-color: white;
border-radius: 12px;
width: 400px;
max-width: 90%;
box-shadow: 0 8px 30px rgba(0,0,0,0.2);
display: flex;
flex-direction: column;
}
.modal-header {
padding: 15px;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
font-size: 16px;
margin: 0;
}
.modal-close {
font-size: 20px;
font-weight: bold;
cursor: pointer;
color: #888;
}
.modal-close:hover {
color: #333;
}
.modal-body {
padding: 15px;
display: flex;
flex-direction: column;
gap: 12px;
}
.modal-body label {
font-size: 13px;
font-weight: 600;
color: #444;
}
.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body input[type="date"],
.modal-body select,
.modal-body textarea {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 14px;
font-family: inherit;
}
.modal-footer {
padding: 15px;
border-top: 1px solid #eee;
display: flex;
justify-content: flex-end;
gap: 10px;
}
.btn-save {
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: white;
border: none;
padding: 8px 18px;
border-radius: 7px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.btn-cancel {
background-color: #f8f9fa;
border: 1px solid #ddd;
padding: 8px 18px;
border-radius: 7px;
cursor: pointer;
font-size: 13px;
}
.form-group {
display: flex;
flex-direction: column;
gap: 4px;
}
/* Custom Cursor Tooltip */
.custom-cursor-tooltip {
position: absolute;
display: none;
background-color: rgba(0, 0, 0, 0.75);
color: white;
padding: 6px 12px;
border-radius: 4px;
font-size: 13px;
font-weight: 500;
pointer-events: none;
z-index: 9999;
white-space: nowrap;
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
/* Sembunyikan default tooltip Leaflet Draw */
.leaflet-draw-tooltip {
display: none !important;
}
/* Sub-layer collapsible */
.layer-group-item {
margin-bottom: 6px;
}
.layer-group-item > .layer-group-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.layer-toggle-icon {
cursor: pointer;
padding: 2px 6px;
color: #666;
font-size: 11px;
border-radius: 4px;
transition: background 0.2s;
flex-shrink: 0;
}
.layer-toggle-icon:hover {
background: #f0f0f0;
color: #333;
}
.layer-toggle-icon i {
transition: transform 0.2s;
}
.layer-toggle-icon.collapsed i {
transform: rotate(-90deg);
}
.sub-layer-list {
padding-left: 18px;
margin-top: 4px;
border-left: 2px solid #eee;
overflow: hidden;
transition: max-height 0.2s ease;
}
.sub-option {
font-size: 12px !important;
color: #555;
margin-bottom: 3px !important;
}
/* ===== Emoji Marker (Pin Bubble) ===== */
.emoji-marker {
display: flex;
flex-direction: column;
align-items: center;
pointer-events: none;
}
.emoji-marker .bubble {
width: 38px;
height: 38px;
border-radius: 50% 50% 50% 0;
transform: rotate(-45deg);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 3px 10px rgba(0,0,0,0.25);
border: 2px solid rgba(255,255,255,0.8);
animation: markerPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.emoji-marker .bubble span {
transform: rotate(45deg);
font-size: 18px;
line-height: 1;
}
@keyframes markerPop {
0% { transform: rotate(-45deg) scale(0); }
100% { transform: rotate(-45deg) scale(1); }
}
/* Warna bubble per tipe */
.emoji-marker .bubble.spbu-24 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.emoji-marker .bubble.spbu-not24 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.emoji-marker .bubble.ibadah { background: linear-gradient(135deg, #f97316, #ea580c); }
.emoji-marker .bubble.miskin-in { background: linear-gradient(135deg, #ef4444, #dc2626); }
.emoji-marker .bubble.miskin-out { background: linear-gradient(135deg, #22c55e, #16a34a); }