Files
WebGIS_Jalan-JalanRusak/assets/css/style.css
T
2026-06-11 02:42:37 +07:00

437 lines
8.5 KiB
CSS

:root {
--primary: #4f46e5;
--primary-hover: #4338ca;
--bg-light: #f3f4f6;
--bg-white: #ffffff;
--text-main: #1f2937;
--text-muted: #6b7280;
--border: #e5e7eb;
--jalan-nasional: #ef4444; /* Red */
--jalan-provinsi: #f97316; /* Orange */
--jalan-kabupaten: #eab308; /* Yellow */
--parsil-shm: #22c55e;
--parsil-hgb: #3b82f6;
--parsil-hgu: #a855f7;
--parsil-hp: #06b6d4;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', sans-serif;
}
body {
background-color: var(--bg-light);
color: var(--text-main);
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
/* NAVBAR */
.navbar {
background: var(--bg-white);
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
z-index: 1000;
}
.nav-brand {
font-size: 20px;
font-weight: 700;
color: var(--primary);
display: flex;
align-items: center;
gap: 10px;
}
.nav-menu {
display: flex;
gap: 10px;
}
.nav-btn {
border: none;
background: transparent;
padding: 10px 20px;
font-size: 14px;
font-weight: 600;
color: var(--text-muted);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 8px;
}
.nav-btn:hover {
background: var(--bg-light);
color: var(--text-main);
}
.nav-btn.active {
background: #eef2ff;
color: var(--primary);
}
/* VIEW CONTROLLER */
main {
flex: 1;
overflow-y: auto;
position: relative;
}
.view-hidden {
display: none !important;
}
.view-active {
display: block;
}
/* VIEW 1: MAP INPUT */
#view-input #map {
width: 100%;
height: 100%;
z-index: 1;
}
.floating-info {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(255, 255, 255, 0.95);
padding: 12px 24px;
border-radius: 50px;
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
font-size: 13px;
font-weight: 500;
z-index: 999;
pointer-events: none;
display: flex;
align-items: center;
gap: 8px;
color: var(--text-main);
}
.floating-info i { color: var(--primary); }
.floating-legend {
position: absolute;
bottom: 80px;
right: 20px;
background: white;
padding: 15px;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
z-index: 999;
font-size: 12px;
min-width: 180px;
}
.floating-legend h4 { margin-bottom: 10px; color: var(--text-main); font-size: 13px;}
.legend-grid div { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--text-muted);}
.legend-grid span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
/* VIEW 2: DASHBOARD */
.dashboard-container {
max-width: 1200px;
margin: 0 auto;
padding: 30px;
}
.dashboard-header {
margin-bottom: 30px;
}
.dashboard-header h2 { font-size: 24px; color: var(--text-main); margin-bottom: 5px; }
.dashboard-header p { color: var(--text-muted); font-size: 14px; }
.stats-row {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
margin-bottom: 30px;
}
.stat-card {
background: var(--bg-white);
padding: 20px 25px;
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid var(--border);
}
.stat-info h3 { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-bottom: 5px; }
.stat-info h2 { font-size: 32px; color: var(--text-main); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.content-row {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 20px;
align-items: start;
}
/* Table Area */
.table-card {
background: var(--bg-white);
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
border: 1px solid var(--border);
overflow: hidden;
}
.table-header {
padding: 20px;
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
}
.table-tabs {
display: flex;
gap: 10px;
}
.tab-btn {
padding: 8px 16px;
border: 1px solid var(--border);
background: var(--bg-white);
border-radius: 8px;
font-size: 14px;
cursor: pointer;
font-weight: 500;
color: var(--text-muted);
transition: all 0.2s;
}
.tab-btn.active {
background: #eef2ff;
color: var(--primary);
border-color: #c7d2fe;
}
.search-box {
position: relative;
}
.search-box i {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: var(--text-muted);
font-size: 13px;
}
.search-box input {
padding: 8px 12px 8px 32px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 13px;
width: 250px;
outline: none;
transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); }
.table-wrapper {
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
}
th {
background: #f9fafb;
text-align: left;
padding: 12px 20px;
font-size: 13px;
font-weight: 600;
color: var(--text-muted);
border-bottom: 1px solid var(--border);
}
td {
padding: 15px 20px;
font-size: 14px;
border-bottom: 1px solid var(--border);
color: var(--text-main);
cursor: pointer;
}
tr:hover td { background-color: #f9fafb; }
.status-badge {
padding: 4px 10px;
border-radius: 50px;
font-size: 12px;
font-weight: 600;
display: inline-block;
}
.btn-sm-del {
background: #fee2e2;
color: #ef4444;
border: none;
padding: 6px 12px;
border-radius: 6px;
font-size: 12px;
cursor: pointer;
font-weight: 600;
display: flex;
align-items: center;
gap: 5px;
}
.btn-sm-del:hover { background: #fecaca; }
/* Minimap Card */
.minimap-card {
background: var(--bg-white);
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
border: 1px solid var(--border);
overflow: hidden;
position: sticky;
top: 20px;
}
.minimap-header {
padding: 15px 20px;
font-size: 14px;
font-weight: 600;
border-bottom: 1px solid var(--border);
background: #f9fafb;
}
#minimap {
height: 300px;
width: 100%;
}
.minimap-footer {
padding: 12px;
font-size: 12px;
color: var(--text-muted);
text-align: center;
}
/* Modals */
.modal {
display: none;
position: fixed;
z-index: 2000;
left: 0; top: 0; width: 100%; height: 100%;
background-color: rgba(0,0,0,0.4);
align-items: center; justify-content: center;
}
.modal-content {
background: var(--bg-white);
border-radius: 12px;
width: 420px;
box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
border: 1px solid var(--border);
overflow: hidden;
}
.modal-header {
padding: 20px;
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 { font-size: 18px; }
.close-btn {
background: transparent;
border: none;
font-size: 20px;
color: var(--text-muted);
cursor: pointer;
}
.modal-body {
padding: 20px;
}
.form-group {
margin-bottom: 18px;
}
.form-group label {
display: block;
margin-bottom: 6px;
font-size: 14px;
font-weight: 500;
}
.form-group input, .form-group select {
width: 100%;
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 14px;
}
.form-group input:focus, .form-group select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.form-group input[readonly] {
background: #f9fafb;
color: var(--text-muted);
}
.text-muted {
font-size: 12px;
color: var(--text-muted);
margin-top: 4px;
display: block;
}
.form-actions {
margin-top: 25px;
}
.btn-primary {
width: 100%;
background: var(--primary);
color: white;
border: none;
padding: 12px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
font-size: 14px;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger {
background: #ef4444;
color: white;
border: none;
padding: 12px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
font-size: 14px;
}
.btn-danger:hover { background: #dc2626; }