luci-theme-bootstrap: fix uci changelog and readonly input styles
[project/luci.git] / themes / luci-theme-bootstrap / htdocs / luci-static / bootstrap / cascade.css
index 5b7baebdbd627a0062c927d5a291b8cda79eb6f0..c10e304e395e10fd760c752ff8dba0eb35c25207 100644 (file)
  *
  * Designed and built with all the love in the world @twitter by @mdo and @fat.
  */
+
+/* Variables
+ * --------- */
+
+:root {
+       --background-color-delta-l-sign: -1;
+       --background-color-h: 0;
+       --background-color-s: 0%;
+       --background-color-l: 100%;
+
+       --background-color-high-hsl:
+               var(--background-color-h),
+               var(--background-color-s),
+               var(--background-color-l);
+       --background-color-high: hsl(var(--background-color-high-hsl));
+
+       --background-color-medium-hsl:
+               var(--background-color-h),
+               var(--background-color-s),
+               calc(var(--background-color-l) + var(--background-color-delta-l-sign) * calc(6 / 255 * 100%));
+       --background-color-medium: hsl(var(--background-color-medium-hsl));
+
+       --background-color-low-hsl:
+               var(--background-color-h),
+               var(--background-color-s),
+               calc(var(--background-color-l) + var(--background-color-delta-l-sign) * calc(10 / 255 * 100%));
+       --background-color-low: hsl(var(--background-color-low-hsl));
+
+       --text-color-delta-l-sign: 1;
+       --text-color-h: 0;
+       --text-color-s: 0%;
+       --text-color-l: 0%;
+
+       --text-color-highest-hsl:
+               var(--text-color-h),
+               var(--text-color-s),
+               var(--text-color-l);
+       --text-color-highest: hsl(var(--text-color-highest-hsl));
+
+       --text-color-high-hsl:
+               var(--text-color-h),
+               var(--text-color-s),
+               calc(var(--text-color-l) + var(--text-color-delta-l-sign) * calc(64 / 255 * 100%));
+       --text-color-high: hsl(var(--text-color-high-hsl));
+
+       --text-color-medium-hsl:
+               var(--text-color-h),
+               var(--text-color-s),
+               calc(var(--text-color-l) + var(--text-color-delta-l-sign) * calc(128 / 255 * 100%));
+       --text-color-medium: hsl(var(--text-color-medium-hsl));
+
+       --text-color-low-hsl:
+               var(--text-color-h),
+               var(--text-color-s),
+               calc(var(--text-color-l) + var(--text-color-delta-l-sign) * calc(191 / 255 * 100%));
+       --text-color-low: hsl(var(--text-color-low-hsl));
+
+       --border-color-delta-l-sign: -1;
+       --border-color-h: var(--background-color-h);
+       --border-color-s: var(--background-color-s);
+       --border-color-l: var(--background-color-l);
+
+       --border-color-high-hsl:
+               var(--border-color-h),
+               var(--border-color-s),
+               calc(var(--border-color-l) + var(--border-color-delta-l-sign) * calc(51 / 255 * 100%));
+       --border-color-high: hsl(var(--border-color-high-hsl));
+
+       --border-color-medium-hsl:
+               var(--border-color-h),
+               var(--border-color-s),
+               calc(var(--border-color-l) + var(--border-color-delta-l-sign) * calc(34 / 255 * 100%));
+       --border-color-medium: hsl(var(--border-color-medium-hsl));
+
+       --border-color-low-hsl:
+               var(--border-color-h),
+               var(--border-color-s),
+               calc(var(--border-color-l) + var(--border-color-delta-l-sign) * calc(17 / 255 * 100%));
+       --border-color-low: hsl(var(--border-color-low-hsl));
+
+       --primary-color-high: #1976d2;
+       --primary-color-medium: #1564c0;
+       --primary-color-low: #0d46a1;
+       --on-primary-color: var(--background-color-high);
+
+       --error-color-high-rgb: 246, 43, 18;
+       --error-color-high: rgb(var(--error-color-high-rgb));
+       --error-color-medium: #e8210d;
+       --error-color-low: #d00000;
+       --on-error-color: var(--background-color-high);
+
+       --success-color-high-rgb: 0, 172, 89;
+       --success-color-high: rgb(var(--success-color-high-rgb));
+       --success-color-medium: #009a4c;
+       --success-color-low: #007936;
+       --on-success-color: var(--background-color-high);
+
+       --warn-color-high: #efbd0b;
+       --warn-color-medium: #f0c629;
+       --warn-color-low: #f2d24f;
+       --on-warn-color: var(--text-color-highest);
+
+       --disabled-opacity: .7;
+
+       color-scheme: light;
+}
+
+:root[data-darkmode="true"] {
+       --background-color-delta-l-sign: 1;
+       --background-color-h: 0;
+       --background-color-s: 0%;
+       --background-color-l: calc(34 / 255 * 100%);
+       --text-color-delta-l-sign: -1;
+       --text-color-h: 0;
+       --text-color-s: 0%;
+       --text-color-l: 100%;
+       --border-color-delta-l-sign: 1;
+
+       --primary-color-high: #4da1c0;
+       --primary-color-medium: #448da6;
+       --primary-color-low: #3c7a8d;
+
+       --error-color-high-rgb: 209, 86, 83;
+       --error-color-medium: #bf4e4c;
+       --error-color-low: #b14946;
+
+       --success-color-high-rgb: 0, 166, 108;
+       --success-color-medium: #00945e;
+       --success-color-low: #008252;
+
+       --warn-color-high: #a69461;
+       --warn-color-medium: #a68d45;
+       --warn-color-low: #a68732;
+       --on-warn-color: var(--background-color-high);
+
+       --disabled-opacity: .4;
+
+       color-scheme: dark;
+}
+
 /* Reset.less
  * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here      that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
  * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@@ -40,6 +180,7 @@ html {
        font-size: 100%;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
+       height: 100%;
 }
 
 a:focus {
@@ -50,13 +191,6 @@ a:hover, a:active {
        outline: 0;
 }
 
-footer,
-header,
-nav,
-section {
-       display: block;
-}
-
 sub, sup {
        font-size: 75%;
        line-height: 0;
@@ -85,7 +219,7 @@ textarea {
        margin: 0;
        box-sizing: border-box;
        vertical-align: baseline;
-       line-height: normal;
+       line-height: 2em;
 }
 
 button::-moz-focus-inner, input::-moz-focus-inner {
@@ -99,13 +233,14 @@ input[type="reset"],
 input[type="submit"] {
        cursor: pointer;
        -webkit-appearance: button;
+       word-break: break-all;
 }
 
 button[disabled],
 input[type="button"][disabled],
 input[type="reset"][disabled],
 input[type="submit"][disabled] {
-       opacity: 0.7;
+       opacity: var(--disabled-opacity);
 }
 
 input[type="search"] {
@@ -127,13 +262,16 @@ textarea {
  * Basic and global styles for generating a grid system, structural layout, and page templates
  * ------------------------------------------------------------------------------------------- */
 body {
-       background-color: #fff;
+       background-color: var(--background-color-high);
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 13px;
        font-weight: normal;
        line-height: 18px;
-       color: #404040;
-       padding: 58px 5px 5px 5px;
+       color: var(--text-color-high);
+       padding: 5px;
+       height: 100%;
+       display: flex;
+       flex-direction: column;
 }
 
 .container {
@@ -144,25 +282,15 @@ body {
        zoom: 1;
 }
 
-.container:before, .container:after {
-       display: table;
-       content: "";
-       zoom: 1;
-}
-
-.container:after {
-       clear: both;
-}
-
 a {
-       color: #0069d6;
+       color: var(--primary-color-high);
        text-decoration: none;
        line-height: inherit;
        font-weight: inherit;
 }
 
 a:hover {
-       color: #00438a;
+       color: var(--primary-color-low);
        text-decoration: underline;
 }
 
@@ -193,7 +321,7 @@ p,
 
 p small {
        font-size: 11px;
-       color: #bfbfbf;
+       color: var(--text-color-low);
 }
 
 h1,
@@ -203,7 +331,7 @@ h4,
 h5,
 h6 {
        font-weight: bold;
-       color: #404040;
+       color: var(--text-color-high);
 }
 
 h1 small,
@@ -212,7 +340,7 @@ h3 small,
 h4 small,
 h5 small,
 h6 small {
-       color: #bfbfbf;
+       color: var(--text-color-low);
 }
 
 h1 {
@@ -263,7 +391,7 @@ h5 {
 
 h6 {
        font-size: 13px;
-       color: #bfbfbf;
+       color: var(--text-color-low);
        text-transform: uppercase;
 }
 
@@ -288,7 +416,7 @@ ol {
 
 li {
        line-height: 18px;
-       color: #808080;
+       color: var(--text-color-medium);
 }
 
 ul.unstyled {
@@ -315,7 +443,7 @@ dl dd {
 hr {
        margin: 20px 0 19px;
        border: 0;
-       border-bottom: 1px solid #eee;
+       border-bottom: 1px solid var(--border-color-low);
 }
 
 strong {
@@ -345,20 +473,26 @@ code, pre {
 }
 
 code {
-       background-color: #fee9cc;
-       color: rgba(0, 0, 0, 0.75);
+       background-color: var(--border-color-low);
+       color: var(--text-color-high);
        padding: 1px 3px;
 }
 
 pre {
-       background-color: #f5f5f5;
+       --border-color-h: var(--background-color-h);
+       --border-color-s: var(--background-color-s);
+       --border-color-delta-l: 100%;
+       --border-color-l: calc(var(--background-color-l) + var(--background-color-delta-l-sign) * var(--border-color-delta-l));
+       --border-color-a: 0.15;
+       --border-color: hsla(var(--border-color-hsl), var(--border-color-a));
+
+       background-color: var(--background-color-low);
        display: block;
        padding: 8.5px;
        margin: 0 0 18px;
        line-height: 18px;
        font-size: 12px;
-       border: 1px solid #ccc;
-       border: 1px solid rgba(0, 0, 0, 0.15);
+       border: 1px solid var(--border-color);
        border-radius: 3px;
        white-space: pre;
        white-space: pre-wrap;
@@ -368,7 +502,8 @@ pre {
 /* Forms.less
  * Base styles for various input types, form layouts, and states
  * ------------------------------------------------------------- */
-form {
+form,
+.cbi-value {
        margin-bottom: 18px;
 }
 
@@ -381,35 +516,18 @@ fieldset legend {
        display: block;
        font-size: 19.5px;
        line-height: 1;
-       color: #404040;
+       color: var(--text-color-high);
        padding-top: 20px;
-
 }
+
 form .cbi-tab-descr {
        line-height: 18px;
        margin-bottom: 18px;
 }
 
-form .clearfix,
-.cbi-value {
-       margin-bottom: 18px;
-       zoom: 1;
-}
-
-form .clearfix:before, form .clearfix:after,
-.cbi-value:before, .cbi-value:after  {
-       display: table;
-       content: "";
-       zoom: 1;
-}
-
-form .clearfix:after,
-.cbi-value:after {
-       clear: both;
-}
-
 label,
 input,
+button,
 select,
 textarea {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -430,39 +548,43 @@ form .input,
        float: left;
        width: 180px;
        text-align: right;
-       color: #404040;
-}
-
-input[type=checkbox], input[type=radio] {
-       cursor: pointer;
+       color: var(--text-color-high);
 }
 
 label > input[type="checkbox"],
 label > input[type="radio"] {
-       vertical-align: bottom;
+       vertical-align: text-top;
        margin: 0;
 }
 
+label[for] {
+       cursor: pointer;
+}
+
 input,
 textarea,
 select,
-.cbi-dropdown,
-.uneditable-input {
+.cbi-select,
+.cbi-dropdown:not(.btn):not(.cbi-button) {
        display: inline-block;
        width: 210px;
-       height: 30px;
        padding: 4px;
+       background: var(--background-color-high);
+       color: var(--text-color-high);
        font-size: 13px;
        line-height: 18px;
-       border: 1px solid #ccc;
+       border: 1px solid var(--border-color-high);
        border-radius: 3px;
 }
 
-.uneditable-input {
-       color: #808080;
+input,
+select,
+.cbi-select,
+.cbi-dropdown:not(.btn):not(.cbi-button) {
+       height: 30px;
 }
 
-.cbi-dropdown,
+.cbi-dropdown:not(.btn):not(.cbi-button),
 .cbi-dynlist {
        min-width: 210px;
        max-width: 400px;
@@ -478,13 +600,16 @@ select,
 
 .cbi-dynlist > .item {
        margin-bottom: 4px;
-       box-shadow: 0 0 2px #ccc;
-       background: #fff;
+       box-shadow: 0 0 2px var(--border-color-high);
+       background: var(--background-color-high);
        padding: 2px 2em 2px 4px;
-       border: 1px solid #ccc;
+       border: 1px solid var(--border-color-high);
        border-radius: 3px;
+       color: var(--text-color-high);
        position: relative;
        pointer-events: none;
+       overflow: hidden;
+       word-break: break-all;
 }
 
 .cbi-dynlist > .item::after {
@@ -496,7 +621,7 @@ select,
        right: -1px;
        bottom: -1px;
        padding: 0 6px;
-       border: 1px solid #ccc;
+       border: 1px solid var(--border-color-high);
        border-radius: 0 3px 3px 0;
        font-weight: bold;
        color: #c44;
@@ -515,22 +640,60 @@ select,
        white-space: nowrap;
 }
 
-select {
-       padding: initial;
-       background: #fff;
-       box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.1);
+.cbi-value-field > .cbi-checkbox {
+       height: 30px;
+       display: flex;
+       align-items: center;
 }
 
-input[type=checkbox], input[type=radio] {
-       width: auto;
-       height: auto;
+.cbi-select {
        padding: 0;
-       margin: 3px 0;
-       *margin-top: 0;
-       /* IE6-7 */
+       position: relative;
+       background: linear-gradient(var(--background-color-high), var(--border-color-low));
+}
 
-       line-height: normal;
+.cbi-select select,
+.cbi-select select:focus {
+       -webkit-appearance: none;
+       appearance: none;
+       outline: none;
        border: none;
+       background: transparent;
+       height: 100%;
+       width: 100%;
+       padding: 0 .3em;
+       cursor: pointer;
+       margin-right: .6em;
+}
+
+.cbi-select::before {
+       position: absolute;
+       top: 0;
+       right: 0;
+       bottom: 0;
+       content: "▾";
+       padding: 0 .3em;
+       background: linear-gradient(var(--background-color-high), var(--border-color-low));
+       pointer-events: none;
+       border-radius: 3px;
+       display: flex;
+       flex-direction: column;
+       justify-content: center;
+}
+
+.cbi-select select option {
+       background: var(--background-color-low);
+       color: var(--text-color-high);
+}
+
+.cbi-select select option:hover {
+       background: var(--primary-color-low);
+       color: var(--on-primary-color);
+}
+
+.cbi-select select option:checked {
+       background: var(--primary-color-medium);
+       color: var(--on-primary-color);
 }
 
 input[type=file] {
@@ -552,67 +715,141 @@ select[multiple] {
        background-color: #fff;
 }
 
-textarea {
-       height: auto !important;
+input[type="checkbox"],
+input[type="radio"] {
+       --bd-color: var(--border-color-high);
+       --fg-color: var(--text-color-high);
+
+       appearance: none;
+       -webkit-appearance: none;
+       width: 14px;
+       height: 14px;
+       color: var(--fg-color);
+       position: relative;
+       display: inline-block;
+       cursor: pointer;
+       background: none;
+       border: none;
+}
+
+input[type="checkbox"]::before,
+input[type="checkbox"]::after,
+input[type="radio"]::before,
+input[type="radio"]::after {
+       position: absolute;
+       content: "";
+}
+
+input[type="checkbox"]::before,
+input[type="radio"]::before {
+       top: -1px;
+       left: -1px;
+       width: 14px;
+       height: 14px;
+       background: linear-gradient(var(--background-color-high), var(--background-color-low));
+       border: 1px solid var(--bd-color);
+       border-radius: 2px;
+}
+
+input[type="radio"],
+input[type="radio"]::before {
+       border-radius: 50%;
+}
+
+input[type="checkbox"]::after,
+input[type="radio"]::after {
+       top: 2px;
+       left: 2px;
+       width: 10px;
+       height: 10px;
+}
+
+input[type="checkbox"]:checked::after,
+input[type="radio"]:checked::after {
+       --checkmark-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><path d='m2.5 7.4 7.5 7.5-2.5 2.4L0 10Zm15-5L20 4.9 7.5 17.3 5 15Z'/></svg>");
+       -webkit-mask: var(--checkmark-icon) center/cover no-repeat;
+       mask: var(--checkmark-icon) center/cover no-repeat;
+       background: var(--fg-color);
+}
+
+input[type="radio"]:checked:after {
+       --checkmark-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='10' cy='10' r='8'/></svg>");
+}
+
+input[type="checkbox"].cbi-input-invalid,
+input[type="radio"].cbi-input-invalid {
+       --bd-color: var(--error-color-medium);
+       --fg-color: var(--error-color-high);
 }
 
 .td > input[type=text],
 .td > input[type=password],
 .td > select,
-.td > .cbi-dropdown,
+.td > .cbi-dropdown:not(.btn):not(.cbi-button),
 .cbi-dynlist > .add-item > .cbi-dropdown {
        width: 100%;
 }
 
-.uneditable-input {
-       background-color: #fff;
-       display: block;
-       border-color: #eee;
-       box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-       cursor: not-allowed;
-}
-
-::-moz-placeholder {
-       color: #bfbfbf;
-}
-
-::-webkit-input-placeholder {
-       color: #bfbfbf;
+::placeholder {
+       color: var(--text-color-medium);
 }
 
-.item::after, .btn, .cbi-button, input, textarea {
+.item::after,
+.btn,
+.cbi-button,
+.cbi-select,
+.cbi-dropdown,
+.cbi-dynlist > .item,
+input[type="checkbox"]::before,
+input[type="radio"]::before,
+input, button, textarea {
        transition: border linear 0.2s, box-shadow linear 0.2s;
-       box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+       box-shadow: inset 0 1px 3px hsla(var(--border-color-low-hsl), .01);
 }
 
 .item:hover::after,
-.btn:hover, .cbi-button:hover,
-input:focus, textarea:focus {
+.btn:hover, .btn:focus,
+.cbi-button:hover, .cbi-button:focus,
+.cbi-select.focus,
+.cbi-dropdown:focus, .cbi-dropdown[open],
+.cbi-dynlist > .item:focus,
+input[type="checkbox"]:focus::before,
+input[type="radio"]:focus::before,
+input:focus, button:hover, textarea:focus {
+       --focus-color-rgb: 82, 168, 236;
+
        outline: 0;
-       border-color: rgba(82, 168, 236, 0.8) !important;
-       box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+       border-color: rgba(var(--focus-color-rgb), 0.8) !important;
+       box-shadow: inset 0 1px 3px hsla(var(--border-color-low-hsl), .01), 0 0 8px rgba(var(--focus-color-rgb), 0.6);
        text-decoration: none;
 }
 
-input[type=file]:focus, input[type=checkbox]:focus, select:focus {
-       box-shadow: none;
-       outline: 1px dotted #666;
+.cbi-input-invalid:focus,
+.cbi-select.cbi-input-invalid,
+input[type="checkbox"].cbi-input-invalid:focus::before,
+input[type="radio"].cbi-input-invalid:focus::before {
+       --focus-color-rgb: var(--error-color-high-rgb);
 }
 
 input[disabled],
+button[disabled],
 select[disabled],
 textarea[disabled],
-input[readonly],
-select[readonly],
-textarea[readonly] {
-       background-color: #f5f5f5;
-       border-color: #ddd;
+.cbi-select[disabled]::before,
+.cbi-dropdown[disabled]:not(.btn):not(.cbi-button),
+input[type="checkbox"][disabled]::before,
+input[type="checkbox"][disabled]::after,
+input[type="radio"][disabled]::before,
+input[type="radio"][disabled]::after {
+       opacity: var(--disabled-opacity);
        pointer-events: none;
        cursor: default;
 }
 
+input[readonly],
 select[readonly],
 textarea[readonly] {
+       border-color: hsla(var(--border-color-high-hsl), var(--disabled-opacity));
        pointer-events: auto;
        cursor: auto;
 }
@@ -639,10 +876,10 @@ textarea[readonly] {
 
 .actions,
 .cbi-page-actions {
-       background: #f5f5f5;
+       background: var(--background-color-low);
        margin-bottom: 18px;
        padding: 17px 20px 18px 17px;
-       border-top: 1px solid #ddd;
+       border-top: 1px solid var(--border-color-medium);
        border-radius: 0 0 3px 3px;
        text-align: right;
 }
@@ -667,27 +904,6 @@ textarea[readonly] {
        margin: 0;
 }
 
-.help-inline, .help-block {
-       font-size: 13px;
-       line-height: 18px;
-       color: #bfbfbf;
-}
-
-.help-inline {
-       padding-left: 5px;
-       *position: relative;
-       /* IE6-7 */
-
-       *top: -5px;
-       /* IE6-7 */
-
-}
-
-.help-block {
-       display: block;
-       max-width: 600px;
-}
-
 /*
  * Tables.less
  * Tables for, you guessed it, tabular data
@@ -721,7 +937,7 @@ textarea[readonly] {
 }
 
 .table .td, .table .th {
-       border-top: 1px solid #ddd;
+       border-top: 1px solid var(--border-color-medium);
 }
 
 .tr.placeholder {
@@ -737,61 +953,73 @@ textarea[readonly] {
        line-height: 3em;
 }
 
+.tr.drag-over-above,
+.tr.drag-over-below {
+       border: 2px solid #0069d6;
+       border-width: 2px 0 0 0;
+}
+
+.tr.drag-over-below {
+       border-width: 0 0 2px 0;
+}
+
 /* Patterns.less
  * Repeatable UI elements outside the base styles provided from the scaffolding
  * ---------------------------------------------------------------------------- */
 header {
-       height: 40px;
-       position: fixed;
+       position: sticky;
        top: 0;
-       left: 0;
-       right: 0;
        z-index: 800;
        overflow: visible;
        color: #BFBFBF;
+       margin: -5px -5px 15px -5px;
+       display: flex;
 }
 
 header a {
        color: #bfbfbf;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+       text-shadow: 0 -1px 0 hsla(var(--border-color-low-hsl), .25);
 }
 
-header h3 a:hover, header .brand:hover, header ul .active > a {
+header .brand:hover, header ul .active > a {
        background-color: #333;
        background-color: rgba(255, 255, 255, 0.05);
        color: #fff;
        text-decoration: none;
 }
 
-header h3 {
-       position: relative;
-}
-
-header h3 a, header .brand {
+header .brand {
        float: left;
        display: block;
        padding: 8px 20px 12px;
-       margin-left: -20px;
+       margin-left: -15px;
        color: #fff;
        font-size: 20px;
        font-weight: 200;
        line-height: 1;
 }
 
+header .pull-right {
+       margin-left: auto;
+       margin-right: 5px;
+       align-self: center;
+}
+
 header p {
        margin: 0;
        line-height: 40px;
 }
 
-header .fill {
-       background-color: #222;
-       background-repeat: repeat-x;
-       background-image: linear-gradient(to bottom, #333333, #222222);
-       box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-       padding: 0 5px;
+header {
+       background: linear-gradient(#333333, #222222);
+       box-shadow: 0 1px 3px hsla(var(--border-color-low-hsl), .25), inset 0 -1px 0 hsla(var(--border-color-low-hsl), .01);
+       padding: 0;
+       /* the redundant properties below work around a csstidy bug */
+       padding-left: calc((100% - 940px) / 2);
+       padding-right: calc((100% - 940px) / 2);
 }
 
-header div > ul, .nav {
+.nav {
        display: block;
        float: left;
        margin: 0 10px 0 0;
@@ -799,12 +1027,12 @@ header div > ul, .nav {
        left: 0;
 }
 
-header div > ul > li, .nav > li {
+.nav > li {
        display: block;
        float: left;
 }
 
-header div > ul a, .nav a {
+.nav a {
        display: block;
        float: none;
        padding: 10px 10px 11px;
@@ -812,83 +1040,34 @@ header div > ul a, .nav a {
        text-decoration: none;
 }
 
-header div > ul a:hover, .nav a:hover {
+.nav a:hover {
        color: #fff;
        text-decoration: none;
 }
 
-header div > ul .active > a, .nav .active > a {
+.nav .active > a {
        background-color: #222;
        background-color: rgba(0, 0, 0, 0.5);
 }
 
-header div > ul.secondary-nav, .nav.secondary-nav {
-       float: right;
-       margin-left: 10px;
-       margin-right: 0;
-}
-
-header div > ul.secondary-nav .menu-dropdown,
-.nav.secondary-nav .menu-dropdown,
-header div > ul.secondary-nav .dropdown-menu,
-.nav.secondary-nav .dropdown-menu {
-       right: 0;
-       border: 0;
-}
-
-header div > ul a.menu:hover,
-.nav a.menu:hover,
-header div > ul li.open .menu,
-.nav li.open .menu,
-header div > ul .dropdown-toggle:hover,
-.nav .dropdown-toggle:hover,
-header div > ul .dropdown.open .dropdown-toggle,
-.nav .dropdown.open .dropdown-toggle {
+.nav a.menu:hover {
        background: #444;
        background: rgba(255, 255, 255, 0.05);
 }
 
-header div > ul .menu-dropdown,
-.nav .menu-dropdown,
-header div > ul .dropdown-menu,
 .nav .dropdown-menu {
        background-color: #333;
 }
 
-header div > ul .menu-dropdown a.menu,
-.nav .menu-dropdown a.menu,
-header div > ul .dropdown-menu a.menu,
-.nav .dropdown-menu a.menu,
-header div > ul .menu-dropdown .dropdown-toggle,
-.nav .menu-dropdown .dropdown-toggle,
-header div > ul .dropdown-menu .dropdown-toggle,
-.nav .dropdown-menu .dropdown-toggle {
+.nav .dropdown-menu a.menu {
        color: #fff;
 }
 
-header div > ul .menu-dropdown a.menu.open,
-.nav .menu-dropdown a.menu.open,
-header div > ul .dropdown-menu a.menu.open,
-.nav .dropdown-menu a.menu.open,
-header div > ul .menu-dropdown .dropdown-toggle.open,
-.nav .menu-dropdown .dropdown-toggle.open,
-header div > ul .dropdown-menu .dropdown-toggle.open,
-.nav .dropdown-menu .dropdown-toggle.open {
-       background: #444;
-       background: rgba(255, 255, 255, 0.05);
-}
-
-header div > ul .menu-dropdown li a,
-.nav .menu-dropdown li a,
-header div > ul .dropdown-menu li a,
 .nav .dropdown-menu li a {
        color: #999;
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
 }
 
-header div > ul .menu-dropdown li a:hover,
-.nav .menu-dropdown li a:hover,
-header div > ul .dropdown-menu li a:hover,
 .nav .dropdown-menu li a:hover {
        background-color: #191919;
        background-repeat: repeat-x;
@@ -896,22 +1075,11 @@ header div > ul .dropdown-menu li a:hover,
        color: #fff;
 }
 
-header div > ul .menu-dropdown .active a,
-.nav .menu-dropdown .active a,
-header div > ul .dropdown-menu .active a,
 .nav .dropdown-menu .active a {
        color: #fff;
 }
 
-header div > ul .menu-dropdown .divider,
-.nav .menu-dropdown .divider,
-header div > ul .dropdown-menu .divider,
-.nav .dropdown-menu .divider {
-       background-color: #222;
-       border-color: #444;
-}
-
-header ul .menu-dropdown li a, header ul .dropdown-menu li a {
+.nav .dropdown-menu li a {
        padding: 4px 15px;
 }
 
@@ -919,7 +1087,7 @@ li.menu, .dropdown {
        position: relative;
 }
 
-a.menu:after, .dropdown-toggle:after {
+a.menu:after {
        width: 0;
        height: 0;
        display: inline-block;
@@ -934,7 +1102,7 @@ a.menu:after, .dropdown-toggle:after {
        opacity: 0.5;
 }
 
-.menu-dropdown, .dropdown-menu {
+.dropdown-menu {
        background-color: #fff;
        float: left;
        position: absolute;
@@ -943,7 +1111,6 @@ a.menu:after, .dropdown-toggle:after {
        z-index: 900;
        min-width: 160px;
        max-width: 220px;
-       _width: 160px;
        margin-left: 0;
        margin-right: 0;
        padding: 6px 0;
@@ -957,21 +1124,13 @@ a.menu:after, .dropdown-toggle:after {
        background-clip: padding-box;
 }
 
-.menu-dropdown li, .dropdown-menu li {
+.dropdown-menu li {
        float: none;
        display: block;
        background-color: transparent;
 }
 
-.menu-dropdown .divider, .dropdown-menu .divider {
-       height: 1px;
-       margin: 5px 0;
-       overflow: hidden;
-       background-color: #eee;
-       border-bottom: 1px solid #fff;
-}
-
-header .dropdown-menu a, .dropdown-menu a {
+.dropdown-menu a {
        display: block;
        padding: 4px 15px;
        clear: both;
@@ -981,10 +1140,7 @@ header .dropdown-menu a, .dropdown-menu a {
        text-shadow: 0 1px 0 #fff;
 }
 
-header .dropdown-menu a:hover,
-.dropdown-menu a:hover,
-header .dropdown-menu a.hover,
-.dropdown-menu a.hover {
+.dropdown-menu a:hover {
        background-color: #ddd;
        background-repeat: repeat-x;
        background-image: linear-gradient(to bottom, #eee, #ddd);
@@ -993,42 +1149,40 @@ header .dropdown-menu a.hover,
        box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
 }
 
-.open .menu,
-.dropdown.open .menu,
-.open .dropdown-toggle,
-.dropdown.open .dropdown-toggle {
-       color: #fff;
-       background: #ccc;
-       background: rgba(0, 0, 0, 0.3);
-}
-
-.open .menu-dropdown,
-.dropdown.open .menu-dropdown,
-.open .dropdown-menu,
-.dropdown.open .dropdown-menu {
-       left: 0;
-}
-
 .dropdown:hover ul.dropdown-menu {
        left: 0;
 }
 
 .dropdown-menu .dropdown-menu {
-         position: absolute;
-         left: 159px;
+       position: absolute;
+       left: 159px;
 }
 
 .dropdown-menu li {
-         position: relative;
+       position: relative;
 }
 
 .tabs, .cbi-tabmenu {
+       --tab-bar-background-color: var(--background-color-high);
+       --tab-inactive-background-color-h: var(--border-color-low-h);
+       --tab-inactive-background-color-s: var(--border-color-low-s);
+       --tab-inactive-background-color-l: var(--border-color-low-l);
+       --tab-inactive-background-color: var(--border-color-low);
+       --tab-inactive-border-color: var(--border-color-medium);
+       --tab-inactive-text-color-delta-l: calc(85 / 255 * 100%);
+       --tab-inactive-text-color-l: calc(var(--tab-inactive-background-color-l) + var(--background-color-delta-l-sign) * var(--tab-inactive-text-color-delta-l));
+       --tab-inactive-text-color: hsl(var(--tab-inactive-background-color-hsl));
+       --tab-inactive-hover-background-color: var(--background-color-high);
+       --tab-active-background-color: var(--background-color-high);
+       --tab-active-text-color: #0069d6;
+       --tab-active-border-color: var(--border-color-medium);
+
        margin: 0 -5px 18px;
        padding: 0 2px;
        list-style: none;
        display: flex;
        flex-wrap: wrap;
-       background: linear-gradient(#fff 28px, #ddd 28px);
+       background: linear-gradient(var(--tab-bar-background-color) 28px, var(--tab-inactive-border-color) 28px);
        background-size: 1px 29px;
        background-position: left bottom;
 }
@@ -1040,11 +1194,11 @@ header .dropdown-menu a.hover,
        height: 25px;
        max-width: 48%;
        margin: 4px 2px 0 2px;
-       background: #fff;
-       border: 1px solid #ddd;
+       background: var(--tab-active-background-color);
+       border: 1px solid var(--tab-active-border-color);
        border-bottom: none;
        border-radius: 4px 4px 0 0;
-       color: #0069d6;
+       color: var(--primary-color-high);
 }
 
 .tabs > li > a, .cbi-tabmenu > li > a {
@@ -1060,12 +1214,12 @@ header .dropdown-menu a.hover,
 }
 
 .tabs > li:not(.active):hover, .cbi-tabmenu > .cbi-tab-disabled:hover {
-       background: linear-gradient(#fff 90%, #ddd 100%);
+       background: linear-gradient(var(--tab-inactive-hover-background-color) 90%, var(--tab-inactive-border-color) 100%);
 }
 
 .tabs > li:not(.active), .cbi-tabmenu > .cbi-tab-disabled {
-       color: #999;
-       background: linear-gradient(#eee 90%, #ddd 100%);
+       color: var(--tab-inactive-text-color);
+       background: linear-gradient(var(--tab-inactive-background-color) 90%, var(--tab-inactive-border-color) 100%);
 }
 
 .cbi-tab-disabled[data-errors]::after {
@@ -1125,44 +1279,60 @@ header .dropdown-menu a.hover,
 .breadcrumb {
        padding: 7px 14px;
        margin: 0 0 18px;
-       background-color: #f5f5f5;
-       background-repeat: repeat-x;
-       background-image: linear-gradient(to bottom, #fff, #f5f5f5);
-       border: 1px solid #ddd;
+       background: linear-gradient(to bottom, var(--background-color-high), var(--background-color-low));
+       border: 1px solid var(--border-color-medium);
        border-radius: 3px;
-       box-shadow: inset 0 1px 0 #fff;
+       display: flex;
+       flex: 0;
 }
 
 .breadcrumb li {
-       display: inline;
-       text-shadow: 0 1px 0 #fff;
+       list-style: none;
 }
 
-.breadcrumb .divider {
+.breadcrumb li:not(:last-child)::after {
+       content: "|";
        padding: 0 5px;
-       color: #bfbfbf;
 }
 
 .breadcrumb .active a {
-       color: #404040;
+       color: var(--text-color-medium);
 }
 
 footer {
-       margin-top: 17px;
        padding-top: 17px;
-       border-top: 1px solid #eee;
+       margin-top: auto;
+       border-top: 1px solid var(--border-color-low);
+       display: flex;
+       flex-wrap: wrap;
+       align-items: baseline;
+       justify-content: space-between;
+       font-size: 12px;
+       color: var(--text-color-low);
+       /* the redundant properties below work around a csstidy bug */
+       padding-left: calc((100% - 940px) / 2);
+       padding-right: calc((100% - 940px) / 2);
+}
+
+footer a {
+       color: var(--primary-color-low);
+}
+
+footer span {
+       margin-bottom: 1em;
+}
+
+footer ul.breadcrumb {
+       margin-left: auto;
 }
 
 #modal_overlay {
        position: fixed;
        top: 0;
        bottom: 0;
-       left: -10000px;
-       right: 10000px;
        background: rgba(0, 0, 0, 0.7);
        z-index: 900;
-       overflow-y: scroll;
-       -webkit-overflow-scrolling: touch;
+       overflow: scroll;
        transition: opacity .125s ease-in;
        opacity: 0;
        visibility: hidden;
@@ -1171,29 +1341,27 @@ footer {
 .modal {
        width: 90%;
        margin: 5em auto;
-       display: flex;
-       flex-wrap: wrap;
        min-height: 32px;
        max-width: 600px;
-       align-items: center;
        border-radius: 3px;
-       background: #fff;
-       box-shadow: 0 0 3px #444;
+       background: var(--background-color-high);
+       border: 1px solid var(--border-color-low);
+       box-shadow: 0 0 3px var(--background-color-low);
        padding: 1em 1em .5em 1em;
-       max-height: 2400px;
        min-width: 270px;
 }
 
 .modal > * {
-       flex-basis: 100%;
        line-height: normal;
        margin-bottom: .5em;
+       max-width: 100%;
 }
 
 .modal > pre,
 .modal > textarea {
        white-space: pre-wrap;
        overflow: auto;
+       width: 100%;
 }
 
 body.modal-overlay-active {
@@ -1208,26 +1376,6 @@ body.modal-overlay-active #modal_overlay {
        visibility: visible;
 }
 
-.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover,
-.cbi-tooltip.error, .cbi-tooltip.success, .cbi-tooltip.info {
-       color: #fff;
-}
-
 .btn .close, .alert-message .close {
        font-family: Arial, sans-serif;
        line-height: 18px;
@@ -1238,65 +1386,71 @@ body.modal-overlay-active #modal_overlay {
 .btn.error,
 .alert-message.error,
 .cbi-tooltip.error {
-       background: linear-gradient(to bottom, #ee5f5b, #c43c35) repeat-x;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+       background: linear-gradient(var(--error-color-low), var(--error-color-medium));
+       color: var(--on-error-color);
+       border-color: var(--error-color-high) var(--error-color-high) var(--error-color-low);
 }
 
 .btn.success, .alert-message.success, .cbi-tooltip.success {
-       background: linear-gradient(to bottom, #62c462, #57a957) repeat-x;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+       background: linear-gradient(var(--success-color-low), var(--success-color-medium));
+       color: var(--on-error-color);
+       border-color: var(--success-color-high) var(--success-color-high) var(--success-color-low);
 }
 
 .btn.info, .alert-message.info, .cbi-tooltip.info {
-       background: linear-gradient(to bottom, #5bc0de, #339bb9) repeat-x;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+       background: linear-gradient(var(--primary-color-low), var(--primary-color-medium));
+       color: var(--on-primary-color);
+       border-color: var(--primary-color-high) var(--primary-color-high) var(--primary-color-low);
 }
 
 .alert-message.notice, .cbi-tooltip.notice {
-       background: linear-gradient(to bottom, #efefef, #fefefe) repeat-x;
-       text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25);
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+       background: linear-gradient(var(--background-color-low), var(--background-color-medium));
+       border-color: var(--background-color-high) var(--background-color-high) var(--background-color-low);
+       color: var(--text-color-high);
+}
+
+.alert-message.warning {
+       background: linear-gradient(var(--warn-color-low), var(--warn-color-medium));
+       border-color: var(--warn-color-high) var(--warn-color-high) var(--warn-color-low);
+       color: var(--on-warn-color);
+}
+
+.modal.alert-message {
+       color: var(--text-color-high);
 }
 
 .item::after,
 .btn,
 .cbi-button {
+       --default-btn-background: linear-gradient(var(--background-color-high), var(--background-color-high) 25%, var(--background-color-low));
+       --on-color: var(--text-color-high);
+
        cursor: pointer;
        display: inline-block;
-       background: linear-gradient(#fff, #fff 25%, #e6e6e6) no-repeat;
-       padding: 5px 14px 6px;
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-       color: #333;
+       background: var(--default-btn-background);
+       padding: 0 14px;
+       color: var(--on-color);
        font-size: 13px;
-       line-height: normal;
-       border: 1px solid #ccc;
-       border-bottom-color: #bbb;
+       line-height: 2em;
+       border: 1px solid var(--border-color-high);
        border-radius: 4px;
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn:focus,
-.cbi-button:focus {
-       outline: 1px dotted #666;
+       white-space: pre;
 }
 
 .cbi-input-invalid,
-.cbi-input-invalid.cbi-dropdown,
+.cbi-input-invalid.cbi-dropdown:not(.btn):not(.cbi-button),
 .cbi-input-invalid.cbi-dropdown:not([open]) > ul > li,
 .cbi-value-error input {
-       color: #f00;
-       border-color: #f00;
+       color: var(--error-color-high);
+       border-color: var(--error-color-medium);
 }
 
 .cbi-button-positive,
 .cbi-button-fieldadd,
 .cbi-button-add,
 .cbi-button-save {
-       border-color: #4a4;
-       color: #4a4;
+       --on-color: var(--success-color-high);
+       border-color: var(--on-color);
 }
 
 .cbi-button-neutral,
@@ -1305,7 +1459,7 @@ body.modal-overlay-active #modal_overlay {
 .cbi-button-link,
 .cbi-button-up,
 .cbi-button-down {
-       color: #444;
+       color: var(--text-color-high);
 }
 
 .btn.primary,
@@ -1313,16 +1467,16 @@ body.modal-overlay-active #modal_overlay {
 .cbi-button-apply,
 .cbi-button-reload,
 .cbi-button-edit {
-       border-color: #0069d6;
-       color: #0069d6;
+       --on-color: var(--primary-color-high);
+       border-color: var(--on-color);
 }
 
 .cbi-button-negative,
 .cbi-section-remove .cbi-button,
 .cbi-button-reset,
 .cbi-button-remove {
-       border-color: #c44;
-       color: #c44;
+       --on-color: var(--error-color-high);
+       border-color: var(--on-color);
 }
 
 .cbi-page-actions::after {
@@ -1331,8 +1485,12 @@ body.modal-overlay-active #modal_overlay {
        clear: both;
 }
 
-.cbi-page-actions > :not([method="post"]):not(.cbi-button-apply):not(.cbi-button-save):not(.cbi-button-reset) {
-       float: left;
+.cbi-page-actions > * {
+       vertical-align: middle;
+}
+
+.cbi-page-actions > :not([method="post"]):not(.cbi-button-apply):not(.cbi-button-negative):not(.cbi-button-save):not(.cbi-button-reset) {
+       float: left;
        margin-right: .4em;
 }
 
@@ -1340,45 +1498,44 @@ body.modal-overlay-active #modal_overlay {
 .cbi-button-action.important,
 .cbi-page-actions .cbi-button-apply,
 .cbi-section-actions .cbi-button-edit {
-       color: #fff;
-       background: linear-gradient(to bottom, #0069d6, #0049d6) no-repeat;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+       --on-color: var(--on-primary-color);
+       background: linear-gradient(var(--primary-color-medium), var(--primary-color-low));
+       border-color: var(--primary-color-high);
 }
 
 .cbi-button-positive.important,
 .cbi-page-actions .cbi-button-save {
-       color: #fff;
-       background: linear-gradient(to bottom, #4a4, #484) no-repeat;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+       --on-color: var(--on-success-color);
+       background: linear-gradient(var(--success-color-medium), var(--success-color-low));
+       border-color: var(--success-color-high);
 }
 
 .cbi-button-negative.important {
-       color: #fff;
-       background: linear-gradient(to bottom, #c44, #c00) no-repeat;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+       --on-color: var(--on-error-color);
+       background: linear-gradient(var(--error-color-medium), var(--error-color-low));
+       border-color: var(--error-color-high);
 }
 
-.cbi-page-actions .cbi-button-apply + .cbi-button-save {
-       background: linear-gradient(#fff, #fff 25%, #e6e6e6);
-       text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.75);
-       color: #4a4;
+.cbi-page-actions .cbi-button-apply + .cbi-button-save,
+.cbi-page-actions .cbi-button-negative + .cbi-button-save {
+       --on-color: var(--success-color-high);
+       border-color: var(--on-color);
+       background: var(--default-btn-background);
 }
 
 .cbi-dropdown {
-       border: 1px solid #ccc;
-       border-radius: 3px;
-       display: inline-flex;
-       padding: 0;
+       display: inline-flex !important;
        cursor: pointer;
        height: auto;
-       background: linear-gradient(#fff 0%, #e9e8e6 100%);
        position: relative;
-       color: #404040;
+       padding: 0 !important;
 }
 
-.cbi-dynlist > .item:focus,
-.cbi-dropdown:focus {
-       outline: 2px solid #4b6e9b;
+.cbi-dropdown:not(.btn):not(.cbi-button) {
+       background: linear-gradient(var(--background-color-high) 0%, var(--border-color-low) 100%);
+       border: 1px solid var(--border-color-high);
+       border-radius: 3px;
+       color: var(--text-color-high);
 }
 
 .cbi-dropdown > ul {
@@ -1386,11 +1543,21 @@ body.modal-overlay-active #modal_overlay {
        padding: 0;
        list-style: none;
        overflow-x: hidden;
-       overflow-y: auto;
+       overflow-y: hidden;
        display: flex;
        width: 100%;
 }
 
+.cbi-dropdown.btn > ul:not(.dropdown),
+.cbi-dropdown.cbi-button > ul:not(.dropdown) {
+       margin: 0 0 0 13px !important;
+}
+
+.cbi-dropdown.btn.spinning > ul:not(.dropdown),
+.cbi-dropdown.cbi-button.spinning > ul:not(.dropdown) {
+       margin: 0 !important;
+}
+
 .cbi-dropdown > ul.preview {
        display: none;
 }
@@ -1404,21 +1571,24 @@ body.modal-overlay-active #modal_overlay {
        justify-content: center;
        text-align: center;
        line-height: 2em;
-       padding: 0 .25em;
+       padding: 0 .3em;
+}
+
+.cbi-dropdown.btn > .open,
+.cbi-dropdown.cbi-button > .open {
+       padding: 0 .5em;
+       margin-left: .5em;
+       border-left: 1px solid;
 }
 
 .cbi-dropdown > .more,
-.cbi-dropdown > ul > li[placeholder] {
-       color: #777;
-       font-weight: bold;
-       text-shadow: 1px 1px 0px #fff;
+.cbi-dropdown:not(.btn):not(.cbi-button) > ul > li[placeholder] {
+       color: var(--text-color-medium);
        display: none;
-       justify-content: center;
 }
 
 .cbi-dropdown > ul > li {
        display: none;
-       padding: .25em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
@@ -1426,15 +1596,21 @@ body.modal-overlay-active #modal_overlay {
        flex-grow: 1;
        align-items: center;
        align-self: center;
-       color: #404040;
+       color: inherit;
+}
+
+.cbi-dropdown > ul.dropdown > li,
+.cbi-dropdown:not(.btn):not(.cbi-button) > ul > li {
        min-height: 20px;
+       padding: .25em;
+       color: var(--text-color-high);
 }
 
 .cbi-dropdown > ul > li .hide-open { display: block; display: initial; }
 .cbi-dropdown > ul > li .hide-close { display: none; }
 
 .cbi-dropdown > ul > li[display]:not([display="0"]) {
-       border-left: 1px solid #ccc;
+       border-left: 1px solid var(--border-color-high);
 }
 
 .cbi-dropdown[empty] > ul {
@@ -1454,7 +1630,7 @@ body.modal-overlay-active #modal_overlay {
 }
 
 .cbi-dropdown > ul > li > form > input[type="checkbox"] {
-       margin: 0;
+       margin: 0 .25em 0 0;
 }
 
 .cbi-dropdown > ul > li input[type="text"] {
@@ -1467,7 +1643,7 @@ body.modal-overlay-active #modal_overlay {
 
 .cbi-dropdown[open] > ul.dropdown {
        display: block;
-       background: #f6f6f5;
+       background: var(--background-color-low);
        border: 1px solid #918e8c;
        box-shadow: 0 0 4px #918e8c;
        position: absolute;
@@ -1476,6 +1652,7 @@ body.modal-overlay-active #modal_overlay {
        min-width: 100%;
        width: auto;
        transition: max-height .125s ease-in;
+       overflow-y: auto;
 }
 
 .cbi-dropdown > ul > li[display],
@@ -1486,28 +1663,37 @@ body.modal-overlay-active #modal_overlay {
 .cbi-dropdown[multiple][more] > .more,
 .cbi-dropdown[multiple][empty] > .more {
        flex-grow: 1;
-       display: flex;
+       display: flex !important;
 }
 
 .cbi-dropdown[empty] > ul > li,
-.cbi-dropdown[optional][open] > ul.dropdown > li[placeholder],
+.cbi-dropdown[optional][open] > ul.dropdown > li[placeholder] {
+       display: block !important;
+}
+
 .cbi-dropdown[multiple][open] > ul.dropdown > li > form {
-       display: block;
+       display: flex !important;
 }
 
 .cbi-dropdown[open] > ul.dropdown > li .hide-open { display: none; }
 .cbi-dropdown[open] > ul.dropdown > li .hide-close { display: block; display: initial; }
 
 .cbi-dropdown[open] > ul.dropdown > li {
-       border-bottom: 1px solid #ccc;
+       border-bottom: 1px solid var(--border-color-high);
 }
 
 .cbi-dropdown[open] > ul.dropdown > li[selected] {
-       background: #b0d0f0;
+       background: var(--primary-color-medium);
+       color: var(--on-primary-color);
 }
 
 .cbi-dropdown[open] > ul.dropdown > li.focus {
-       background: linear-gradient(90deg, #a3c2e8 0%, #84aad9 100%);
+       background: var(--primary-color-low);
+       color: var(--on-primary-color);
+}
+
+.cbi-dropdown[open] > ul.dropdown > li[selected].focus {
+       background: linear-gradient(90deg, var(--primary-color-medium) 50%, var(--primary-color-low));
 }
 
 .cbi-dropdown[open] > ul.dropdown > li:last-child {
@@ -1523,16 +1709,12 @@ body.modal-overlay-active #modal_overlay {
        width: 100%;
 }
 
-.cbi-dropdown[disabled] {
-       pointer-events: none;
-       opacity: .6;
-}
-
 input[type="text"] + .cbi-button,
 input[type="password"] + .cbi-button,
-select + .cbi-button {
+select + .cbi-button,
+.cbi-select + .cbi-button {
        border-radius: 0 3px 3px 0;
-       border-color: #ccc;
+       border-color: var(--border-color-high);
        margin-left: -2px;
        padding: 0 6px;
        vertical-align: top;
@@ -1541,8 +1723,9 @@ select + .cbi-button {
        line-height: 28px;
 }
 
-select + .cbi-button {
-       border-left-color: transparent;
+select + .cbi-button,
+.cbi-select + .cbi-button {
+       position: relative;
 }
 
 .cbi-title-ref {
@@ -1560,10 +1743,10 @@ select + .cbi-button {
 .cbi-tooltip {
        position: absolute;
        z-index: 1000;
-       left: -1000px;
-       box-shadow: 0 0 2px #ccc;
+       left: -10000px;
+       box-shadow: 0 0 2px var(--border-color-high);
        border-radius: 3px;
-       background: #fff;
+       background: var(--background-color-high);
        white-space: pre;
        padding: 2px 5px;
        opacity: 0;
@@ -1577,30 +1760,27 @@ select + .cbi-button {
 }
 
 .cbi-progressbar {
-       border: 1px solid #ccc;
+       border: 1px solid var(--border-color-high);
        border-radius: 3px;
        position: relative;
        min-width: 170px;
-       height: 20px;
-       margin: 4px 0;
-       background: #f9f9f9;
+       height: 8px;
+       margin: 1.4em 0 4px 0;
+       background: var(--background-color-medium);
 }
 
 .cbi-progressbar > div {
-       background: #90c0e0;
+       background: var(--primary-color-medium);
        height: 100%;
        transition: width .25s ease-in;
        width: 0%;
+       border-radius: 3px;
 }
 
-.cbi-progressbar::after {
+.cbi-progressbar::before {
        position: absolute;
-       bottom: 0;
-       top: 0;
-       right: 0;
+       top: -1.4em;
        left: 0;
-       text-align: center;
-       text-shadow: 0 0 2px #fff;
        content: attr(title);
        white-space: pre;
        overflow: hidden;
@@ -1618,6 +1798,8 @@ select + .cbi-button {
 
 .zonebadge .cbi-tooltip > * {
        margin: 1px;
+       z-index: 2;
+       position: relative;
 }
 
 .zone-forwards {
@@ -1642,20 +1824,13 @@ select + .cbi-button {
 }
 
 .btn.active, .btn:active {
-       box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn.disabled {
-       cursor: default;
-       background-image: none;
-       opacity: 0.65;
-       box-shadow: none;
+       box-shadow: inset 0 2px 4px hsla(var(--border-color-low-hsl), .25), 0 1px 2px rgba(0, 0, 0, 0.05);
 }
 
+.btn.disabled,
 .btn[disabled] {
        cursor: default;
-       background-image: none;
-       opacity: 0.65;
+       opacity: var(--disabled-opacity);
        box-shadow: none;
 }
 
@@ -1694,60 +1869,55 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
 
 .alert-message {
        position: relative;
-       padding: 7px 15px;
-       margin-bottom: 18px;
-       color: #404040;
-       background: linear-gradient(to bottom, #fceec1, #eedc94) repeat-x;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-       text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-       border-width: 1px;
-       border-style: solid;
+       padding: .5em .5em .25em .5em;
+       margin-bottom: .5em;
+       color: var(--on-warn-color);
+       background: linear-gradient(#fceec1, #eedc94);
+       border: 1px solid var(--border-color-low);
+       border-color: var(--border-color-high) var(--border-color-high) var(--border-color-low);
        border-radius: 4px;
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+       box-shadow: 1px 1px 1px var(--border-color-low);
+       white-space: unset;
 }
 
 .alert-message .close {
        margin-top: 1px;
-       *margin-top: 0;
-}
-
-.alert-message a {
-       font-weight: bold;
-       color: #404040;
-}
-
-.alert-message.danger p a,
-.alert-message.error p a,
-.alert-message.success p a,
-.alert-message.info p a {
-       color: #fff;
-}
-
-.alert-message h5 {
-       line-height: 18px;
 }
 
+.alert-message h4,
+.alert-message h5,
+.alert-message pre,
+.alert-message ul,
+.alert-message li,
 .alert-message p {
-       margin-bottom: 0;
+       color: inherit;
+       border: none;
+       line-height: inherit;
+       background: transparent;
+       padding: 0;
+       margin: .25em 0;
 }
 
-.alert-message div {
-       margin-top: 5px;
-       margin-bottom: 2px;
-       line-height: 28px;
+.alert-message button {
+       margin: .25em 0;
 }
 
-.label {
-       padding: 1px 3px 2px;
+.label,
+header [data-indicator] {
+       padding: 3px 3px 2px;
        font-size: 9.75px;
        font-weight: bold;
-       color: #fff !important;
+       color: var(--text-color-high);
        text-transform: uppercase;
        white-space: nowrap;
-       background-color: #bfbfbf;
+       background-color: var(--background-color-low);
        border-radius: 3px;
        text-shadow: none;
+       margin: .125em 0 .125em .4em;
+}
+
+header [data-indicator][data-clickable] {
+       cursor: pointer;
 }
 
 a.label:link,
@@ -1760,40 +1930,42 @@ a.label:hover {
 }
 
 .label.important {
-       background-color: #c43c35;
+       background-color: var(--primary-color-high);
+       color: var(--on-primary-color);
 }
 
 .label.warning {
-       background-color: #f89406;
+       background-color: var(--warn-color-high);
+       color: var(--on-warn-color);
 }
 
 .label.success {
-       background-color: #46a546;
+       background-color: var(--success-color-high);
+       color: var(--on-success-color);
 }
 
-.label.notice {
-       background-color: #62cffc;
+.label.notice,
+header [data-indicator][data-style="active"] {
+       color: var(--on-primary-color);
+       background-color: var(--primary-color-high);
 }
 
 /* LuCI specific items */
 .hidden { display: none }
 
-#xhr_poll_status {
-         cursor: pointer;
-}
-
 form.inline { display: inline; margin-bottom: 0; }
 
-header .pull-right { padding-top: 8px; }
-
 #modemenu li:last-child span.divider { display: none }
 
-#syslog {  width: 100%; }
+#syslog {
+       width: 100%;
+       color: var(--text-color-highest);
+}
 
 .cbi-section-table .tr:hover .td,
 .cbi-section-table .tr:hover .th,
 .cbi-section-table .tr:hover::before {
-       background-color: #f5f5f5;
+       background-color: var(--background-color-low);
 }
 
 .cbi-section-table .tr.cbi-section-table-descr .th {
@@ -1814,7 +1986,7 @@ header .pull-right { padding-top: 8px; }
 .cbi-section-table-titles.named::before,
 .cbi-section-table-descr.named::before,
 .cbi-section-table-row[data-title]::before {
-       border-top: 1px solid #ddd;
+       border-top: 1px solid var(--border-color-medium);
 }
 
 .left { text-align: left !important; }
@@ -1824,14 +1996,6 @@ header .pull-right { padding-top: 8px; }
 .middle { vertical-align: middle !important; }
 .bottom { vertical-align: bottom !important; }
 
-.cbi-value-field { line-height: 1.5em; }
-
-.cbi-value-field input[type=checkbox],
-.cbi-value-field input[type=radio] {
-       margin-top: 8px;
-       margin-right: 6px;
-}
-
 table table td,
 .cbi-value-field table td {
        border: none;
@@ -1840,8 +2004,10 @@ table table td,
 .table.cbi-section-table input[type="password"],
 .table.cbi-section-table input[type="text"],
 .table.cbi-section-table textarea,
-.table.cbi-section-table select {
+.table.cbi-section-table select,
+.table.cbi-section-table .cbi-select {
        width: 100%;
+       min-width: auto;
 }
 
 .table.cbi-section-table .td.cbi-section-table-cell {
@@ -1849,7 +2015,8 @@ table table td,
        text-align: right;
 }
 
-.table.cbi-section-table .td.cbi-section-table-cell select {
+.table.cbi-section-table .td.cbi-section-table-cell select,
+.table.cbi-section-table .td.cbi-section-table-cell .cbi-select {
        width: inherit;
 }
 
@@ -1880,15 +2047,29 @@ table table td,
 .cbi-rowstyle-2,
 .tr.table-titles,
 .tr.cbi-section-table-titles {
-       background: #f9f9f9;
+       background: var(--background-color-medium);
 }
 
 .cbi-value-description {
-       background-image: url(/luci-static/resources/cbi/help.gif);
-       background-position: .25em .2em;
-       background-repeat: no-repeat;
-       margin: .25em 0 0 0;
-       padding: 0 0 0 1.7em;
+       margin: .25em 0 0 1.25em;
+       position: relative;
+}
+
+.cbi-value-description:not(:empty)::before {
+       --help-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><path d='M10 0A10 10 0 000 10a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0010 0zm1 17H9v-2h2v2zm2.1-7.7l-.9.9c-.8.7-1.2 1.3-1.2 2.8H9v-.5c0-1.1.4-2.1 1.2-2.8l1.2-1.3c.4-.3.6-.8.6-1.4a2 2 0 00-2-2 2 2 0 00-2 2H6a4 4 0 014-4 4 4 0 014 4c0 .9-.4 1.7-.9 2.3z'/></svg>");
+
+       position: absolute;
+       left: -1.25em;
+       content: "\a0";
+       display: inline-block;
+       width: 1em;
+       height: 1em;
+       margin-right: .25em;
+       background: var(--primary-color-high);
+       mask-image: var(--help-icon);
+       mask-size: cover;
+       -webkit-mask-image: var(--help-icon);
+       -webkit-mask-size: cover;
 }
 
 .cbi-section-error {
@@ -1907,15 +2088,13 @@ table table td,
 }
 
 .ifacebox {
-       background-color: #fff;
-       border: 1px solid #ccc;
+       border: 1px solid var(--border-color-high);
        margin: 0 10px;
        text-align: center;
        white-space: nowrap;
-       background-image: linear-gradient(#fff, #fff 25%, #f9f9f9);
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+       background: linear-gradient(var(--background-color-high), var(--background-color-medium));
        border-radius: 4px;
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+       box-shadow: inset 0 1px 0 hsla(var(--text-color-low-hsl), 0.05);
        display: inline-flex;
        flex-direction: column;
        line-height: 1.2em;
@@ -1923,13 +2102,25 @@ table table td,
 }
 
 .ifacebox .ifacebox-head {
-       border-bottom: 1px solid #ccc;
+       border-bottom: 1px solid var(--border-color-high);
+       border-radius: 4px 4px 0 0;
        padding: 2px;
        background: #eee;
+       color: var(--text-color-high);
+}
+
+.ifacebox .ifacebox-head[style] {
+       text-shadow: 0 1px 1px hsla(var(--background-color-high-hsl), 0.75);
 }
 
 .ifacebox .ifacebox-head.active {
-       background: #90c0e0;
+       background: var(--primary-color-high);
+       color: var(--on-primary-color);
+}
+
+[data-darkmode="true"] .zonebadge[style],
+[data-darkmode="true"] .ifacebox-head[style] {
+       background: linear-gradient(rgba(var(--zone-color-rgb), .4), rgba(var(--zone-color-rgb), .3)) !important;
 }
 
 .ifacebox .ifacebox-body {
@@ -1940,13 +2131,13 @@ table table td,
        display: inline-block;
        flex-direction: row;
        white-space: nowrap;
-       background-color: #fff;
-       border: 1px solid #ccc;
+       border: 1px solid var(--border-color-high);
        padding: 2px;
-       background-image: linear-gradient(#fff, #fff 25%, #f9f9f9);
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+       background: linear-gradient(var(--background-color-high), var(--background-color-high) 25%, var(--background-color-medium));
+       color: var(--text-color-high);
+       text-shadow: 0 1px 1px hsla(var(--background-color-high-hsl), 0.75);
        border-radius: 4px;
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+       box-shadow: inset 0 1px 0 hsla(var(--background-color-high-hsl), 0.05);
        cursor: default;
        line-height: 1.2em;
 }
@@ -1989,9 +2180,9 @@ table table td,
 }
 
 .network-status-table .ifacebox-body > div {
+       margin: -.125em;
        display: flex;
        flex-wrap: wrap;
-       margin: -.125em;
 }
 
 #dsl_status_table .ifacebox-body span > strong {
@@ -2001,13 +2192,22 @@ table table td,
 
 .ifacebadge.large,
 .network-status-table .ifacebox-body .ifacebadge {
-       display: inline-flex;
+       display: flex;
        flex: 1;
        padding: .25em;
        min-width: 220px;
        margin: .125em;
 }
 
+.ifacebadge.large {
+       display: inline-flex;
+}
+
+.network-status-table .ifacebox-body .ifacebadge > span {
+       overflow: hidden;
+       text-overflow: ellipsis;
+}
+
 .ifacebadge > *,
 .ifacebadge.large > * {
        margin: 0 .125em;
@@ -2018,8 +2218,8 @@ table table td,
        border-radius: 4px;
        display: inline-block;
        white-space: nowrap;
-       color: #666;
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+       color: var(--text-color-high);
+       text-shadow: 0 1px 1px hsla(var(--background-color-high-hsl), 0.75);
 }
 
 .zonebadge > em,
@@ -2049,139 +2249,107 @@ div.cbi-value var,
        color: #0069d6;
 }
 
-.uci-change-list {
-       line-height: 170%;
-       white-space: pre;
+div.cbi-value var[data-tooltip],
+.td.cbi-value-field var[data-tooltip],
+div.cbi-value var.cbi-tooltip-container,
+.td.cbi-value-field var.cbi-tooltip-container {
+       cursor: help;
+       border-bottom: 1px dotted #0069d6;
 }
 
-.uci-change-list del,
-.uci-change-list ins,
-.uci-change-list var,
-.uci-change-legend-label del,
-.uci-change-legend-label ins,
-.uci-change-legend-label var {
-       text-decoration: none;
-       font-family: monospace;
+div.cbi-value var.cbi-tooltip-container,
+.td.cbi-value-field var.cbi-tooltip-container .cbi-tooltip {
        font-style: normal;
-       border: 1px solid #ccc;
-       background: #eee;
-       padding: 2px;
-       display: block;
-       line-height: 15px;
-       margin-bottom: 1px;
+       white-space: normal;
+       color: var(--text-color-high);
 }
 
-.uci-change-list ins,
-.uci-change-legend-label ins {
-       border-color: #0f0;
-       background: #cfc;
+#modal_overlay > .modal.uci-dialog,
+#modal_overlay > .modal.cbi-modal {
+       max-width: 900px;
 }
 
-.uci-change-list del,
-.uci-change-legend-label del {
-       border-color: #f00;
-       background: #fcc;
+#modal_overlay > .modal.login > button.important {
+       font-size: 120% !important;
+       margin-top: .5em;
+       width: 100%;
 }
 
-.uci-change-list var,
-.uci-change-legend-label var {
-       border-color: #ccc;
-       background: #eee;
+.uci-change-list {
+       line-height: 170%;
+       white-space: pre;
 }
 
-.uci-change-list var ins,
-.uci-change-list var del {
-       display: inline-block;
-       border: none;
-       width: 100%;
-       padding: 0;
+.uci-change-dialog div > del,
+.uci-change-dialog div > ins,
+.uci-change-dialog div > var {
+       margin-bottom: 2px;
+       border: 1px solid hsla(var(--border-color-high-hsl), .6);
+       line-height: 15px;
+       overflow: hidden;
+       text-overflow: ellipsis;
+       padding: 2px;
+       position: relative;
+       background-color: hsla(var(--background-color-low-hsl), .3);
 }
 
-.uci-change-legend {
-       padding: 5px;
+.uci-change-dialog div > ins {
+       background-color: rgba(var(--success-color-high-rgb), .3);
+       border-color: rgba(var(--success-color-high-rgb), .6);
 }
 
-.uci-change-legend-label {
-       width: 150px;
-       float: left;
+.uci-change-dialog div > del {
+       background-color: rgba(var(--error-color-high-rgb), .3);
+       border-color: rgba(var(--error-color-high-rgb), .6);
 }
 
-.uci-change-legend-label > ins,
-.uci-change-legend-label > del,
-.uci-change-legend-label > var {
-       float: left;
-       margin-right: 4px;
-       width: 10px;
-       height: 10px;
-       display: block;
-       position: relative;
-}
-
-.uci-change-legend-label var ins,
-.uci-change-legend-label var del {
-       border: none;
-       position: absolute;
-       top: 2px;
-       left: 2px;
-       right: 2px;
-       bottom: 2px;
+.uci-change-dialog var > ins {
+       background-color: rgba(var(--success-color-high-rgb), .3);
 }
 
-#modal_overlay {
-       position: fixed;
-       top: 0;
-       bottom: 0;
-       left: -10000px;
-       right: 10000px;
-       background: rgba(0, 0, 0, 0.7);
-       z-index: 900;
-       overflow-y: scroll;
-       -webkit-overflow-scrolling: touch;
-       transition: opacity .125s ease-in;
-       opacity: 0;
+.uci-change-dialog var > del {
+       background-color: rgba(var(--error-color-high-rgb), .3);
 }
 
-#modal_overlay > .modal {
-       width: 90%;
-       margin: 5em auto;
-       display: flex;
-       flex-wrap: wrap;
-       min-height: 32px;
-       max-width: 600px;
-       align-items: center;
-       border-radius: 3px;
-       background: #fff;
-       box-shadow: 0 0 3px #444;
-       padding: 1em 1em .5em 1em;
-       max-height: 2400px;
-       min-width: 270px;
+.uci-change-list > var > * {
+       overflow: hidden;
+       text-overflow: ellipsis;
 }
 
-#modal_overlay .modal > * {
-       flex-basis: 100%;
-       line-height: normal;
-       margin-bottom: .5em;
+.uci-change-dialog del,
+.uci-change-dialog ins,
+.uci-change-dialog var {
+       text-decoration: none;
+       font-family: monospace;
+       font-style: normal;
+       color: var(--text-color-high);
+       display: block;
 }
 
-#modal_overlay .modal > pre,
-#modal_overlay .modal > textarea {
-       white-space: pre-wrap;
-       overflow: auto;
+.uci-change-legend {
+       display: flex;
+       flex-wrap: wrap;
 }
 
-body.modal-overlay-active {
-       overflow: hidden;
-       height: 100vh;
+.uci-change-legend-label {
+       flex-basis: 150px;
+       margin: 2px;
+       display: flex;
+       align-items: center;
 }
 
-body.modal-overlay-active #modal_overlay {
-       left: 0;
-       right: 0;
-       opacity: 1;
+.uci-change-legend-label > ins,
+.uci-change-legend-label > del,
+.uci-change-legend-label > var {
+       margin-right: 4px;
+       width: 16px;
+       height: 16px;
+       display: flex;
 }
 
-html body.apply-overlay-active {
-       height: calc(100vh - 63px);
+.uci-change-legend-label > * > * {
+       flex-basis: 100%;
+       padding: 1px;
 }
 
 #applyreboot-section {
@@ -2202,20 +2370,32 @@ html body.apply-overlay-active {
        animation: flash .35s;
 }
 
+#view > div.spinning:first-child {
+       display: table;
+       margin: 15vh auto;
+}
+
 .spinning {
        position: relative;
        padding-left: 32px !important;
 }
 
 .spinning::before {
+       --spinner-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' stroke='%23000' stroke-width='3' fill='none'><circle cx='10' cy='10' r='8' stroke-opacity='.5'/><path d='M10 2c4 0 8 4 8 8'><animateTransform attributeName='transform' type='rotate' dur='1s' from='0 10 10' to='360 10 10' repeatCount='indefinite'/></path></svg>");
+
        position: absolute;
-       top: 0;
-       left: 0;
-       bottom: 0;
-       width: 32px;
+       top: calc(50% - 10px);
+       left: 6px;
+       width: 20px;
+       height: 20px;
        content: " ";
-       background: url(../resources/icons/loading.gif) no-repeat center;
-       background-size: 16px;
+       background: var(--on-color, #000);
+       mask: var(--spinner-icon) center/cover no-repeat;
+       -webkit-mask: var(--spinner-icon) center/cover no-repeat;
+}
+
+[data-darkmode="true"] .spinning::before {
+       background: var(--on-color, #fff);
 }
 
 [data-tab-title] {
@@ -2230,3 +2410,135 @@ html body.apply-overlay-active {
        overflow: visible;
        transition: opacity .25s ease-in;
 }
+
+.cbi-filebrowser {
+       min-width: 210px;
+       max-width: 100%;
+       border: 1px solid #ccc;
+       border-radius: 3px;
+       display: flex;
+       flex-direction: column;
+       opacity: 0;
+       height: 0;
+       overflow: hidden;
+}
+
+.cbi-filebrowser.open {
+       opacity: 1;
+       height: auto;
+       overflow: visible;
+       transition: opacity .25s ease-in;
+}
+
+.cbi-filebrowser > * {
+       max-width: 100%;
+       overflow: hidden;
+       text-overflow: ellipsis;
+       padding: 0 0 .25em 0;
+       margin: .25em .25em 0px .25em;
+       white-space: nowrap;
+       border-bottom: 1px solid #ccc;
+}
+
+.cbi-filebrowser .cbi-button-positive {
+       margin-right: .25em;
+}
+
+.cbi-filebrowser > div {
+       border-bottom: none;
+}
+
+.cbi-filebrowser > ul > li {
+       display: flex;
+       flex-direction: row;
+}
+
+.cbi-filebrowser > ul > li:hover {
+       background: #f5f5f5;
+}
+
+.cbi-filebrowser > ul > li > div:first-child {
+       flex: 10;
+       overflow: hidden;
+       text-overflow: ellipsis;
+}
+
+.cbi-filebrowser > ul > li > div:last-child {
+       flex: 3;
+       text-align: right;
+}
+
+.cbi-filebrowser > ul > li > div:last-child > button {
+       padding: .125em .25em;
+       margin: 1px 0 1px .25em;
+}
+
+.cbi-filebrowser .upload {
+       display: flex;
+       flex-direction: row;
+       flex-wrap: wrap;
+       margin: 0 -.125em .25em -.125em;
+       padding: 0 0 .125em 0px;
+       border-bottom: 1px solid #ccc;
+}
+
+.cbi-filebrowser .upload > * {
+       margin: .125em;
+       flex: 1;
+}
+
+.cbi-filebrowser .upload > .btn {
+       flex-basis: 60px;
+}
+
+.cbi-filebrowser .upload > div {
+       flex: 10;
+       min-width: 150px;
+}
+
+.cbi-filebrowser .upload > div > input {
+       width: 100%;
+}
+
+@keyframes fade-in {
+       0% { opacity: 0; }
+       100% { opacity: 1; }
+}
+
+@keyframes fade-out {
+       0% { opacity: 1; }
+       100% { opacity: 0; }
+}
+
+.fade-in {
+       animation: fade-in .4s ease;
+}
+
+.fade-out {
+       animation: fade-out .4s ease;
+}
+
+.assoclist .ifacebadge {
+       display: flex;
+       flex-direction: column;
+       align-items: center;
+       white-space: normal;
+       text-align: center;
+}
+
+.assoclist .ifacebadge > img {
+       margin: .2em;
+}
+
+.assoclist .td:nth-of-type(3),
+.assoclist .td:nth-of-type(5) {
+       width: 25%;
+}
+
+.assoclist .td:nth-of-type(6) button {
+       word-break: normal;
+}
+
+[data-darkmode="true"] [data-page="admin-statistics-graphs"] [data-plugin] img {
+       filter: invert(100%) hue-rotate(150deg);
+}