:root {
  --shadow: 0 0 0 0px #fff, 0 20px 25px -5px rgba(0,0,0,0.10196), 0 8px 10px -6px rgba(0,0,0,0.10196);
  --transition-time: 0.25s;
  
  --color-light-background-primary: #e5e5e5;
  --color-light-background-secondary: #fafafa;
  --color-light-background-tertiary: #f5f5f5;
  --color-light-border: #d4d4d4;
  --color-light-text-primary: #404040;
  --color-light-text-secondary: #a3a3a3;
  --color-light-danger: #dc2626;
  --color-light-cta-background: #737373;
  --color-light-cta-hover-background: #404040;
  --color-light-cta-text: #fafafa;
  --color-light-cta-hover-text: var(--color-light-cta-text);
  --color-light-cta-alt-background: #a3a3a3;
  --color-light-cta-alt-hover-background: #fafafa;
  --color-light-cta-alt-text: #404040;
  --color-light-cta-alt-hover-text: var(--color-light-cta-alt-text);
  --color-light-gauge-background: #a3a3a3;
  --color-light-gauge-fill: #0284c7;
  --light-root-background: linear-gradient(to top right, var(--color-light-background-primary), var(--color-light-background-primary), var(--color-light-border));
  
  --color-dark-background-primary: #404040;
  --color-dark-background-secondary: #525252;
  --color-dark-background-tertiary: #737373;
  --color-dark-border: #737373;
  --color-dark-text-primary: #fafafa;
  --color-dark-text-secondary: #a3a3a3;
  --color-dark-danger: #fca5a5;
  --color-dark-cta-background: #a3a3a3;
  --color-dark-cta-hover-background: #fafafa;
  --color-dark-cta-text: #404040;
  --color-dark-cta-hover-text: var(--color-dark-cta-text);
  --color-dark-cta-alt-background: #737373;
  --color-dark-cta-alt-hover-background: #404040;
  --color-dark-cta-alt-text: #fafafa;
  --color-dark-cta-alt-hover-text: var(--color-dark-cta-alt-text);
  --color-dark-gauge-background: #e5e5e5;
  --color-dark-gauge-fill: #38bdf8;
  --dark-root-background: linear-gradient(to top right, var(--color-dark-background-primary), var(--color-dark-background-primary), var(--color-dark-background-secondary));
  
  --color-background-primary: var(--color-light-background-primary);
  --color-background-secondary: var(--color-light-background-secondary);
  --color-background-tertiary: var(--color-light-background-tertiary);
  --color-border: var(--color-light-border);
  --color-text-primary: var(--color-light-text-primary);
  --color-text-secondary: var(--color-light-text-secondary);
  --color-danger: var(--color-light-danger);
  --color-cta-background: var(--color-light-cta-background);
  --color-cta-hover-background: var(--color-light-cta-hover-background);
  --color-cta-text: var(--color-light-cta-text);
  --color-cta-hover-text: var(--color-light-cta-hover-text);
  --color-cta-alt-background: var(--color-light-cta-alt-background);
  --color-cta-alt-hover-background: var(--color-light-cta-alt-hover-background);
  --color-cta-alt-text: var(--color-light-cta-alt-text);
  --color-cta-alt-hover-text: var(--color-light-cta-alt-hover-text);
  --color-gauge-background: var(--color-light-gauge-background);
  --color-gauge-fill: var(--color-light-gauge-fill);
  --root-background: var(--light-root-background);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background-primary: var(--color-dark-background-primary);
    --color-background-secondary: var(--color-dark-background-secondary);
    --color-background-tertiary: var(--color-dark-background-tertiary);
    --color-border: var(--color-dark-border);
    --color-text-primary: var(--color-dark-text-primary);
    --color-text-secondary: var(--color-dark-text-secondary);
    --color-danger: var(--color-dark-danger);
    --color-cta-background: var(--color-dark-cta-background);
    --color-cta-hover-background: var(--color-dark-cta-hover-background);
    --color-cta-text: var(--color-dark-cta-text);
    --color-cta-hover-text: var(--color-dark-cta-hover-text);
    --color-cta-alt-background: var(--color-dark-cta-alt-background);
    --color-cta-alt-hover-background: var(--color-dark-cta-alt-hover-background);
    --color-cta-alt-text: var(--color-dark-cta-alt-text);
    --color-cta-alt-hover-text: var(--color-dark-cta-alt-hover-text);
    --color-gauge-background: var(--color-dark-gauge-background);
    --color-gauge-fill: var(--color-dark-gauge-fill);
    --root-background: var(--dark-root-background);
  }
}

.light {
  --color-background-primary: var(--color-light-background-primary);
  --color-background-secondary: var(--color-light-background-secondary);
  --color-background-tertiary: var(--color-light-background-tertiary);
  --color-border: var(--color-light-border);
  --color-text-primary: var(--color-light-text-primary);
  --color-text-secondary: var(--color-light-text-secondary);
  --color-danger: var(--color-light-danger);
  --color-cta-background: var(--color-light-cta-background);
  --color-cta-hover-background: var(--color-light-cta-hover-background);
  --color-cta-text: var(--color-light-cta-text);
  --color-cta-hover-text: var(--color-light-cta-hover-text);
  --color-cta-alt-background: var(--color-light-cta-alt-background);
  --color-cta-alt-hover-background: var(--color-light-cta-alt-hover-background);
  --color-cta-alt-text: var(--color-light-cta-alt-text);
  --color-cta-alt-hover-text: var(--color-light-cta-alt-hover-text);
  --color-gauge-background: var(--color-light-gauge-background);
  --color-gauge-fill: var(--color-light-gauge-fill);
  --root-background: var(--light-root-background);
}

.dark {
  --color-background-primary: var(--color-dark-background-primary);
  --color-background-secondary: var(--color-dark-background-secondary);
  --color-background-tertiary: var(--color-dark-background-tertiary);
  --color-border: var(--color-dark-border);
  --color-text-primary: var(--color-dark-text-primary);
  --color-text-secondary: var(--color-dark-text-secondary);
  --color-danger: var(--color-dark-danger);
  --color-cta-background: var(--color-dark-cta-background);
  --color-cta-hover-background: var(--color-dark-cta-hover-background);
  --color-cta-text: var(--color-dark-cta-text);
  --color-cta-hover-text: var(--color-dark-cta-hover-text);
  --color-cta-alt-background: var(--color-dark-cta-alt-background);
  --color-cta-alt-hover-background: var(--color-dark-cta-alt-hover-background);
  --color-cta-alt-text: var(--color-dark-cta-alt-text);
  --color-cta-alt-hover-text: var(--color-dark-cta-alt-hover-text);
  --color-gauge-background: var(--color-dark-gauge-background);
  --color-gauge-fill: var(--color-dark-gauge-fill);
  --root-background: var(--dark-root-background);
}

.btn {
  height: 2em;
  border-radius: 1em;
  text-align: center;
  border: 0;
  box-shadow: var(--shadow);
  transition: all var(--transition-time);
  padding: 0 1em;
}

.btn.cta {
  background-color: var(--color-cta-background);
  color: var(--color-cta-text);
}

.btn.cta:hover,
.btn.cta:active {
  background-color: var(--color-cta-hover-background);
  color: var(--color-cta-hover-text);
}

.btn.cta.alt {
  background-color: var(--color-cta-alt-background);
  color: var(--color-cta-alt-text);
}

.btn.cta.alt:hover,
.btn.cta.alt:active {
  background-color: var(--color-cta-alt-hover-background);
  color: var(--color-cta-alt-hover-text);
}

.card {
  position: relative;
  height: 100%;
  border-radius: 15px;
  background-color: var(--color-background-secondary);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.card *{
    /* allow sub nesting, by assuming not set is 12 */
    grid-column-end: span 12;
}

.card .card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0;
  background-color: var(--color-background-tertiary);
  padding: 1rem;
  border-bottom: solid 1px var(--color-border);
}

.card .card-header .header-title {
  flex: 1 1 auto;
  font-size: 1.2em;
}

.card .card-header .dropdown {
  position: relative;
  display: inline-block;
}

.card .card-header .dropdown .dropdown-btn {
  color: white;
  padding: 6px;
  font-size: 1em;
  border: none;
  cursor: pointer;
}

.card .card-header .dropdown .dropdown-content {
  position: absolute;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.card .card-header .dropdown .dropdown-content a {
  color: black;
  font-size: 1em;
  padding: 12px 16px;
  -webkit-text-decoration: none;
  -webkit-text-decoration: none;
  text-decoration: none;
  display: block;
}

.card .card-header .dropdown .dropdown-content a:hover {
  background-color: #f1f1f1;
}

.card .card-img {
  width: 100%;
}

.card .card-body {
  padding: 5px;
}

.card-body-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-column-gap: 10px;
}

.card .card-body p {
  font-size: 1rem;
}

.card .card-footer {
  flex: 1 1 auto;
  padding: 5px;
  font-size: 0.75em;
  background-color: var(--color-background-tertiary);
}

.form-table {
  text-align: left;
}

.form-table label {
  font-weight: bold;
}

.form-table input,
.form-table textarea,
.form-table select {
  padding: 0.5em;
  border-radius: 0.5em;
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--color-background-primary);
  color: var(--color-text-primary)
}

.form-table .helptext {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: 0.7rem;
}

.errorlist {
  color: var(--color-danger);
  list-style: none;
  text-align: left;
  padding-left: 10px;
  margin: 0;
}

.form-table .errorlist {
  padding-left: 0;
}

* {
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: auto;
}

html {
  font-size: 1.2em;
  line-height: 1.4;
  font-weight: 400;
  font-family: Inter var,ui-sans-serif,system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
}

body {
  padding: 1em;
  margin: 0 auto;
  max-width: 95%;
  min-height: 100vh;
  background: var(--root-background);
  color: var(--color-text-primary);
}

a{
  color: var(--color-text-primary);
  cursor: pointer;
  font-size: 1.1rem;
  -webkit-text-decoration: none;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em 0;
  line-height: 1.2;
  letter-spacing: -.02em;
}

hr{
  border-color: var(--color-text-primary);
}

.menu {
  background: var(--color-background-secondary);
  list-style: none;
  margin: 0;
  padding-left: 0;
  display: flex;
  z-index: 2;
}

.menu li {
  background: var(--color-background-secondary);
  display: block;
  float: left;
  padding: 0.5rem 2rem;
  position: relative;
  -webkit-text-decoration: none;
  text-decoration: none;
}

.menu li a {
  color: var(--color-text-primary);
}

.menu li.active, .menu li ul li.active {
  background-color: var(--color-background-tertiary);
}

.menu li:hover,
.menu li:focus-within {
  background-color: var(--color-background-tertiary);
  cursor: pointer;
}

.menu li:focus-within a {
  outline: none;
}

.menu .dropdown {
  display: none;
  left: 0;
  margin: 0.5rem 0 0;
  padding: 0;
  min-width: 4em;
  opacity: 0;
  position: absolute;
  visibility: hidden;
  background: var(--color-background-tertiary);
  border: 1px solid var(--color-border);
  border-top: 0;
  overflow: hidden;
  border-radius: 0 0 15px 15px;
}

.menu li:hover > .dropdown,
.menu li:focus-within > .dropdown,
.menu li .dropdown:hover,
.menu li .dropdown:focus {
  visibility: visible;
  opacity: 1;
  display: block;
  z-index: 1;
}

.menu .dropdown li {
  clear: both;
  width: 100%;
  padding: 0;
}

.menu .dropdown li a {
  display: block;
  padding: 0.5rem 2rem;
  white-space: nowrap;
}

.menu-card {
  display: flex;
  margin-bottom: 1em;
}

.menu-card nav {
  flex-grow: 1;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  border-right: 0;
  border-left: 0;
}

.menu-card .bumper {
  width: 15px;
  overflow: hidden;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  z-index: 1;
}

.menu-card .bumper:first-child {
  border-radius: 15px 0 0 15px;
  border-right: 0;
}

.menu-card .bumper:last-child {
  border-radius: 0 15px 15px 0;
  border-left: 0;
}

/* This is an example - you'd ideally use a lib or scss to compile this, add responsiveness etc */

.span-1 {
  grid-column-end: span 1 !important;
}

.span-1 {
  grid-auto-rows: min-content;
}

.span-2 {
  grid-column-end: span 2 !important;
}

.span-2 {
  grid-auto-rows: min-content;
}

.span-3 {
  grid-column-end: span 3 !important;
}

.span-3 {
  grid-auto-rows: min-content;
}

.span-4 {
  grid-column-end: span 4 !important;
}

.span-4 {
  grid-auto-rows: min-content;
}

.span-5 {
  grid-column-end: span 5 !important;
}

.span-5 {
  grid-auto-rows: min-content;
}

.span-6 {
  grid-column-end: span 6;
  grid-auto-rows: min-content;
}

.span-7 {
  grid-column-end: span 7;
  grid-auto-rows: min-content;
}

.span-8 {
  grid-column-end: span 8;
  grid-auto-rows: min-content;
}

.span-9 {
  grid-column-end: span 9;
  grid-auto-rows: min-content;
}

.span-10 {
  grid-column-end: span 10;
  grid-auto-rows: min-content;
}

.span-11 {
  grid-column-end: span 11;
  grid-auto-rows: min-content;
}

.span-12 {
  grid-column-end: span 12;
  grid-auto-rows: min-content;
}

.gauge-container {
  display: block;
  margin: auto;
  position: relative;
  width: 100%;
}

.gauge .dial {
  stroke: var(--color-gauge-background);
  stroke-width: 10;
  opacity: 0.1;
}

.gauge .value {
  stroke: var(--color-gauge-fill);
  stroke-dasharray: none;
  stroke-width: 10;
}

.gauge-title-text {
  color: var(--color-text-primary);
  text-align: center;
  display: inline-block;
  width: 100%;
  font-size: 10vw;
}

.gauge-value-text {
  color: var(--color-text-primary);
  text-align: center;
  display: inline-block;
  width: 100%;
}

.gauge-sub-text {
  color: var(--color-text-secondary);
  display: inline-block;
  font-size: .8rem;
}

.gauge-content {
  position: absolute;
  margin: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dashboard-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: 1rem;
  gap: 1rem;
  text-align: center;
  width: 100%;
}

h1, h2, h3, h4, p, .tab-container {
  grid-column: 1 / 13;
}

.tab-content div.active .card{
    border-radius: 0 15px 15px 15px;
}

.dashboard-component-inner {
  padding: 2rem;
}

.dashboard-component-cta {
  color: var(--color-text-primary);
  -webkit-text-decoration: none;
  text-decoration: none;
  font-size: 1.3rem;
}

.tabs {
  border-top: 2px var(--color-border) solid;
  display: flex;
  flex-wrap: wrap;
  margin-left: 0;
  padding: 35px 0 0;
  list-style: none;
}

.tabs div, .tabs .tab {
  background-color: var(--color-background-secondary);
  padding: 10px 20px;
}

.tabs div a, .tabs .tab a {
  color: var(--color-text-primary);
}

.tabs div a.active, .tabs .tab a.active {
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-background-secondary);
}

.dataTables_filter, .dataTables_length, .dataTables_info, .dataTables_paginate {
  color: var(--color-text-primary) !important;
  font-size: 0.9rem !important;
}

.dataTables_filter, .dataTables_length, .dataTables_info, .dataTables_paginate {
  margin-bottom: 10px;
}

.dataTables_length select {
  color: var(--color-text-primary) !important;
}

.table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  font-size: 0.8rem;
}

.table thead th {
  background-color: var(--color-background-secondary);
  padding: 1rem;
  text-align: left;
  text-shadow: 1px 1px 1px var(--color-border);
}

.table tbody td {
  border: solid 1px var(--color-background-secondary);
  padding: 10px;
}

.customComponent {
  background-color: var(--color-background-primary);
  border-radius: 20px;
  padding: 10px 5px;
  margin: 10px;
  font-size: 0.8em;
}

.gauge-container {
  margin: auto;
  max-width: 65%;
}

.loading-img{
  padding: 5em;
}