Files
webgis_geospesial/assets/css/style.css
T

781 lines
22 KiB
CSS

/* ============================================================
WebGIS - style.css
Design: Red & White Theme (Merah Putih)
Font: Plus Jakarta Sans + JetBrains Mono
============================================================ */
/* --- Reset & Variables ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--sidebar-w: 300px;
--sidebar-bg: #ffffff;
--sidebar-border: rgba(0,0,0,0.08);
--sidebar-text: #334155;
--sidebar-text-muted: #64748b;
--sidebar-hover: #f1f5f9;
--accent: #e11d48; /* Merah cantik */
--accent-glow: rgba(225, 29, 72, 0.25);
--green: #16a34a;
--red: #e11d48;
--amber: #d97706;
--surface: #ffffff;
--surface-2: #f8fafc;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--shadow-md: 0 4px 24px rgba(0,0,0,0.08);
--shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
--font: 'Plus Jakarta Sans', system-ui, sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
html, body { height: 100%; overflow: hidden; }
body {
font-family: var(--font);
font-size: 14px;
background: #f1f5f9;
color: var(--sidebar-text);
}
/* --- Scrollbar ------------------------------------------ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
/* ============================================================
SIDEBAR
============================================================ */
.sidebar {
position: fixed;
left: 0; top: 0; bottom: 0;
width: var(--sidebar-w);
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-right: 1px solid var(--sidebar-border);
display: flex;
flex-direction: column;
z-index: 900;
overflow-y: auto;
overflow-x: hidden;
transition: transform var(--transition), width var(--transition);
box-shadow: 2px 0 20px rgba(0,0,0,0.03);
}
.sidebar.collapsed {
transform: translateX(calc(-1 * var(--sidebar-w)));
}
/* Sidebar Header */
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 16px 16px;
border-bottom: 1px solid var(--sidebar-border);
flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
width: 38px; height: 38px;
background: linear-gradient(135deg, var(--accent), #be123c);
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
color: white;
box-shadow: 0 4px 12px var(--accent-glow);
flex-shrink: 0;
}
.logo-title {
display: block;
font-size: 16px; font-weight: 800;
color: #0f172a; letter-spacing: -0.3px;
}
.logo-sub {
display: block;
font-size: 10.5px; font-weight: 500;
color: var(--sidebar-text-muted);
letter-spacing: 0.5px; text-transform: uppercase;
}
.sidebar-toggle {
width: 30px; height: 30px;
border: 1px solid var(--sidebar-border);
border-radius: 8px; background: transparent;
color: var(--sidebar-text-muted); cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: all var(--transition);
}
.sidebar-toggle:hover { background: var(--sidebar-hover); color: #0f172a; border-color: rgba(0,0,0,0.15); }
/* Sidebar Section */
.sidebar-section {
padding: 16px;
border-bottom: 1px solid var(--sidebar-border);
}
.section-label {
font-size: 10px; font-weight: 700;
color: var(--sidebar-text-muted);
letter-spacing: 1.2px; text-transform: uppercase;
margin-bottom: 12px;
}
/* Stats Grid */
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
margin-bottom: 14px;
}
.stat-card {
background: var(--surface-2);
border-radius: var(--radius-md);
padding: 12px 10px;
display: flex; align-items: center; gap: 8px;
border: 1px solid var(--sidebar-border);
transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-1px); border-color: rgba(0,0,0,0.15); }
.stat-icon { font-size: 18px; line-height: 1; }
.stat-value {
font-size: 22px; font-weight: 800;
color: #0f172a; line-height: 1;
font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 10px; color: var(--sidebar-text-muted); margin-top: 2px; font-weight: 600; }
.stat-blue { border-left: 3px solid #3b82f6; }
.stat-amber { border-left: 3px solid var(--amber); }
.stat-green { border-left: 3px solid var(--green); }
.stat-red { border-left: 3px solid var(--red); }
/* Coverage Bar */
.coverage-bar-wrap { }
.coverage-bar-header {
display: flex; justify-content: space-between;
font-size: 11.5px; color: var(--sidebar-text);
margin-bottom: 6px; font-weight: 600;
}
.coverage-bar-header strong { color: var(--accent); font-size: 13px; }
.coverage-bar-track {
height: 6px; background: rgba(0,0,0,0.06);
border-radius: 99px; overflow: hidden;
}
.coverage-bar-fill {
height: 100%;
background: linear-gradient(90deg, var(--red), #fb7185);
border-radius: 99px;
transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
/* Tool Grid */
.tool-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
margin-bottom: 10px;
}
.tool-btn {
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 4px; padding: 10px 6px;
background: var(--surface);
border: 1px solid var(--sidebar-border);
border-radius: var(--radius-sm);
color: var(--sidebar-text);
cursor: pointer; font-family: var(--font);
font-size: 10px; font-weight: 600;
transition: all var(--transition);
letter-spacing: 0.3px;
}
.tool-btn:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.tool-btn.active {
background: var(--accent);
border-color: var(--accent);
color: white;
box-shadow: 0 2px 12px var(--accent-glow);
}
.tool-icon { font-size: 18px; }
.help-text {
font-size: 11px; color: var(--sidebar-text-muted);
line-height: 1.5; padding: 8px 10px;
background: var(--surface-2);
border-radius: var(--radius-sm);
border: 1px solid var(--sidebar-border);
}
/* Layer List */
.layer-list { display: flex; flex-direction: column; gap: 4px; }
.layer-item {
display: flex; align-items: center; gap: 8px;
padding: 7px 8px;
border-radius: var(--radius-sm);
cursor: pointer; transition: background var(--transition);
font-size: 12.5px; color: #0f172a; font-weight: 500;
user-select: none;
}
.layer-item:hover { background: var(--sidebar-hover); }
.layer-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
.layer-dot {
width: 10px; height: 10px;
border-radius: 50%; flex-shrink: 0;
}
/* Legend */
.legend-list { display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--sidebar-text); font-weight: 500; }
.legend-marker {
width: 12px; height: 12px;
background: #e11d48; border-radius: 50%;
border: 2px solid white;
box-shadow: 0 0 0 2px rgba(225,29,72,0.3);
flex-shrink: 0;
}
.legend-circle {
width: 14px; height: 14px;
border-radius: 50%; flex-shrink: 0;
}
.legend-line {
width: 22px; height: 3px;
border-radius: 2px; flex-shrink: 0;
}
/* Sidebar Footer */
.sidebar-footer {
margin-top: auto;
padding: 12px 16px;
border-top: 1px solid var(--sidebar-border);
font-size: 10.5px; color: var(--sidebar-text-muted);
font-weight: 500;
}
/* Open button (collapsed state) */
.sidebar-open-btn {
position: fixed;
left: 12px; top: 50%;
transform: translateY(-50%);
z-index: 901;
width: 36px; height: 36px;
background: var(--sidebar-bg);
border: 1px solid var(--sidebar-border);
border-radius: 10px;
color: var(--sidebar-text);
cursor: pointer;
display: flex; align-items: center; justify-content: center;
box-shadow: var(--shadow-md);
transition: all var(--transition);
}
.sidebar-open-btn:hover { background: var(--surface-2); color: #0f172a; border-color: rgba(0,0,0,0.15); }
/* ============================================================
MAP CONTAINER
============================================================ */
#mapContainer {
position: fixed;
left: var(--sidebar-w);
top: 0; right: 0; bottom: 0;
transition: left var(--transition);
}
#mapContainer.full-width { left: 0; }
#map { width: 100%; height: 100%; background: #e5e5e5; }
/* Loading overlay */
.map-loading {
position: absolute; inset: 0;
background: rgba(255,255,255,0.85);
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 12px; z-index: 500;
color: #0f172a; font-size: 14px; font-weight: 600;
backdrop-filter: blur(4px);
transition: opacity 0.4s;
}
.map-loading.hidden { opacity: 0; pointer-events: none; }
.loading-spinner {
width: 38px; height: 38px;
border: 3px solid rgba(0,0,0,0.1);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ============================================================
TOAST NOTIFICATIONS
============================================================ */
.toast-container {
position: absolute;
bottom: 24px; right: 16px;
display: flex; flex-direction: column; gap: 8px;
z-index: 800; pointer-events: none;
}
.toast {
display: flex; align-items: center; gap: 10px;
padding: 12px 16px;
border-radius: var(--radius-md);
font-size: 13px; font-weight: 600;
color: white;
box-shadow: var(--shadow-md);
animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
pointer-events: all; max-width: 320px;
backdrop-filter: blur(8px);
}
.toast.success { background: rgba(22,163,74,0.95); }
.toast.error { background: rgba(225,29,72,0.95); }
.toast.info { background: rgba(59,130,246,0.95); }
.toast.warning { background: rgba(217,119,6,0.95); }
.toast.fade-out { animation: toastOut 0.3s forwards; }
@keyframes toastIn {
from { transform: translateX(60px); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
to { transform: translateX(60px); opacity: 0; }
}
/* ============================================================
MODAL
============================================================ */
.modal-backdrop {
position: fixed; inset: 0;
background: rgba(0,0,0,0.4);
z-index: 1000;
backdrop-filter: blur(3px);
transition: opacity var(--transition);
}
.modal-backdrop.hidden { display: none; }
.modal {
position: fixed;
top: 50%; left: 50%;
transform: translate(-50%, -50%) scale(0.96);
width: 480px; max-width: calc(100vw - 32px);
max-height: calc(100vh - 60px);
background: #ffffff;
border: 1px solid rgba(0,0,0,0.05);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
z-index: 1100;
display: flex; flex-direction: column;
overflow: hidden;
animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.modal.hidden { display: none; }
.modal.modal-sm { width: 380px; }
@keyframes modalIn {
from { opacity: 0; transform: translate(-50%, -52%) scale(0.93); }
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal-header {
padding: 18px 20px 14px;
border-bottom: 1px solid rgba(0,0,0,0.06);
display: flex; align-items: center;
justify-content: space-between; gap: 12px;
flex-shrink: 0;
background: #f8fafc;
}
.modal-title-wrap { display: flex; align-items: center; gap: 12px; }
.modal-icon {
width: 40px; height: 40px;
border-radius: var(--radius-sm);
display: flex; align-items: center;
justify-content: center; font-size: 20px;
flex-shrink: 0;
background: #ffe4e6 !important;
color: var(--accent) !important;
}
.modal-title { font-size: 16px; font-weight: 800; color: #0f172a; }
.modal-subtitle { font-size: 11px; color: var(--sidebar-text-muted); margin-top: 2px; font-weight: 500; }
.modal-close {
width: 30px; height: 30px;
border: 1px solid rgba(0,0,0,0.1);
border-radius: 8px; background: #ffffff;
color: var(--sidebar-text-muted); cursor: pointer;
font-size: 14px; transition: all var(--transition);
display: flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.modal-close:hover { background: #ffe4e6; border-color: var(--accent); color: var(--accent); }
.modal-body {
padding: 18px 20px;
overflow-y: auto; flex: 1;
}
.modal-footer {
padding: 14px 20px;
border-top: 1px solid rgba(0,0,0,0.06);
display: flex; gap: 8px; justify-content: flex-end;
flex-shrink: 0;
background: #f8fafc;
}
/* --- Form Elements ------------------------------------ */
.form-row {
display: grid; grid-template-columns: 1fr 1fr;
gap: 12px;
}
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
display: block;
font-size: 11.5px; font-weight: 700;
color: var(--sidebar-text-muted);
letter-spacing: 0.5px; text-transform: uppercase;
margin-bottom: 6px;
}
.form-label small { font-size: 10px; text-transform: none; font-weight: 500; color: #94a3b8; }
.req { color: var(--accent); }
.form-input {
width: 100%;
background: #ffffff;
border: 1px solid rgba(0,0,0,0.15);
border-radius: var(--radius-sm);
padding: 9px 12px;
font-size: 13px;
color: #0f172a;
font-family: var(--font);
font-weight: 500;
outline: none;
transition: border-color var(--transition), box-shadow var(--transition);
resize: none;
}
.form-input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: #94a3b8; font-weight: 400; }
.form-input[readonly] { background: #f1f5f9; cursor: default; color: #64748b; }
.form-input.mono { font-family: var(--font-mono); font-size: 12px; }
.form-input option { background: #ffffff; }
/* Radio Tabs */
.radio-tabs { display: flex; gap: 6px; }
.radio-tab {
flex: 1; position: relative;
}
.radio-tab input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-tab span {
display: block; text-align: center;
padding: 8px;
background: #ffffff;
border: 1px solid rgba(0,0,0,0.15);
border-radius: var(--radius-sm);
font-size: 12.5px; font-weight: 600;
cursor: pointer; color: var(--sidebar-text);
transition: all var(--transition);
}
.radio-tab input:checked + span {
background: var(--accent);
border-color: var(--accent);
color: white;
box-shadow: 0 2px 8px var(--accent-glow);
}
/* Range */
.range-wrap {
display: flex; align-items: center; gap: 8px;
}
.range-min, .range-max {
font-size: 10px; color: var(--sidebar-text-muted);
font-family: var(--font-mono); flex-shrink: 0; font-weight: 600;
}
.range-input {
flex: 1; height: 4px; cursor: pointer;
accent-color: var(--accent);
-webkit-appearance: none;
background: rgba(0,0,0,0.1);
border-radius: 99px;
outline: none;
}
.range-input::-webkit-slider-thumb {
-webkit-appearance: none;
width: 16px; height: 16px;
border-radius: 50%; background: var(--accent);
box-shadow: 0 2px 6px var(--accent-glow);
cursor: pointer; border: 2px solid white;
}
/* Geocode wrap */
.geocode-wrap { position: relative; }
.geocode-status {
position: absolute; top: 8px; right: 10px;
font-size: 11px; color: var(--sidebar-text-muted); font-weight: 500;
}
/* Status Jangkauan Card */
.status-jangkauan-card {
background: #f8fafc;
border: 1px solid rgba(0,0,0,0.06);
border-radius: var(--radius-md);
padding: 12px 14px;
margin-bottom: 14px;
}
.sj-label { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--sidebar-text-muted); margin-bottom: 4px; }
.sj-value { font-size: 15px; font-weight: 800; color: #0f172a; }
.sj-value.dalam { color: var(--green); }
.sj-value.luar { color: var(--accent); }
.sj-ditangani { font-size: 11.5px; color: var(--sidebar-text-muted); margin-top: 3px; font-weight: 500; }
/* --- Buttons ------------------------------------------ */
.btn {
padding: 9px 20px;
border-radius: var(--radius-sm);
border: none; cursor: pointer;
font-family: var(--font);
font-size: 13px; font-weight: 700;
transition: all var(--transition);
display: inline-flex; align-items: center; gap: 6px;
justify-content: center;
}
.btn-primary {
background: var(--accent);
color: white;
box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover { background: #be123c; transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-primary:active { transform: none; }
.btn-ghost {
background: #ffffff;
border: 1px solid rgba(0,0,0,0.15);
color: var(--sidebar-text);
}
.btn-ghost:hover { background: #f1f5f9; color: #0f172a; border-color: rgba(0,0,0,0.25); }
.btn-danger { background: var(--accent); color: white; }
.btn-danger:hover { background: #be123c; }
.btn-sm { padding: 5px 12px; font-size: 11.5px; }
/* --- Hidden ------------------------------------------- */
.hidden { display: none !important; }
/* ============================================================
LEAFLET CUSTOMIZATIONS
============================================================ */
/* Popup */
.leaflet-popup-content-wrapper {
background: #ffffff !important;
border: 1px solid rgba(0,0,0,0.08) !important;
border-radius: var(--radius-md) !important;
box-shadow: var(--shadow-md) !important;
color: #334155 !important;
padding: 0 !important;
overflow: hidden;
}
.leaflet-popup-tip { background: #ffffff !important; border-top: 1px solid rgba(0,0,0,0.08); border-left: 1px solid rgba(0,0,0,0.08); }
.leaflet-popup-content { margin: 0 !important; }
.popup-card {
padding: 14px 16px;
min-width: 200px;
}
.popup-title {
font-size: 14px; font-weight: 800;
color: #0f172a; margin-bottom: 8px;
display: flex; align-items: center; gap: 6px;
}
.popup-badge {
font-size: 10px; font-weight: 700;
padding: 2px 7px; border-radius: 99px;
text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-dalam { background: #dcfce7; color: #166534; }
.badge-luar { background: #ffe4e6; color: #9f1239; }
.badge-fp { background: #f1f5f9; color: #475569; }
.popup-row {
display: flex; gap: 6px;
font-size: 12px; margin-bottom: 4px;
color: #64748b; font-weight: 500;
}
.popup-row strong { color: #0f172a; min-width: 80px; font-weight: 700; }
.popup-actions {
display: flex; gap: 6px;
padding: 10px 16px;
border-top: 1px solid rgba(0,0,0,0.06);
background: #f8fafc;
}
.popup-btn {
flex: 1; padding: 6px;
border: 1px solid rgba(0,0,0,0.12);
border-radius: 6px;
background: #ffffff; cursor: pointer;
font-size: 11px; font-weight: 700;
color: var(--sidebar-text); font-family: var(--font);
transition: all 0.15s;
text-align: center;
}
.popup-btn:hover { background: #f1f5f9; color: #0f172a; }
.popup-btn.del:hover { background: #ffe4e6; border-color: var(--accent); color: var(--accent); }
/* Zoom / Attribution */
.leaflet-control-zoom a {
background: #ffffff !important;
border-color: rgba(0,0,0,0.1) !important;
color: #0f172a !important;
font-weight: 700 !important;
}
.leaflet-control-zoom a:hover { background: #f8fafc !important; color: var(--accent) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,0.9) !important; color: #64748b !important; font-size: 10px !important; font-weight: 500 !important; }
.leaflet-control-attribution a { color: var(--accent) !important; font-weight: 600 !important; }
/* Scale */
.leaflet-control-scale-line {
background: rgba(255,255,255,0.9) !important;
border-color: rgba(0,0,0,0.3) !important;
color: #0f172a !important;
font-size: 10px !important;
font-weight: 600 !important;
}
/* ============================================================
SEARCH BOX
============================================================ */
.sidebar-search {
padding: 16px 16px 0;
position: relative;
z-index: 50;
}
.search-input-wrap {
position: relative;
display: flex;
align-items: center;
}
.search-icon {
position: absolute;
left: 12px;
color: #94a3b8;
}
#searchInput {
width: 100%;
background: #ffffff;
border: 1px solid rgba(0,0,0,0.15);
border-radius: var(--radius-sm);
padding: 10px 12px 10px 36px;
color: #0f172a;
font-family: var(--font);
font-size: 12.5px;
font-weight: 500;
transition: all var(--transition);
}
#searchInput:focus {
border-color: var(--accent);
outline: none;
box-shadow: 0 0 0 3px var(--accent-glow);
}
#searchInput::placeholder {
color: #94a3b8; font-weight: 400;
}
.search-results {
position: absolute;
top: calc(100% + 4px);
left: 16px; right: 16px;
background: #ffffff;
border: 1px solid rgba(0,0,0,0.1);
border-radius: var(--radius-md);
max-height: 280px;
overflow-y: auto;
box-shadow: var(--shadow-lg);
display: flex; flex-direction: column;
}
.search-results.hidden {
display: none !important;
}
.search-item {
padding: 10px 14px;
border-bottom: 1px solid rgba(0,0,0,0.05);
cursor: pointer;
display: flex; flex-direction: column; gap: 3px;
transition: background var(--transition);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #f8fafc; }
.search-item-title { font-size: 13px; font-weight: 800; color: #0f172a; }
.search-item-type { font-size: 10.5px; color: var(--accent); font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.search-item-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--sidebar-text-muted); font-weight: 500; }
/* ============================================================
RESPONSIVE
============================================================ */
@media (max-width: 900px) {
:root { --sidebar-w: 260px; }
}
@media (max-width: 680px) {
.sidebar {
transform: translateX(calc(-1 * var(--sidebar-w)));
width: 85%;
max-width: 300px;
z-index: 1050;
}
.sidebar.mobile-open {
transform: translateX(0);
box-shadow: 10px 0 25px rgba(0,0,0,0.2);
}
#mapContainer {
left: 0 !important;
}
.sidebar-open-btn {
display: flex !important;
top: 20px;
z-index: 1000;
}
.modal {
width: calc(100vw - 32px);
max-height: calc(100vh - 40px);
}
.form-row { grid-template-columns: 1fr; }
.toast-container {
bottom: 24px; left: 16px; right: 16px;
align-items: center;
}
.toast {
width: 100%; max-width: 100%;
justify-content: center;
}
}
/* --- Utility ------------------------------------------ */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }