/* Workspace branding — every accent follows --brand (set per workspace in sections/brand-head.tpl).
   Loaded after custom.css / dark-mode.css. Semantic colours (success / danger / warning) are kept. */

/* top bar + sidebar */
html body .navbar.navbar-fixed-top.white-bg, html body .navbar-fixed-top.white-bg { border-bottom:3px solid var(--brand) !important; }
html body .navbar-minimalize, html body .navbar-minimalize.btn-primary { background:var(--brand) !important; border-color:var(--brand) !important; color:var(--brand-ink) !important; }

/* buttons */
html body .btn-primary, html body .btn-primary:focus { background:var(--brand) !important; background-color:var(--brand) !important; border-color:var(--brand) !important; color:var(--brand-ink) !important; background-image:none !important; }
html body .btn-primary:hover, html body .btn-primary:active, html body .btn-primary.active, html body .open > .dropdown-toggle.btn-primary {
  background:var(--brand-d) !important; background-color:var(--brand-d) !important; border-color:var(--brand-d) !important; color:var(--brand-ink) !important; }
html body .btn-default, html body .btn-white { background:#fff !important; color:#2a3a45 !important; border:1px solid #cfd8dd !important; }
html body .btn-default:hover, html body .btn-white:hover { background:var(--brand-soft) !important; border-color:var(--brand-line) !important; color:var(--brand-text) !important; }
html body .btn-info { background:#12808e !important; border-color:#12808e !important; color:#fff !important; }
html body .btn-success { background:#12855f !important; border-color:#12855f !important; color:#fff !important; background-image:none !important; }
html body .btn-success:hover { background:#0e6b4c !important; border-color:#0e6b4c !important; }
html body .btn-warning { background:#f3b33d !important; border-color:#e0a12c !important; color:#2a2a2a !important; background-image:none !important; }
html body .btn-warning:hover { background:#e9a521 !important; color:#1a1a1a !important; }
html body .label-warning { background:#f3b33d !important; color:#2a2a2a !important; }
/* sidebar: active pill + hover tint in the brand colour */
html body #side-menu > li.active > a { background:linear-gradient(135deg, var(--brand), var(--brand-dd)) !important; box-shadow:0 4px 12px rgba(var(--brand-rgb), .28) !important; }
html body #side-menu > li > a:hover, html body #side-menu > li > a:focus { background:var(--brand-soft) !important; color:var(--brand-text) !important; }
html body #side-menu > li > a:hover > i { color:var(--brand-text) !important; }
html body #side-menu .nav-second-level > li.active > a, html body #side-menu .nav-second-level > li > a:hover { color:var(--brand-text) !important; background:var(--brand-soft) !important; }
html body .btn-link { color:var(--brand-text) !important; }

/* links, labels, progress, pagination, form focus */
html body a { color:var(--brand-text); }
html body .nav a, html body .btn a, html body a.btn { color:inherit; }
html body .label-primary, html body .badge-primary, html body .progress-bar { background-color:var(--brand) !important; }
html body .pagination > .active > a, html body .pagination > .active > span, html body .pagination > .active > a:hover {
  background-color:var(--brand) !important; border-color:var(--brand) !important; color:var(--brand-ink) !important; }
html body .pagination > li > a:hover { color:var(--brand-text) !important; }
html body .form-control:focus { border-color:var(--brand) !important; box-shadow:0 0 0 3px var(--brand-t) !important; }
html body .text-navy, html body .text-primary { color:var(--brand-text) !important; }
html body .ibox-title { border-top-color:var(--brand) !important; }
html body .nav-tabs > li.active > a, html body .nav-tabs > li.active > a:hover { border-top:2px solid var(--brand) !important; color:var(--brand-text) !important; }
html body .icheckbox_square-blue.checked, html body .iradio_square-blue.checked { filter:none; }

/* header widgets */
html body .top-search-btn, html body #top-search + .input-group-btn .btn, html body .navbar-form .btn { background:var(--brand) !important; border-color:var(--brand) !important; color:#fff !important; }

/* SaaS screens (welcome, subscription, integrations, banners) */
html body .wz-hero { background:linear-gradient(135deg, var(--brand), var(--brand-dd)) !important; }
html body .wz-step h4 span { background:var(--brand-soft) !important; color:var(--brand-text) !important; }
html body .sb-u .bar i { background:var(--brand) !important; }
html body .sb-u .bar i.hi { background:#f0a020 !important; } html body .sb-u .bar i.full { background:#d9434f !important; }
html body .saas-banner .btn-primary { background:var(--brand) !important; }

/* client-facing pages: portal + public invoice / quote */
html body { --pb-blue:var(--brand); --pb-blue-d:var(--brand-d); }
html body .pbtn-w { color:var(--brand-text) !important; border-color:var(--brand-line) !important; }

/* login */
body.login-page { --brand-dark:var(--brand-d); flex-direction:column; }
body.login-page .btn-login { background:var(--brand) !important; color:var(--brand-ink) !important; }
body.login-page .btn-login:hover { background:var(--brand-d) !important; }

/* dark mode keeps its surfaces; only accents follow the brand */
html[data-theme="dark"] body a { color:color-mix(in srgb, var(--brand) 55%, #fff); }
