/* Triumf brand palette: indigo #4635c4 -> light blue #9ec5ff */
:root { --triumf: #4635c4; --triumf-dark: #35289a; --triumf-light: #9ec5ff; }

/* login page */
body.task-login { background: linear-gradient(135deg, #f3f1ff 0%, #e6f0ff 100%); }
#login-form { background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(70,53,196,.12); padding: 2rem 2rem 1rem; }
#login-form #logo { max-width: 160px; max-height: 80px; margin-bottom: 1rem; }
.triumf-hint { color: #6b6b80; font-size: .85rem; text-align: center; margin: .75rem 0 0; }

/* primary buttons */
.btn-primary, .btn.btn-primary, #rcmloginsubmit {
  background-color: var(--triumf) !important; border-color: var(--triumf) !important;
}
.btn-primary:hover, .btn-primary:focus, #rcmloginsubmit:hover {
  background-color: var(--triumf-dark) !important; border-color: var(--triumf-dark) !important;
}

/* links & accents */
a, .listing li.selected > a, .menu a.selected { color: var(--triumf); }
.listing li.selected, .listing tr.selected td, .records-table tr.selected td {
  background-color: #ece9ff !important; color: #1f1a4d !important;
}
.listing li.selected > a, .listing tr.selected td a { color: #1f1a4d !important; }
#layout-menu .menu a.selected, #layout-menu .menu a:hover { color: var(--triumf-light) !important; }
#layout-menu { background: linear-gradient(180deg, #2b2470 0%, #1f1a4d 100%); }
#layout-menu .popover-header, #layout-menu #logo { background: transparent; }
.unread .subject a, .unread .subject span { color: var(--triumf-dark); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::before,
.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--triumf) !important; border-color: var(--triumf) !important;
}
.badge-primary, .unread-count, .count { background-color: var(--triumf) !important; }
input:focus, textarea:focus, select:focus, .form-control:focus {
  border-color: var(--triumf-light) !important; box-shadow: 0 0 0 .2rem rgba(70,53,196,.2) !important;
}

/* dark mode (Elastic adds html.dark-mode) */
html.dark-mode body.task-login { background: linear-gradient(135deg, #15132b 0%, #0f1a2b 100%); }
html.dark-mode #login-form { background: #1e2230; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
html.dark-mode .triumf-hint { color: #a9a9c0; }
html.dark-mode a, html.dark-mode .menu a.selected { color: var(--triumf-light); }
html.dark-mode .listing li.selected, html.dark-mode .listing tr.selected td,
html.dark-mode .records-table tr.selected td { background-color: #2d2866 !important; color: #fff !important; }
html.dark-mode .listing li.selected > a, html.dark-mode .listing tr.selected td a { color: #fff !important; }
html.dark-mode .unread .subject a, html.dark-mode .unread .subject span { color: var(--triumf-light); }
