
/* Fix: Hide empty sidebar badges rendered by PolyUtilities */
#side-menu .badge:empty,
#side-menu .badge:not(:empty):has(> :only-child:empty),
.sidebar .badge.pull-right:empty,
.sidebar .badge.bg-info:empty,
#side-menu li .badge.pull-right {
    display: none !important;
}
#side-menu li .badge.pull-right:not(:empty) {
    display: inline-block !important;
}
/* Target badges with only whitespace */
.nav.metis-menu .badge[style*="background-color: "] {
    display: none !important;
}

/* ============================================================
   Broadsafe — Admin login branding (website palette: navy #0d1633 + green #00be98)
   Scoped to body.login_admin ONLY — does not affect the rest of the CRM
   nor the customer/client portal login. Added 2026-06-13.
   ============================================================ */
body.login_admin {
    background:
        radial-gradient(1100px 560px at 50% -8%, rgba(0,190,152,0.20), transparent 60%),
        linear-gradient(160deg, #0d1633 0%, #14224a 55%, #0d1633 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}
body.login_admin::before { background: transparent !important; }

/* Logo on a clean white chip so the dark logo stays readable on navy */
body.login_admin .company-logo {
    width: max-content;
    max-width: 300px;
    margin: 0 auto 6px !important;
    padding: 16px 30px !important;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.55);
}
body.login_admin .company-logo img { max-height: 52px; width: auto; }

/* Heading + subtitle sit on the navy background -> light text */
body.login_admin h1 { color: #ffffff !important; }
body.login_admin .authentication-form-wrapper > .text-center p { color: rgba(255,255,255,0.78) !important; }

/* Login card */
body.login_admin .authentication-form-wrapper .tw-bg-white {
    border-radius: 16px !important;
    border-color: rgba(255,255,255,0.16) !important;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,0.60) !important;
}

/* Inputs */
body.login_admin .form-control {
    border-radius: 10px;
    border: 1px solid #d9deea;
    height: auto;
    padding: 10px 12px;
}
body.login_admin .form-control:focus {
    border-color: #00be98;
    box-shadow: 0 0 0 3px rgba(0,190,152,0.18);
    outline: 0;
}

/* Primary button = brand green with navy text (AA contrast) */
body.login_admin .btn-primary {
    background-color: #00be98 !important;
    border-color: #00be98 !important;
    color: #0d1633 !important;
    border-radius: 10px;
    font-weight: 600;
    transition: background-color .15s ease, transform .05s ease;
}
body.login_admin .btn-primary:hover,
body.login_admin .btn-primary:focus {
    background-color: #00a886 !important;
    border-color: #00a886 !important;
    color: #0d1633 !important;
}
body.login_admin .btn-primary:active { transform: translateY(1px); }

/* Links + checkbox accent */
body.login_admin a.text-muted { color: #00a886 !important; }
body.login_admin a.text-muted:hover { color: #00be98 !important; }
body.login_admin input[type="checkbox"] { accent-color: #00be98; }

/* ==== NDIS mobile layout fixes for the lead view — added 2026-07-16 ==== */
@media (max-width: 767px) {
  /* Lead slide-panel fills the screen so nothing is pushed off-screen / clipped */
  .lead-modal .modal-dialog { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
  .lead-modal .modal-content { border-radius: 0 !important; min-height: 100vh; }

  /* Clip any stray wide child so the panel never scrolls sideways */
  .lead-modal .modal-body,
  .lead-wrapper,
  .lead-wrapper > .row { overflow-x: hidden !important; }
  .lead-wrapper > .row { margin-left: 0; margin-right: 0; }

  /* Header: title + print button wrap instead of the print icon clipping off-screen */
  .lead-modal .modal-header { padding-right: 44px; position: relative; }
  .lead-modal .modal-header .tw-flex.tw-justify-between { flex-wrap: wrap; row-gap: 4px; }
  .lead-modal .modal-title { max-width: 100%; word-break: break-word; }
  .lead-modal .lead-print-btn { margin-left: 0 !important; margin-right: 8px !important; }

  /* Tabs scroll horizontally within the panel, never widen it */
  .lead-modal .horizontal-scrollable-tabs { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lead-modal .horizontal-scrollable-tabs .nav-tabs { flex-wrap: nowrap; }

  /* Action rows (Convert to customer + edit, note buttons) wrap instead of clipping */
  .lead-wrapper .tw-flex.tw-justify-end { flex-wrap: wrap; justify-content: flex-start !important; row-gap: 8px; }

  /* Stacked info columns get a little breathing room */
  .lead-information-col { margin-bottom: 8px; }
}
/* ==== end NDIS mobile layout fixes ==== */

/* ==== NDIS mobile fixes: dashboard top area / top nav (added 2026-07-16) ==== */
@media (max-width: 767px) {
  /* Top search: breathing room so it isn't crammed against the toggle/icons */
  #top_search { margin-left: 6px !important; margin-right: 8px !important; }

  /* "Dashboard Options" button: clearance so it doesn't crowd the header or first widget */
  #wrapper .screen-options-btn { margin-top: 10px !important; margin-bottom: 6px !important; }
  #wrapper > .content { padding-top: 4px; }
}
/* ==== end NDIS dashboard/top-nav fixes ==== */
