/**
 * BIXCRM brand theme — primary #00ADEF, accent #0033CC / #0054A6
 */
:root {
  --bixcrm-primary: #00adef;
  --bixcrm-primary-dark: #0095d1;
  --bixcrm-primary-light: #e6f7fd;
  --bixcrm-accent: #0033cc;
  --bixcrm-accent-mid: #0054a6;
  --bixcrm-sidebar-active-bg: rgba(0, 173, 239, 0.12);
  --bixcrm-sidebar-active-border: #00adef;
  --bixcrm-gradient: linear-gradient(135deg, #00adef 0%, #0054a6 100%);
}

/* ── Primary actions ── */
.btn-primary,
.btn-primary:focus,
.open > .dropdown-toggle.btn-primary {
  background: var(--bixcrm-gradient) !important;
  border-color: var(--bixcrm-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 173, 239, 0.25);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.active {
  background: linear-gradient(135deg, var(--bixcrm-primary-dark) 0%, var(--bixcrm-accent) 100%) !important;
  border-color: var(--bixcrm-primary-dark) !important;
}

.btn-info {
  background-color: var(--bixcrm-accent-mid) !important;
  border-color: var(--bixcrm-accent-mid) !important;
}

.text-primary,
a.text-primary {
  color: var(--bixcrm-accent-mid) !important;
}

.text-info {
  color: var(--bixcrm-primary) !important;
}

.label-primary,
.badge-primary {
  background-color: var(--bixcrm-primary) !important;
}

.progress-bar-primary,
.progress-bar-info {
  background-color: var(--bixcrm-primary) !important;
}

/* ── Admin shell ── */
body.admin,
.admin #wrapper {
  background: #f4f9fc !important;
}

.admin .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%) !important;
  border-right-color: rgba(0, 173, 239, 0.15) !important;
}

.admin #header {
  background: #fff !important;
  border-bottom: 3px solid transparent !important;
  border-image: var(--bixcrm-gradient) 1 !important;
  box-shadow: 0 2px 12px rgba(0, 84, 166, 0.06);
}

.admin .navbar-nav > li > a:hover,
.admin .navbar-nav > li > a:focus,
.admin .navbar-nav a.notifications-icon:hover i,
.admin .navbar-nav a.top-timers:hover i {
  color: var(--bixcrm-primary) !important;
}

/* Sidebar active / hover */
.admin .sidebar > ul.nav > li.active {
  border-left-color: var(--bixcrm-sidebar-active-border) !important;
}

[dir="rtl"] .admin .sidebar > ul.nav > li.active {
  border-right-color: var(--bixcrm-sidebar-active-border) !important;
}

.admin .sidebar > ul.nav > li.active > a:first-child,
.admin .sidebar > ul.nav > li.active a:first-child i.menu-icon {
  color: var(--bixcrm-accent-mid) !important;
}

.admin .sidebar > ul.nav > li:hover a:first-child,
.admin .sidebar > ul.nav > li:hover a:first-child i.menu-icon {
  color: var(--bixcrm-primary) !important;
}

.admin #side-menu li.active > a,
.admin #setup-menu li.active > a,
.admin #side-menu li.active > a:first-child,
.admin #setup-menu li.active > a:first-child {
  background: var(--bixcrm-sidebar-active-bg) !important;
  border-color: rgba(0, 173, 239, 0.28) !important;
}

#setup-menu-wrapper .customizer-heading {
  color: var(--bixcrm-accent-mid) !important;
}

/* ── Tabs & pills ── */
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  border-bottom-color: var(--bixcrm-primary) !important;
  color: var(--bixcrm-accent-mid) !important;
}

.nav-tabs > li > a:hover {
  color: var(--bixcrm-primary) !important;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  background: var(--bixcrm-gradient) !important;
}

/* ── Forms ── */
.form-control:focus,
.bootstrap-select .dropdown-toggle:focus,
.bootstrap-select.open .dropdown-toggle {
  border-color: var(--bixcrm-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.2) !important;
}

.checkbox-primary input[type="checkbox"]:checked + label::before,
.radio-primary input[type="radio"]:checked + label::before {
  background-color: var(--bixcrm-primary) !important;
  border-color: var(--bixcrm-primary) !important;
}

.onoffswitch-checkbox:checked + .onoffswitch-label {
  background-color: var(--bixcrm-primary) !important;
}

/* ── Tables & datatables ── */
.dataTables_wrapper table tbody a:not(.text-muted, .text-primary, .text-danger, .text-warning, .text-success, .text-info) {
  color: var(--bixcrm-accent-mid) !important;
}

.dataTables_wrapper table tbody a:hover:not(.text-muted, .text-primary, .text-danger, .text-warning, .text-success, .text-info) {
  color: var(--bixcrm-primary) !important;
}

table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
  color: var(--bixcrm-primary) !important;
}

.pagination > .active > a,
.pagination > .active > span {
  background: var(--bixcrm-gradient) !important;
  border-color: var(--bixcrm-primary) !important;
}

.pagination > li > a:hover,
.pagination > li > span:hover {
  color: var(--bixcrm-accent-mid) !important;
}

/* ── Modals ── */
.modal-header {
  background: var(--bixcrm-gradient) !important;
  border-bottom: none !important;
}

.modal-header .modal-title,
.modal-header .close,
.modal-header > *:not(.modal-title) {
  color: #fff !important;
  opacity: 1;
}

.modal-header .close:hover {
  color: #fff !important;
  opacity: 0.85;
}

/* ── Customer portal (KB, login, clients) — light header so logo stays visible ── */
.customers .navbar-default,
.customers nav.navbar-default.header {
  background: #ffffff !important;
  border: 0 !important;
  border-bottom: 3px solid var(--bixcrm-primary) !important;
  box-shadow: 0 2px 14px rgba(0, 84, 166, 0.08) !important;
}

.customers .navbar-default .navbar-nav > li > a {
  color: #334155 !important;
  font-weight: 500;
}

.customers .navbar-default .navbar-nav > .active > a,
.customers .navbar-default .navbar-nav > .active > a:focus,
.customers .navbar-default .navbar-nav > .active > a:hover {
  background: var(--bixcrm-sidebar-active-bg) !important;
  color: var(--bixcrm-accent-mid) !important;
}

.customers .navbar-default .navbar-nav > li > a:hover,
.customers .navbar-default .navbar-nav > li > a:focus {
  background: #f0f9ff !important;
  color: var(--bixcrm-accent-mid) !important;
}

.customers .navbar-default .navbar-brand.logo,
.customers .navbar-default a.navbar-brand.logo {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 23px 0 25px 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
}

.customers .navbar-default .navbar-brand.logo img,
.customers .navbar-default a.navbar-brand.logo img {
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  display: block !important;
  filter: none !important;
}

.customers .navbar-default .navbar-toggle .icon-bar {
  background-color: var(--bixcrm-accent-mid) !important;
}

.customers .btn-primary {
  background: var(--bixcrm-gradient) !important;
}

/* ── Login / auth ── */
body.login_admin,
body.authentication {
  background: linear-gradient(165deg, #e6f7fd 0%, #ffffff 40%, #dceefb 100%) !important;
  min-height: 100vh;
}

.bixcrm-auth-card {
  border-top: 4px solid var(--bixcrm-primary) !important;
  box-shadow: 0 8px 32px rgba(0, 84, 166, 0.1) !important;
}

body.login_admin h1 {
  color: var(--bixcrm-accent-mid) !important;
}

.authentication-form-wrapper .company-logo img {
  max-height: 64px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 173, 239, 0.2));
}

.authentication-form .btn-primary,
body.login_admin .btn-primary {
  background: var(--bixcrm-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 173, 239, 0.35);
  letter-spacing: 0.02em;
}

.authentication-form a.text-muted:hover,
body.login_admin a.text-muted:hover {
  color: var(--bixcrm-primary) !important;
}

/* ── SaaS client (perfex_saas) ── */
.ps-container .company.panel_s .btn-primary.tw-rounded-full {
  background: var(--bixcrm-gradient) !important;
  box-shadow: 0 2px 10px rgba(0, 173, 239, 0.35);
}

.bixcrm-register-steps li.active a {
  background: linear-gradient(135deg, rgba(0, 173, 239, 0.14) 0%, rgba(0, 51, 204, 0.08) 100%) !important;
  color: var(--bixcrm-accent-mid) !important;
  border-color: rgba(0, 173, 239, 0.4) !important;
}

/* ── Tailwind utility overrides ── */
.tw-bg-primary-600,
.tw-bg-primary-500,
.hover\:tw-bg-primary-700:hover {
  background-color: var(--bixcrm-primary) !important;
}

.tw-text-primary-600,
.tw-text-primary-700,
.hover\:tw-text-primary-700:hover {
  color: var(--bixcrm-accent-mid) !important;
}

.tw-border-primary-500,
.tw-border-primary-600 {
  border-color: var(--bixcrm-primary) !important;
}

.tw-ring-primary-500 {
  --tw-ring-color: rgba(0, 173, 239, 0.45) !important;
}

.tw-from-primary-600 {
  --tw-gradient-from: var(--bixcrm-primary) !important;
}

.tw-to-primary-700 {
  --tw-gradient-to: var(--bixcrm-accent-mid) !important;
}

/* ── Footer branding ── */
.bixcrm-admin-footer strong {
  color: var(--bixcrm-accent-mid);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bixcrm-admin-footer {
  background: linear-gradient(180deg, transparent, rgba(0, 173, 239, 0.04));
}
