body {
  background: #1e1e1e;
  color: #cccccc;
}

.login-page .login-container .login-form {
  background-color: #1e1e1e;
}

.login-page .login-container .login-form .brand {
  color: #adb5bd;
}

.login-page .login-container .login-form .form-login .input-group::before {
  color: #adb5bd;
}

.login-page .login-container .login-form .form-login .input-group .border {
  border-bottom: 1px var(--dark-primary) solid;
}

.login-page .login-container .login-form .form-login .input-group input {
  background-color: transparent !important;
  color: #adb5bd;
  border-bottom: #adb5bd 1px solid !important;
  border-radius: 0;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none;
}

.login-page .login-container .login-form .form-login .input-group input:focus {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

.login-page .login-container .login-form .form-login .cbi-button-apply {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
}

.login-page .login-container .login-form .form-login .cbi-button-apply:hover,
.login-page .login-container .login-form .form-login .cbi-button-apply:focus {
  opacity: .9;
}

.login-page .login-container footer,
.login-page .login-container footer a {
  color: #adb5bd;
}

header::after {
  background-color: #1e1e1e !important;
}

.main .main-left {
  background-color: #333333 !important;
  box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.15);
}

.main .main-left .sidenav-header .brand {
  color: #ccc;
}

.main .main-left .nav .slide .slide-menu .active a {
  color: #fff !important;
}

.main .main-left .nav .slide .slide-menu li a {
  color: #cccccc;
}

.main .main-left .nav .slide .slide-menu li a::after {
  background-color: var(--dark-primary) !important;
  box-shadow: 0 0 1px #000  !important;
}

.main .main-left .nav .slide .slide-menu li a:hover {
  background: none !important;
}

.main .main-left .nav .slide .menu:hover,
.main .main-left .nav .slide .menu.active {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
  color: #fff !important;
  box-shadow: 0 0 1px #000 !important;
}

.main .main-left .nav .slide .menu[data-title=Status]:before {
  color: var(--dark-primary) !important;
}

.main .main-left .nav .slide .menu[data-title=Control]:before {
  color: var(--dark-primary) !important;
}

.main .main-left .nav li a {
  color: #cccccc !important;
}

.main .main-left .nav li a:hover {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
  color: #fff !important;
}

.main .main-left::-webkit-scrollbar-thumb {
  background-color: #252526 !important;
}

.main .main-right {
  background-color: #1e1e1e;
}

h2 {
  color: #ccc;
  background: #333333;
}

h3 {
  color: #ccc;
  border-bottom: 0;
  background: #333333;
}

a:link,
a:visited,
a:active {
  color: var(--dark_webkit-any-link);
}

a:-webkit-any-link:not(li a, .main-left a, .brand, .pull-right a, .alert-message a, .login-container footer a, .cbi-button) {
  color: var(--dark_webkit-any-link) !important;
  text-shadow: 1px 1px 2px #000 !important;
}

input:-webkit-autofill {
  background-color: #3c3c3c !important;
}

input[type="checkbox"]:checked {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
}

.cbi-input-radio:checked {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
}

.cbi-value-field .cbi-input-apply,
.cbi-button-apply,
.cbi-button-edit {
  color: #fff !important;
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
  border-color: #483d8b !important;
  border-color: var(--dark-primary) !important;
}

.cbi-section em {
  color: var(--dark_webkit-any-link);
  text-shadow: 1px 1px 2px #000;
}

header.bg-primary {
  background-color: #1e1e1e !important;
}

.cbi-map-descr {
  color: #ccc;
}

.cbi-section {
  background: none;
  box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35);
}

.panel-title {
  color: #ccc;
  background-color: #333333;
  border-bottom: 0px;
}

table>tbody>tr>td,
table>tfoot>tr>td,
table>thead>tr>td {
  color: #ccc;
}

fieldset>table>tbody>tr:nth-of-type(2n) {
  background-color: #252526;
}

table>tbody>tr>td,
table>tfoot>tr>td,
table>thead>tr>td {
  border-top: 1px solid #252526;
}

#swaptotal>div>div,
#swapfree>div>div,
#memfree>div>div,
#membuff>div>div,
#conns>div>div,
#memtotal>div>div {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
}

#swaptotal>div>div>div>small,
#swapfree>div>div>div>small,
#memfree>div>div>div>small,
#membuff>div>div>div>small,
#conns>div>div>div>small,
#memtotal>div>div>div>small {
  color: #ccc !important;
  text-shadow: 1px 1px 2px #000 !important;
}

.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last {
  line-height: 1.8em;
}

.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last div[style="margin:3px 0; width:300px; height:10px; border:1px solid #000000; background-color:#80C080"] {
  border: 1px solid #999999 !important;
  background-color: transparent !important;
}

.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last div[style="margin:3px 0; width:300px; height:10px; border:1px solid #000000; background-color:#80C080"] div {
  background-color: #32325d !important;
  background-color: var(--dark-primary) !important;
}

table>tbody>tr>th,
table>tfoot>tr>th,
table>thead>tr>th {
  background-color: #252526;
  border-top: none;
  border-bottom: black 1px solid !important;
}

.cbi-rowstyle-2 {
  background-color: #2c2c2c !important;
}

.cbi-rowstyle-1 {
  background-color: #252526;
}

.cbi-section>h3:first-child,
.panel-title {
  color: #ccc;
  border-bottom: 0;
}

.cbi-section-table .cbi-section-table-titles .cbi-section-table-cell {
  background-color: #1e1e1f;
}

.cbi-button {
  color: #ccc;
  background-color: #2c2c2c;
}

.cbi-rowstyle-2 .cbi-button-up,
.cbi-rowstyle-2 .cbi-button-down {
  background-color: #252526 !important;
}

.cbi-section-node {
  background: none;
  border-radius: 0 0 .375rem .375rem;
  padding: 0rem;
}

abbr {
  color: #8898aa;
}

div>table>tbody>tr:nth-of-type(2n),
div>.table>.tbody>.tr:nth-of-type(2n) {
  background-color: #252526;
}

/* file selector button */
::file-selector-button {
  border: 1px solid darkseagreen !important;
  background-color: darkseagreen !important;
}

/* Fix background color of table-titles */
.cbi-section-node>.cbi-section-table>tbody>.cbi-section-table-titles th {
  background-color: #1e1e1e;
  border: none !important;
}

/* Fix background color of table-descr */
.cbi-section-node>.cbi-section-table>tbody>.cbi-section-table-descr th {
  background-color: #333333;
  border: none !important;
}

/* Fix background color not change when the H tag is in the table rowstyle-1 */
.cbi-section-node>.cbi-section-table>tbody>.cbi-rowstyle-1 th {
  background-color: #252526;
  border-top: 1px solid #252526;
  border-bottom: none !important;
}

/* Fix background color not change when the H tag is in the table rowstyle-2 */
.cbi-section-node>.cbi-section-table>tbody>.cbi-rowstyle-2 th {
  background-color: #2c2c2c;
  border-top: 1px solid #252526;
  border-bottom: none !important;
}

/* Change the color of the H label in the table to make it more visible */
th h1, td h1,
th h2, td h2,
th h3, td h3,
th h4, td h4,
th h5, td h5,
th h6, td h6 {
  background: var(--gray-dark);
}

/* Improved the background color of each itemes in "UNSAVED CHANGES" (dark mode only) */
.uci-change-list del,
.uci-change-legend-label del {
  background-color: #fb74008c;
}
.uci-change-list var,
.uci-change-legend-label var {
  background-color: #333333;
}
.uci-change-list ins,
.uci-change-legend-label ins {
  background-color: #00ff0a45 !important;
}

#content_syslog {
  box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35);
}

#syslog {
  color: #ccc;
  background-color: #1e1e1e;
}

#iwsvg,
#iwsvg2,
#bwsvg {
  overflow: hidden;
  box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35);
  background-color: #1e1e1e !important;
}

.tabs {
  background-color: #252526;
}

.tabs>li:hover,
.tabs>li[class~="active"],
.cbi-tabmenu>li:hover,
.cbi-tabmenu>li[class~="cbi-tab"] {
  border-bottom: .18751rem solid var(--dark-primary);
  background-color: #3c3c3c;
}

.tabs>li>a,
.cbi-tabmenu>li>a {
  color: #ccc !important;
}

.cbi-tabmenu>li>a:hover,
.cbi-tabmenu>li:hover>a,
.cbi-tabmenu>.cbi-tab>a,
.tabs>li>a:hover,
.tabs>li:hover>a,
.tabs>li[class~="active"]>a {
  color: #fff !important;
}

.cbi-tabmenu>li {
  background: #2d2d2d;
}

.cbi-tabmenu {
  border-bottom: 0 solid #ddd !important;
}

.cbi-tab-descr {
  color: #ccc;
}

.cbi-tabcontainer>.cbi-value:nth-of-type(2n),
.cbi-tabcontainer>.cbi-value:nth-of-type(2n)>textarea {
  background-color: #252526;
}

.cbi-value-title {
  color: #ccc;
}

select,
input {
  color: #ccc;
  background-color: transparent;
  border: 1px solid #3c3c3c !important;
  box-shadow: 0 3px 2px rgba(0,0,0,0.05);
}

select:not([multiple="multiple"]):hover,
input:hover,
input:focus {
  border-color: #483d8b !important;
  border-color: var(--dark-primary) !important;
  background-color: transparent;
  outline: 0;
  box-shadow: none;
}

select {
  background-color: #1e1e1e !important;
}

#cbi-dropbear h2,
#cbi-dropbear .cbi-map-descr,
#cbi-dropbear .cbi-map-descr abbr,
#cbi-rc h2,
#cbi-rc .cbi-map-descr,
#cbi-distfeedconf h2,
#cbi-distfeedconf .cbi-map-descr,
#cbi-customfeedconf h2,
#cbi-customfeedconf .cbi-map-descr,
#cbi-download h2,
#cbi-filelist h2 {
  color: #ccc !important;
}

.cbi-value-field>ul>li .ifacebadge {
  background-color: #3c3c3c;
}

.cbi-section-descr {
  color: #ccc;
}

/*textarea for dark mode*/
textarea {
  border: 1px solid #3c3c3c !important;
  background-color: #1e1e1e;
  color: #ccc;
}

.cbi-section-remove:nth-of-type(2n),
.cbi-section-node:nth-of-type(2n) {
  background-color: #1e1e1e;
}

.node-system-packages>.main table tr td:nth-last-child(1) {
  color: #ccc;
}

.node-system-packages>.main .cbi-value>pre {
  background-color: #333;
}

.cbi-section-node .cbi-value {
  padding: 1rem 1rem .3rem 1rem;
}

.ifacebox {
  background-color: #1e1e1e;
  border: 1px solid #1e1e1e;
}

.ifacebox-head {
  color: #666;
}

.ifacebox-body {
  background-color: #333;
}

.zonebadge strong {
  color: #333;
}

.zonebadge>.ifacebadge {
  background-color: #3c3c3c;
}

/* Fix firewall zone: "unspecified -or- create: " background color (dark mode only) */
div[onclick$="._fwzone_new').checked=true"] {
  border: 1px solid #3c3c3c;
  background-color: transparent !important;
}

/* Improve the background color of "Any zone" and "Device" when ADD/EDIT Rules in Firewall > Traffic Rules (dark mode only) */
label[for$=".src_any"],
label[for$=".dest_empty"],
label[for$=".dest_any"] {
  background-color: #2888db !important;
}

/* Fix/add background color of wireless signal strength badge for dark mode */
td>.ifacebadge,
.td>.ifacebadge {
  background-color: #3c3c3c;
}

/* Improved loading process gif color (dark mode only) */
img[src="/luci-static/resources/icons/loading.gif"] {
  filter: invert(1);
}

div.cbi-value var,
td.cbi-value-field var,
.td.cbi-value-field var {
  color: #483d8b;
  color: var(--dark_webkit-any-link);
  text-shadow: 1px 1px 2px #000;
}

#diag-rc-output>pre {
  color: #ccc;
  background-color: #1e1e1e;
}

.node-services-vssr .block {
  background-color: #1e1e1e !important;
  box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35) !important;
}

.node-services-vssr .block h4 {
  color: #ccc !important;
}

.node-services-vssr .status-bar {
  color: #ccc;
  background: #333333f0;
  box-shadow: #00000094 10px 10px 30px 5px;
}

.node-services-vssr .cbi-section-table-row {
  color: #ccc;
  background-color: #3c3c3c !important;
  box-shadow: 0 0 5px 0 rgba(0,0,0,0.35);
}

.node-services-vssr .cbi-section-table-row.fast {
  background: #483d8b !important;
  background: var(--dark-primary) !important;
  color: #fff;
}

.node-services-vssr .ssr-button {
  color: #ccc;
}

.node-services-vssr .incon:nth-child(2) {
  border-right: #1e1e1e 1px solid;
}

.main .main-right #maincontent .container p {
  color: #ccc;
}

#xhr_poll_status>.label.success {
  color: #ccc !important;
  background-color: darkolivegreen !important;
}

/* Define the warning background-color breathe display animation (dark mode) */
@keyframes warning-background-color-breathe-dark {
  0%{
    color: #fff;
    background-color: darkorange;
  }
  50%{
    color: #ccc;
    background-color: #333333;
  }
  100%{
    color: #fff;
    background-color: darkorange;
  }
}
.warning,
.warning * {
  animation: warning-background-color-breathe-dark 1.5s ease-in-out infinite !important;
}

.notice {
  background-color: #483d8b !important;
  background-color: var(--dark-primary) !important;
}

/* Improved the aleart-message background color during device restart (dark mode only) */
.errorbox,
.alert-message {
  background-color: #333333;
}

.cbi-input-find,
.cbi-input-save,
.cbi-button-add,
.cbi-button-save,
.cbi-button-find,
.cbi-input-reload,
.cbi-button-reload {
  background-color: darkseagreen !important;
  border-color: darkseagreen !important;
}

.cbi-button-reset,
.cbi-input-remove {
  color: #fff !important;
  background-color: darkorange !important;
  border-color: darkorange !important;
}

.cbi-page-actions .cbi-button-apply,
.cbi-section-actions .cbi-button-edit,
.cbi-button-edit.important,
.cbi-button-apply.important,
.cbi-button-reload.important,
.cbi-button-action.important {
  border: 1px #483d8b solid !important;
  border: 1px var(--dark-primary) solid !important;
}

fieldset[id^="cbi-apply-"] {
  background-color: #333333;
}

#detail-bubble>div {
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 5px;
  background: #252525;
}

/* Define the error text border breathe display animation (dark mode) */
@keyframes error-border-breathe-dark {
  0%{
    border-color: darkorange;
  }
  50%{
    border-color: transparent;
  }
  100%{
    border-color: darkorange;
  }
}

/* Add border for error text box, and border breathe display animation to make it more noticeable (dark mode) */
.cbi-section-error>ul>li {
  color: darkorange;
  border: 2px solid darkorange ;
  animation: error-border-breathe-dark 1.5s ease-in-out infinite;
}

.cbi-input-invalid,
.cbi-value-error input {
  color: darkorange;
  border: 1px dashed darkorange !important;
}

.node-services-vssr .block h4 span {
  color: #ccc !important;
}

/* luci-app-passwall */
#cbi-passwall #add_link_div,
#cbi-passwall #set_node_div {
  background: #333333f0 !important;
  box-shadow: #00000094 10px 10px 30px 5px !important;
}

/* luci-app-bypass */
#cbi-bypass .status-bar {
  color: #ccc;
  background: #333333f0;
  box-shadow: #00000094 10px 10px 30px 5px;
}

/* luci-app-clash */
#cbi-clash .cbi-section .pure-u-1-4 .pure-g,
#cbi-clash .cbi-section .siz .pure-g {
  background-color: #1e1e1e !important;
  box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35) !important;
}

/* luci-app-openclash */
#cbi-openclash #eye-icon,
#cbi-openclash img[title="刷新"] {
  filter: invert(100%);
}
#cbi-openclash #cbi-openclash-config fieldset[control-id="ControlID-46"],
#cbi-openclash .CodeMirror-merge-copybuttons-right,
.CodeMirror-scroll {
  background-color: #333333 !important;
}
#cbi-openclash .cbi-section .cbi-tabmenu li {
  border-right: 1px solid #3c3c3c !important;
}
#cbi-openclash .CodeMirror-merge {
  border: 1px solid transparent !important;
}
#cbi-openclash-config-clog .cbi-section {
  border: 1px solid #3c3c3c !important;
}
#cbi-openclash .CodeMirror-gutters {
  border-right: 1px solid #3c3c3c !important;
  background-color: #1e1e1e !important;
}

/* luci-app-dockerman */
#cbi-dockerd .img-con img {
  filter: invert(0.4);
}

/* luci-app-istorex (interface config[NetworkPort]) */
#cbi-nfs-mount  .app-container_status-label_bg {
  background: #333333;
}
#cbi-nfs-mount td svg {
  filter: invert(0.3);
}
#actioner .actioner-dns {
  background-color: #333333;
}
#actioner .actioner-dns_header,
#actioner .actioner-container_header {
  border-bottom: 1px solid #cbcbcb !important;
}
#actioner .actioner-dns_footer {
  border-top: 1px solid #cbcbcb !important;
}

/* luci-app-istorex (Network Guide) */
#app #main #page .title,
#app #main #page .desc {
  color: #cccccc;
  background-color: #333333;
}
#app #main #page .network-message li:not(span):not(a) {
  color: #8d8d8d;
}
#app #main #page code {
  background-color: #333333;
}

/* luci-app-istorex (Quick Start) */
#app #main #page .network-container_flow-container,
#app #main #page .app-container_status-container,
#app #main #page .nas-container .nas-container_card .app-container,
#app #main #page .app-container {
  background-color: #333333;
}
#app #main #page .flow-data span,
#app #main #page .app-container_status-label_block span,
#app #main #page .app-container .item-label span:not(#app #main #page .app-container .progress-value span) {
  color: #cccccc;
}
#app #main #page .app-container_status-info span,
#app #main #page .app-container_status-info span,
#app #main #page .app-container_title span {
  color: #dddddd;
}
.app-container_body .app-container_status-label_bg {
  background-color: #282828 !important;
}
#app #main #page .item-label_value .progress {
  background-color: rgb(118, 118, 118);
}
#app #main #page .app-container_nas-menu button[class=""] {
  background-color: #8b8b8b;
}
#app #main #page .app-container_nas-menu button[class="on"] {
  background-color: #555555;
}
#app #main #page .app-container_title .DeviceBlock ul {
  background-color: #cccccc;
}
#actioner div.action,
#actioner div.actioner-container {
  background-color: #3c3c3c;
}
#actioner div.action .title {
  color: #cccccc;
}
#actioner div.action .desc {
  color: #cbcbcb;
}
#actioner div.action div.roots span,
#actioner div.action div.move span:not(span.tip),
#actioner div.action div.left span,
#actioner div.action div.input_row span,
#actioner div.label-item label span {
  color: #cbcbcb;
}
#actioner div.action span.tooltip-trigger svg path {
  fill: #cbcbcb;
}
#actioner div.actioner-dns_body div.label-item_value select {
  height: 43px;
}
#actioner div.actioner-container_footer div.close {
  color: #ffffff;
}
#app #main div.app-container div.app-container_title span a svg path,
#app #main #page span.disk_infoicon svg g {
  fill: #8b8b8b;
}

@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
  .login-page .login-container .login-form {
    -webkit-backdrop-filter: blur(var(--blur-radius-dark));
    backdrop-filter: blur(var(--blur-radius-dark));
    background-color: rgba(0, 0, 0, var(--blur-opacity-dark));
  }
}

@media screen and (max-width:480px) {
  .node-status-iptables>.main div>.cbi-map>form {
    background-color: #1e1e1e;
    box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35);
  }
}