Files
D1041231091-WebGIS-All/01/assets/css/style.css
T

355 lines
9.2 KiB
CSS

/* ============================================================
style.css — WebGIS SPBU
Tampilan sederhana, bersih, dan fungsional
============================================================ */
/* ── Import Google Fonts ──────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
/* ── CSS Variables (tema warna) ───────────────────────────── */
:root {
--primary: #1a56db;
--primary-dk: #1341b0;
--danger: #e02424;
--danger-dk: #b91c1c;
--success: #057a55;
--bg: #f0f4f8;
--panel: #ffffff;
--border: #d1d9e0;
--text: #1a202c;
--text-muted: #6b7280;
--shadow: 0 4px 24px rgba(0,0,0,0.10);
--radius: 10px;
--font: 'Plus Jakarta Sans', sans-serif;
}
/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
height: 100%; /* ← pastikan ada height: 100% */
display: flex;
flex-direction: column;
overflow: hidden;
}
/* ── Header ───────────────────────────────────────────────── */
header {
background: var(--primary);
color: #fff;
padding: 0 24px;
height: 58px;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 2px 10px rgba(26,86,219,0.35);
z-index: 1000;
flex-shrink: 0;
}
header h1 {
font-size: 1.15rem;
font-weight: 700;
letter-spacing: -0.01em;
display: flex;
align-items: center;
gap: 10px;
}
header h1 .icon { font-size: 1.3rem; }
.header-hint {
font-size: 0.78rem;
background: rgba(255,255,255,0.18);
border: 1px solid rgba(255,255,255,0.3);
border-radius: 20px;
padding: 4px 12px;
display: flex;
align-items: center;
gap: 6px;
}
/* ── Map Container ────────────────────────────────────────── */
#map {
flex: 1;
width: 100%;
min-height: 0; /* ← TAMBAHKAN BARIS INI */
cursor: crosshair;
}
/* ── Legend ───────────────────────────────────────────────── */
.legend {
background: var(--panel);
border-radius: var(--radius);
padding: 12px 14px;
box-shadow: var(--shadow);
font-size: 0.78rem;
min-width: 170px;
}
.legend h4 {
font-size: 0.8rem;
font-weight: 700;
margin-bottom: 8px;
color: var(--text);
border-bottom: 1px solid var(--border);
padding-bottom: 5px;
}
.legend-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 5px;
line-height: 1.3;
}
.legend-dot {
width: 14px;
height: 14px;
border-radius: 50%;
flex-shrink: 0;
border: 2px solid rgba(0,0,0,0.25);
}
.dot-orange { background: #f97316; }
.dot-green { background: #22c55e; }
.dot-red { background: #ef4444; }
.dot-blue { background: #3b82f6; }
.dot-black { background: #1f2937; }
/* ── Leaflet Popup Overrides ─────────────────────────────── */
.leaflet-popup-content-wrapper {
border-radius: var(--radius) !important;
padding: 0 !important;
overflow: hidden;
box-shadow: var(--shadow) !important;
border: 1px solid var(--border);
min-width: 280px;
}
.leaflet-popup-content {
margin: 0 !important;
width: auto !important;
}
.leaflet-popup-tip-container { margin-top: -1px; }
/* ── Popup: Header ────────────────────────────────────────── */
.popup-header {
background: var(--primary);
color: #fff;
padding: 12px 16px;
font-weight: 700;
font-size: 0.92rem;
display: flex;
align-items: center;
gap: 8px;
}
/* ── Popup: Body ──────────────────────────────────────────── */
.popup-body {
padding: 14px 16px;
background: var(--panel);
}
/* ── Popup: Info Table (detail view) ─────────────────────── */
.info-table {
width: 100%;
border-collapse: collapse;
font-size: 0.83rem;
margin-bottom: 12px;
}
.info-table tr td {
padding: 5px 4px;
vertical-align: top;
}
.info-table tr td:first-child {
color: var(--text-muted);
white-space: nowrap;
width: 110px;
font-weight: 500;
}
.info-table tr td:last-child {
font-weight: 600;
color: var(--text);
}
/* ── Badge status ─────────────────────────────────────────── */
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
}
.badge-ramai { background: #fef3c7; color: #92400e; }
.badge-tidakramai{ background: #ecfdf5; color: #065f46; }
.badge-ya { background: #eff6ff; color: #1e40af; }
.badge-tidak { background: #f9fafb; color: #374151; }
.badge-buka { background: #d1fae5; color: #065f46; }
.badge-tutup { background: #fee2e2; color: #991b1b; }
/* ── Form Controls ────────────────────────────────────────── */
.form-group {
margin-bottom: 10px;
}
.form-group label {
display: block;
font-size: 0.79rem;
font-weight: 600;
color: var(--text-muted);
margin-bottom: 4px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.form-group input[type="text"],
.form-group select {
width: 100%;
padding: 7px 10px;
border: 1.5px solid var(--border);
border-radius: 7px;
font-family: var(--font);
font-size: 0.85rem;
color: var(--text);
background: #f8fafc;
transition: border-color 0.2s, box-shadow 0.2s;
outline: none;
}
.form-group input:focus,
.form-group select:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
background: #fff;
}
/* ── Buttons ──────────────────────────────────────────────── */
.btn-row {
display: flex;
gap: 8px;
margin-top: 12px;
}
.btn {
flex: 1;
padding: 8px 12px;
border: none;
border-radius: 7px;
font-family: var(--font);
font-size: 0.83rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, transform 0.1s;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
background: var(--primary);
color: #fff;
}
.btn-primary:hover { background: var(--primary-dk); }
.btn-danger {
background: var(--danger);
color: #fff;
}
.btn-danger:hover { background: var(--danger-dk); }
.btn-secondary {
background: #f1f5f9;
color: var(--text);
border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: #e2e8f0; }
.btn-success {
background: var(--success);
color: #fff;
}
.btn-success:hover { background: #046c4e; }
/* ── Divider ──────────────────────────────────────────────── */
.divider {
border: none;
border-top: 1px solid var(--border);
margin: 10px 0;
}
/* ── Toast Notification ───────────────────────────────────── */
#toast {
position: fixed;
bottom: 28px;
left: 50%;
transform: translateX(-50%) translateY(80px);
background: #1f2937;
color: #fff;
padding: 10px 22px;
border-radius: 30px;
font-size: 0.85rem;
font-weight: 500;
z-index: 9999;
opacity: 0;
transition: transform 0.3s ease, opacity 0.3s ease;
pointer-events: none;
white-space: nowrap;
box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
#toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
#toast.toast-success { background: #057a55; }
#toast.toast-error { background: #e02424; }
/* ── Loading Overlay ──────────────────────────────────────── */
#loading {
display: none;
position: fixed;
inset: 0;
background: rgba(255,255,255,0.55);
z-index: 8000;
align-items: center;
justify-content: center;
}
#loading.show { display: flex; }
.spinner {
width: 38px;
height: 38px;
border: 4px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ── Koordinat display ────────────────────────────────────── */
.coord-display {
background: #f0f9ff;
border: 1px solid #bae6fd;
border-radius: 7px;
padding: 7px 10px;
font-size: 0.78rem;
color: #0369a1;
margin-bottom: 10px;
display: flex;
gap: 12px;
align-items: center;
}
.coord-display span { font-weight: 600; }