summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-17 19:51:24 -0500
committerChristian Cleberg <[email protected]>2026-04-17 19:51:24 -0500
commit92c574a2f415f50115831e4a125ce1ca95135be3 (patch)
treebd64cbc7561fe5494cfc8e2f0f4360d4c9184ac2 /assets
parent623ae07ebacb9d596b225179727dc87641ad1cca (diff)
downloadworld-incarceration-92c574a2f415f50115831e4a125ce1ca95135be3.tar.gz
world-incarceration-92c574a2f415f50115831e4a125ce1ca95135be3.tar.bz2
world-incarceration-92c574a2f415f50115831e4a125ce1ca95135be3.zip
revamp UI/UX with dark design system and modern layoutv2
Replace Bootstrap color utilities and legacy layout patterns with a cohesive dark-mode design system. Key changes: - CSS: full rewrite using custom property tokens (--bg, --surface, --accent, --text-muted, etc.), Inter font, glassmorphism modals (backdrop-filter + semi-transparent backgrounds), and a fixed pill-bar metric selector centered at the bottom of the viewport - Navbar: unified nav-icon-btn style for all icon buttons, removed the gradient-toggle collapse button, settings dropdown aligned end - Metric bar: promoted from Bootstrap collapse to always-visible fixed pill bar; metric-btn replaces btn; active-metric pre-applied to match default currentMetric - Modals: removed inline bg overrides, h4 → h5, custom close buttons (nav-icon-btn + SVG), btn-modal-primary / btn-modal-ghost / ref-btn replace Bootstrap color variants - Dropped Font Awesome dependency (all icons are inline SVGs)
Diffstat (limited to 'assets')
-rw-r--r--assets/css/app.css473
1 files changed, 385 insertions, 88 deletions
diff --git a/assets/css/app.css b/assets/css/app.css
index af5e95c..d5b2f84 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -1,145 +1,442 @@
-html {
+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
+
+/* ── Design tokens ───────────────────────────────────────────────────── */
+:root {
+ --bg: #0d0d14;
+ --surface: #13131e;
+ --surface-2: #1c1c2a;
+ --surface-3: #252535;
+ --border: rgba(255, 255, 255, 0.08);
+ --border-2: rgba(255, 255, 255, 0.14);
+ --accent: #24ab48;
+ --accent-dim: rgba(36, 171, 72, 0.14);
+ --accent-glow: rgba(36, 171, 72, 0.25);
+ --text: #e2e2ef;
+ --text-muted: #5e5e78;
+ --text-soft: #9898b0;
+ --danger: #ef4444;
+ --danger-dim: rgba(239, 68, 68, 0.12);
+ --nav-h: 52px;
+ --radius-sm: 6px;
+ --radius: 10px;
+ --radius-lg: 14px;
+ --radius-pill: 100px;
+ --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
+ --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
+ --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.7);
+}
+
+/* ── Reset ───────────────────────────────────────────────────────────── */
+*, *::before, *::after { box-sizing: border-box; }
+
+html, body {
height: 100%;
margin: 0;
+ background: var(--bg);
+ color: var(--text);
+ font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ line-height: 1.5;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
}
-body {
- background: #161616;
+a { text-decoration: none; color: inherit; }
+
+/* Bootstrap resets we override */
+.btn { border-radius: var(--radius-sm) !important; }
+.modal-content { border-radius: var(--radius-lg) !important; }
+
+/* ── Navbar ──────────────────────────────────────────────────────────── */
+.navbar {
+ height: var(--nav-h);
+ min-height: var(--nav-h);
+ padding: 0 20px;
+ background: rgba(13, 13, 20, 0.9);
+ backdrop-filter: blur(20px);
+ -webkit-backdrop-filter: blur(20px);
+ border-bottom: 1px solid var(--border);
+ position: sticky;
+ top: 0;
+ z-index: 1000;
+ margin-bottom: 0;
}
-a,
-.fa-question-circle {
- text-decoration: none;
+.navbar-brand {
+ font-size: 14px;
+ font-weight: 600;
+ letter-spacing: 0.02em;
+ color: var(--text) !important;
+ opacity: 0.9;
}
-.btn,
-.nav-link,
-.dropdown-menu,
-.dropdown-item,
-.modal-content {
- border-radius: 0;
+.navbar-nav {
+ gap: 4px;
+ align-items: center;
}
-.navbar {
- background: #161616;
- margin-bottom: 0;
+/* ── Navbar icon buttons ─────────────────────────────────────────────── */
+.nav-icon-btn {
+ width: 36px;
+ height: 36px;
+ padding: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: transparent;
+ border: 1px solid transparent;
+ border-radius: var(--radius-sm) !important;
+ color: var(--text-muted);
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
+ cursor: pointer;
+}
+
+.nav-icon-btn svg path { fill: currentColor; }
+.navbar path { fill: currentColor; }
+
+.nav-icon-btn:hover {
+ background: var(--surface-2);
+ border-color: var(--border);
+ color: var(--text);
+}
+
+.nav-icon-btn:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 2px;
+}
+
+/* ── Dropdown ────────────────────────────────────────────────────────── */
+.dropdown-menu {
+ background: var(--surface) !important;
+ border: 1px solid var(--border-2) !important;
+ border-radius: var(--radius) !important;
+ padding: 6px !important;
+ box-shadow: var(--shadow) !important;
+ min-width: 160px;
+}
+
+.dropdown-item {
+ border-radius: var(--radius-sm) !important;
+ padding: 9px 12px !important;
+ font-size: 13px;
+ font-weight: 500;
+ color: var(--text-soft) !important;
+ transition: background 0.12s, color 0.12s;
+}
+
+.dropdown-item:hover, .dropdown-item:focus {
+ background: var(--surface-2) !important;
+ color: var(--text) !important;
}
-.modal-title path,
-.navbar path {
- fill: white;
+/* ── Navbar toggler (mobile) ─────────────────────────────────────────── */
+.navbar-toggler {
+ border: 1px solid var(--border) !important;
+ border-radius: var(--radius-sm) !important;
+ padding: 6px 10px;
}
-#settings-icon {
- fill: black;
+.navbar-toggler-icon {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28226,226,239,0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
+/* ── Map container ───────────────────────────────────────────────────── */
+#map-container {
+ height: calc(100vh - var(--nav-h));
+ width: 100%;
+ background: var(--bg);
+ position: relative;
+}
+
+/* ── Metric pill bar ─────────────────────────────────────────────────── */
+#gbar {
+ position: fixed;
+ bottom: 28px;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex !important;
+ align-items: center;
+ gap: 3px;
+ padding: 5px;
+ background: rgba(19, 19, 30, 0.94);
+ backdrop-filter: blur(20px);
+ -webkit-backdrop-filter: blur(20px);
+ border: 1px solid var(--border-2);
+ border-radius: var(--radius-pill);
+ box-shadow: var(--shadow), 0 2px 8px rgba(0, 0, 0, 0.4);
+ z-index: 500;
+ white-space: nowrap;
+ /* allow horizontal scroll on very small screens */
+ max-width: calc(100vw - 32px);
+ overflow-x: auto;
+ scrollbar-width: none;
+}
+
+#gbar::-webkit-scrollbar { display: none; }
+
+.metric-btn {
+ padding: 7px 18px;
+ border: none;
+ border-radius: var(--radius-pill);
+ background: transparent;
+ color: var(--text-muted);
+ font-family: inherit;
+ font-size: 12px;
+ font-weight: 500;
+ letter-spacing: 0.025em;
+ cursor: pointer;
+ transition: background 0.15s, color 0.15s;
+ white-space: nowrap;
+}
+
+.metric-btn:hover {
+ background: var(--surface-3);
+ color: var(--text-soft);
+}
+
+.metric-btn.active-metric {
+ background: var(--accent);
+ color: #000;
+ font-weight: 600;
+}
+
+/* ── Tooltip ─────────────────────────────────────────────────────────── */
+.map-tooltip {
+ position: fixed;
+ background: rgba(13, 13, 20, 0.96);
+ color: var(--text);
+ padding: 9px 14px;
+ border: 1px solid var(--border-2);
+ border-radius: var(--radius);
+ pointer-events: none;
+ font-size: 13px;
+ font-weight: 500;
+ font-family: 'Inter', system-ui, sans-serif;
+ opacity: 0;
+ transition: opacity 0.1s;
+ z-index: 9999;
+ box-shadow: var(--shadow);
+}
+
+/* ── Modals ──────────────────────────────────────────────────────────── */
.modal-content {
- border: 1px solid #fff;
+ background: rgba(13, 13, 20, 0.98) !important;
+ border: 1px solid var(--border-2) !important;
+ border-radius: var(--radius-lg) !important;
+ overflow: hidden;
+ box-shadow: var(--shadow-lg);
+ color: var(--text);
+ backdrop-filter: blur(24px);
+ -webkit-backdrop-filter: blur(24px);
}
.modal-header {
- background-color: #24ab48;
- border-bottom: #000;
- color: white;
+ background: transparent !important;
+ border-bottom: 1px solid var(--border) !important;
+ padding: 20px 24px;
+}
+
+.modal-title {
+ font-size: 15px !important;
+ font-weight: 600;
+ color: var(--text) !important;
+ letter-spacing: 0.01em;
+}
+
+/* Country modal — accent title */
+#country-modal-title {
+ color: var(--accent) !important;
+}
+
+.modal-body {
+ background: transparent !important;
+ padding: 24px !important;
+ color: var(--text);
}
-.modal-body,
.modal-footer {
- background-color: #000;
- color: #ffffff;
+ background: transparent !important;
+ border-top: 1px solid var(--border) !important;
+ padding: 16px 24px !important;
+ gap: 8px;
}
-.alert {
- background-color: rgb(66, 133, 244);
- background-color: rgba(66, 133, 244, 0.5);
- color: #ffffff;
- margin: 1.5rem auto;
- width: 90%;
+/* Modal body typography */
+.modal-body p {
+ margin-bottom: 14px;
+ font-size: 14px;
+ line-height: 1.7;
}
-#gradientbtn {
- background-color: #9966ff;
- color: #ffffff;
+.modal-body p:last-child { margin-bottom: 0; }
+
+.modal-body p b {
+ color: var(--text-soft);
+ font-weight: 500;
+ margin-right: 4px;
}
-#totPop,
-#perCapita,
-#women,
-#juveniles,
-#occupancy {
- background-color: #9966ff;
- color: #ffffff;
- margin: 5px;
- padding: 10px;
+.modal-body hr {
+ border: none;
+ border-top: 1px solid var(--border);
+ margin: 20px 0;
+}
+
+/* ── Modal buttons ───────────────────────────────────────────────────── */
+.btn-modal-primary {
+ padding: 9px 20px;
+ background: var(--accent);
+ color: #000;
+ border: none;
+ border-radius: var(--radius-sm) !important;
+ font-family: inherit;
+ font-size: 13px;
+ font-weight: 600;
+ cursor: pointer;
+ transition: opacity 0.15s;
+}
+
+.btn-modal-primary:hover { opacity: 0.85; }
+
+.btn-modal-ghost {
+ padding: 9px 20px;
+ background: transparent;
+ color: var(--text-soft);
+ border: 1px solid var(--border-2);
+ border-radius: var(--radius-sm) !important;
+ font-family: inherit;
+ font-size: 13px;
+ font-weight: 500;
+ cursor: pointer;
+ transition: background 0.15s, color 0.15s;
+}
+
+.btn-modal-ghost:hover {
+ background: var(--surface-2);
+ color: var(--text);
+}
+
+.btn-modal-link {
+ padding: 9px 20px;
+ background: transparent;
+ color: var(--accent);
+ border: none;
+ border-radius: var(--radius-sm) !important;
+ font-family: inherit;
+ font-size: 13px;
+ font-weight: 500;
+ cursor: pointer;
+ text-decoration: none;
+ display: inline-flex;
+ align-items: center;
+}
+
+/* ── Alert ───────────────────────────────────────────────────────────── */
+.alert-danger {
+ background: var(--danger-dim) !important;
+ border: 1px solid rgba(239, 68, 68, 0.25) !important;
+ border-radius: var(--radius) !important;
+ color: #fca5a5 !important;
+ padding: 12px 16px;
+ margin-bottom: 16px;
+ font-size: 13px;
}
+.text-danger { color: var(--danger) !important; }
+
+/* ── Selects ─────────────────────────────────────────────────────────── */
select {
- -webkit-appearance: none;
- -moz-appearance: none;
appearance: none;
- background: url(../images/down-arrow.png) no-repeat #24ab48;
- background-color: #000;
- background-position: 95%;
- border: 1px solid #24ab48;
- border-radius: 0;
- color: white;
+ -webkit-appearance: none;
+ background-color: var(--surface-2);
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%235e5e78' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
+ background-repeat: no-repeat;
+ background-position: right 12px center;
+ border: 1px solid var(--border-2);
+ border-radius: var(--radius);
+ color: var(--text);
cursor: pointer;
- font-size: 16px;
- overflow: hidden;
- padding: 0.5rem;
+ font-family: inherit;
+ font-size: 13px;
+ padding: 10px 36px 10px 12px;
width: 100%;
+ transition: border-color 0.15s;
}
-select::-ms-expand {
- display: none;
+select:focus {
+ outline: none;
+ border-color: var(--accent);
+ box-shadow: 0 0 0 3px var(--accent-dim);
}
+select option { background: var(--surface); }
+
+/* ── Table ───────────────────────────────────────────────────────────── */
.table {
- color: #ddd;
+ color: var(--text);
+ border-collapse: collapse;
+ width: 100%;
+ font-size: 13px;
}
-th {
- color: #fff;
- font-size: 16px;
+.table th {
+ color: var(--text-muted);
+ font-size: 11px;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.07em;
+ padding: 0 12px 10px;
+ border-bottom: 1px solid var(--border-2);
}
-#map-container {
- height: calc(100vh - 56px);
- width: 100%;
- background: #161616;
+.table td {
+ padding: 12px;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.04);
+ vertical-align: top;
+ line-height: 1.5;
}
-.map-tooltip {
- position: absolute;
- background: #1a1a1a;
- color: #fff;
- padding: 8px 12px;
- border: 1px solid #24ab48;
- border-radius: 0;
- pointer-events: none;
- font-size: 13px;
- opacity: 0;
- transition: opacity 0.1s;
- z-index: 9999;
+.table td:first-child {
+ color: var(--text-soft);
+ font-size: 12px;
+ font-weight: 500;
+ white-space: nowrap;
+ padding-right: 20px;
}
-/* chart containers inside graph modal */
+.table tbody tr:last-child td { border-bottom: none; }
+
+/* ── Chart containers ────────────────────────────────────────────────── */
#myChart2,
#myNextChart {
- min-height: 300px;
- background: #000;
-}
-
-/* active metric button highlight */
-.active-metric {
- outline: 2px solid #fff;
+ min-height: 340px;
+ background: transparent;
}
-/* D3 axis lines */
+/* D3 chart axis styling */
#myChart2 .domain,
#myNextChart .domain,
#myChart2 .tick line,
#myNextChart .tick line {
- stroke: #555;
+ stroke: var(--border-2);
+}
+
+/* ── Info modal reference links ──────────────────────────────────────── */
+.modal-body .ref-btn {
+ display: block;
+ padding: 10px 16px;
+ background: var(--surface-2);
+ border: 1px solid var(--border);
+ border-radius: var(--radius);
+ color: var(--text-soft);
+ font-size: 13px;
+ font-weight: 500;
+ text-align: center;
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
+}
+
+.modal-body .ref-btn:hover {
+ background: var(--surface-3);
+ border-color: var(--border-2);
+ color: var(--text);
}