Files
WebGIS/pertemuan2/style.css
T

1202 lines
24 KiB
CSS

/* ==========================================
CSS CUSTOM PROPERTIES (DESIGN SYSTEM)
========================================== */
:root {
--primary: #10b981; /* Emerald Green for SPBU theme */
--primary-dark: #059669;
--primary-light: #d1fae5;
--accent: #3b82f6; /* Blue */
--surface: #0f172a; /* Slate 900 */
--surface-2: #1e293b; /* Slate 800 */
--border: rgba(255, 255, 255, 0.08);
--border-strong: rgba(255, 255, 255, 0.15);
--text-primary: #f8fafc;
--text-secondary: #cbd5e1;
--text-muted: #64748b;
--success: #10b981;
--warning: #f59e0b;
--danger: #ef4444;
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--font: 'Plus Jakarta Sans', sans-serif;
--font-mono: 'DM Mono', monospace;
}
/* ==========================================
BASE & RESET
========================================== */
*, *::before, *::after {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: var(--font);
background: #090d16;
color: var(--text-primary);
overflow: hidden;
}
#map {
height: 100vh;
width: 100%;
}
/* ==========================================
HEADER BAR
========================================== */
.webgis-header {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 1100;
height: 60px;
background: rgba(15, 23, 42, 0.85);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 20px;
gap: 20px;
}
.header-brand {
display: flex;
align-items: center;
gap: 12px;
white-space: nowrap;
flex-shrink: 0;
}
.brand-icon {
width: 36px;
height: 36px;
background: linear-gradient(135deg, var(--primary), var(--accent));
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.brand-icon svg {
width: 20px;
height: 20px;
color: white;
}
.brand-name {
font-size: 16px;
font-weight: 700;
color: #ffffff;
letter-spacing: -0.3px;
line-height: 1.2;
}
.brand-subtitle {
font-size: 11px;
font-weight: 500;
color: var(--primary);
letter-spacing: 0.5px;
text-transform: uppercase;
}
.header-divider {
width: 1px;
height: 28px;
background: var(--border);
flex-shrink: 0;
}
/* ==========================================
SEARCH WRAPPER & BAR
========================================== */
.search-wrapper {
flex: 1;
max-width: 520px;
position: relative;
}
.search-bar {
display: flex;
align-items: center;
background: rgba(30, 41, 59, 0.6);
border: 1px solid var(--border);
border-radius: var(--radius-md);
height: 40px;
transition: all 0.2s ease;
}
.search-bar:focus-within {
background: rgba(30, 41, 59, 0.9);
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
/* Category Select */
.search-category-wrap {
position: relative;
display: flex;
align-items: center;
border-right: 1px solid var(--border);
padding: 0 10px 0 12px;
height: 100%;
flex-shrink: 0;
cursor: pointer;
transition: background 0.15s ease;
}
.search-category-wrap:hover {
background: rgba(255, 255, 255, 0.03);
}
.search-category-icon {
color: var(--primary);
display: flex;
align-items: center;
margin-right: 6px;
flex-shrink: 0;
}
.search-category-icon svg {
width: 15px;
height: 15px;
}
.custom-select-trigger {
color: var(--text-secondary);
font-size: 12.5px;
font-weight: 600;
padding-right: 18px;
min-width: 90px;
white-space: nowrap;
user-select: none;
}
.category-arrow {
position: absolute;
right: 8px;
color: var(--text-muted);
pointer-events: none;
display: flex;
align-items: center;
}
.category-arrow svg {
width: 12px;
height: 12px;
}
.custom-select-options {
position: absolute;
top: calc(100% + 8px);
left: 0;
min-width: 180px;
background: var(--surface-2);
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
box-shadow: var(--shadow-lg);
z-index: 1300;
display: none;
flex-direction: column;
padding: 6px;
}
.custom-select-options.show {
display: flex;
}
.custom-option {
padding: 8px 12px;
font-size: 13px;
color: var(--text-secondary);
border-radius: var(--radius-sm);
cursor: pointer;
transition: all 0.15s;
}
.custom-option:hover {
background: rgba(16, 185, 129, 0.15);
color: white;
}
.custom-option.selected {
background: rgba(16, 185, 129, 0.25);
color: #a7f3d0;
font-weight: 600;
}
/* Input field */
.search-input-wrap {
display: flex;
align-items: center;
flex: 1;
padding: 0 12px;
gap: 8px;
}
.search-icon {
color: var(--text-muted);
display: flex;
align-items: center;
flex-shrink: 0;
}
.search-icon svg {
width: 16px;
height: 16px;
}
#search-input {
flex: 1;
background: transparent;
border: none;
color: #ffffff;
font-family: var(--font);
font-size: 13px;
outline: none;
min-width: 0;
}
#search-input::placeholder {
color: var(--text-muted);
}
.search-clear-btn {
background: rgba(255, 255, 255, 0.05);
border: none;
border-radius: 5px;
color: var(--text-muted);
width: 22px;
height: 22px;
display: none;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
transition: all 0.15s;
}
.search-clear-btn:hover {
background: rgba(255, 255, 255, 0.15);
color: #ffffff;
}
.search-clear-btn svg {
width: 12px;
height: 12px;
}
/* ==========================================
SEARCH RESULTS DROPDOWN
========================================== */
.search-results {
position: absolute;
top: calc(100% + 8px);
left: 0;
right: 0;
background: var(--surface-2);
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
box-shadow: var(--shadow-lg);
max-height: 280px;
overflow-y: auto;
display: none;
z-index: 1200;
}
.results-header {
padding: 8px 12px 6px;
font-size: 10px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.8px;
border-bottom: 1px solid var(--border);
}
.result-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
cursor: pointer;
transition: background 0.15s;
border-bottom: 1px solid var(--border);
}
.result-item:last-child {
border-bottom: none;
}
.result-item:hover {
background: rgba(16, 185, 129, 0.12);
}
.result-item-icon {
width: 28px;
height: 28px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
font-size: 13px;
}
.result-item-text {
flex: 1;
min-width: 0;
}
.result-item-name {
font-size: 13px;
font-weight: 500;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.result-item-sub {
font-size: 11px;
color: var(--text-muted);
}
.badge-kategori {
font-size: 9.5px;
font-weight: 600;
padding: 2px 8px;
border-radius: 20px;
flex-shrink: 0;
letter-spacing: 0.3px;
text-transform: uppercase;
}
.badge-SPBU {
background: rgba(16, 185, 129, 0.15);
color: #34d399;
}
.result-empty {
padding: 20px 12px;
text-align: center;
color: var(--text-muted);
font-size: 13px;
}
/* ==========================================
HEADER RIGHT & BUTTONS
========================================== */
.header-tools {
display: flex;
align-items: center;
gap: 10px;
margin-left: auto;
flex-shrink: 0;
}
.tool-badge {
background: rgba(16, 185, 129, 0.12);
border: 1px solid rgba(16, 185, 129, 0.2);
padding: 5px 12px;
border-radius: 20px;
font-size: 12px;
color: #a7f3d0;
font-weight: 500;
}
/* ==========================================
SIDEBAR PANEL
========================================== */
.sidebar-toggle {
position: absolute;
top: 76px;
left: 20px;
z-index: 1000;
background: var(--surface-2);
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
padding: 10px 16px;
color: var(--text-primary);
font-family: var(--font);
font-size: 13px;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
box-shadow: var(--shadow-md);
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-toggle:hover {
background: var(--primary);
border-color: var(--primary-dark);
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
transform: translateY(-1px);
}
.sidebar-toggle svg {
width: 16px;
height: 16px;
transition: transform 0.25s ease;
}
.sidebar-toggle.open svg {
transform: rotate(45deg);
}
.input-sidebar {
position: absolute;
top: 76px;
left: -400px;
bottom: 20px;
width: 360px;
background: rgba(15, 23, 42, 0.92);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
border: 1px solid var(--border-strong);
border-radius: var(--radius-lg);
z-index: 1005;
box-shadow: var(--shadow-lg);
display: flex;
flex-direction: column;
overflow: hidden;
transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-sidebar.open {
left: 20px;
}
.sidebar-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
.sidebar-title {
display: flex;
align-items: center;
gap: 10px;
}
.sidebar-title-icon {
width: 30px;
height: 30px;
background: rgba(16, 185, 129, 0.15);
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
color: var(--primary);
}
.sidebar-title-icon svg {
width: 16px;
height: 16px;
}
.sidebar-title-text {
font-size: 14.5px;
font-weight: 700;
color: #ffffff;
}
.sidebar-title-sub {
font-size: 11px;
color: var(--text-muted);
}
.sidebar-close {
background: transparent;
border: none;
color: var(--text-muted);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
border-radius: 50%;
transition: all 0.2s;
}
.sidebar-close:hover {
background: rgba(255, 255, 255, 0.08);
color: #ffffff;
}
.sidebar-close svg {
width: 16px;
height: 16px;
}
/* Tabs */
.sidebar-tabs {
display: flex;
background: rgba(30, 41, 59, 0.5);
border-bottom: 1px solid var(--border);
padding: 4px 6px;
}
.stab {
flex: 1;
background: transparent;
border: none;
padding: 8px 10px;
color: var(--text-muted);
font-family: var(--font);
font-size: 12.5px;
font-weight: 600;
cursor: pointer;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
transition: all 0.2s;
}
.stab:hover {
color: var(--text-secondary);
}
.stab.active {
background: var(--surface-2);
color: #ffffff;
box-shadow: var(--shadow-sm);
}
.stab-icon {
font-size: 14px;
}
/* Sidebar Body */
.sidebar-body {
flex: 1;
overflow-y: auto;
padding: 20px;
}
.sidebar-body::-webkit-scrollbar {
width: 4px;
}
.sidebar-body::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.08);
border-radius: 4px;
}
.stab-content {
display: none;
}
.stab-content.active {
display: block;
}
/* Form Styling */
.step-guide {
background: rgba(30, 41, 59, 0.4);
border-left: 3px solid var(--primary);
padding: 10px 14px;
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
margin-bottom: 14px;
}
.step-badge {
font-size: 9px;
font-weight: 700;
color: var(--primary);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 3px;
}
.step-guide p {
margin: 0;
font-size: 12px;
line-height: 1.4;
color: var(--text-secondary);
}
.btn-pick-location {
width: 100%;
padding: 10px 16px;
background: rgba(16, 185, 129, 0.1);
border: 1.5px dashed var(--primary);
border-radius: var(--radius-md);
color: #34d399;
font-family: var(--font);
font-weight: 600;
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
transition: all 0.2s;
margin-bottom: 12px;
}
.btn-pick-location:hover, .btn-pick-location.active-pick {
background: var(--primary);
color: #0f172a;
border-style: solid;
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-pick-location svg {
width: 16px;
height: 16px;
}
.coords-display {
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 8px 12px;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.coords-label {
font-size: 11px;
color: var(--text-muted);
font-weight: 600;
text-transform: uppercase;
}
.coords-value {
font-size: 12px;
color: var(--text-secondary);
font-weight: 500;
}
.coords-value.has-coords {
color: var(--success);
font-weight: 600;
}
.sfield {
margin-bottom: 14px;
}
.sfield-label {
display: block;
font-size: 11px;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 6px;
}
.required {
color: var(--danger);
}
.sinput, .sselect {
width: 100%;
background: var(--surface-2);
border: 1.5px solid var(--border);
border-radius: var(--radius-sm);
padding: 9px 12px;
font-family: var(--font);
font-size: 13px;
color: #ffffff;
outline: none;
transition: all 0.2s;
}
.sinput:focus, .sselect:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.sinput[readonly] {
background: rgba(30, 41, 59, 0.3);
color: var(--text-muted);
border-color: var(--border);
cursor: not-allowed;
}
.btn-save-sidebar {
width: 100%;
padding: 10px 16px;
background: var(--primary);
border: none;
border-radius: var(--radius-md);
color: white;
font-family: var(--font);
font-weight: 600;
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
transition: all 0.2s;
margin-top: 20px;
}
.btn-save-sidebar:hover {
background: var(--primary-dark);
box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
transform: translateY(-1px);
}
.btn-save-sidebar svg {
width: 16px;
height: 16px;
}
/* Overlay pick banner */
.pick-mode-overlay {
position: absolute;
top: -80px;
left: 50%;
transform: translateX(-50%);
z-index: 1099;
display: flex;
justify-content: center;
transition: top 0.3s ease;
pointer-events: none;
}
.pick-mode-overlay.active {
top: 76px;
pointer-events: auto;
}
.pick-mode-banner {
background: #0f172a;
border: 1px solid var(--primary);
border-radius: 30px;
padding: 6px 6px 6px 16px;
display: flex;
align-items: center;
gap: 12px;
box-shadow: var(--shadow-lg);
}
.pick-mode-banner svg {
width: 14px;
height: 14px;
color: var(--primary);
}
.pick-mode-banner span {
font-size: 12px;
font-weight: 600;
color: #ffffff;
}
.pick-mode-banner button {
background: var(--danger);
border: none;
border-radius: 20px;
color: white;
padding: 4px 12px;
font-size: 11px;
font-weight: 600;
cursor: pointer;
transition: background 0.15s;
}
.pick-mode-banner button:hover {
background: #dc2626;
}
/* ==========================================
POPUP LAYOUTS (MAP INFOBOX)
========================================== */
.leaflet-popup-content-wrapper {
background: var(--surface-2) !important;
border: 1px solid var(--border-strong) !important;
border-radius: var(--radius-lg) !important;
box-shadow: var(--shadow-lg) !important;
padding: 0 !important;
overflow: hidden !important;
}
.leaflet-popup-content {
margin: 0 !important;
width: 250px !important;
}
.leaflet-popup-close-button {
color: #ffffff !important;
padding: 12px !important;
}
.popup-container {
font-family: var(--font);
color: var(--text-primary);
}
.popup-header {
background: linear-gradient(135deg, var(--primary-dark), var(--primary));
padding: 14px 16px;
border-bottom: 1px solid var(--border);
}
.popup-header h4 {
margin: 0;
font-size: 14.5px;
font-weight: 700;
color: #ffffff;
line-height: 1.3;
}
.popup-type-badge {
display: inline-flex;
margin-top: 4px;
font-size: 9.5px;
font-weight: 700;
color: rgba(255, 255, 255, 0.85);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.popup-body {
padding: 14px 16px;
}
.popup-body form {
display: flex;
flex-direction: column;
}
.popup-body input, .popup-body select {
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 8px 10px;
font-family: var(--font);
font-size: 12.5px;
color: #ffffff;
margin-bottom: 10px;
outline: none;
transition: all 0.2s;
}
.popup-body input:focus, .popup-body select:focus {
border-color: var(--primary);
}
.info-row {
margin-bottom: 8px;
display: flex;
flex-direction: column;
gap: 2px;
}
.info-row:last-of-type {
margin-bottom: 0;
}
.info-label {
font-size: 9.5px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.8px;
}
.info-value {
font-size: 13px;
font-weight: 500;
color: var(--text-secondary);
}
/* Popup CRUD Buttons */
.btn-group {
display: flex;
gap: 8px;
margin-top: 14px;
}
.btn {
flex: 1;
padding: 8px 12px;
border: none;
border-radius: var(--radius-sm);
cursor: pointer;
font-family: var(--font);
font-size: 12px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
transition: all 0.15s;
}
.btn-save {
background: var(--primary);
color: white;
}
.btn-save:hover {
background: var(--primary-dark);
}
.btn-edit {
background: rgba(245, 158, 11, 0.15);
color: #f59e0b;
border: 1px solid rgba(245, 158, 11, 0.3);
}
.btn-edit:hover {
background: #f59e0b;
color: #0f172a;
}
.btn-delete {
background: rgba(239, 68, 68, 0.15);
color: #ef4444;
border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-delete:hover {
background: var(--danger);
color: white;
}
/* ==========================================
MAP LEGEND (BOTTOM LEFT)
========================================== */
.legend {
background: rgba(15, 23, 42, 0.85);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
color: var(--text-secondary);
font-family: var(--font);
font-size: 11px;
box-shadow: var(--shadow-lg);
max-width: 36px;
max-height: 36px;
overflow: hidden;
padding: 0;
transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
padding 0.3s ease;
cursor: pointer;
position: relative;
}
.legend:hover {
max-width: 220px;
max-height: 150px;
padding: 12px 14px;
cursor: default;
}
.legend-icon-btn {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
display: flex;
align-items: center;
justify-content: center;
color: var(--primary);
transition: opacity 0.2s;
}
.legend-icon-btn svg {
width: 18px;
height: 18px;
}
.legend:hover .legend-icon-btn {
opacity: 0;
visibility: hidden;
}
.legend-content {
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease;
white-space: nowrap;
}
.legend:hover .legend-content {
opacity: 1;
visibility: visible;
transition-delay: 0.15s;
}
.legend h4 {
margin: 0 0 10px 0;
font-size: 12px;
font-weight: 700;
color: #ffffff;
border-bottom: 1px solid var(--border);
padding-bottom: 6px;
letter-spacing: 0.3px;
}
.legend-group {
display: block;
font-weight: 700;
font-size: 9.5px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-top: 5px;
margin-bottom: 6px;
}
.legend-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
font-size: 11.5px;
}
.legend-item:last-child {
margin-bottom: 0;
}
.legend-marker {
width: 12px;
height: 20px;
display: inline-block;
}
/* ==========================================
LEAFLET CUSTOM OVERRIDES
========================================== */
.leaflet-bar {
border: 1px solid var(--border-strong) !important;
box-shadow: var(--shadow-md) !important;
border-radius: var(--radius-md) !important;
overflow: hidden;
}
.leaflet-bar a {
background-color: var(--surface-2) !important;
color: var(--text-primary) !important;
border-bottom: 1px solid var(--border) !important;
transition: all 0.15s;
}
.leaflet-bar a:hover {
background-color: var(--primary) !important;
color: white !important;
}
.leaflet-control-zoom {
border: none !important;
}
/* Shift Leaflet top controls below the 60px header */
.leaflet-top {
margin-top: 70px;
}
/* Custom styling for Leaflet Layers Control - Compact Design at bottomleft */
.leaflet-control-layers {
background: rgba(15, 23, 42, 0.9) !important;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid var(--border-strong) !important;
border-radius: var(--radius-md) !important;
box-shadow: var(--shadow-md) !important;
transition: all 0.2s ease;
padding: 0 !important;
}
/* Make the collapsed toggle button small and compact */
.leaflet-control-layers-toggle {
width: 32px !important;
height: 32px !important;
background-size: 16px 16px !important;
}
/* Expanded list styling - smaller padding and fonts */
.leaflet-control-layers-expanded {
padding: 8px 10px !important;
min-width: 140px;
}
.leaflet-control-layers-list label {
margin-bottom: 6px;
cursor: pointer;
font-size: 11px;
font-weight: 600;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 6px;
transition: color 0.15s;
}
.leaflet-control-layers-list label:last-child {
margin-bottom: 0;
}
.leaflet-control-layers-list label:hover {
color: #ffffff;
}
/* Custom Checkbox Design - Smaller */
.leaflet-control-layers-selector {
-webkit-appearance: none;
appearance: none;
width: 13px !important;
height: 13px !important;
border: 1.5px solid var(--border-strong) !important;
border-radius: 3px !important;
outline: none;
background: var(--surface) !important;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
margin: 0 !important;
position: relative;
}
.leaflet-control-layers-selector:checked {
background: var(--primary) !important;
border-color: var(--primary) !important;
}
.leaflet-control-layers-selector:checked::after {
content: '';
width: 3px;
height: 6px;
border: solid white;
border-width: 0 1.5px 1.5px 0;
transform: rotate(45deg);
position: absolute;
top: 1.5px;
left: 3.5px;
}
.leaflet-control-layers-selector:focus {
box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.25) !important;
}