Files
citypulse/dashboard/styles.css
Zahar 0e3eea7de9 Enhance dashboard interactivity and update dependencies
- Added a new function to navigate to specific locations on the map with animation and detail display.
- Made the item title clickable to trigger the navigation function.
- Updated CSS to style the clickable item title for better user experience.
- Added `pydantic[email]` to backend requirements for enhanced validation capabilities.
2025-09-26 20:31:22 +08:00

183 lines
5.3 KiB
CSS

:root{
--bg:#f8fafc;
--panel:#ffffff;
--muted:#6b7280;
--accent:#0ea5a4;
--severity-high:#D32F2F;
--severity-medium:#F57C00;
--severity-low:#388E3C;
--status-submitted:#1976D2;
--status-in_progress:#7B1FA2;
--status-fixed:#455A64;
--shadow: 0 6px 18px rgba(15,23,42,0.08);
--surface-contrast: #111827;
}
*{box-sizing:border-box}
html,body,#root{height:100%}
body{
margin:0;
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
background:var(--bg);
color:var(--surface-contrast);
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
font-size:14px;
}
.header{
height:56px;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 16px;
background:var(--panel);
border-bottom:1px solid #e6eef3;
box-shadow: none;
z-index:100;
}
.brand{font-weight:700;font-size:18px;color:#111827}
.lang-toggle select{padding:6px;border-radius:6px;border:1px solid #e6eef3;background:white}
.app-root{height:100vh;display:flex;flex-direction:column}
.container{
height:calc(100vh - 56px);
display:flex;
flex-direction:column;
gap:8px;
padding:12px;
}
/* main area */
.main{
display:grid;
grid-template-columns:300px 1fr 340px;
gap:12px;
align-items:stretch;
flex:1;
}
/* panels */
.panel{
background:var(--panel);
border-radius:8px;
box-shadow:var(--shadow);
padding:12px;
display:flex;
flex-direction:column;
min-height:0;
}
.filters h3{margin:0 0 8px 0}
.filter-group{margin-bottom:12px}
.checkbox-row{display:flex;flex-direction:column;gap:6px;max-height:220px;overflow:auto;padding-right:6px}
.checkbox-row label{font-size:13px;color:#111827}
/* chips/buttons */
.btn{
background:var(--accent);
color:white;
border:none;
padding:8px 12px;
border-radius:6px;
cursor:pointer;
font-weight:600;
}
.btn.secondary{background:#f1f5f9;color:#0f172a}
.btn.ghost{background:transparent;border:1px solid #e6eef3;color:#0f172a;padding:6px 10px}
.btn:focus{outline:2px solid rgba(14,165,164,0.25)}
.multi-select{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:inline-block;padding:4px 8px;border-radius:14px;font-size:13px;color:white}
.chip.severity-high{background:var(--severity-high)}
.chip.severity-medium{background:var(--severity-medium)}
.chip.severity-low{background:var(--severity-low)}
.chip.status-submitted{background:var(--status-submitted)}
.chip.status-in_progress{background:var(--status-in_progress)}
.chip.status-fixed{background:var(--status-fixed)}
/* severity buttons in filter */
button.chip{border:none;cursor:pointer;opacity:0.95}
button.chip[aria-pressed="false"]{opacity:0.55;filter:grayscale(0.15)}
/* map panel */
.map-panel{position:relative;min-height:0;height:100%;padding:0;overflow:hidden}
#map{width:100%;height:100%}
.map-panel .map-empty{
display:none;
position:absolute;
left:0;right:0;top:0;bottom:0;
align-items:center;justify-content:center;
font-size:18px;color:#374151;background:rgba(255,255,255,0.85);
z-index:800;
}
.map-panel.no-reports .map-empty{display:flex}
/* queue list */
.queue-list{display:flex;flex-direction:column;gap:8px;overflow:auto;padding-right:6px}
.queue-item{display:flex;align-items:center;gap:12px;padding:8px;border-radius:8px;border:1px solid #eef2f7;background:linear-gradient(180deg,#fff,#fbfdff)}
.thumb{width:56px;height:56px;border-radius:6px;background:linear-gradient(180deg,#eef2ff,#fff);display:flex;align-items:center;justify-content:center;color:#0f172a;font-weight:700}
.item-main{flex:1;min-width:0}
.item-title{font-weight:600;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.item-title.clickable{
cursor:pointer;
transition:all 0.2s ease;
border-radius:4px;
padding:2px 4px;
margin:-2px -4px;
}
.item-title.clickable:hover{
background-color:rgba(14,165,164,0.1);
color:var(--accent);
transform:translateY(-1px);
box-shadow:0 2px 8px rgba(14,165,164,0.15);
}
.item-meta{display:flex;gap:8px;align-items:center;margin-top:6px;font-size:12px;color:var(--muted)}
.item-actions{display:flex;align-items:center}
/* drawer */
.drawer{
position:fixed;
top:56px;
right:0;
bottom:0;
width:380px;
transform:translateX(100%);
transition:transform .28s ease;
z-index:1200;
display:flex;
align-items:flex-start;
pointer-events:none;
}
.drawer.open{transform:translateX(0);pointer-events:auto}
.drawer-content{
width:100%;
height:100%;
background:var(--panel);
box-shadow:-12px 0 30px rgba(2,6,23,0.12);
padding:16px;
overflow:auto;
}
.drawer-close{position:absolute;right:12px;top:8px;background:transparent;border:none;font-size:20px;cursor:pointer}
.drawer-header{display:flex;align-items:center}
.drawer-thumb.large{width:84px;height:84px;border-radius:8px;background:#f3f4f6;display:flex;align-items:center;justify-content:center;font-weight:700}
.drawer-body{margin-top:12px;color:#111827}
.drawer-actions{display:flex;gap:8px;margin-top:16px}
/* marker custom */
.leaflet-container .custom-marker{display:flex;align-items:center;justify-content:center}
/* small screens */
@media (max-width:900px){
.main{grid-template-columns:1fr;grid-auto-rows:auto}
.drawer{top:56px;width:100%}
.drawer.open{transform:none}
.header{padding:8px 12px}
.filters{order:2}
.map-panel{order:1}
.panel{padding:10px}
}
/* accessibility tweaks */
.chip, .btn{font-family:inherit}