/* Dark theme — color overrides only (active when html[data-theme="dark"]) */

html[data-theme="dark"] body {
    background-color: #2b2b2b;
    color: #ffffff;
}

html[data-theme="dark"] a:link,
html[data-theme="dark"] a:visited {
    color: #6b9cff;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:active {
    color: #295EFF;
}

html[data-theme="dark"] header,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
    color: #ffffff;
}

html[data-theme="dark"] div#login {
    background-color: #3a3a3a;
    border-top-color: #555555;
}

html[data-theme="dark"] nav#navmain {
    border-right-color: #555555;
}

html[data-theme="dark"] nav#navmain > h2,
html[data-theme="dark"] nav#navmain > div > h2,
html[data-theme="dark"] nav#navmain > div > h3 {
    color: #e8e8e8;
}

html[data-theme="dark"] .breadcrumbs {
    color: #b0b0b0;
}

html[data-theme="dark"] .breadcrumbs a:link,
html[data-theme="dark"] .breadcrumbs a:visited {
    color: #6b9cff;
}

html[data-theme="dark"] .breadcrumbs a:hover,
html[data-theme="dark"] .breadcrumbs a:active {
    color: #295EFF;
}

html[data-theme="dark"] div.message {
    color: #ffffff;
    box-shadow: 1px 1px 3px #111111;
}

html[data-theme="dark"] div.message > a:link,
html[data-theme="dark"] div.message > a:visited {
    color: #6b9cff;
}

html[data-theme="dark"] div.message > a:hover,
html[data-theme="dark"] div.message > a:active {
    color: #295EFF;
}

html[data-theme="dark"] div.error,
html[data-theme="dark"] div.warning,
html[data-theme="dark"] div.success,
html[data-theme="dark"] div.list-item,
html[data-theme="dark"] div.list-item.package,
html[data-theme="dark"] div.list-item.specialsection,
html[data-theme="dark"] ul#notes > li,
html[data-theme="dark"] form > fieldset > ul > li > input[type=submit],
html[data-theme="dark"] form > fieldset > ul > li > input[type=button],
html[data-theme="dark"] ul.pagination li {
    filter: none;
    background-image: none;
}

html[data-theme="dark"] div.error {
    background-color: #6b3a3a;
}

html[data-theme="dark"] div.warning {
    background-color: #6b6530;
    color: #ffffff;
}

html[data-theme="dark"] div.success {
    background-color: #3a6b3a;
}

html[data-theme="dark"] div.list-item {
    background-color: #454545;
}

html[data-theme="dark"] div.list-item.package {
    background-color: #4a4e66;
}

html[data-theme="dark"] div.list-item.specialsection {
    background-color: #456650;
}

html[data-theme="dark"] form > fieldset > ul li > label.error,
html[data-theme="dark"] form > fieldset > ul li label.error {
    color: #ff8888;
}

html[data-theme="dark"] form > fieldset > ul li > input[type=text].error,
html[data-theme="dark"] form > fieldset > ul li > input[type=password].error,
html[data-theme="dark"] form > fieldset > ul li > textarea.error {
    background-color: #4a3030;
}

html[data-theme="dark"] form > fieldset > ul li > input[type=checkbox].error {
    border-color: #ff6666;
}

html[data-theme="dark"] form > fieldset > ul > li > input[type=submit],
html[data-theme="dark"] form > fieldset > ul > li > input[type=button] {
    background-color: #555555;
    border-color: #777777;
    color: #ffffff;
}

html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=file],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: #3a3a3a;
    color: #ffffff;
    border-color: #666666;
}

html[data-theme="dark"] li.role:nth-child(even) {
    background-color: #353535;
}

html[data-theme="dark"] ul.actions li:nth-child(odd) {
    background-color: #333333;
}

html[data-theme="dark"] ul.actions li:nth-child(even) {
    background-color: #3a3a3a;
}

html[data-theme="dark"] ul#notes > li {
    background-color: #4a4838;
}

html[data-theme="dark"] ul#notes > li:first-child {
    background: none;
}

html[data-theme="dark"] ul#notes .default {
    color: #b0b0b0;
}

html[data-theme="dark"] ul#notes > li > p[contenteditable=true]:focus,
html[data-theme="dark"] ul#notes > li > h3[contenteditable=true]:focus {
    background-color: #3a3a3a;
}

html[data-theme="dark"] table {
    border-color: #666666;
}

html[data-theme="dark"] table caption {
    color: #cccccc;
}

html[data-theme="dark"] table tr {
    border-color: #555555;
    background-color: #333333;
}

html[data-theme="dark"] table tr:nth-child(even) {
    background-color: #2f2f2f;
}

html[data-theme="dark"] table tr th,
html[data-theme="dark"] table tr td {
    border-color: #555555;
    color: #ffffff;
}

html[data-theme="dark"] table tr th {
    background-color: #404040;
}

html[data-theme="dark"] table tr td.error {
    color: #ff8888;
}

html[data-theme="dark"] ul.pagination li {
    background-color: #404040;
    border-color: #666666;
}

html[data-theme="dark"] ul.pagination li a:link,
html[data-theme="dark"] ul.pagination li a:visited {
    color: #6b9cff;
}

html[data-theme="dark"] ul.pagination li a:hover,
html[data-theme="dark"] ul.pagination li a:active {
    color: #295EFF;
}

html[data-theme="dark"] ul.icons > li > a:link,
html[data-theme="dark"] ul.icons > li > a:visited {
    color: #e0e0e0;
}

html[data-theme="dark"] ul.icons > li > a:hover,
html[data-theme="dark"] ul.icons > li > a:active {
    color: #ffffff;
}

html[data-theme="dark"] .image-browse {
    background-color: #3a3a3a;
    border-top-color: #222222;
    border-left-color: #222222;
    border-bottom-color: #555555;
    border-right-color: #555555;
}

html[data-theme="dark"] ul.job_tree > li.border {
    border-color: #666666;
    background-color: #454545;
}

html[data-theme="dark"] ul.job_tree > li > ul > li {
    border-color: #666666;
    background-color: #3a3a3a;
}

html[data-theme="dark"] span.money {
    color: #7dcea0;
}

html[data-theme="dark"] .ui-autocomplete-loading {
    background-color: #3a3a3a;
}

/* jQuery UI — override theme gradients (background shorthand, not just background-color) */
html[data-theme="dark"] .ui-widget-content {
    background: #3a3a3a;
    color: #ffffff;
    border-color: #666666;
}

html[data-theme="dark"] .ui-widget-content a {
    color: #6b9cff;
}

html[data-theme="dark"] .ui-widget-header {
    background: #454545;
    color: #ffffff;
    border-color: #666666;
}

html[data-theme="dark"] .ui-widget-header a {
    color: #6b9cff;
}

html[data-theme="dark"] .ui-state-default,
html[data-theme="dark"] .ui-widget-content .ui-state-default,
html[data-theme="dark"] .ui-widget-header .ui-state-default {
    background: #4a4a4a;
    color: #ffffff;
    border-color: #666666;
}

html[data-theme="dark"] .ui-state-default a,
html[data-theme="dark"] .ui-state-default a:link,
html[data-theme="dark"] .ui-state-default a:visited {
    color: #6b9cff;
}

html[data-theme="dark"] .ui-state-hover,
html[data-theme="dark"] .ui-widget-content .ui-state-hover,
html[data-theme="dark"] .ui-widget-header .ui-state-hover,
html[data-theme="dark"] .ui-state-focus,
html[data-theme="dark"] .ui-widget-content .ui-state-focus,
html[data-theme="dark"] .ui-widget-header .ui-state-focus {
    background: #555555;
    color: #ffffff;
    border-color: #777777;
}

html[data-theme="dark"] .ui-state-active,
html[data-theme="dark"] .ui-widget-content .ui-state-active,
html[data-theme="dark"] .ui-widget-header .ui-state-active {
    background: #505050;
    color: #ffffff;
    border-color: #777777;
}

html[data-theme="dark"] .ui-accordion.ui-widget {
    background: transparent;
    border: none;
}

html[data-theme="dark"] .ui-accordion .ui-accordion-header {
    background: #454545;
    color: #ffffff;
    border-color: #666666;
}

html[data-theme="dark"] .ui-accordion .ui-accordion-header.ui-state-active {
    background: #505050;
    border-bottom-color: #666666;
}

html[data-theme="dark"] .ui-accordion .ui-accordion-header a {
    color: #e8e8e8;
    text-decoration: none;
}

html[data-theme="dark"] .ui-accordion .ui-accordion-header.ui-state-hover a,
html[data-theme="dark"] .ui-accordion .ui-accordion-header.ui-state-active a {
    color: #ffffff;
}

html[data-theme="dark"] .ui-accordion .ui-accordion-content {
    background: #353535;
    color: #ffffff;
    border-color: #666666;
}

html[data-theme="dark"] h3.ui-accordion-header {
    color: #ffffff;
}

html[data-theme="dark"] .long-search .ui-accordion-content .form,
html[data-theme="dark"] .accordion-fit .form {
    background: transparent;
}

html[data-theme="dark"] .ui-state-default .ui-icon,
html[data-theme="dark"] .ui-state-active .ui-icon,
html[data-theme="dark"] .ui-state-hover .ui-icon,
html[data-theme="dark"] .ui-state-focus .ui-icon {
    filter: brightness(0) invert(0.85);
}

html[data-theme="dark"] .ui-dialog .ui-dialog-titlebar-close {
    filter: invert(1);
}
