/*
  Custom global font override
  - Loaded automatically if this file exists
  - Safe to edit/remove without touching core files
*/

/* Load Montserrat from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Apply the font app-wide while avoiding icon fonts */
html,
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

/* Keep code/monospace blocks unchanged */
code, pre, kbd, samp { font-family: Consolas, Menlo, Monaco, 'Courier New', monospace; }

/* -------------------------------------------------
   Brand colors override (Blue, Light Blue, Orange)
   Adjust HEX values to match your exact logo colors
   This overrides Bootstrap/Tailwind-derived classes
   without modifying core theme files.
-------------------------------------------------- */
:root {
  --brand-primary: #1e40af;        /* Blue */
  --brand-primary-hover: #1b378f;
  --brand-info: #3b82f6;           /* Light Blue */
  --brand-info-hover: #2563eb;
  --brand-accent: #f97316;         /* Orange */
  --brand-accent-hover: #ea580c;
}

/* Links */
a { color: var(--brand-primary); }
a:hover, a:focus { color: var(--brand-primary-hover); }

/* Primary (Blue) */
.text-primary { color: var(--brand-primary) !important; }
.bg-primary, .primary-bg { background-color: var(--brand-primary) !important; color: #fff !important; }
.label-primary, .badge-primary { background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #fff !important; }
.btn-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active {
  background-color: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}

/* Info (Light Blue) */
.text-info { color: var(--brand-info) !important; }
.bg-info, .info-bg { background-color: var(--brand-info) !important; color: #fff !important; }
.label-info, .badge-info { background-color: var(--brand-info) !important; border-color: var(--brand-info) !important; color: #fff !important; }
.btn-info {
  background-color: var(--brand-info) !important;
  border-color: var(--brand-info) !important;
  color: #fff !important;
}
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active {
  background-color: var(--brand-info-hover) !important;
  border-color: var(--brand-info-hover) !important;
  color: #fff !important;
}

/* Warning mapped to Orange (Accent) */
.text-warning { color: var(--brand-accent) !important; }
.bg-warning, .warning-bg { background-color: var(--brand-accent) !important; color: #fff !important; }
.label-warning, .badge-warning { background-color: var(--brand-accent) !important; border-color: var(--brand-accent) !important; color: #fff !important; }
.btn-warning {
  background-color: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
  color: #fff !important;
}

/* -------------------------------------------------
   Left sidebar background override
   Requested color: #c5e2f9
   Adjust text/hover for readability on light background
-------------------------------------------------- */
.sidebar { background: #f7f7f7 !important; }
.sidebar li a { color: #374151 !important; }
.sidebar #side-menu > li:first-child { background: transparent !important; }
.sidebar .nav > li > a:hover,
.sidebar .nav > li > a:focus,
.sidebar li.active > a {
  background: rgba(55, 65, 81, 0.08) !important;
  color: #1f2937 !important;
}
.sidebar .nav > li .nav-second-level > li:not(.active) > a { color: #4b5563 !important; }
.sidebar .nav > li .nav-second-level > li:not(.active) > a:hover,
.sidebar .nav > li .nav-second-level > li:not(.active) > a:focus {
  background: rgba(55, 65, 81, 0.08) !important;
  color: #1f2937 !important;
}

/* Setup drawer should follow sidebar palette */
#setup-menu-wrapper,
#setup-menu {
  background: #f7f7f7 !important;
}
#setup-menu > li:first-child {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1f2937 !important;
}
#setup-menu > li > a,
#setup-menu > li > a:focus,
#setup-menu > li > a:hover {
  color: #1f2937 !important;
  background: transparent !important;
}
#setup-menu li .nav-second-level li a { color: #4b5563 !important; }
#setup-menu li .nav-second-level li a:hover,
#setup-menu li .nav-second-level li.active a,
#setup-menu > li.active > a,
#setup-menu > li > a:hover {
  background: rgba(55, 65, 81, 0.08) !important;
  color: #1f2937 !important;
  border-radius: 5px !important;
}
#setup-menu .close-customizer { color: #4b5563 !important; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active {
  background-color: var(--brand-accent-hover) !important;
  border-color: var(--brand-accent-hover) !important;
  color: #fff !important;
}

/* Ensure success actions use contrasting white text */
.btn.btn-success,
.btn.btn-success:visited,
.btn.btn-success:hover,
.btn.btn-success:focus,
.btn.btn-success:active {
  color: #fff !important;
}

.btn.btn-success i,
.btn.btn-success span,
.btn.btn-success strong {
  color: inherit !important;
}

/* Ensure proforma view button keeps white text/icon on info background */
.btn-proforma-view {
  color: #fff !important;
}

.btn-proforma-view i {
  color: inherit !important;
}

.btn-po-source,
.btn-po-source:visited,
.btn-po-source:hover,
.btn-po-source:focus,
.btn-po-source:active {
  color: #fff !important;
}

.btn-po-source i {
  color: inherit !important;
}

/* -------------------------------------------------
   Remove legacy navy backgrounds from layout wrappers
   Makes sure short pages and off-canvas areas stay light
-------------------------------------------------- */
html,
body,
#wrapper,
#wrapper::before,
#wrapper::after,
body::before,
body::after,
.app-admin,
.content,
.app-content,
.admin .page-wrapper,
.admin .page-wrapper::before,
.main-wrapper,
.main-wrapper::before,
.page,
.page::before,
footer {
  background-color: #f8fafc !important;
  background-image: none !important;
}

/* Fallback for any gradient utilities that might remain */
.bg-gradient,
.navbar-bg,
.footer-bg {
  background-color: #f8fafc !important;
  background-image: none !important;
}

/* -------------------------------------------------
   Enlarge item selector checkboxes (quotes, POs, packing slips)
-------------------------------------------------- */
input.ps-item-select[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  transform: scale(1.35);
  transform-origin: center;
}
