Administrator revised this gist 3 days ago. Go to revision
No changes
Administrator revised this gist 3 days ago. Go to revision
1 file changed, 46 insertions, 1 deletion
[Banking Use case] Custom CSS
| @@ -1,4 +1,4 @@ | |||
| 1 | - | /* ===== Magic Banking Dashboard ===== */ | |
| 1 | + | /* ===== Magic Banking — Analytic ===== */ | |
| 2 | 2 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); | |
| 3 | 3 | ||
| 4 | 4 | :root { | |
| @@ -277,3 +277,48 @@ | |||
| 277 | 277 | .dashboard-component-tabs .ant-tabs-content-holder, | |
| 278 | 278 | .dashboard-component-tabs .ant-tabs-content, | |
| 279 | 279 | .dashboard-component-tabs .ant-tabs-tabpane { background: transparent !important; } | |
| 280 | + | ||
| 281 | + | ||
| 282 | + | /* ===== tmb-tables: blend table & pivot charts into the card gradient ===== */ | |
| 283 | + | .dashboard-component-chart-holder table, | |
| 284 | + | .dashboard-component-chart-holder thead, | |
| 285 | + | .dashboard-component-chart-holder tbody, | |
| 286 | + | .dashboard-component-chart-holder tr, | |
| 287 | + | .dashboard-component-chart-holder td, | |
| 288 | + | .dashboard-component-chart-holder .pvtTable td.pvtVal, | |
| 289 | + | .dashboard-component-chart-holder .pvtTable td.pvtTotal, | |
| 290 | + | .dashboard-component-chart-holder .pvtTable td.pvtGrandTotal { background-color: transparent !important; } | |
| 291 | + | .dashboard-component-chart-holder table th, | |
| 292 | + | .dashboard-component-chart-holder .pvtTable th { | |
| 293 | + | background: linear-gradient(180deg, rgba(31,78,140,.08) 0%, rgba(31,78,140,.04) 100%) !important; | |
| 294 | + | color: #13325E !important; | |
| 295 | + | border-color: rgba(31,78,140,.12) !important; | |
| 296 | + | } | |
| 297 | + | .dashboard-component-chart-holder tbody tr:nth-child(even) td { background-color: rgba(31,78,140,.025) !important; } | |
| 298 | + | .dashboard-component-chart-holder tbody tr:hover td { background-color: rgba(201,162,39,.08) !important; } | |
| 299 | + | .dashboard-component-chart-holder td { border-color: rgba(31,78,140,.08) !important; } | |
| 300 | + | .dashboard-component-chart-holder .pvtTable td.pvtTotal, | |
| 301 | + | .dashboard-component-chart-holder .pvtTable td.pvtGrandTotal { background-color: rgba(31,78,140,.05) !important; font-weight: 600; color: #13325E; } | |
| 302 | + | /* table controls: search, page size, pagination */ | |
| 303 | + | .dashboard-component-chart-holder .dt-controls, | |
| 304 | + | .dashboard-component-chart-holder .dataTables_wrapper, | |
| 305 | + | .dashboard-component-chart-holder .superset-data-table-container { background: transparent !important; } | |
| 306 | + | .dashboard-component-chart-holder input, | |
| 307 | + | .dashboard-component-chart-holder .ant-select-selector { | |
| 308 | + | background: rgba(255,255,255,.7) !important; | |
| 309 | + | border: 1px solid rgba(31,78,140,.15) !important; | |
| 310 | + | border-radius: 8px !important; | |
| 311 | + | } | |
| 312 | + | .dashboard-component-chart-holder .pagination a, | |
| 313 | + | .dashboard-component-chart-holder .pagination li > a { | |
| 314 | + | background: transparent !important; | |
| 315 | + | border: 1px solid rgba(31,78,140,.12) !important; | |
| 316 | + | border-radius: 6px !important; | |
| 317 | + | color: #1F4E8C !important; | |
| 318 | + | } | |
| 319 | + | .dashboard-component-chart-holder .pagination .active a, | |
| 320 | + | .dashboard-component-chart-holder .pagination li.active > a { | |
| 321 | + | background: linear-gradient(120deg, #13325E 0%, #1F4E8C 100%) !important; | |
| 322 | + | color: #FFFFFF !important; | |
| 323 | + | border-color: transparent !important; | |
| 324 | + | } | |
Administrator revised this gist 3 days ago. Go to revision
1 file changed, 279 insertions
[Banking Use case] Custom CSS (file created)
| @@ -0,0 +1,279 @@ | |||
| 1 | + | /* ===== Magic Banking Dashboard ===== */ | |
| 2 | + | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); | |
| 3 | + | ||
| 4 | + | :root { | |
| 5 | + | --tmb-bg: #F4F6FA; | |
| 6 | + | --tmb-card: #FFFFFF; | |
| 7 | + | --tmb-ink: #0F1B2D; | |
| 8 | + | --tmb-muted: #5B6B82; | |
| 9 | + | --tmb-line: #E3E8F0; | |
| 10 | + | --tmb-accent: #1F4E8C; | |
| 11 | + | --tmb-gold: #C9A227; | |
| 12 | + | --tmb-radius: 12px; | |
| 13 | + | --tmb-shadow: 0 1px 2px rgba(15,27,45,.04), 0 4px 16px rgba(15,27,45,.06); | |
| 14 | + | --tmb-shadow-hi: 0 2px 4px rgba(15,27,45,.06), 0 10px 28px rgba(15,27,45,.10); | |
| 15 | + | } | |
| 16 | + | ||
| 17 | + | /* Canvas & font */ | |
| 18 | + | .dashboard, .dashboard-content, .grid-container { | |
| 19 | + | font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif !important; | |
| 20 | + | color: var(--tmb-ink); | |
| 21 | + | } | |
| 22 | + | ||
| 23 | + | /* ===== Layered canvas background (tmb-canvas) ===== */ | |
| 24 | + | .dashboard[data-test="dashboard-content-wrapper"] { | |
| 25 | + | background-color: #EEF2F8 !important; | |
| 26 | + | background-image: | |
| 27 | + | radial-gradient(900px 520px at 100% -5%, rgba(31,78,140,.16) 0%, rgba(31,78,140,0) 70%), | |
| 28 | + | radial-gradient(700px 480px at -5% 45%, rgba(201,162,39,.10) 0%, rgba(201,162,39,0) 70%), | |
| 29 | + | radial-gradient(800px 600px at 105% 95%, rgba(44,107,184,.12) 0%, rgba(44,107,184,0) 70%), | |
| 30 | + | radial-gradient(rgba(15,27,45,.07) 1px, transparent 1.2px), | |
| 31 | + | linear-gradient(180deg, #F6F8FC 0%, #EAF0F7 55%, #E4EBF5 100%) !important; | |
| 32 | + | background-size: auto, auto, auto, 22px 22px, auto !important; | |
| 33 | + | background-attachment: fixed, fixed, fixed, fixed, fixed !important; | |
| 34 | + | } | |
| 35 | + | .dashboard-content, .grid-container { background: transparent !important; } | |
| 36 | + | ||
| 37 | + | /* Title bar: frosted glass */ | |
| 38 | + | [data-test="dashboard-header-container"] { | |
| 39 | + | background: rgba(255,255,255,.78) !important; | |
| 40 | + | backdrop-filter: saturate(160%) blur(10px); | |
| 41 | + | -webkit-backdrop-filter: saturate(160%) blur(10px); | |
| 42 | + | border-bottom: 1px solid rgba(15,27,45,.08) !important; | |
| 43 | + | box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 18px rgba(15,27,45,.05); | |
| 44 | + | } | |
| 45 | + | ||
| 46 | + | /* Filter panel: soft navy-tinted sidebar with accent strip */ | |
| 47 | + | [data-test="dashboard-filters-panel"] { | |
| 48 | + | background: linear-gradient(180deg, #FFFFFF 0%, #F3F6FB 60%, #EDF2F9 100%) !important; | |
| 49 | + | border-right: 1px solid rgba(15,27,45,.08) !important; | |
| 50 | + | box-shadow: 4px 0 18px rgba(15,27,45,.04); | |
| 51 | + | position: relative; | |
| 52 | + | } | |
| 53 | + | [data-test="dashboard-filters-panel"]::before { | |
| 54 | + | content: ''; | |
| 55 | + | position: absolute; top: 0; left: 0; right: 0; height: 3px; | |
| 56 | + | background: linear-gradient(90deg, #13325E, #1F4E8C 60%, var(--tmb-gold)); | |
| 57 | + | } | |
| 58 | + | ||
| 59 | + | /* Section headers: fading rule line under the title */ | |
| 60 | + | .dashboard .dashboard-component.dashboard-component-header { | |
| 61 | + | border-bottom: 1px solid transparent !important; | |
| 62 | + | border-image: linear-gradient(90deg, rgba(31,78,140,.45) 0%, rgba(201,162,39,.35) 30%, rgba(15,27,45,0) 85%) 1 !important; | |
| 63 | + | } | |
| 64 | + | ||
| 65 | + | /* Cards: slightly translucent so the canvas glows through */ | |
| 66 | + | .dashboard-component-chart-holder { | |
| 67 | + | background: rgba(255,255,255,.92) !important; | |
| 68 | + | border: 1px solid rgba(15,27,45,.07) !important; | |
| 69 | + | } | |
| 70 | + | ||
| 71 | + | /* Banner (Markdown element) */ | |
| 72 | + | .dashboard-markdown .tmb-banner { | |
| 73 | + | background: linear-gradient(115deg, #0F1B2D 0%, #1F4E8C 70%, #2C6BB8 100%); | |
| 74 | + | border-radius: var(--tmb-radius); | |
| 75 | + | border-bottom: 3px solid var(--tmb-gold); | |
| 76 | + | padding: 20px 26px; | |
| 77 | + | box-shadow: var(--tmb-shadow); | |
| 78 | + | } | |
| 79 | + | .dashboard-markdown .tmb-banner h2 { color: #FFFFFF !important; font-weight: 700; font-size: 22px; margin: 0 0 6px; } | |
| 80 | + | .dashboard-markdown .tmb-banner p { color: #D6E1F0 !important; font-size: 13px; margin: 0; } | |
| 81 | + | ||
| 82 | + | /* Section headers (Header element) */ | |
| 83 | + | .dashboard-component-header { background: transparent !important; } | |
| 84 | + | .dashboard-component-header .editable-title, | |
| 85 | + | .dashboard-component-header .editable-title input { | |
| 86 | + | color: var(--tmb-ink) !important; | |
| 87 | + | font-weight: 600 !important; | |
| 88 | + | letter-spacing: .3px; | |
| 89 | + | } | |
| 90 | + | .dashboard-component-header .editable-title::before { | |
| 91 | + | content: ''; | |
| 92 | + | display: inline-block; | |
| 93 | + | width: 5px; height: 18px; | |
| 94 | + | margin-right: 10px; | |
| 95 | + | vertical-align: -3px; | |
| 96 | + | border-radius: 3px; | |
| 97 | + | background: linear-gradient(180deg, var(--tmb-accent), var(--tmb-gold)); | |
| 98 | + | } | |
| 99 | + | ||
| 100 | + | /* Chart cards */ | |
| 101 | + | .dashboard-component-chart-holder { | |
| 102 | + | background: var(--tmb-card) !important; | |
| 103 | + | border: 1px solid var(--tmb-line) !important; | |
| 104 | + | border-radius: var(--tmb-radius) !important; | |
| 105 | + | box-shadow: var(--tmb-shadow) !important; | |
| 106 | + | padding: 14px 16px !important; | |
| 107 | + | transition: box-shadow .2s ease, transform .2s ease; | |
| 108 | + | } | |
| 109 | + | .dashboard-component-chart-holder:hover { | |
| 110 | + | box-shadow: var(--tmb-shadow-hi) !important; | |
| 111 | + | transform: translateY(-1px); | |
| 112 | + | } | |
| 113 | + | .chart-header { | |
| 114 | + | color: var(--tmb-ink) !important; | |
| 115 | + | font-weight: 600 !important; | |
| 116 | + | border-bottom: 1px solid var(--tmb-line); | |
| 117 | + | padding-bottom: 8px !important; | |
| 118 | + | margin-bottom: 8px !important; | |
| 119 | + | } | |
| 120 | + | ||
| 121 | + | /* KPI big number */ | |
| 122 | + | .big_number .header-line, | |
| 123 | + | .superset-legacy-chart-big-number .header-line { | |
| 124 | + | color: var(--tmb-accent) !important; | |
| 125 | + | font-weight: 700 !important; | |
| 126 | + | letter-spacing: -.5px; | |
| 127 | + | } | |
| 128 | + | .big_number .subheader-line, | |
| 129 | + | .superset-legacy-chart-big-number .subheader-line { color: var(--tmb-muted) !important; } | |
| 130 | + | ||
| 131 | + | /* Tables */ | |
| 132 | + | .dashboard-component-chart-holder table th { | |
| 133 | + | background: #F7F9FC !important; | |
| 134 | + | color: var(--tmb-muted) !important; | |
| 135 | + | font-weight: 600 !important; | |
| 136 | + | text-transform: uppercase; | |
| 137 | + | font-size: 11px !important; | |
| 138 | + | letter-spacing: .4px; | |
| 139 | + | } | |
| 140 | + | .dashboard-component-chart-holder table td { border-color: var(--tmb-line) !important; } | |
| 141 | + | ||
| 142 | + | /* tmb-md-wrap: transparent wrapper around banner */ | |
| 143 | + | .dashboard-component-markdown, | |
| 144 | + | .dashboard-component-markdown .dashboard-markdown, | |
| 145 | + | .dashboard-component-markdown .dragdroppable { | |
| 146 | + | background: transparent !important; | |
| 147 | + | border: none !important; | |
| 148 | + | box-shadow: none !important; | |
| 149 | + | } | |
| 150 | + | ||
| 151 | + | /* ===== Hero banner (tmb-hero) ===== */ | |
| 152 | + | .dashboard-markdown .tmb-hero { | |
| 153 | + | position: relative; | |
| 154 | + | overflow: hidden; | |
| 155 | + | background: | |
| 156 | + | radial-gradient(circle at 92% 12%, rgba(201,162,39,.28) 0, rgba(201,162,39,0) 34%), | |
| 157 | + | radial-gradient(circle at 78% 110%, rgba(44,107,184,.55) 0, rgba(44,107,184,0) 45%), | |
| 158 | + | linear-gradient(120deg, #0B1626 0%, #13325E 55%, #1F4E8C 100%); | |
| 159 | + | border-radius: 16px; | |
| 160 | + | border-bottom: 3px solid var(--tmb-gold); | |
| 161 | + | padding: 24px 28px 18px; | |
| 162 | + | box-shadow: 0 10px 30px rgba(15,27,45,.18); | |
| 163 | + | color: #E6ECF5; | |
| 164 | + | font-family: 'Inter', sans-serif; | |
| 165 | + | } | |
| 166 | + | .dashboard-markdown .tmb-hero-top { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:10px; } | |
| 167 | + | .dashboard-markdown .tmb-eyebrow { font-size:11px; font-weight:600; letter-spacing:1.6px; text-transform:uppercase; color:var(--tmb-gold); } | |
| 168 | + | .dashboard-markdown .tmb-period { font-size:11.5px; font-weight:500; color:#DCE6F4; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.18); padding:4px 10px; border-radius:999px; } | |
| 169 | + | .dashboard-markdown .tmb-title { color:#FFFFFF !important; font-size:26px !important; font-weight:700 !important; letter-spacing:-.3px; margin:0 0 6px !important; line-height:1.2; } | |
| 170 | + | .dashboard-markdown .tmb-sub { color:#C9D6E8 !important; font-size:13.5px; line-height:1.6; max-width:880px; margin:0 0 16px !important; } | |
| 171 | + | .dashboard-markdown .tmb-stats { display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:10px; } | |
| 172 | + | .dashboard-markdown .tmb-stat { background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.14); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; backdrop-filter: blur(2px); } | |
| 173 | + | .dashboard-markdown .tmb-stat-val { color:#FFFFFF; font-size:19px; font-weight:700; letter-spacing:-.3px; font-variant-numeric: tabular-nums; } | |
| 174 | + | .dashboard-markdown .tmb-stat:first-child .tmb-stat-val { color:#F2D27A; } | |
| 175 | + | .dashboard-markdown .tmb-stat-lbl { color:#AFC0D8; font-size:11px; font-weight:500; } | |
| 176 | + | .dashboard-markdown .tmb-note { color:#8FA3C0 !important; font-size:11px; font-style:italic; margin:12px 0 0 !important; } | |
| 177 | + | @media (max-width: 1100px) { .dashboard-markdown .tmb-stats { grid-template-columns:repeat(3, minmax(0,1fr)); } } | |
| 178 | + | ||
| 179 | + | /* ===== tmb-polish: frameless hero + visible sidebar tint ===== */ | |
| 180 | + | .dashboard-markdown .dashboard-component-chart-holder, | |
| 181 | + | .dashboard-component-markdown .dashboard-component-chart-holder { | |
| 182 | + | background: transparent !important; | |
| 183 | + | border: none !important; | |
| 184 | + | box-shadow: none !important; | |
| 185 | + | padding: 0 !important; | |
| 186 | + | } | |
| 187 | + | .dashboard-markdown .dashboard-component-chart-holder:hover { transform: none !important; } | |
| 188 | + | [data-test="dashboard-filters-panel"] { | |
| 189 | + | background: linear-gradient(180deg, #FFFFFF 0%, #F1F5FB 55%, #E8EEF8 100%) !important; | |
| 190 | + | background-attachment: fixed !important; | |
| 191 | + | } | |
| 192 | + | [data-test="dashboard-filters-panel"] > div { background: transparent !important; } | |
| 193 | + | ||
| 194 | + | /* ===== tmb-cards: richer chart card backgrounds ===== */ | |
| 195 | + | .dashboard-component-chart-holder { | |
| 196 | + | position: relative; | |
| 197 | + | overflow: hidden; | |
| 198 | + | background: | |
| 199 | + | radial-gradient(420px 220px at 100% 0%, rgba(31,78,140,.06) 0%, rgba(31,78,140,0) 70%), | |
| 200 | + | radial-gradient(360px 200px at 0% 100%, rgba(201,162,39,.05) 0%, rgba(201,162,39,0) 70%), | |
| 201 | + | linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 55%, #F4F7FC 100%) !important; | |
| 202 | + | border: 1px solid rgba(31,78,140,.10) !important; | |
| 203 | + | box-shadow: | |
| 204 | + | 0 1px 0 rgba(255,255,255,.9) inset, | |
| 205 | + | 0 1px 2px rgba(15,27,45,.05), | |
| 206 | + | 0 8px 24px rgba(15,27,45,.07) !important; | |
| 207 | + | } | |
| 208 | + | /* accent strip on top of every chart card */ | |
| 209 | + | .dashboard-component-chart-holder::before { | |
| 210 | + | content: ''; | |
| 211 | + | position: absolute; top: 0; left: 0; right: 0; height: 3px; | |
| 212 | + | background: linear-gradient(90deg, #13325E 0%, #1F4E8C 55%, #C9A227 100%); | |
| 213 | + | opacity: .85; | |
| 214 | + | z-index: 1; | |
| 215 | + | } | |
| 216 | + | /* chart title band */ | |
| 217 | + | .dashboard-component-chart-holder .chart-header { | |
| 218 | + | background: linear-gradient(180deg, rgba(31,78,140,.045) 0%, rgba(31,78,140,0) 100%); | |
| 219 | + | margin: -14px -16px 10px !important; | |
| 220 | + | padding: 14px 16px 10px !important; | |
| 221 | + | border-bottom: 1px solid rgba(31,78,140,.10) !important; | |
| 222 | + | } | |
| 223 | + | /* let the card gradient show through the chart canvases */ | |
| 224 | + | .dashboard-component-chart-holder .chart-container, | |
| 225 | + | .dashboard-component-chart-holder .slice_container, | |
| 226 | + | .dashboard-component-chart-holder .superset-legacy-chart-big-number, | |
| 227 | + | .dashboard-component-chart-holder .big_number { | |
| 228 | + | background: transparent !important; | |
| 229 | + | } | |
| 230 | + | .dashboard-component-chart-holder:hover { | |
| 231 | + | border-color: rgba(31,78,140,.22) !important; | |
| 232 | + | box-shadow: | |
| 233 | + | 0 1px 0 rgba(255,255,255,.9) inset, | |
| 234 | + | 0 2px 4px rgba(15,27,45,.06), | |
| 235 | + | 0 14px 32px rgba(15,27,45,.11) !important; | |
| 236 | + | } | |
| 237 | + | /* keep the hero banner frameless */ | |
| 238 | + | .dashboard-markdown .dashboard-component-chart-holder { background: transparent !important; border: none !important; box-shadow: none !important; } | |
| 239 | + | .dashboard-markdown .dashboard-component-chart-holder::before { display: none !important; } | |
| 240 | + | ||
| 241 | + | /* ===== tmb-tabs: navigation tab bar ===== */ | |
| 242 | + | .dashboard-component-tabs { background: transparent !important; } | |
| 243 | + | .dashboard-component-tabs > .ant-tabs > .ant-tabs-nav, | |
| 244 | + | .dashboard-component-tabs .ant-tabs-nav { | |
| 245 | + | background: rgba(255,255,255,.88) !important; | |
| 246 | + | border: 1px solid rgba(31,78,140,.10); | |
| 247 | + | border-radius: 14px; | |
| 248 | + | padding: 6px 8px !important; | |
| 249 | + | margin: 4px 0 14px !important; | |
| 250 | + | box-shadow: 0 6px 18px rgba(15,27,45,.06); | |
| 251 | + | } | |
| 252 | + | .dashboard-component-tabs .ant-tabs-nav::before { border-bottom: none !important; } | |
| 253 | + | .dashboard-component-tabs .ant-tabs-tab { | |
| 254 | + | border-radius: 10px !important; | |
| 255 | + | padding: 8px 18px !important; | |
| 256 | + | margin: 0 4px 0 0 !important; | |
| 257 | + | transition: background .2s ease, color .2s ease; | |
| 258 | + | } | |
| 259 | + | .dashboard-component-tabs .ant-tabs-tab .ant-tabs-tab-btn, | |
| 260 | + | .dashboard-component-tabs .ant-tabs-tab .ant-tabs-tab-btn * { | |
| 261 | + | color: var(--tmb-muted) !important; | |
| 262 | + | font-weight: 600 !important; | |
| 263 | + | letter-spacing: .2px; | |
| 264 | + | } | |
| 265 | + | .dashboard-component-tabs .ant-tabs-tab:hover { background: rgba(31,78,140,.07) !important; } | |
| 266 | + | .dashboard-component-tabs .ant-tabs-tab.ant-tabs-tab-active, | |
| 267 | + | .dashboard-component-tabs .ant-tabs-tab.ant-tabs-tab-active:hover { | |
| 268 | + | background: linear-gradient(120deg, #13325E 0%, #1F4E8C 100%) !important; | |
| 269 | + | box-shadow: 0 4px 12px rgba(19,50,94,.25); | |
| 270 | + | } | |
| 271 | + | .dashboard-component-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn, | |
| 272 | + | .dashboard-component-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn *, | |
| 273 | + | .dashboard-component-tabs .ant-tabs-tab.ant-tabs-tab-active input { color: #FFFFFF !important; } | |
| 274 | + | .dashboard-component-tabs .ant-tabs-ink-bar { background: var(--tmb-gold) !important; height: 3px !important; border-radius: 3px; } | |
| 275 | + | ||
| 276 | + | /* tmb-tabs-pane: let the canvas show through tab content */ | |
| 277 | + | .dashboard-component-tabs .ant-tabs-content-holder, | |
| 278 | + | .dashboard-component-tabs .ant-tabs-content, | |
| 279 | + | .dashboard-component-tabs .ant-tabs-tabpane { background: transparent !important; } | |