/* «Деталь в деталь» поверх скина Elastic: цвета сайта. Акцент #c9431d, тёмный #1d232b. */
#layout-menu, html.dark-mode #layout-menu { background-color: #1d232b; }
#taskmenu a, #taskmenu .special-buttons a { color: #c9ced6; }
#taskmenu a:hover { color: #fff; background-color: #2a323c; }
#taskmenu a.selected { background-color: #c9431d; color: #fff; }
#taskmenu a.compose, #taskmenu a.compose:hover { color: #ff8a5c; }
#taskmenu a.logout { color: #ff6b5b; }
/* «О программе» убрано по просьбе владельца */
#taskmenu a.about, a.about, .menu a.about, #about-dialog { display: none !important; }

a, a:visited, .link, .ui-widget-content a { color: #b33a17; }
html.dark-mode a, html.dark-mode .link { color: #f07a52; }

.btn-primary, .btn.btn-primary, button.btn-primary, .formbuttons .btn-primary, #rcmloginsubmit {
  background-color: #c9431d !important; border-color: #c9431d !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus, #rcmloginsubmit:hover { background-color: #a9361a !important; border-color: #a9361a !important; }
.btn-primary:focus { box-shadow: 0 0 0 .2rem rgba(201, 67, 29, .35) !important; }

input.form-control:focus, select.form-control:focus, textarea.form-control:focus, .custom-select:focus,
.input-group input:focus { border-color: #c9431d !important; box-shadow: 0 0 0 .2rem rgba(201, 67, 29, .2) !important; }
input[type=checkbox].form-check-input:checked, .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #c9431d; border-color: #c9431d; }

/* выбранные строки и папки */
.listing li.selected > a, .listing li.selected, table.listing tr.selected td, .records-table tr.selected td,
.listing li.selected > div, .treelist li.selected > a { background-color: #fbe6de !important; color: #1d232b !important; }
html.dark-mode .listing li.selected > a, html.dark-mode .listing li.selected, html.dark-mode table.listing tr.selected td,
html.dark-mode .records-table tr.selected td { background-color: #4a2418 !important; color: #fff !important; }
.listing li.mailbox a .unreadcount, .unreadcount { background: #c9431d !important; color: #fff !important; }
table.messagelist tr.unread td.subject span.subject a { color: #1d232b; }
.header .header-title, .boxtitle { color: #1d232b; }
html.dark-mode .header .header-title { color: #fff; }
.toolbar a.button:hover, .toolbar .button:hover { color: #c9431d; }

/* вход: фон «карбон», как на сайте, карточка */
body.task-login { background: #f6f7f9 url("bg.jpg") center / cover no-repeat fixed; }
body.task-login #layout-content { background: transparent; }
body.task-login #login-form { background: #fff; padding: 28px 30px 22px; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
body.task-login #logo { max-width: 260px; max-height: 64px; margin-bottom: 12px; }
html.dark-mode body.task-login #login-form { background: #1b1f25; }
/* пустая область справа — наш значок: nginx отдаёт plugins/detal_theme/watermark.html вместо skins/elastic/watermark.html */
#layout-menu #logo { max-height: 44px; }

/* Кружки оформления (как на сайте) */
.detal-themes { display: flex; gap: 8px; justify-content: center; padding: 8px 0; }
.detal-themes.on-login { position: fixed; top: 14px; right: 16px; z-index: 10; }
.detal-round { width: 36px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: rgba(0,0,0,.15); cursor: pointer; }
.on-login .detal-round { border-color: rgba(0,0,0,.25); background: rgba(255,255,255,.75); }
.detal-round span { width: 18px; height: 18px; border-radius: 50%; display: block; transition: transform .45s cubic-bezier(.5,-0.3,.4,1.4); }
.detal-mode span { background: linear-gradient(135deg, #f5f5f5 0 50%, #1a1a1a 50% 100%); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
html.dark-mode .detal-mode span { transform: rotate(180deg); }
.detal-brandbtn span { background: linear-gradient(135deg, #ffd200 0 50%, #a8e04a 50% 100%); box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
html.detal-lime .detal-brandbtn span { transform: rotate(180deg); }
html:not(.detal-brand) .detal-brandbtn span { filter: saturate(.35); opacity: .75; }
#taskmenu a.theme { display: none !important; }  /* штатный «Тёмный режим» заменён кружком */

/* «Визитка»: жёлтая / салатовая — меню цвета визитки с чёрным текстом, кнопки чёрные */
html.detal-yellow { --detal-brand: #ffd200; --detal-soft: #fff4b8; }
html.detal-lime { --detal-brand: #a8e04a; --detal-soft: #e6f6cc; }
html.detal-brand #layout-menu { background-color: var(--detal-brand) !important; }
html.detal-brand #taskmenu a, html.detal-brand #taskmenu .special-buttons a { color: #151515 !important; }
html.detal-brand #taskmenu a:hover { background-color: rgba(0,0,0,.08) !important; }
html.detal-brand #taskmenu a.selected { background-color: #151515 !important; color: #fff !important; }
html.detal-brand #taskmenu a.logout { color: #b3261e !important; }
html.detal-brand .detal-round { border-color: rgba(0,0,0,.35); background: rgba(255,255,255,.35); }
html.detal-brand .btn-primary, html.detal-brand #rcmloginsubmit, html.detal-brand .floating-action-buttons a.button {
  background-color: #151515 !important; border-color: #151515 !important; color: #fff !important; }
html.detal-brand:not(.dark-mode) .listing li.selected > a, html.detal-brand:not(.dark-mode) .listing li.selected,
html.detal-brand:not(.dark-mode) table.listing tr.selected td, html.detal-brand:not(.dark-mode) .records-table tr.selected td {
  background-color: var(--detal-soft) !important; }
html.detal-brand .unreadcount { background: #151515 !important; }
html.detal-brand body.task-login { background: var(--detal-brand) !important; }
html.detal-brand.dark-mode .btn-primary, html.detal-brand.dark-mode .floating-action-buttons a.button {
  background-color: var(--detal-brand) !important; border-color: var(--detal-brand) !important; color: #151515 !important; }

.detal-themes.in-menu { flex-direction: column; align-items: center; gap: 6px; margin-top: auto; padding: 10px 0; }
html.dark-mode body.task-login { background-image: url("bg-dark.jpg"); background-color: #121519; }
html.dark-mode body.task-login #logo { content: url("logo-dark.svg"); }
html.dark-mode .on-login .detal-round { background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.3); }
