/* Public auth + /client brand colors — replaces orange (#ff9f43) */
body.theme-brand {
    --brand-ink: #14213a;
    --brand-accent: #3778b1;
    --brand-accent-hover: #2d6699;
    --brand-accent-soft: #e8f1f8;
    --brand-accent-rgb: 55, 120, 177;
    --brand-success-bg: #e8f1f8;
    --brand-success-text: #2d6699;
    --brand-success-border: rgba(55, 120, 177, 0.28);
    --brand-pending-bg: #eef3f8;
    --brand-pending-text: #14213a;
}

body.theme-brand ::selection {
    background: var(--brand-accent);
    color: #fff;
}

body.theme-brand a {
    color: var(--brand-accent);
}

body.theme-brand a:hover {
    color: var(--brand-accent-hover);
}

/* Sidebar link colors come from client-shell.css */
body.theme-brand #sidebar a,
body.theme-brand #sidebar a:hover {
    color: inherit;
}

body.theme-brand h1,
body.theme-brand .h1,
body.theme-brand h2,
body.theme-brand .h2,
body.theme-brand h3,
body.theme-brand .h3,
body.theme-brand h4,
body.theme-brand .h4,
body.theme-brand h5,
body.theme-brand .h5,
body.theme-brand h6,
body.theme-brand .h6 {
    color: var(--brand-ink);
}

/* Buttons */
body.theme-brand .btn-primary,
body.theme-brand .btn-login,
body.theme-brand .btn-submit,
body.theme-brand .btn-save,
body.theme-brand .btn-send,
body.theme-brand .btn-checks.active,
body.theme-brand .page-header .btn-added,
body.theme-brand .btn-added,
body.theme-brand .btn-filters,
body.theme-brand .btn-filter {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
}

body.theme-brand .btn-primary:hover,
body.theme-brand .btn-primary:focus,
body.theme-brand .btn-primary:active,
body.theme-brand .btn-login:hover,
body.theme-brand .btn-submit:hover,
body.theme-brand .btn-save:hover,
body.theme-brand .btn-send:hover,
body.theme-brand .page-header .btn-added:hover,
body.theme-brand .btn-added:hover,
body.theme-brand .btn-filters:hover,
body.theme-brand .input-blocks .btn-filters:hover,
body.theme-brand .btn-filter:hover {
    background-color: var(--brand-accent-hover) !important;
    border-color: var(--brand-accent-hover) !important;
    color: #fff !important;
    background-image: none !important;
}

body.theme-brand .login-wrapper .login-content .form-login .btn-login:hover {
    box-shadow: 0 50px #fff inset !important;
    color: var(--brand-accent) !important;
    background-color: #fff !important;
    border-color: var(--brand-accent) !important;
}

body.theme-brand .btn-outline-primary,
body.theme-brand .btn-ghost-primary {
    color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
}

body.theme-brand .btn-outline-primary:hover,
body.theme-brand .btn-outline-primary.active,
body.theme-brand .btn-check:checked + .btn-outline-primary {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #fff !important;
}

body.theme-brand .btn-success,
body.theme-brand .btn.btn-success {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #fff !important;
    box-shadow: none !important;
}

body.theme-brand .btn-success:hover,
body.theme-brand .btn-success:focus,
body.theme-brand .btn-success:active,
body.theme-brand .btn.btn-success:hover {
    background-color: var(--brand-accent-hover) !important;
    border-color: var(--brand-accent-hover) !important;
    color: #fff !important;
}

body.theme-brand .btn-soft-primary,
body.theme-brand .btn-primary-light {
    background-color: var(--brand-accent-soft) !important;
    color: var(--brand-accent) !important;
    border-color: transparent !important;
}

body.theme-brand .btn-soft-primary:hover,
body.theme-brand .btn-primary-light:hover {
    background-color: rgba(var(--brand-accent-rgb), 0.2) !important;
    color: var(--brand-accent-hover) !important;
    border-color: var(--brand-accent) !important;
}

/* Backgrounds / badges / borders */
body.theme-brand .bg-primary {
    background-color: var(--brand-accent) !important;
}

body.theme-brand .bg-soft-primary,
body.theme-brand .bg-primary-transparent {
    background-color: var(--brand-accent-soft) !important;
    color: var(--brand-accent) !important;
}

body.theme-brand .text-primary {
    color: var(--brand-accent) !important;
}

body.theme-brand .border-primary {
    border-color: var(--brand-accent) !important;
}

body.theme-brand .badge.badge-primary,
body.theme-brand .badge-primary {
    background: var(--brand-accent) !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* Success badges — soft brand blue instead of bright green */
body.theme-brand .badge.bg-success,
body.theme-brand .badge.badge-success,
body.theme-brand .badge-success,
body.theme-brand .badge.badge-soft-success,
body.theme-brand .badge-soft-success {
    background: var(--brand-success-bg) !important;
    color: var(--brand-success-text) !important;
    border: 1px solid var(--brand-success-border) !important;
    box-shadow: none !important;
}

body.theme-brand .badge.bg-success a,
body.theme-brand .badge.badge-success a,
body.theme-brand .badge-success a {
    color: inherit !important;
    text-decoration: none;
}

body.theme-brand .badge.badge-lg.badge-success,
body.theme-brand .badge-lg.bg-success {
    background: var(--brand-success-bg) !important;
    color: var(--brand-success-text) !important;
    border: 1px solid var(--brand-success-border) !important;
}

body.theme-brand .bg-success {
    background-color: var(--brand-accent) !important;
    color: #fff !important;
}

body.theme-brand .badge.bg-success,
body.theme-brand span.badge.bg-success {
    background-color: var(--brand-success-bg) !important;
    color: var(--brand-success-text) !important;
}

body.theme-brand .progress-bar.bg-success {
    background-color: var(--brand-accent) !important;
}

body.theme-brand .text-success {
    color: var(--brand-accent) !important;
}

body.theme-brand .text-warning {
    color: var(--brand-accent-hover) !important;
}

body.theme-brand .bg-warning,
body.theme-brand .badge.bg-warning {
    background-color: var(--brand-pending-bg) !important;
    color: var(--brand-pending-text) !important;
}

body.theme-brand .bg-info,
body.theme-brand .badge.bg-info {
    background-color: rgba(var(--brand-accent-rgb), 0.14) !important;
    color: var(--brand-accent-hover) !important;
}

body.theme-brand .badge.badge-danger,
body.theme-brand .badge-danger,
body.theme-brand .bg-danger {
    box-shadow: none !important;
}

body.theme-brand .page-item.active .page-link,
body.theme-brand .pagination .page-item.active .page-link {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #fff !important;
}

body.theme-brand .dropdown-item.active,
body.theme-brand .dropdown-item:active {
    background-color: var(--brand-accent) !important;
}

body.theme-brand .dropdown-item:not(.active):focus,
body.theme-brand .dropdown-item:not(.active):active {
    color: var(--brand-accent);
    background-color: rgba(var(--brand-accent-rgb), 0.05);
}

body.theme-brand .svg-primary {
    fill: var(--brand-accent);
}

/* Sidebar colors are owned by client-shell.css (dark navy panel).
   Do not set light soft backgrounds here — they hide white nav text. */

body.theme-brand .header .user-menu .nav-item a:hover,
body.theme-brand .header .user-menu .nav-link:hover {
    color: var(--brand-accent);
}

body.theme-brand .whirly-loader {
    border-color: var(--brand-accent) transparent transparent transparent;
}

body.theme-brand .form-check-input:checked {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
}

body.theme-brand .form-control:focus,
body.theme-brand .form-select:focus,
body.theme-brand .select2-container--default.select2-container--focus .select2-selection--single,
body.theme-brand .select2-container--default .select2-selection--single:focus {
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-accent-rgb), 0.2) !important;
}

body.theme-brand .checkboxs input:checked ~ .checkmarks {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
}

body.theme-brand .forgot-link,
body.theme-brand .hover-a,
body.theme-brand .signinform a {
    color: var(--brand-accent) !important;
}

body.theme-brand .forgot-link:hover,
body.theme-brand .hover-a:hover,
body.theme-brand .signinform a:hover {
    color: var(--brand-accent-hover) !important;
}

/* Auth pages — keep login card width consistent (matches apply / register layout) */
body.theme-brand.account-page .login-wrapper.login-new .login-content.user-login form {
    width: 510px;
    max-width: 100%;
}

body.theme-brand.account-page .login-wrapper.login-new .login-content.user-login .login-userset {
    width: 100%;
}

/* Select2 / Swal accents where possible */
body.theme-brand .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-accent) !important;
}

body.theme-brand .swal2-styled.swal2-confirm {
    background-color: var(--brand-accent) !important;
}

body.theme-brand .language-switcher .lang-flag.active .lang-code {
    color: var(--brand-accent);
}

/* Catch remaining orange leftovers from DreamPOS (soft fills / rgba) */
body.theme-brand .bg-soft-primary,
body.theme-brand .btn-soft-primary,
body.theme-brand .btn.btn-primary-light {
    background-color: var(--brand-accent-soft) !important;
    color: var(--brand-accent) !important;
}

body.theme-brand .swal2-loader {
    border-color: var(--brand-accent) transparent var(--brand-accent) transparent !important;
}

body.theme-brand .swal2-icon.swal2-success .swal2-success-ring,
body.theme-brand .swal2-icon.swal2-success [class^=swal2-success-line] {
    border-color: var(--brand-accent) !important;
    background-color: var(--brand-accent) !important;
}

body.theme-brand .page-header .page-title h4,
body.theme-brand .page-header .page-title h3 {
    color: var(--brand-ink) !important;
}

body.theme-brand .table thead th {
    color: var(--brand-ink) !important;
}

body.theme-brand .nav-tabs .nav-link.active {
    color: var(--brand-accent) !important;
    border-color: var(--brand-accent) var(--brand-accent) #fff !important;
}

body.theme-brand .form-check-input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-accent-rgb), 0.2);
}

body.theme-brand .customizer-links,
body.theme-brand #setdata {
    display: none !important;
}

/* Force primary hover shadows away from orange rgba */
body.theme-brand .btn.btn-primary,
body.theme-brand .btn-outline-primary.active,
body.theme-brand .btn-soft-primary:hover {
    box-shadow: 0 6px 16px rgba(var(--brand-accent-rgb), 0.28) !important;
}

body.theme-brand .badge.badge-warning,
body.theme-brand .badge-warning {
    background: var(--brand-pending-bg) !important;
    color: var(--brand-pending-text) !important;
    border: 1px solid rgba(20, 33, 58, 0.08) !important;
    box-shadow: none !important;
}
