/**
* Template Name: NiceAdmin
* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
* Updated: Apr 20 2024 with Bootstrap v5.3.3
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/

:root {
  --cb-primary: #104271;
  --bs-pagination-active-bg: #104271;
  --bs-pagination-active-border-color: #104271;
  --bs-pagination-color: #104271;
  --bs-link-color: #104271;
  --bs-link-hover-color: #343a46;
  --theme-dark-color: #343a46;
  --bs-btn-color: #fff;
  --theme-light-color: #2439FF;
  --theme-green-color: #22C55E;
  --theme-green-dark-color: #9BE64D;
  --theme-blue-background-color: #3B5CFF;
  scroll-behavior: smooth;
}

.btn-info {
  --bs-btn-color: #fff;
  --bs-btn-bg: #104271;
  --bs-btn-border-color: #104271;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #343a46;
  --bs-btn-hover-border-color: #343a46;
  --bs-btn-focus-shadow-rgb: 11, 172, 204;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #343a46;
  --bs-btn-active-border-color: #343a46;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #104271;
  --bs-btn-disabled-border-color: #104271;
}

/* Hover/pressed/disabled were near-black (#343a46). On a phone a button
   keeps its hover state after being tapped, so primary buttons turned black
   the moment anyone touched them — off-brand, and read as "something
   broke". A darker navy for hover/pressed; disabled keeps the brand navy
   and relies on Bootstrap's own disabled opacity to look inactive. */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #104271;
  --bs-btn-border-color: #104271;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b3052;
  --bs-btn-hover-border-color: #0b3052;
  --bs-btn-focus-shadow-rgb: 49, 132, 253;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0b3052;
  --bs-btn-active-border-color: #0b3052;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #104271;
  --bs-btn-disabled-border-color: #104271;
}

/* Several call-form fields are hidden from Bootstrap's point of view — the
   photo input sits behind the camera widget, and select2 hides the real
   doctor/pharmacy <select> — so its "show feedback beside an invalid input"
   rule never fires and those messages stayed invisible. Show any message in
   the call form whenever it has text. */
#callModal .invalid-feedback:not(:empty) {
  display: block;
}

body {
  font-family: "Open Sans", sans-serif;
  background: #fff;
  color: #444444;
}

a {
  color: var(--cb-primary);
  text-decoration: none;
}

a:hover {
  color: #717ff5;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Nunito", sans-serif;
}

input[type="email"],
input[type="text"],
input[type="password"],
select {
  min-height: 42px;
}

#loginBtn,
#forgotBtn,
#resetBtn {
  min-height: 42px;
}

.text-primary {
  color: var(--cb-primary) !important;
}

/*--------------------------------------------------------------
# Main
--------------------------------------------------------------*/
#main {
  margin-top: 60px;
  padding: 20px 25px;
  transition: all 0.3s;
}

@media (max-width: 1199px) {
  #main {
    padding: 20px;
  }
}

/*--------------------------------------------------------------
# Page Title
--------------------------------------------------------------*/
.pagetitle {
  margin-bottom: 10px;
}

.pagetitle h1 {
  font-size: 24px;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--cb-primary);
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--cb-primary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
}

.back-to-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: #6776f4;
  color: #fff;
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/*--------------------------------------------------------------
# Override some default Bootstrap stylings
--------------------------------------------------------------*/
/* Dropdown menus */
.dropdown-menu {
  border-radius: 4px;
  padding: 10px 0;
  animation-name: dropdown-animate;
  animation-duration: 0.2s;
  animation-fill-mode: both;
  border: 0;
  box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
  text-align: center;
  font-size: 15px;
  padding: 10px 25px;
}

.dropdown-menu .dropdown-footer a {
  color: #444444;
  text-decoration: underline;
}

.dropdown-menu .dropdown-footer a:hover {
  text-decoration: none;
}

.dropdown-menu .dropdown-divider {
  color: #a5c5fe;
  margin: 0;
}

.dropdown-menu .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.dropdown-menu .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f6f9ff;
}

@media (min-width: 768px) {
  .dropdown-menu-arrow::before {
    content: "";
    width: 13px;
    height: 13px;
    background: #fff;
    position: absolute;
    top: -7px;
    right: 20px;
    transform: rotate(45deg);
    border-top: 1px solid #eaedf1;
    border-left: 1px solid #eaedf1;
  }
}

@keyframes dropdown-animate {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }

  0% {
    opacity: 0;
  }
}

/* Light Backgrounds */
.bg-primary-light {
  background-color: #cfe2ff;
  border-color: #cfe2ff;
}

.bg-secondary-light {
  background-color: #e2e3e5;
  border-color: #e2e3e5;
}

.bg-success-light {
  background-color: #d1e7dd;
  border-color: #d1e7dd;
}

.bg-danger-light {
  background-color: #f8d7da;
  border-color: #f8d7da;
}

.bg-warning-light {
  background-color: #fff3cd;
  border-color: #fff3cd;
}

.bg-info-light {
  background-color: #cff4fc;
  border-color: #cff4fc;
}

.bg-dark-light {
  background-color: #d3d3d4;
  border-color: #d3d3d4;
}

/* Card */
.card {
  margin-bottom: 30px;
  border: none;
  border-radius: 5px;
  /* box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1); */
  /* box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; */
  box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
}

.card-header,
.card-footer {
  border-color: #ebeef4;
  background-color: #fff;
  color: #798eb3;
  padding: 15px;
}

.card-title {
  padding: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--cb-primary);
  font-family: "Poppins", sans-serif;
}

.card-title span {
  color: #899bbd;
  font-size: 14px;
  font-weight: 400;
}

.card-body {
  padding: 0 20px 20px 20px;
}

.card-img-overlay {
  background-color: rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert-heading {
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  font-size: 20px;
}

/* Close Button */
.btn-close {
  /* background-size: 25%; */
}

.btn-close:focus {
  outline: 0;
  box-shadow: none;
}

/* Accordion */
.accordion-item {
  border: 1px solid #ebeef4;
}

.accordion-button:focus {
  outline: 0;
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  color: var(--cb-primary);
  background-color: #f6f9ff;
}

.accordion-flush .accordion-button {
  padding: 15px 0;
  background: none;
  border: 0;
}

.accordion-flush .accordion-button:not(.collapsed) {
  box-shadow: none;
  color: var(--cb-primary);
}

.accordion-flush .accordion-body {
  padding: 0 0 15px 0;
  color: #3e4f6f;
  font-size: 15px;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 14px;
  font-family: "Nunito", sans-serif;
  color: #899bbd;
  font-weight: 600;
}

.breadcrumb a {
  color: #899bbd;
  transition: 0.3s;
}

.breadcrumb a:hover {
  color: #51678f;
}

.breadcrumb .breadcrumb-item::before {
  color: #899bbd;
}

.breadcrumb .active {
  color: #51678f;
  font-weight: 600;
}

/* Bordered Tabs */
.nav-tabs-bordered {
  border-bottom: 2px solid #ebeef4;
}

.nav-tabs-bordered .nav-link {
  margin-bottom: -2px;
  border: none;
  color: #2c384e;
}

.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus {
  color: var(--cb-primary);
}

.nav-tabs-bordered .nav-link.active {
  background-color: #fff;
  color: var(--cb-primary);
  border-bottom: 2px solid var(--cb-primary);
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.logo {
  line-height: 1;
}

@media (min-width: 1200px) {
  .logo {
    width: 280px;
  }
}

.logo img {
  max-height: 34px;
}

.logo span {
  font-size: 26px;
  font-weight: 700;
  color: var(--cb-primary);
  font-family: "Nunito", sans-serif;
}

.header {
  transition: all 0.5s;
  z-index: 997;
  height: 60px;
  box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1);
  background-color: #fff;
  padding-left: 20px;
  /* Toggle Sidebar Button */
  /* Search Bar */
}

.header .toggle-sidebar-btn {
  font-size: 32px;
  padding-right: 10px;
  cursor: pointer;
  color: var(--cb-primary);
  width: 42px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header .search-bar {
  min-width: 360px;
  padding: 0 20px;
}

@media (max-width: 1199px) {
  .header .search-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: 0px 0px 15px 0px rgba(1, 41, 112, 0.1);
    background: white;
    z-index: 9999;
    transition: 0.3s;
    visibility: hidden;
    opacity: 0;
  }

  .header .search-bar-show {
    top: 60px;
    visibility: visible;
    opacity: 1;
  }
}

.header .search-form {
  width: 100%;
}

.header .search-form input {
  border: 0;
  font-size: 14px;
  color: var(--cb-primary);
  border: 1px solid rgba(1, 41, 112, 0.2);
  padding: 7px 38px 7px 8px;
  border-radius: 3px;
  transition: 0.3s;
  width: 100%;
}

.header .search-form input:focus,
.header .search-form input:hover {
  outline: none;
  box-shadow: 0 0 10px 0 rgba(1, 41, 112, 0.15);
  border: 1px solid rgba(1, 41, 112, 0.3);
}

.header .search-form button {
  border: 0;
  padding: 0;
  margin-left: -30px;
  background: none;
}

.header .search-form button i {
  color: var(--cb-primary);
}

/*--------------------------------------------------------------
# Header Nav
--------------------------------------------------------------*/
.header-nav ul {
  list-style: none;
}

.header-nav>ul {
  margin: 0;
  padding: 0;
}

.header-nav .nav-icon {
  font-size: 22px;
  color: var(--cb-primary);
  margin-right: 25px;
  position: relative;
}

.header-nav .nav-profile {
  color: var(--cb-primary);
}

.header-nav .nav-profile img {
  max-height: 36px;
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.header-nav .nav-profile span {
  font-size: 14px;
  font-weight: 600;
}

.header-nav .badge-number {
  position: absolute;
  inset: -2px -5px auto auto;
  font-weight: normal;
  font-size: 12px;
  padding: 3px 6px;
}

.header-nav .notifications {
  inset: 8px -15px auto auto !important;
}

.header-nav .notifications .notification-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  transition: 0.3s;
}

.header-nav .notifications .notification-item i {
  margin: 0 20px 0 10px;
  font-size: 24px;
}

.header-nav .notifications .notification-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.header-nav .notifications .notification-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: #919191;
}

.header-nav .notifications .notification-item:hover {
  background-color: #f6f9ff;
}

.header-nav .messages {
  inset: 8px -15px auto auto !important;
}

.header-nav .messages .message-item {
  padding: 15px 10px;
  transition: 0.3s;
}

.header-nav .messages .message-item a {
  display: flex;
}

.header-nav .messages .message-item img {
  margin: 0 20px 0 10px;
  max-height: 40px;
}

.header-nav .messages .message-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #444444;
}

.header-nav .messages .message-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: #919191;
}

.header-nav .messages .message-item:hover {
  background-color: #f6f9ff;
}

.header-nav .profile {
  min-width: 240px;
  padding-bottom: 0;
  padding-top: 0px;
  top: 8px !important;
}

.header-nav .profile .dropdown-header h6 {
  font-size: 18px;
  margin-bottom: 0;
  font-weight: 600;
  color: #444444;
}

.header-nav .profile .dropdown-header span {
  font-size: 14px;
}

.header-nav .profile .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.header-nav .profile .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
  background-color: #f6f9ff;
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 260px;
  z-index: 996;
  transition: all 0.3s;
  padding: 10px 5px 0 0;
  overflow-y: auto;
  /* Same overscroll-chaining issue as .modal-dialog-scrollable .modal-body
     below — scrolling up past the top of the menu wasn't consumed here,
     so it chained up to the page and the mobile webview app's own
     pull-to-refresh picked it up as a refresh gesture. */
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #aab7cf transparent;
  box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1);
  background-color: #fff;
}

@media (max-width: 1199px) {
  .sidebar {
    left: -260px;
  }
}

.sidebar::-webkit-scrollbar {
  width: 5px;
  height: 8px;
  background-color: #fff;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #aab7cf;
}

@media (min-width: 1200px) {

  #main,
  #footer {
    margin-left: 260px;
  }
}

@media (max-width: 1199px) {
  .toggle-sidebar .sidebar {
    left: 0;
  }
}

@media (min-width: 1200px) {

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 0;
  }

  .toggle-sidebar .sidebar {
    left: -260px;
  }
}

.sidebar-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav li {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-item {
  margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
  font-size: 11px;
  text-transform: uppercase;
  color: #899bbd;
  font-weight: 600;
  margin: 10px 0 5px 15px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--cb-primary);
  transition: 0.3;
  background: #f6f9ff;
  padding: 10px 15px;
  border-radius: 4px;
}

.sidebar-nav .nav-link i {
  font-size: 16px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
  flex: 0 0 20px;
  color: var(--cb-primary);
}

.sidebar-nav .nav-link.collapsed {
  color: var(--cb-primary);
  background: #fff;
}

.sidebar-nav .nav-link.collapsed i {
  color: #899bbd;
}

.sidebar-nav .nav-link:hover {
  color: var(--cb-primary);
  background: #f6f9ff;
}

.sidebar-nav .nav-link:hover i {
  color: var(--cb-primary);
}

.sidebar-nav .nav-link .bi-chevron-down {
  margin-right: 0;
  transition: transform 0.2s ease-in-out;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

.sidebar-nav .nav-content {
  padding: 5px 0 0 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--cb-primary);
  transition: 0.3;
  padding: 10px 0 10px 40px;
  transition: 0.3s;
}

.sidebar-nav .nav-content a i {
  font-size: 6px;
  margin-right: 8px;
  line-height: 0;
  border-radius: 50%;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--cb-primary);
}

.sidebar-nav .nav-content a.active i {
  background-color: var(--cb-primary);
}

/*--------------------------------------------------------------
# Dashboard
--------------------------------------------------------------*/
/* Filter dropdown */
.dashboard .filter {
  position: absolute;
  right: 0px;
  top: 15px;
}

.dashboard .filter .icon {
  color: #aab7cf;
  padding-right: 20px;
  padding-bottom: 5px;
  transition: 0.3s;
  font-size: 16px;
}

.dashboard .filter .icon:hover,
.dashboard .filter .icon:focus {
  color: var(--cb-primary);
}

.dashboard .filter .dropdown-header {
  padding: 8px 15px;
}

.dashboard .filter .dropdown-header h6 {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #aab7cf;
  margin-bottom: 0;
  padding: 0;
}

.dashboard .filter .dropdown-item {
  padding: 8px 15px;
}

/* Info Cards */
.dashboard .info-card {
  padding-bottom: 5px;
}

.cb_top_kpis_wrapper .info-card .card-title {
  width: calc(100% - 20px);
}

.cb_top_kpis_wrapper .info-card .card-title {
  width: calc(100% - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb_top_kpis_wrapper .card-body {
  padding: 0 20px 20px 20px;
}

.dashboard .info-card h6 {
  font-size: 28px;
  color: var(--cb-primary);
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.dashboard .card-icon {
  font-size: 28px;
  line-height: 0;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  flex-grow: 0;
  background: #f6f6fe;
}

.dashboard .sales-card .card-icon {
  color: var(--cb-primary);
  background: #f6f6fe;
}

.dashboard .revenue-card .card-icon {
  color: #2eca6a;
  background: #e0f8e9;
}

.dashboard .customers-card .card-icon {
  color: #ff771d;
  background: #ffecdf;
}

/* Activity */
.dashboard .activity {
  font-size: 14px;
}

.dashboard .activity .activity-item .activite-label {
  color: #888;
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
  min-width: 64px;
}

.dashboard .activity .activity-item .activite-label::before {
  content: "";
  position: absolute;
  right: -11px;
  width: 4px;
  top: 0;
  bottom: 0;
  background-color: #eceefe;
}

/* .dashboard .activity .activity-item .activity-badge {
  margin-top: 3px;
  z-index: 1;
  font-size: 11px;
  line-height: 0;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid #fff;
  flex-grow: 0;
} */

.dashboard .activity .activity-item .activity-badge {
  margin-top: 0px;
  margin-left: -2px;
  z-index: 1;
  font-size: 10px;
  border: 1px solid #269ffc;
  background-color: #eceefe;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex-grow: 0;
  line-height: normal;
}

.dashboard .activity .activity-item .activity-content {
  padding-left: 10px;
  padding-bottom: 20px;
}

.dashboard .activity .activity-item:first-child .activite-label::before {
  top: 5px;
}

.dashboard .activity .activity-item:last-child .activity-content {
  padding-bottom: 0;
}

/* News & Updates */
.dashboard .news .post-item+.post-item {
  margin-top: 15px;
}

.dashboard .news img {
  width: 80px;
  float: left;
  border-radius: 5px;
}

.dashboard .news h4 {
  font-size: 15px;
  margin-left: 95px;
  font-weight: bold;
  margin-bottom: 5px;
}

.dashboard .news h4 a {
  color: var(--cb-primary);
  transition: 0.3s;
}

.dashboard .news h4 a:hover {
  color: var(--cb-primary);
}

.dashboard .news p {
  font-size: 14px;
  color: #777777;
  margin-left: 95px;
}

/* Recent Sales */
.dashboard .recent-sales {
  font-size: 14px;
}

.dashboard .recent-sales .table thead {
  background: #f6f6fe;
}

.dashboard .recent-sales .table thead th {
  border: 0;
}

.dashboard .recent-sales .dataTable-top {
  padding: 0 0 10px 0;
}

.dashboard .recent-sales .dataTable-bottom {
  padding: 10px 0 0 0;
}

/* Top Selling */
.dashboard .top-selling {
  font-size: 14px;
}

.dashboard .top-selling .table thead {
  background: #f6f6fe;
}

.dashboard .top-selling .table thead th {
  border: 0;
}

.dashboard .top-selling .table tbody td {
  vertical-align: middle;
}

.dashboard .top-selling img {
  border-radius: 5px;
  max-width: 60px;
}

/*--------------------------------------------------------------
# Icons list page
--------------------------------------------------------------*/
.iconslist {
  display: grid;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding-top: 15px;
}

.iconslist .icon {
  background-color: #fff;
  border-radius: 0.25rem;
  text-align: center;
  color: var(--cb-primary);
  padding: 15px 0;
}

.iconslist i {
  margin: 0.25rem;
  font-size: 2.5rem;
}

.iconslist .label {
  font-family: var(--bs-font-monospace);
  display: inline-block;
  width: 100%;
  overflow: hidden;
  padding: 0.25rem;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #666;
}

/*--------------------------------------------------------------
# Profie Page
--------------------------------------------------------------*/
.profile .profile-card img {
  max-width: 120px;
}

.profile .profile-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2c384e;
  margin: 10px 0 0 0;
}

.profile .profile-card h3 {
  font-size: 18px;
}

.profile .profile-card .social-links a {
  font-size: 20px;
  display: inline-block;
  color: rgba(1, 41, 112, 0.5);
  line-height: 0;
  margin-right: 10px;
  transition: 0.3s;
}

.profile .profile-card .social-links a:hover {
  color: var(--cb-primary);
}

.profile .profile-overview .row {
  margin-bottom: 20px;
  font-size: 15px;
}

.profile .profile-overview .card-title {
  color: var(--cb-primary);
}

.profile .profile-overview .label {
  font-weight: 600;
  color: rgba(1, 41, 112, 0.6);
}

.profile .profile-edit label {
  font-weight: 600;
  color: rgba(1, 41, 112, 0.6);
}

.profile .profile-edit img {
  max-width: 120px;
}

/*--------------------------------------------------------------
# F.A.Q Page
--------------------------------------------------------------*/
.faq .basic h6 {
  font-size: 18px;
  font-weight: 600;
  color: var(--cb-primary);
}

.faq .basic p {
  color: #6980aa;
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box {
  padding: 28px 30px;
}

.contact .info-box i {
  font-size: 38px;
  line-height: 0;
  color: var(--cb-primary);
}

.contact .info-box h3 {
  font-size: 20px;
  color: var(--cb-primary);
  font-weight: 700;
  margin: 20px 0 10px 0;
}

.contact .info-box p {
  padding: 0;
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
}

.contact .php-email-form .error-message {
  display: none;
  color: #fff;
  background: #ed3c0d;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.contact .php-email-form .sent-message {
  display: none;
  color: #fff;
  background: #18d26e;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.contact .php-email-form .loading {
  display: none;
  background: #fff;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}

.contact .php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid #18d26e;
  border-top-color: #eee;
  animation: animate-loading 1s linear infinite;
}

.contact .php-email-form input,
.contact .php-email-form textarea {
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  border-radius: 0;
}

.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
  border-color: var(--cb-primary);
}

.contact .php-email-form input {
  padding: 10px 15px;
}

.contact .php-email-form textarea {
  padding: 12px 15px;
}

.contact .php-email-form button[type=submit] {
  background: var(--cb-primary);
  border: 0;
  padding: 10px 30px;
  color: #fff;
  transition: 0.4s;
  border-radius: 4px;
}

.contact .php-email-form button[type=submit]:hover {
  background: #5969f3;
}

@keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Error 404
--------------------------------------------------------------*/
.error-404 {
  padding: 30px;
}

.error-404 h1 {
  font-size: 180px;
  font-weight: 700;
  color: var(--cb-primary);
  margin-bottom: 0;
  line-height: 150px;
}

.error-404 h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--cb-primary);
  margin-bottom: 30px;
}

.error-404 .btn {
  background: #51678f;
  color: #fff;
  padding: 8px 30px;
}

.error-404 .btn:hover {
  background: #3e4f6f;
}

@media (min-width: 992px) {
  .error-404 img {
    max-width: 50%;
  }
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  padding: 20px 0;
  font-size: 14px;
  transition: all 0.3s;
  border-top: 1px solid #cddfff;
}

.footer .copyright {
  text-align: center;
  color: var(--cb-primary);
}

.footer .credits {
  padding-top: 5px;
  text-align: center;
  font-size: 13px;
  color: var(--cb-primary);
  position: initial;
}

.cb-loader-wrapper {
  width: 100px;
  height: 100px;
}

.cb-loader-spinner {
  width: 100px;
  height: 100px;
  border-width: 4px;
  color: var(--cb-primary);
}

.cb-loader-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 90px;
  height: auto;
  animation: cbPulse 1.4s infinite ease-in-out;
}

@keyframes cbPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

.cb_pagonation_wrapper .pagination,
.cb_pagonation_wrapper p {
  margin: 0px;
}

table td button.btn {
  min-width: 80px;
}

.datatable-selector {
  padding: 5px;
  min-width: 100px;
  margin-right: 4px;
}

table tr>td {
  min-width: 130px;
  vertical-align: middle;
}

table tr>td:nth-child(1) {
  min-width: 50px;
}

.table_btns {
  min-width: 182px;
  text-align: right;
  max-width: 182px;
}

#rolesTable tr>th:nth-child(1),
#rolesTable tr>td:nth-child(1) {
  min-width: 50px;
  max-width: 50px;
}

.cb_alerts_activity {
  max-height: 400px;
  overflow: auto;
}

.card-title i,
.list-group-item i,
.activity-badge {
  width: 18px;
  text-align: center;
}

.cb_top_selling_wrapper table td:nth-last-child(1),
.cb_top_selling_wrapper table th:nth-last-child(1) {
  min-width: 85px;
}

.cb_password_eye_wrap {
  position: absolute;
  right: 18px;
  top: 42px;
  cursor: pointer;
  z-index: 9;
}

.cb_password_eye_wrap i {
  font-size: 16px;
  color: var(--cb-primary);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cb-eye-anim {
  transform: scale(1.1);
}

#yourPassword,
.cb_eye_input {
  padding-right: 30px;
}

#resetForm .input-group .cb_password_eye_wrap {
  top: 10px;
  right: 8px;
}

/* Keep the invalid-field icon Bootstrap adds from overlapping the password eye toggle */
#yourPassword.is-invalid {
  background-position: right 2.5rem center;
  padding-right: 4.5rem;
}

/* select2 style overrides */
.select2-container--default .select2-selection--single {
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  height: 37px;
  margin-right: 30px;
  font-size: 18px;
  color: #888;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px;
  padding: 0 .75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
  top: 0px;
  right: 0px;
  width: 30px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-width: 6px 5px 0 5px;
  margin-left: -4px;
  margin-top: -2px;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: #000;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  outline: none;
}

.select2-dropdown {
  border-color: var(--bs-border-color);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  padding: 10px;
  /* applySelect2() always uses body as dropdownParent now (even for a
     select inside a modal), so this needs an explicit z-index above
     Bootstrap's modal/backdrop stack (~1055) or it can render behind
     the modal it visually belongs to. */
  z-index: 2000;
}

.select2-search--dropdown {
  padding: 0px;
  margin-bottom: 10px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-width: 0 5px 6px 5px;
}

/* select2 style overrides */

/* modal-dialog-scrollable (e.g. the Add Call / camera-capture modal)
   makes .modal-body the actual scroll container. A swipe that reaches
   the top/bottom of that scroll — or one that never finds anything to
   scroll at all, e.g. a short modal — isn't consumed there and chains
   up to the underlying page, which the mobile webview app's own
   pull-to-refresh picks up as a refresh gesture. overscroll-behavior
   stops the chain at the modal's own scroll boundary instead of
   letting it leak through. */
.modal-dialog-scrollable .modal-body {
  overscroll-behavior-y: contain;
}

/* Every OTHER modal (no modal-dialog-scrollable) still has the same
   problem one level up: Bootstrap makes the outer .modal element itself
   the scroll container when its content is taller than the viewport
   (header/footer scroll along with the body). That element had no
   overscroll-behavior at all, so the same chain-to-page-refresh bug hit
   almost every modal in the app, not just the scrollable-dialog ones. */
.modal {
  overscroll-behavior-y: contain;
}

.table_btns_3 {
  min-width: 215px;
  max-width: 215px;
}

.cb_first_loading_wrapper {
  background: #fff;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0px;
  left: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: scale-out-bottom 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) 3s both;
}

.cb_first_loading_logo {
  width: 150px;
  height: auto;
  animation: scale-in-center 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

@keyframes scale-in-center {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scale-out-bottom {
  0% {
    transform: scale(1);
    transform-origin: 50% 100%;
    opacity: 1;
  }

  100% {
    transform: scale(0);
    transform-origin: 50% 100%;
    opacity: 1;
  }
}

.credits {
  position: fixed;
  bottom: 20px;
  font-size: 15px;
}

.cb_logo_auth_wrap {
  position: initial;
  margin-bottom: 20px;
}

.needs-validation .cb_validation_icon_cl .form-control:invalid,
.was-validated .cb_validation_icon_cl .form-control.is-invalid {
  background-position: right calc(0px + 34px) center;
}

.cb_403_page_container {
  /* display: flex;
  align-items: center;
  height: 100vh;
  justify-content: center;
  padding: 15px; */
}

.cb_403_page_container .section {
  width: 100%;
}

.table_btns_inner_wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

/* Smaller action-button text on desktop only — these buttons already
   drop to icon-only below md (see the d-md-none label spans next to
   them), so this only affects the labeled desktop version. */
@media (min-width: 768px) {
  .table_btns_inner_wrap .btn {
    font-size: 12px;
  }
}

/* Leaflet's own CSS puts its zoom/attribution controls at z-index:1000
   (see .leaflet-top/.leaflet-bottom), which sits above this app's mobile
   sidebar overlay (z-index:996 above) — on any page with a map (Doctors,
   Pharmacies, Visit Planning, Pathway), opening the sidebar on mobile
   let the map's +/- zoom box visibly float on top of the menu itself.
   Capped below the sidebar; still well above the map's own tiles/panes
   (max ~700), so normal map control usability is unaffected. */
.leaflet-top,
.leaflet-bottom {
  z-index: 990 !important;
}

/* ===============================================
   rxkpi — KPI Cards v2 (bold colored redesign)
   Scoped entirely under .rxkpi-* — zero globals touched
   =============================================== */

.rxkpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rxkpi-card {
  border-radius: 16px;
  padding: 20px 20px 0 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  margin-bottom: unset;
  color: #fff;
}

.rxkpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

.rxkpi-bg-icon {
  position: absolute;
  right: -10px;
  bottom: -8px;
  font-size: 80px;
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
  color: #fff;
}

.rxkpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rxkpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.80);
}

.rxkpi-badge {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.rxkpi-value {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
  font-family: "Poppins", sans-serif;
}

.rxkpi-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  min-height: 18px;
}

.rxkpi-sub-muted {
  color: rgba(255, 255, 255, 0.55);
}

.rxkpi-sub-bold {
  color: #fff;
  font-weight: 700;
}

.rxkpi-sparkline {
  margin: auto -20px 0;
  min-height: 52px;
}

.rxkpi-progress-wrap {
  margin: auto -20px 0;
}

.rxkpi-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

.rxkpi-progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0 0 16px 16px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.rxkpi-ach-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.rxkpi-radial {
  flex-shrink: 0;
  margin-right: -6px;
}

.rx_dash_top_btns_wrap>.btn>img {
  height: 26px;
  width: auto;
}

.rx_dash_top_btns_wrap {
  padding: 0px;
  overflow: hidden;
  background-color: #104271;
  border-radius: 6px;
}

.rx_dash_top_btns_wrap .btn {
  padding: 10px 12px !important;
  border-radius: 0px;
  min-width: 62px;
  justify-content: center;
}

.rx_dash_top_btns_line {
  width: 1px;
  height: 28px;
  background-color: rgba(255, 255, 255, 0.5);
  margin: 0px 2px;
}

.rx_dash_btns_tittle {
  color: #fff;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 12px;
  padding: 5px 0px 5px;
  margin: 0px 5px;
}

@media (min-width: 768px) {
  .cb_login_card {
    margin-bottom: 30px;
    border: none;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
    padding: 3rem 1.5rem !important;
  }
}

@media (max-width: 1199px) {
  body.toggle-sidebar {
    overflow: hidden;
  }
}

@media (max-width: 991px) {
  .rxkpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rxkpi-sub-muted {
    white-space: nowrap;
    width: 100%;
    display: block;
  }

  .rxkpi-sub {
    flex-wrap: wrap;
    line-height: normal;
    min-height: auto;
    margin-bottom: 10px;
  }

  .rxkpi-card {
    padding: 12px 12px 0 12px;
  }
}

@media (max-width: 767px) {
  .rx-table thead {
    display: none;
  }

  .rx-table tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 5px;
    background: #fff;
  }

  .rx-table td {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    border: none;
    border-bottom: 1px dashed #888888;
    word-break: break-word;
    gap: 15px;
    min-width: 100% !important;
    text-align: right;
  }

  .rx-table td:last-child {
    border-bottom: none;
  }

  .rx-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    white-space: nowrap;
  }

  .rx-table td.table_btns {
    max-width: 100%;
  }

  table td button.btn>i {
    font-size: 12px;
    width: auto;
    height: auto;
  }

  table td button.btn {
    font-size: 0px;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: auto;
    width: 28px;
    height: 26px;
  }

  .table-striped.rx-table>tbody>tr:nth-of-type(odd) {
    color: var(--bs-table-striped-color);
    background-color: var(--bs-table-striped-bg);
  }

  .table-striped.rx-table>tbody>tr:nth-of-type(odd)>* {
    color: var(--bs-table-striped-color);
    background-color: transparent;
  }

  .table-striped>tbody>tr:nth-of-type(odd)>* {
    --bs-table-color-type: none;
    --bs-table-bg-type: none;
  }

  .card-body {
    padding: 10px 10px 10px 10px;
  }

  .card-title {
    padding: 10px 0 15px 0;
  }

  #main {
    padding: 20px 10px;
  }

  .header {
    padding-left: 10px;
  }

  .toggle-sidebar .bi-list.toggle-sidebar-btn:before {
    content: "\f00d";
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    vertical-align: 0;
    padding: 5px;
    font-size: 26px;
  }

  /* A 3+ tab strip (Approvals, Distribution, Doctors, ...) wraps to a
     boxy second row by default — a single scrollable row reads as one
     coherent tab bar instead. */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs .nav-link {
    white-space: nowrap;
  }

  /* The search/per-page/filter/add toolbar row (same shared markup on
     every list page) partially wraps its controls on mobile — some
     pair up, some sit alone with dead space beside them (the search
     box in particular, capped at a desktop-oriented 300px). Give every
     control its own full-width row instead: predictable, and matches
     the one-control-per-row pattern used elsewhere in the mobile
     layout (page-intro, table cards, etc). */
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap>* {
    flex: 1 1 100%;
  }

  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap .input-group.flex-grow-1 {
    max-width: none !important;
  }
}

@media (max-width: 600px) {
  .datatable-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .rx_dash_btns_tittle {
    font-size: 12px;
  }

  .rx_dash_top_btns_wrap .btn {
    padding: 8px 15px !important;
    min-width: auto;
  }
}

@media (max-width: 400px) {
  .rxkpi-value {
    font-size: 26px;
  }

  .rx_dash_top_btns_wrap>.btn>img {
    height: 22px;
  }

  .rx_dash_top_btns_wrap .btn {
    min-width: 56px;
  }
}



/* Custom date picker */
.custom-date-input::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

.date-wrapper,
.date-wrapper .custom-date-input,
.date-wrapper .input-group-text {
  cursor: pointer !important;
}

/* Custom date piker */

/* Table Sorting Related */
.rx-sortable-th {
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.rx-sortable-th .sort-icon {
  opacity: 0.3;
  font-size: 0.85em;
  transition: all 0.2s;
}

.rx-sortable-th.active-sort .sort-icon {
  opacity: 1;
  color: var(--bs-primary);
}


/* FILTER DROPOWN RELATED */
.rx-table-wrapper .dropdown-menu {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.rx-table-wrapper .dropdown-menu .dropdown-header {
  position: sticky;
  top: -1rem;
  background: #fff;
  z-index: 10;
  margin-top: -1rem;
  padding-top: 1rem;
}

.rx-table-wrapper .dropdown-menu .border-top {
  position: sticky;
  bottom: -1rem;
  background: #fff;
  z-index: 10;
  margin-bottom: -1rem;
  padding-bottom: 1rem;
}

/* Skeleton loading placeholder — RxTable swaps this in for a table's
   first load instead of the global page loader, so a page never blocks
   on its own initial data fetch. Replaced with real rows the instant
   the response arrives. */
.rx-skeleton-bar {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #edf0f5 25%, #e2e7ee 37%, #edf0f5 63%);
  background-size: 400% 100%;
  animation: rx-skeleton-shimmer 1.4s ease infinite;
}

@keyframes rx-skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

/* The per-page picker's toolbar row is forced to a single non-wrapping
   line at desktop widths (flex-md-nowrap) — when the row's other
   controls (search box, filter, add button) don't all fit, the browser's
   default flex-shrink squeezes this down below its set width, truncating
   "25 / page" to unreadable text. Never let it shrink; the search box
   (which already tolerates shrinking down to its own min-width) absorbs
   the squeeze instead. Applies at every width, not just mobile. */
select.rx-per-page+.select2-container {
  flex-shrink: 0;
}
/* Doctor/pharmacy History window — a simple timeline, newest first. */
.rx-history-item {
  position: relative;
  padding: 0 0 1rem 1.25rem;
  border-left: 2px solid #dee2e6;
}
.rx-history-item:last-child {
  padding-bottom: 0;
}
.rx-history-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6c757d;
}
.rx-history-item.rx-history-created::before {
  background: #198754;
}
.rx-history-item.rx-history-request::before {
  background: #ffc107;
}
.rx-history-item.rx-history-deleted::before {
  background: #dc3545;
}
.rx-history-from {
  text-decoration: line-through;
  color: #6c757d;
}
.rx-history-change + .rx-history-change {
  margin-top: 0.15rem;
}

/* The sort in effect is filled in the brand colour, so the list's order reads at a glance. */
.rx-mobile-sort-bar .rx-sortable-th.active-sort {
  background-color: #104271 !important;
  border-color: #104271 !important;
  color: #fff !important;
}
.rx-mobile-sort-bar .rx-sortable-th.active-sort .sort-icon {
  color: #fff;
}

/* Call Details map: a visit logged at the registered address — one pin, blue ring with a red centre. */
.rx-visit-pin-same {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.rx-visit-pin-same > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid #fff;
}
.rx-visit-pin-same.rx-visit-pin-same-sm {
  width: 14px;
  height: 14px;
  border-width: 1px;
  box-shadow: none;
}
.rx-visit-pin-same.rx-visit-pin-same-sm > span {
  width: 6px;
  height: 6px;
  border-width: 1px;
}

/* Approvals on a phone: one card per request (requestCard() in approvals/index)
   instead of a dashed label/value row for every column. */
@media (max-width: 767px) {
  .rx-table td.rx-request-card {
    display: block;
    text-align: left;
    border-bottom: none;
    padding: 6px 8px;
  }
  .rx-table td.rx-request-card::before {
    content: none;
  }
  .rx-request-type {
    font-size: 0.8rem;
    font-weight: 600;
    color: #104271;
  }
  .rx-request-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
  }
  .rx-request-people {
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1px solid #eef0f3;
    font-size: 0.85rem;
    color: #6b7280;
  }
  .rx-table td.rx-request-card button.rx-request-review {
    width: 100%;
    height: auto;
    font-size: 0.95rem;
    padding: 0.55rem;
    margin-top: 0.75rem;
  }
}

/* Reports > Team Leaderboard on a phone: one row per person (renderLeaderboard()). */
@media (max-width: 767px) {
  .rx-table td.rx-lb-card {
    display: block;
    text-align: left;
    border-bottom: none;
    padding: 4px 8px;
  }
  .rx-table td.rx-lb-card::before {
    content: none;
  }
  .rx-lb-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: #eef2f7;
    color: #104271;
  }
  .rx-lb-rank-1 { background: #fbbf24; color: #fff; }
  .rx-lb-rank-2 { background: #9ca3af; color: #fff; }
  .rx-lb-rank-3 { background: #c2410c; color: #fff; }
  .rx-lb-name {
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
  }
  .rx-lb-meta {
    font-size: 0.8rem;
    color: #6b7280;
  }
  .rx-lb-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #104271;
    line-height: 1;
  }
  .rx-lb-value-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .rx-lb-badge {
    font-size: 0.85rem;
  }
}

/* Doctor/Pharmacy Calls on a phone: one card per visit (window.visitCard in components/call_modal). */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card {
    display: block;
    text-align: left;
    border-bottom: none;
    padding: 6px 8px;
  }
  .rx-table td.rx-visit-card::before {
    content: none;
  }
  .rx-visit-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #1f2937;
    line-height: 1.3;
  }
  .rx-visit-meta {
    font-size: 0.82rem;
    color: #6b7280;
  }
  .rx-visit-remarks {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #374151;
  }
  .rx-visit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1px solid #eef0f3;
  }
  .rx-table td.rx-visit-card .rx-visit-actions .btn {
    font-size: 0.8rem;
    width: auto;
    height: auto;
    padding: 0.3rem 0.7rem;
    gap: 0.3rem;
  }
}

/* Pathway > Team Activity on a phone: one row per person (loadTeamSummary()); shares the leaderboard's name/figure styles. */
@media (max-width: 767px) {
  .rx-table td.rx-team-card {
    display: block;
    text-align: left;
    border-bottom: none;
    padding: 4px 8px;
  }
  .rx-table td.rx-team-card::before {
    content: none;
  }
  .rx-team-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8eef6;
    color: #104271;
    font-weight: 700;
    font-size: 0.85rem;
  }
  .rx-table td.rx-team-card button.rx-team-view {
    width: 100%;
    height: auto;
    font-size: 0.9rem;
    padding: 0.45rem;
    margin-top: 0.65rem;
  }
}

/* Approvals: small visit-photo preview beside a flagged visit (the full photo is in Review). */
.rx-request-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}
@media (max-width: 767px) {
  .rx-request-thumb {
    width: 56px;
    height: 56px;
  }
}

/* Call Details modal (components/call_details_modal): who/when/where up top, pills for method and review, sections only when filled. */
.rx-cd-head {
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid #eef0f3;
}
.rx-cd-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  color: #104271;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rx-cd-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.25;
  margin: 0.15rem 0 0.35rem;
}
.rx-cd-meta {
  font-size: 0.88rem;
  color: #4b5563;
}
.rx-cd-meta .bi {
  color: #9ca3af;
  margin-right: 0.25rem;
}
.rx-cd-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.rx-cd-pill-success {
  background: #ecfdf3;
  color: #047857;
  border-color: #bbf7d0;
}
.rx-cd-pill-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
/* A status pill that can be clicked (Users table): the same look, plus a hand cursor, hover and keyboard focus. */
.rx-cd-pill.rx-status-toggle {
  cursor: pointer;
  font-family: inherit;
  line-height: 1.5;
  transition: background-color 0.15s, border-color 0.15s;
}
.rx-cd-pill.rx-status-toggle:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.rx-cd-pill-success.rx-status-toggle:hover {
  background: #d1fae5;
  border-color: #86efac;
}
.rx-cd-pill.rx-status-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.rx-cd-legend {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
}
.rx-cd-map {
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.rx-cd-section {
  margin-top: 0.9rem;
}
.rx-cd-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.rx-cd-chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #eef2f7;
  color: #1f2937;
}
.rx-cd-chip-info {
  background: #e0f2fe;
  color: #075985;
}
.rx-cd-remarks {
  padding: 0.5rem 0.7rem;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  border-radius: 6px;
  color: #374151;
  white-space: pre-line;
}
.rx-cd-photo {
  display: block;
  width: 100%;
  /* The whole photo, not a crop — a visit photo often has the signboard at the top or edge. */
  max-height: min(65vh, 460px);
  object-fit: contain;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* Touch screens: shown on a locked map until it's tapped (lockMapForTouch in main.js). */
.rx-map-lock-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 800;
  pointer-events: none;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

/* Doctor/Pharmacy Calls cards: small photo preview in the header (window.visitCard). */
.rx-visit-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  cursor: pointer;
}

/* Users list on a phone: one card per person (usersTable renderer); shares name/meta, pill and action styles. */
@media (max-width: 767px) {
  .rx-table td.rx-user-card {
    display: block;
    text-align: left;
    border-bottom: none;
    padding: 6px 8px;
  }
  .rx-table td.rx-user-card::before {
    content: none;
  }
  .rx-user-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8eef6;
    color: #104271;
    font-weight: 700;
    font-size: 0.9rem;
  }
  .rx-user-contact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1px solid #eef0f3;
    font-size: 0.88rem;
  }
  .rx-user-contact a {
    color: #104271;
    text-decoration: none;
  }
  .rx-user-contact .bi {
    color: #9ca3af;
    margin-right: 0.3rem;
  }
  .rx-table td.rx-user-card .rx-visit-actions .btn {
    font-size: 0.8rem;
    width: auto;
    height: auto;
    padding: 0.3rem 0.7rem;
    gap: 0.3rem;
  }
}

/* Users card: the status pill keeps its width; a long role name wraps instead of squeezing "Active" onto two lines. */
.rx-user-card .rx-cd-pill {
  flex-shrink: 0;
  white-space: nowrap;
}

/* x-user_avatar: initials on a soft circle when a person has no photo (header, profile, platform header). */
.rx-avatar,
.header-nav .nav-profile .rx-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8eef6;
  color: #104271;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Doctors / Pharmacies cards on a phone: status pill beside the name, latest visit in its own strip. */
.rx-status-pill {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .rx-list-lastcall {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #6b7280;
  }
  .rx-list-lastcall .bi {
    color: #9ca3af;
  }
  .rx-list-lastcall .btn {
    margin-left: auto;
  }
  /* Actions as equal tiles in one row — icon over a short label — so four actions never wrap. */
  .rx-card-tiles {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.4rem;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: auto;
    height: auto;
    min-height: 52px;
    padding: 0.45rem 0.2rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.1;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .btn > i {
    font-size: 15px;
    color: #104271;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .btn-danger,
  .rx-table td.rx-visit-card .rx-card-tiles .btn-danger > i {
    color: #b91c1c;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .btn-outline-success,
  .rx-table td.rx-visit-card .rx-card-tiles .btn-outline-success > i {
    color: #047857;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .js-add-call-btn {
    background: #104271;
    border-color: #104271;
    color: #fff;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .js-add-call-btn > i {
    color: #fff;
  }
}

/* ---- Page top, modernised: intro summary, and on phones a compact title, segmented tabs and a tidy toolbar ---- */
.rx-intro-summary {
  display: none;
}
@media (max-width: 767px) {
  .pagetitle {
    margin-bottom: 12px;
  }
  .pagetitle h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  /* The breadcrumb only repeats the title on a phone; the menu is the way back. */
  .pagetitle nav {
    display: none;
  }

  /* Tabs as one segmented control. */
  .nav-tabs {
    border-bottom: 0;
    background: #eef2f7;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
  }
  .nav-tabs .nav-link {
    border: 0 !important;
    border-radius: 9px;
    margin: 0;
    padding: 0.5rem 0.9rem;
    color: #475569;
    font-weight: 500;
    background: transparent;
  }
  .nav-tabs .nav-link.active {
    background: #fff;
    color: #104271;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  }

  /* Intro collapses to a single tappable line. */
  .rx-intro {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    padding: 0.6rem 0.8rem !important;
    border-radius: 10px;
  }
  .rx-intro-summary {
    display: flex;
    align-items: center;
    list-style: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #104271;
  }
  .rx-intro-summary::-webkit-details-marker {
    display: none;
  }
  .rx-intro-summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    margin-left: auto;
    transition: transform 0.2s;
  }
  .rx-intro[open] .rx-intro-summary::after {
    transform: rotate(180deg);
  }
  .rx-intro[open] .rx-intro-summary {
    margin-bottom: 0.5rem;
  }
  .rx-intro .rx-intro-icon {
    display: none;
  }

  /* List toolbar: search on its own row, page size beside Filter, Import beside Add. */
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > .input-group {
    flex: 1 1 100%;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > select.rx-per-page,
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > .select2-container {
    flex: 1 1 0 !important;
    max-width: none !important;
    width: auto !important;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > .dropdown {
    flex: 1 1 0;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > .dropdown > .btn {
    width: 100%;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > .btn {
    flex: 1 1 40%;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap .form-control,
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap .btn,
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap .select2-selection {
    min-height: 44px;
    border-radius: 10px;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap .input-group > .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap .input-group > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

/* Card tiles: some action buttons carry Bootstrap's text-white (!important) from the desktop table, which hid their label on the white tile. */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card .rx-card-tiles .btn.text-white:not(.js-add-call-btn) {
    color: #374151 !important;
  }
}

/* ---- App bar, modernised: one quiet surface, equal round icon buttons, a tidy badge and avatar ---- */
.header {
  height: 60px;
  background-color: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #eef0f3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.header .toggle-sidebar-btn,
.header-nav .nav-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cb-primary);
  transition: background-color 0.15s;
}
.header .toggle-sidebar-btn {
  font-size: 26px;
  margin-right: 6px;
}
.header-nav .nav-icon {
  font-size: 20px;
  margin-right: 4px;
}
.header .toggle-sidebar-btn:hover,
.header-nav .nav-icon:hover,
.header-nav .nav-icon[aria-expanded="true"] {
  background-color: #f1f5f9;
}
.header-nav .badge-number {
  inset: 3px 2px auto auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  background: #dc2626 !important;
  border: 2px solid #fff;
  box-sizing: content-box;
}
.header-nav .nav-profile {
  padding: 2px;
  border-radius: 999px;
  transition: background-color 0.15s;
}
.header-nav .nav-profile:hover,
.header-nav .nav-profile[aria-expanded="true"] {
  background-color: #f1f5f9;
}
.header-nav .nav-profile .rx-avatar,
.header-nav .nav-profile .rx-avatar-img {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dbe3ee;
}
.header .logo img {
  max-height: 32px;
}
@media (max-width: 767px) {
  .header {
    padding-left: 8px;
    padding-right: 4px;
  }
  .header .logo img {
    max-height: 30px;
  }
  .header-nav .nav-icon {
    margin-right: 2px;
  }
}

/* ---- Dashboard: greeting, labelled call buttons, today-at-a-glance tiles, chart headers ---- */
.rx-dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.rx-dash-greeting {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.15rem;
}
.rx-dash-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}
.rx-dash-actions {
  display: flex;
  gap: 0.5rem;
}
.rx-dash-actions .btn,
#rxStartDayBtn {
  min-height: 44px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.rx-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}
.rx-glance-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
}
.rx-glance-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rx-glance-label .bi {
  font-size: 0.7rem;
}
.rx-glance-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eef6;
  color: #104271;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.rx-glance-attention .rx-glance-icon {
  background: #fde68a;
  color: #92400e;
}
.rx-glance-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: #104271;
  font-variant-numeric: tabular-nums;
}
.rx-glance-link:hover {
  border-color: #cbd5e1;
}
/* Call statuses on a dashboard tile: a small stack of icon and count at the right edge. */
.rx-glance-tile:has(.rx-glance-status) {
  position: relative;
}
.rx-glance-status {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  color: #4b5563;
  font-variant-numeric: tabular-nums;
}
.rx-glance-status > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.rx-glance-status > span.is-zero {
  opacity: 0.4;
}
.rx-glance-stat-done .bi {
  color: #198754;
}
.rx-glance-stat-unavailable .bi {
  color: #b45309;
}
.rx-glance-stat-refused .bi {
  color: #dc3545;
}
.rx-glance-stat-follow_up .bi {
  color: #0d6efd;
}
.rx-glance-attention {
  border-color: #fde68a;
  background: #fffbeb;
}
.rx-glance-attention .rx-glance-value {
  color: #b45309;
}
/* A calm reminder: the same soft blue as the help panels on the billing page. */
.rx-glance-info {
  border-color: #d6e4f5;
  background: #eef4fb;
}
.rx-glance-info .rx-glance-icon {
  background: #dbe8f7;
  color: #104271;
}
.rx-glance-info .rx-glance-label {
  color: #4b5563;
}
.rx-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
}
.rx-chart-sub {
  font-size: 0.78rem;
  color: #6b7280;
}
@media (max-width: 767px) {
  .rx-dash-head {
    flex-direction: column;
    align-items: stretch;
  }
  .rx-dash-actions-wrap {
    align-items: stretch;
  }
  .rx-dash-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
  /* Doctor / Pharmacy / CP call as compact tiles: icon over a label that may wrap, so three fit. */
  .rx-dash-actions .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.45rem 0.3rem;
    font-size: 0.85rem;
    line-height: 1.15;
    white-space: normal;
  }
  .rx-dash-actions .btn .bi {
    margin-right: 0 !important;
    font-size: 1.15rem;
  }
  #rxStartDayBtn {
    width: 100%;
  }
  .rx-glance {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }
  .rx-glance-value {
    font-size: 1.4rem;
  }
  /* The invoice reminder is a full-width row on phones, so the amount and the due date both stay readable. */
  .rx-glance-wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
  .rx-glance-wide .rx-glance-icon {
    margin-bottom: 0;
  }
  .rx-glance-wide .rx-glance-value {
    white-space: nowrap;
  }
  .rx-glance-wide .rx-glance-label {
    margin-left: auto;
    overflow: visible;
  }
}

/* Bell badge: a small counter at the bell's top-right corner rather than a pill covering the icon. */
.header-nav .nav-icon .badge-number {
  inset: 4px 2px auto auto;
  transform: translate(45%, -25%);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 16px;
  border-width: 1.5px;
}

/* Dashboard Top Selling Products on a phone: one row per product (rank, name, region and units, value with a growth pill). */
@media (max-width: 767px) {
  .rx-top-value {
    font-size: 1rem;
    font-weight: 700;
    color: #104271;
    white-space: nowrap;
  }
  .rx-top-growth {
    margin-top: 0.2rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .rx-top-pill-down {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
  }
}

/* Loading overlay: a light blur over the page with a compact card, instead of a blank white screen. */
.rx-loader {
  background: rgba(248, 250, 252, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: rx-loader-in 0.15s ease-out;
}
.rx-loader-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.1rem 1.4rem 0.9rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
@keyframes rx-loader-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-loader { animation: none; }
}
.rx-loader .cb-loader-wrapper,
.rx-loader .cb-loader-spinner {
  width: 64px;
  height: 64px;
}
.rx-loader .cb-loader-spinner {
  border-width: 3px;
}

/* Bell badge: sits on the bell's own corner and keeps clear of the avatar next to it
   (users without a settings icon have the bell right beside their avatar). */
.header-nav .nav-icon .badge-number {
  inset: 3px 3px auto auto;
  transform: translate(35%, -20%);
}
#notificationBellToggle {
  margin-right: 10px;
}
.rx-loader .cb-loader-logo {
  width: 40px;
}
.rx-request-thumb[role="button"] {
  cursor: pointer;
}

/* Approvals review modal */
.rx-review-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.rx-cd-label .badge { text-transform: none; letter-spacing: 0; }
.rx-review-footer { flex-wrap: nowrap; gap: .5rem; }
.rx-review-footer > .btn { flex: 1 1 0; margin: 0; min-height: 44px; font-weight: 600; }
@media (min-width: 768px) {
  .rx-review-footer > .btn { flex: 0 0 auto; min-width: 120px; }
}

/* Pathway: summary tiles and the loading / nothing-logged state */
.rx-path-state .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.rx-path-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eef6;
  color: #104271;
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
}
.rx-path-state[data-state="error"] .rx-path-state-icon {
  background: #fef2f2;
  color: #b91c1c;
}
.rx-path-state-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  text-wrap: balance;
}
.rx-path-state-text {
  font-size: 0.88rem;
  color: #6b7280;
  max-width: 34ch;
  margin-top: 0.3rem;
}
.rx-path-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rx-path-summary .rx-glance-value small {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
}
@media (max-width: 767px) {
  .rx-path-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .rx-path-summary .rx-glance-tile {
    padding: 0.6rem 0.5rem;
    align-items: center;
    text-align: center;
  }
  .rx-path-summary .rx-glance-icon {
    display: none;
  }
  .rx-path-summary .rx-glance-value {
    font-size: 1.2rem;
  }
  .rx-path-summary .rx-glance-label {
    font-size: 0.72rem;
  }
}

/* Sign-in screens: soft brand-tinted ground, one centred card */
.rx-auth {
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
}
.rx-auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 16px 1.25rem;
}
.rx-auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16, 66, 113, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
  padding: 1.75rem 1.4rem 1.5rem;
}
.rx-auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.rx-auth-logo img {
  max-height: 40px;
  max-width: 170px;
  object-fit: contain;
}
.rx-auth-head {
  text-align: center;
  margin-bottom: 1.4rem;
}
.rx-auth-title {
  font-family: "Nunito", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}
.rx-auth-sub {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0.2rem 0 0;
}
.rx-auth-field {
  margin-bottom: 1rem;
}
.rx-auth .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}
.rx-auth-input {
  position: relative;
}
.rx-auth-input .form-control {
  height: 48px;
  padding-left: 2.6rem;
  border-radius: 12px !important;
  border-color: #dde3ea;
  font-size: 1rem;
}
.rx-auth-input .form-control:focus {
  border-color: #104271;
  box-shadow: 0 0 0 0.2rem rgba(16, 66, 113, 0.12);
}
.rx-auth-input-icon {
  position: absolute;
  left: 0.95rem;
  top: 24px;
  transform: translateY(-50%);
  color: #9ca3af;
  z-index: 6;
  pointer-events: none;
}
.rx-auth-input .form-control:focus ~ .rx-auth-input-icon,
.rx-auth-input:focus-within .rx-auth-input-icon {
  color: #104271;
}
.rx-auth-input #yourPassword,
.rx-auth-input .cb_eye_input {
  padding-right: 3rem;
}
/* Two-factor code box: big, spaced digits. */
.rx-auth .rx-auth-code {
  height: 48px;
  border-radius: 12px !important;
  letter-spacing: 4px;
  font-size: 1.25rem;
}
.rx-auth-input .cb_password_eye_wrap {
  top: 24px;
  right: 0;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* The reset form's older eye rule (#resetForm, 10px from the top) would win over the one above. */
#resetForm .rx-auth-input .cb_password_eye_wrap {
  top: 24px;
  right: 0;
}
/* Bootstrap's valid and invalid tick sits to the left of the eye, not under it. */
.rx-auth-input .cb_eye_input.is-valid,
.rx-auth-input .cb_eye_input.is-invalid,
.was-validated .rx-auth-input .cb_eye_input:valid,
.was-validated .cb_validation_icon_cl.rx-auth-input .cb_eye_input.is-invalid {
  background-position: right 3.1rem center;
  padding-right: 5rem;
}
.rx-auth-input .invalid-feedback {
  width: 100%;
}
.rx-auth-link {
  font-weight: 600;
  text-decoration: none;
}
.rx-auth-remember {
  margin: 0.25rem 0 1.25rem;
}
.rx-pw-hint.is-met {
  color: #198754;
}
/* The terms checkbox's message sits under the label: make it read as an error, not fine print. */
.rx-auth-remember .invalid-feedback {
  font-size: 0.875rem;
  font-weight: 600;
}
.rx-auth-remember .form-check-label {
  font-size: 0.9rem;
  color: #4b5563;
}
.rx-auth-consent {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}
/* The links in that line sit in the same small type, a touch heavier so they read as links. */
.rx-auth-consent .rx-auth-link {
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rx-auth-submit {
  height: 48px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
}
.rx-auth-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: #4b5563;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}
.rx-auth-switch:hover {
  background: rgba(16, 66, 113, 0.06);
  color: #104271;
}
.rx-auth-credits {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}
.rx-auth-credits a {
  color: #6b7280;
  text-decoration: none;
}
/* The show-password eye sits where Bootstrap draws its warning icon. */
.rx-auth-input #yourPassword.is-invalid {
  background-image: none;
}
/* Sign-up: a few more fields than sign-in, so a little wider. */
.rx-auth-card-wide {
  max-width: 460px;
}
.rx-auth-input .form-select {
  height: 48px;
  padding-left: 2.6rem;
  border-radius: 12px;
  border-color: #dde3ea;
  font-size: 1rem;
}
.rx-auth-input .form-select:focus {
  border-color: #104271;
  box-shadow: 0 0 0 0.2rem rgba(16, 66, 113, 0.12);
}
/* Request access: a modal on the sign-up page, outside .rx-auth, so it carries the same field look itself. */
.rx-auth-modal .modal-content {
  border-radius: 16px;
  border: 0;
}
.rx-auth-modal .modal-title {
  font-weight: 700;
  color: #1f2937;
}
.rx-auth-modal .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}
.rx-auth-modal .form-control,
.rx-auth-modal .form-select {
  border-radius: 12px;
  border-color: #dde3ea;
  font-size: 1rem;
}
.rx-auth-modal .form-control:not(textarea),
.rx-auth-modal .form-select {
  height: 48px;
}
.rx-auth-modal .form-control:focus,
.rx-auth-modal .form-select:focus {
  border-color: #104271;
  box-shadow: 0 0 0 0.2rem rgba(16, 66, 113, 0.12);
}
.rx-auth-modal .modal-footer {
  border-top: 0;
  padding-top: 0;
}
.rx-auth-modal .modal-footer .btn {
  height: 44px;
  border-radius: 12px;
  font-weight: 600;
}
/* A short note above an auth form (e.g. "Your request is approved"). */
.rx-auth-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(25, 135, 84, 0.08);
  color: #14532d;
  font-size: 0.9rem;
}
.rx-auth-notice .bi {
  margin-top: 0.1rem;
}
.rx-auth-after {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: #6b7280;
  text-align: center;
}
/* Secondary actions under an auth form (e.g. confirm-your-email). */
.rx-auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
/* The bot trap: off-screen, never seen or tabbed to by people. */
.rx-auth-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Medicines card: pack size and price on one line under the name. */
@media (max-width: 767px) {
  .rx-list-facts {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: #4b5563;
  }
  .rx-list-facts:empty {
    display: none;
  }
  .rx-list-facts .bi {
    color: #9ca3af;
    margin-right: 0.3rem;
  }
  .rx-list-facts strong {
    color: #104271;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
  }
}

/* Notification pieces, shared by the header bell and the Notifications page (window.notificationContent). */
.rx-notif-tag { white-space: nowrap; display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; background: #f1f5f9; color: #475569; }
.rx-notif-tag-warning { background: #fff7e6; color: #b45309; }
.rx-notif-tag-success { background: #ecfdf3; color: #047857; }
.rx-notif-tag-danger { background: #fef2f2; color: #b91c1c; }
.rx-notif-body { font-size: .85rem; color: #374151; margin-top: .15rem; }
.rx-notif-meta { font-size: .8rem; color: #6b7280; margin-top: .1rem; }
.rx-notif-meta strong { color: #374151; font-weight: 600; }
.rx-notif-note { font-size: .8rem; color: #4b5563; font-style: italic; margin-top: .3rem; padding-left: .5rem; border-left: 2px solid #e5e7eb; }
.rx-notif-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.rx-notif-icon-warning { background: #fff7e6; color: #b45309; }
.rx-notif-icon-success { background: #ecfdf3; color: #047857; }
.rx-notif-icon-danger { background: #fef2f2; color: #b91c1c; }
.rx-notif-icon-primary { background: #e8eef6; color: #104271; }

/* Header bell dropdown */
#notificationList.rx-notification-list {
  width: 380px;
  max-width: calc(100vw - 16px);
  max-height: min(520px, 75vh);
  overflow-y: auto;
  padding: 0;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.rx-nd-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .8rem 1rem;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}
.rx-nd-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.rx-nd-count {
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: #e8eef6;
  color: #104271;
}
.rx-nd-markall {
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.header-nav .notifications .rx-nd-item i {
  margin: 0;
  font-size: inherit;
}
.header-nav .notifications .rx-nd-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid #f1f3f6;
  cursor: pointer;
  white-space: normal;
  transition: background-color .15s ease;
}
.header-nav .notifications .rx-nd-item:hover {
  background: #f8fafc;
}
.header-nav .notifications .rx-nd-item.is-unread {
  background: #f3f8ff;
}
.header-nav .notifications .rx-nd-item.is-unread:hover {
  background: #eaf2fe;
}
.rx-nd-item-title {
  font-size: .9rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.3;
}
.rx-nd-item.is-unread .rx-nd-item-title {
  font-weight: 700;
}
.rx-nd-item .rx-notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: .35rem;
  border-radius: 50%;
  background: #2563eb;
}
.rx-nd-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .4rem;
}
.rx-nd-time {
  font-size: .75rem;
  color: #9ca3af;
}
.rx-nd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .2rem;
  padding: 2rem 1rem;
  color: #374151;
}
.rx-nd-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.3rem;
  margin-bottom: .4rem;
}
.rx-nd-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid #eef0f3;
}
.rx-nd-foot a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .7rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}
@media (max-width: 767px) {
  #notificationList.rx-notification-list {
    position: fixed !important;
    inset: 64px 8px auto 8px !important;
    transform: none !important;
    width: auto;
    max-width: none;
  }
  #notificationList.rx-notification-list.dropdown-menu-arrow::before {
    display: none;
  }
}

/* Card action tiles: a label never breaks mid-word ("Deactivat / e"); if it can't fit it trims with an ellipsis. */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card .rx-card-tiles .btn {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: normal;
  }
  .rx-table td.rx-visit-card .rx-card-tiles .btn > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Doctors / Pharmacies on a computer: Edit, Delete, Deactivate and History as compact icon buttons
   (their name shows on hover), Add Call keeps its label. Five labelled buttons were wider than the
   column and ran over the Last Call date. */
@media (min-width: 768px) {
  td.table_btns_3 {
    min-width: 0;
    max-width: none;
    width: 1%;
    white-space: nowrap;
  }
  td.table_btns_3 .table_btns_inner_wrap {
    gap: 4px;
  }
  td.table_btns_3 .btn:not(.js-add-call-btn),
  .rx-table td[data-label="Last Call" i] .btn {
    font-size: 0;
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #104271;
  }
  td.table_btns_3 .btn:not(.js-add-call-btn) i.d-md-none {
    display: inline-block !important;
    font-size: 14px;
  }
  td.table_btns_3 .btn:not(.js-add-call-btn):hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
  }
  td.table_btns_3 .btn-danger:not(.js-add-call-btn) {
    color: #b91c1c;
  }
  td.table_btns_3 .btn-danger:not(.js-add-call-btn):hover {
    background: #fef2f2;
    border-color: #fecaca;
  }
  td.table_btns_3 .btn-outline-success:not(.js-add-call-btn) {
    color: #047857;
  }
  td.table_btns_3 .btn-outline-secondary:not(.js-add-call-btn) {
    color: #475569;
  }
  td.table_btns_3 .js-add-call-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    background: #104271;
    border-color: #104271;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
  }
  td.table_btns_3 .js-add-call-btn i.d-md-none {
    display: inline-block !important;
  }
}

/* Edit carries Bootstrap text-white (white !important), which left a white pencil on the white icon button. */
@media (min-width: 768px) {
  td.table_btns_3 .btn.text-white:not(.js-add-call-btn) {
    color: #104271 !important;
  }
  .rx-table td[data-label="Last Call" i] .btn i {
    font-size: 14px;
  }
  td.table_btns_3 .js-add-call-btn {
    min-width: 0;
  }
}

/* Dashboard "Visits today" / "This week" summary (openGlanceSummary) */
button.rx-glance-tile {
  text-align: left;
  font: inherit;
  width: 100%;
  cursor: pointer;
}
.rx-glance-link:focus-visible {
  outline: 2px solid #104271;
  outline-offset: 2px;
}
.rx-gs-date {
  font-size: .82rem;
  color: #6b7280;
  margin-top: .1rem;
}
.rx-gs-loading {
  padding: 2rem 0;
  text-align: center;
  color: #6b7280;
}
.rx-gs-lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #1f2937;
  margin-bottom: .5rem;
}
.rx-gs-lead strong {
  color: #104271;
}
.rx-gs-facts {
  font-size: .9rem;
  line-height: 1.55;
  color: #4b5563;
  margin-bottom: .75rem;
}
.rx-gs-facts strong {
  color: #1f2937;
  font-weight: 600;
}
.rx-gs-notes {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}
.rx-gs-note {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: .88rem;
  text-decoration: none;
}
.rx-gs-note-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.rx-gs-note-warning:hover {
  background: #fef3c7;
  color: #92400e;
}
.rx-gs-section {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
  margin: 1rem 0 .5rem;
}
.rx-gs-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: .35rem;
  align-items: end;
}
.rx-gs-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.rx-gs-day-count {
  font-size: .78rem;
  font-weight: 600;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}
.rx-gs-day-bar {
  width: 100%;
  max-width: 34px;
  height: 56px;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.rx-gs-day-bar > span {
  display: block;
  width: 100%;
  background: #104271;
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.rx-gs-day-name {
  font-size: .72rem;
  color: #6b7280;
}
.rx-gs-people {
  display: flex;
  flex-direction: column;
}
.rx-gs-person {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem 0;
  border-bottom: 1px solid #f1f3f6;
}
.rx-gs-person:last-child {
  border-bottom: 0;
}
.rx-gs-avatar {
  width: 36px;
  height: 36px;
  font-size: .8rem;
}
.rx-gs-person-name {
  font-weight: 600;
  color: #1f2937;
  font-size: .92rem;
  line-height: 1.3;
}
.rx-gs-person-meta {
  font-size: .8rem;
  color: #6b7280;
  line-height: 1.35;
}
.rx-gs-person-total {
  flex-shrink: 0;
  min-width: 34px;
  text-align: right;
  font-size: 1.15rem;
  font-weight: 700;
  color: #104271;
  font-variant-numeric: tabular-nums;
}
.rx-gs-idle {
  font-size: .88rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 0;
}
.rx-gs-pathway {
  margin-top: 1.1rem;
  min-height: 44px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rx-gs-idle-note {
  color: #6b7280;
  font-size: .82rem;
}
.rx-gs-person-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.rx-gs-person-total small {
  font-size: .68rem;
  font-weight: 500;
  color: #9ca3af;
}
/* Summary text: one statement per line so it reads top to bottom. */
.rx-gs-lead {
  margin-bottom: .75rem;
}
.rx-gs-lead > div:first-child {
  font-size: 1.1rem;
}
.rx-gs-lead-sub {
  font-size: .95rem;
  color: #374151;
  margin-top: .15rem;
}
ul.rx-gs-facts {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
ul.rx-gs-facts li {
  margin: 0;
}
.rx-gs-hint {
  display: block;
  font-size: .8rem;
  color: #9ca3af;
  margin-left: 1.35rem;
}
/* Summary on phones: headline at body-text scale so it doesn't wrap into a block. */
@media (max-width: 575px) {
  .rx-gs-lead > div:first-child {
    font-size: .98rem;
    line-height: 1.4;
  }
  .rx-gs-lead-sub {
    font-size: .88rem;
  }
  ul.rx-gs-facts,
  .rx-gs-facts {
    font-size: .85rem;
    line-height: 1.45;
  }
  .rx-gs-note {
    font-size: .84rem;
  }
  #glanceSummaryModal .modal-title {
    font-size: 1.1rem;
  }
}
/* Summary rows open that person's route on Pathway. */
a.rx-gs-person-link {
  color: inherit;
  text-decoration: none;
  margin: 0 -.5rem;
  padding-left: .5rem;
  padding-right: .5rem;
  border-radius: 10px;
}
a.rx-gs-person-link:hover,
a.rx-gs-person-link:focus-visible {
  background: #f5f8fc;
}
a.rx-gs-person-link:focus-visible {
  outline: 2px solid #104271;
  outline-offset: -2px;
}
.rx-gs-person-go {
  flex-shrink: 0;
  color: #9ca3af;
  font-size: .85rem;
}

/* Add Doctor: "this doctor may already be in RxRep" */
.rx-similar {
  margin-top: .6rem;
  padding: .75rem .85rem;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
}
.rx-similar-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  font-size: .9rem;
  color: #92400e;
  margin-bottom: .45rem;
}
.rx-similar-item {
  padding: .5rem 0;
  border-top: 1px solid #fde68a;
}
.rx-similar-item:first-of-type {
  border-top: 0;
  padding-top: .1rem;
}
.rx-similar-name {
  font-weight: 600;
  color: #1f2937;
}
.rx-similar-facts {
  font-size: .82rem;
  color: #6b7280;
  margin-top: .1rem;
}
.rx-similar-actions {
  margin-top: .45rem;
}
.rx-similar-actions .btn {
  border-radius: 8px;
  font-weight: 600;
}
.rx-similar-note {
  font-size: .82rem;
  color: #92400e;
}
.rx-similar .js-similar-dismiss {
  color: #6b7280;
  text-decoration: underline;
}
.rx-similar-nudge {
  animation: rx-similar-nudge .6s ease;
}
@keyframes rx-similar-nudge {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .rx-similar-nudge { animation: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .35); }
}

/* Possible duplicates window (components/duplicate_tools) */
.rx-dup-sub {
  font-size: .82rem;
  color: #6b7280;
  margin-top: .15rem;
}
.rx-dup-empty {
  padding: 2rem 0;
  text-align: center;
  color: #6b7280;
}
.rx-dup-empty .bi {
  color: #16a34a;
  margin-right: .4rem;
}
.rx-dup-group {
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  padding: .75rem .85rem;
  margin-bottom: .85rem;
}
.rx-dup-group-head {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  margin-bottom: .4rem;
}
.rx-dup-record {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .55rem .6rem;
  border-radius: 10px;
  cursor: pointer;
  margin: 0 -.35rem;
}
.rx-dup-record:hover {
  background: #f5f8fc;
}
.rx-dup-record:has(input:checked) {
  background: #eef4fb;
  box-shadow: inset 0 0 0 1px #c7d7ea;
}
.rx-dup-record.is-locked {
  cursor: default;
  opacity: .75;
}
.rx-dup-record .form-check-input {
  margin-top: .3rem;
  flex-shrink: 0;
}
.rx-dup-name {
  font-weight: 600;
  color: #1f2937;
}
.rx-dup-suggested {
  display: inline-block;
  margin-left: .35rem;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #047857;
  font-size: .7rem;
  font-weight: 600;
  vertical-align: middle;
}
.rx-dup-facts {
  font-size: .8rem;
  color: #6b7280;
  line-height: 1.4;
}
.rx-dup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .5rem;
}
.rx-dup-actions .btn {
  border-radius: 8px;
  font-weight: 600;
}
@media (max-width: 575px) {
  .rx-dup-actions .btn {
    width: 100%;
    min-height: 42px;
  }
}

/* Area picker (territory_selector): a level flagged by a failed save gets the usual red outline and message. */
.territory-select.is-invalid + .select2-container .select2-selection {
  border-color: #dc3545;
}
.territory-select.is-invalid ~ .invalid-feedback {
  display: block;
}
.rx-dup-actions {
  gap: .5rem;
  flex-wrap: wrap;
}
@media (max-width: 575px) {
  .rx-dup-actions .btn { flex: 1 1 100%; }
}

/* Doctors / Pharmacies "Last call" on a computer (lastCallCell in components/call_modal). */
.rx-lastcall {
  display: flex;
  align-items: center;
  gap: .6rem;
  white-space: nowrap;
}
.rx-lastcall-text {
  min-width: 96px;
}
.rx-lastcall-day {
  font-weight: 600;
  color: #1f2937;
  line-height: 1.25;
}
.rx-lastcall-meta {
  font-size: .8rem;
  color: #6b7280;
  line-height: 1.3;
}
.rx-lastcall-never {
  font-size: .88rem;
  color: #9ca3af;
}
.rx-list-lastcall strong {
  font-weight: 600;
  color: #374151;
}

/* Review a flagged visit: "Also move the saved location here" */
.rx-move-pin {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin-top: .75rem;
  padding: .7rem .85rem;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f5f8fc;
  cursor: pointer;
}
.rx-move-pin:has(input:checked) {
  border-color: #93b4e8;
  background: #eaf2fe;
}
.rx-move-pin .form-check-input {
  margin-top: .2rem;
  flex-shrink: 0;
}
.rx-move-pin-title {
  display: block;
  font-weight: 600;
  color: #1f2937;
  font-size: .9rem;
}
.rx-move-pin-help {
  display: block;
  font-size: .8rem;
  color: #6b7280;
  margin-top: .1rem;
}
/* Summary facts with a label each ("Top visitor:", "Team visits by area:"). */
ul.rx-gs-labelled li {
  display: flex;
  gap: .5rem;
  align-items: baseline;
}
ul.rx-gs-labelled .bi {
  color: #104271;
  flex-shrink: 0;
}
.rx-gs-label {
  color: #6b7280;
}
/* Doctors / Pharmacies list: who added the record, under its name. */
.rx-added-by {
  font-size: .78rem;
  color: #9ca3af;
  margin-top: .1rem;
}

/* "Sign in as" from the admin panel: a small badge (bottom-left) that opens into a card with the way back. */
.rx-imp {
  position: fixed;
  left: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 1080;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: .5rem;
}
.rx-imp-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #f59e0b;
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  cursor: pointer;
}
.rx-imp-badge:focus-visible {
  outline: 3px solid rgba(245, 158, 11, .45);
  outline-offset: 2px;
}
.rx-imp-card {
  display: none;
  width: min(260px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: .75rem .85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.rx-imp.is-open .rx-imp-card {
  display: block;
}
.rx-imp-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #b45309;
  font-weight: 600;
}
.rx-imp-name {
  font-weight: 600;
  color: #111827;
  overflow-wrap: anywhere;
}
.rx-imp-org {
  font-size: .8rem;
  color: #6b7280;
  margin-bottom: .6rem;
}
.rx-imp-exit {
  display: block;
  text-align: center;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: .45rem .6rem;
  font-size: .85rem;
  text-decoration: none;
}
.rx-imp-exit:hover {
  background: #374151;
  color: #fff;
}

/* Admin panel › Organizations: Sign in as + Edit + "More" menu, kept on one line. */
.rx-org-actions,
.rx-row-actions {
  white-space: nowrap;
  width: 1%;
}
@media (min-width: 768px) {
  .rx-org-actions .btn,
  .rx-row-actions .btn {
    font-size: 12px;
  }
}
.rx-org-actions .dropdown-item {
  font-size: .875rem;
}
.rx-row-actions .dropdown-item {
  font-size: .875rem;
}
/* Deactivated users stay listed (their history keeps their name), just quieter. */
.rx-table tr.rx-user-inactive td {
  color: #6b7280;
}
.rx-table td.user_status .rx-cd-pill {
  white-space: nowrap;
}
/* Users table: Report, Edit and Reactivate are the same height and width-to-text, not Edit at the table's 80px minimum. */
.rx-table-wrapper[data-renderer="usersTable"] .rx-row-actions .btn:not(.rx-kebab) {
  min-width: 64px;
  padding: 4px 12px;
}
/* The "more actions" menu button in a table row: a compact icon, not another full-width button. */
.rx-table .rx-row-actions .btn.rx-kebab {
  min-width: 0;
  width: 30px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: #6b7280;
}
.rx-table .rx-row-actions .btn.rx-kebab:hover,
.rx-table .rx-row-actions .btn.rx-kebab:focus-visible,
.rx-table .rx-row-actions .show > .btn.rx-kebab {
  background: #eef2f7;
  border-color: #dbe2ea;
  color: #111827;
}
/* A small second line under a table cell's main text, e.g. the employee ID under a name. */
.rx-cell-sub {
  margin-top: 0.1rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #6b7280;
}
.rx-user-status-note {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #6b7280;
}

/* Admin panel › Organization users: places in use, the limit, then filters. */
.rx-ou-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-bottom: .75rem;
}
.rx-ou-places-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
}
.rx-ou-places-value {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.rx-ou-places.is-full .rx-ou-places-value {
  color: #dc3545;
}
.rx-ou-limit {
  width: 160px;
}
.rx-ou-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-left: auto;
}
.rx-ou-tools input[type="search"] {
  width: 220px;
  max-width: 100%;
}
@media (max-width: 767.98px) {
  .rx-ou-tools {
    margin-left: 0;
    width: 100%;
  }
  .rx-ou-tools input[type="search"] {
    flex: 1 1 160px;
  }
}

/* Admin panel › Platform dashboard */
.rx-pd-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (max-width: 1199.98px) {
  .rx-pd-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575.98px) {
  .rx-pd-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}
.rx-pd-stat {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(1, 41, 112, .08);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
a.rx-pd-stat:hover {
  color: inherit;
  box-shadow: 0 0 0 1px rgba(16, 66, 113, .18), 0 0 20px rgba(1, 41, 112, .1);
}
.rx-pd-stat > span:last-child {
  min-width: 0;
}
.rx-pd-stat-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--rx-pd-tone);
  background: color-mix(in srgb, var(--rx-pd-tone) 12%, #fff);
}
.rx-pd-stat-label,
.rx-pd-stat-value,
.rx-pd-stat-note {
  display: block;
}
.rx-pd-stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
}
.rx-pd-stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: #012970;
  font-variant-numeric: tabular-nums;
}
.rx-pd-stat-note {
  font-size: .8rem;
  color: #6b7280;
}
.rx-pd-stat.is-alert .rx-pd-stat-value {
  color: #b45309;
}
.rx-pd-num {
  font-variant-numeric: tabular-nums;
}
.rx-pd-trend {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  font-size: .85rem;
  color: #6b7280;
}
.rx-pd-trend .rx-pd-num {
  font-weight: 700;
  color: #012970;
  font-size: 1rem;
}
.rx-pd-allclear {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem;
  border-radius: 8px;
  background: #f0fdf4;
  margin-top: .5rem;
}
.rx-pd-allclear > i {
  font-size: 1.4rem;
  color: #198754;
  line-height: 1;
}
.rx-pd-module {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 4.5rem;
  align-items: center;
  gap: .75rem;
  padding: .3rem 0;
}
.rx-pd-module .progress {
  height: 6px;
}
.rx-pd-section {
  letter-spacing: .05em;
}

/* Pathway: time in the field — a full-width strip under the four numbers. */
.rx-path-time {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  padding: .7rem .9rem;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rx-path-time .rx-glance-icon {
  margin-bottom: 0;
}
.rx-path-time-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .6rem;
  min-width: 0;
}
.rx-path-time-label {
  flex-basis: 100%;
  font-size: .8rem;
  font-weight: 500;
  color: #6b7280;
}
.rx-path-time-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: #104271;
  font-variant-numeric: tabular-nums;
}
.rx-path-time-value small {
  font-size: .8rem;
  font-weight: 600;
  color: #6b7280;
  margin-left: 1px;
}
.rx-path-time-note {
  font-size: .8rem;
  color: #6b7280;
}
.rx-path-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-left: auto;
}
.rx-path-time-chip {
  padding: .2rem .6rem;
  border-radius: 999px;
  background: #e8eef6;
  color: #104271;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 767px) {
  .rx-path-summary .rx-path-time {
    padding: .6rem .75rem;
  }
  .rx-path-time-chips {
    margin-left: 0;
    width: 100%;
  }
}

/* Approvals › doctor / pharmacy edit: what changes, old → new. */
.rx-change-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: .25rem .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.rx-change-row:last-child {
  border-bottom: 0;
}
.rx-change-label {
  font-size: .85rem;
  color: #6b7280;
}
.rx-change-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.rx-change-old {
  color: #9ca3af;
  text-decoration: line-through;
}
.rx-change-new {
  font-weight: 600;
  color: #1f2937;
}
@media (max-width: 575.98px) {
  .rx-change-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Activity feeds: the small open button on a row — a fixed square, never stretched by the row. */
.rx-feed-open {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  font-size: .85rem;
  text-decoration: none;
}
.rx-feed-open:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #104271;
}

/* A record shown read-only (RxReadOnly in main.js), opened from an activity feed's view button. */
.rx-readonly-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  background: #eef4fb;
  color: #104271;
  border-radius: 8px;
  padding: .5rem .7rem;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.rx-readonly .form-control:disabled,
.rx-readonly .form-select:disabled,
.rx-readonly textarea:disabled {
  background: #f8fafc;
  color: #1f2937;
  opacity: 1;
  cursor: default;
}

/* Which area a dropped pin probably belongs to (location_picker): a small card under the map. */
.rx-area-suggest {
  margin-top: .5rem;
  padding: .7rem .85rem;
  border: 1px solid #d6e2f0;
  border-left: 3px solid #104271;
  border-radius: 10px;
  background: #f7fafd;
  color: #1f2937;
  font-size: .85rem;
}
.rx-as-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #104271;
}
.rx-as-name {
  margin-top: .15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #104271;
}
.rx-as-why {
  color: #6b7280;
  font-size: .8rem;
}
.rx-as-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .5rem;
  margin-top: .55rem;
}
.rx-as-actions .btn {
  font-size: .8rem;
  padding: .25rem .7rem;
  border-radius: 8px;
}
.rx-as-actions .btn-link {
  padding-left: .25rem;
  padding-right: .25rem;
  text-decoration: none;
}
/* One-line states: checking, set, outside your areas, no match. */
.rx-area-suggest.is-checking,
.rx-area-suggest.is-done,
.rx-area-suggest.is-warning,
.rx-area-suggest.is-muted {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.rx-area-suggest.is-checking {
  color: #475569;
  border-left-color: #94a3b8;
}
.rx-area-suggest.is-checking .spinner-border {
  flex: 0 0 auto;
  width: .9rem;
  height: .9rem;
  margin-top: .15rem;
}
.rx-area-suggest.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
  color: #166534;
}
.rx-area-suggest.is-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
  color: #92400e;
}
.rx-area-suggest.is-muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-left-color: #94a3b8;
  color: #475569;
}
.rx-area-suggest > .bi {
  flex: 0 0 auto;
  margin-top: .1rem;
}
/* The area field just set by a suggestion: a brief highlight so the eye lands on it. */
.territory-picker.rx-area-flash {
  border-radius: 10px;
  animation: rx-area-flash 1.8s ease-out;
}
@keyframes rx-area-flash {
  0%, 35% { box-shadow: 0 0 0 3px rgba(22, 163, 74, .45); background: #f0fdf4; }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .territory-picker.rx-area-flash { animation: none; box-shadow: 0 0 0 3px rgba(22, 163, 74, .45); }
}

/* Two-choice switch (Visit Planning's My Plan / Team Plans): one control, halves of equal width. */
.rx-seg {
  display: flex;
  gap: .25rem;
  padding: .25rem;
  background: #f1f5f9;
  border-radius: 10px;
}
.rx-seg-btn {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: .45rem .6rem;
  font-size: .9rem;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}
.rx-seg-btn.active {
  background: #fff;
  color: #104271;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
.rx-seg-count {
  min-width: 1.4rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: .75rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.rx-seg-btn.active .rx-seg-count {
  background: #e8eef6;
  color: #104271;
}
@media (max-width: 575.98px) {
  /* A phone shows the title, text and button in one block — keep the icon modest. */
  .rx-dp-head .dp-icon-circle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .rx-dp-head .card-title {
    font-size: 1.05rem;
  }
}

/* Visit Planning: one plan for the day — name, how far along, and the day itself. */
.rx-plan-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .75rem .9rem;
  margin-bottom: .5rem;
  background: #fff;
  cursor: pointer;
}
.rx-plan-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.rx-plan-top {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}
.rx-plan-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7f1ff;
  color: #0d6efd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}
.rx-plan-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rx-plan-count {
  flex: 0 0 auto;
  font-weight: 700;
  color: #104271;
  font-variant-numeric: tabular-nums;
}
.rx-plan-bar {
  height: 6px;
  margin: .55rem 0 .4rem;
  background: #eef2f7;
}
.rx-plan-foot {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
  color: #6b7280;
}

/* Export sits beside a list's heading as an icon — it's an occasional action, not a main button. */
.rx-export-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
}

/* A list's heading row: the export icon sits at the far right on a phone, beside the title on desktop. */
.rx-list-head {
  display: flex;
  align-items: center;
  gap: .5rem;
}
@media (max-width: 767.98px) {
  .rx-list-head {
    width: 100%;
    justify-content: space-between;
  }
}

/* HR › employee: the employment form grouped into Job / Dates / Placement. */
.rx-hr-section {
  padding: .9rem 0;
  border-bottom: 1px solid #eef0f3;
}
.rx-hr-section:first-of-type {
  padding-top: .25rem;
}
.rx-hr-section-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .6rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #104271;
}
.rx-hr-switch {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
}
.rx-hr-switch .form-check-input {
  margin: 0;
  width: 2.2em;
  height: 1.2em;
  cursor: pointer;
}
.rx-hr-switch-title {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: #1f2937;
}
.rx-hr-switch-help {
  display: block;
  font-size: .78rem;
  color: #6b7280;
}
.rx-hr-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}
@media (max-width: 575.98px) {
  .rx-hr-actions .btn {
    width: 100%;
  }
}

/* Incentives: the payable headline, one block per product, and the next-slab hint. */
.rx-inc-summary {
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #104271;
  color: #fff;
}
.rx-inc-summary .text-muted {
  color: rgba(255, 255, 255, .75) !important;
}
.rx-inc-label {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .85;
}
.rx-inc-total {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.rx-inc-product {
  padding: .7rem 0;
  border-bottom: 1px solid #eef0f3;
}
.rx-inc-product:last-child {
  border-bottom: 0;
}
.rx-inc-amount {
  color: #104271;
  font-variant-numeric: tabular-nums;
}
.rx-inc-bar {
  height: 6px;
  margin-top: .4rem;
  background: #eef2f7;
}
.rx-inc-next {
  margin-top: .4rem;
  font-size: .8rem;
  color: #0f5132;
  background: #f0fdf4;
  border-radius: 8px;
  padding: .3rem .55rem;
  display: inline-block;
}
.rx-inc-team-total {
  font-size: .9rem;
  color: #475569;
}
.rx-inc-row {
  padding: .35rem 0;
  border-bottom: 1px dashed #eef0f3;
}

/* Incentives: where the period stands (open / approved / sent to payroll). */
.rx-inc-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .9rem;
    margin-bottom: 1rem;
    border-radius: .5rem;
    font-size: .875rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}
.rx-inc-status[data-status="approved"] { background: var(--bs-success-bg-subtle); border-color: var(--bs-success-border-subtle); }
.rx-inc-status[data-status="paid"] { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary-border-subtle); }

/* Lists (Targets, Sales, Activities): a main line with a quiet second line, right-aligned figures,
   short remarks, and — on a computer — Edit / Delete as compact icon buttons (name on hover),
   like the Doctors / Pharmacies lists. */
.rx-cell-main { display: block; font-weight: 500; color: #1e293b; }
.rx-cell-sub { display: block; font-size: .8rem; color: #64748b; margin-top: 1px; }
.rx-cell-empty { color: #94a3b8; }
.rx-table th.rx-num, .rx-table td.rx-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-table td.rx-nowrap { white-space: nowrap; }
.rx-cell-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 34ch; color: #475569; }
.rx-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2f7; color: #334155; white-space: nowrap; }
.rx-chip-area { background: #e0f2fe; color: #075985; }
@media (min-width: 768px) {
  td.rx-icon-actions { min-width: 0; max-width: none; width: 1%; white-space: nowrap; }
  td.rx-icon-actions .table_btns_inner_wrap { gap: 4px; }
  td.rx-icon-actions .btn {
    font-size: 0; width: 32px; height: 32px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; color: #104271;
  }
  td.rx-icon-actions .btn i.d-md-none { display: inline-block !important; font-size: 14px; }
  td.rx-icon-actions .btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
  td.rx-icon-actions .btn-danger { color: #b91c1c; }
  td.rx-icon-actions .btn-danger:hover { background: #fef2f2; border-color: #fecaca; }
}
/* The compact icon buttons above must beat the older labelled-button sizes (min widths from the
   list layout) and Bootstrap's text-white on the Edit button, which hid its icon on the white square. */
@media (min-width: 768px) {
  .rx-table td.rx-icon-actions { min-width: 0 !important; max-width: none !important; }
  .rx-table td.rx-icon-actions .btn {
    width: 32px !important; min-width: 32px !important; max-width: 32px; flex: 0 0 32px;
    color: #104271 !important; background: #fff !important; border-color: #e2e8f0 !important;
  }
  .rx-table td.rx-icon-actions .btn:hover { background: #f1f5f9 !important; border-color: #cbd5e1 !important; }
  .rx-table td.rx-icon-actions .btn-danger { color: #b91c1c !important; }
  .rx-table td.rx-icon-actions .btn-danger:hover { background: #fef2f2 !important; border-color: #fecaca !important; }
}

/* ===== Training & Knowledge Center ===== */
/* Summary tiles (My Training, Analytics). */
.rx-tc-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px;
}
.rx-tc-summary > div {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.rx-tc-summary span { font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #64748b; }
.rx-tc-summary strong { font-size: 1.5rem; line-height: 1.2; color: #104271; font-variant-numeric: tabular-nums; }
.rx-tc-summary strong.text-success { color: #047857 !important; }
.rx-tc-summary strong.text-danger { color: #b91c1c !important; }

/* My Training: one row per program. */
.rx-tc-item {
  display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e2e8f0;
  border-left: 4px solid #cbd5e1; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.rx-tc-item[data-status="in_progress"] { border-left-color: #0ea5e9; }
.rx-tc-item[data-status="completed"] { border-left-color: #10b981; }
.rx-tc-item[data-status="overdue"] { border-left-color: #dc2626; }
.rx-tc-item-main { flex: 1 1 auto; min-width: 0; }
.rx-tc-item .btn { flex: 0 0 auto; min-width: 96px; }
.rx-tc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 75ch; }
.rx-tc-progress { height: 6px; background: #e2e8f0; border-radius: 999px; min-width: 80px; }
.rx-tc-empty-icon { font-size: 2rem; }
@media (max-width: 575.98px) {
  .rx-tc-item { flex-direction: column; align-items: stretch; }
}

/* A program's steps, in order, with the lesson material under each. */
.rx-tc-step { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #eef2f7; }
.rx-tc-step-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: #eef2f7; color: #104271;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}
.rx-tc-step.is-done .rx-tc-step-num { background: #d1fae5; color: #047857; }
.rx-tc-material {
  margin-top: 8px; padding: 10px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px;
  font-size: .875rem; white-space: pre-wrap; color: #334155;
}

/* Knowledge library cards. */
.rx-kl-filters .select2-container { width: 100% !important; }
.rx-kl-card { border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.rx-kl-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(16, 66, 113, .08); }
.rx-kl-card .card-body { display: flex; flex-direction: column; padding: 16px 18px; }
.rx-kl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rx-kl-type {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; background: #eef2f7; color: #334155;
}
.rx-kl-type-document { background: #e0f2fe; color: #075985; }
.rx-kl-type-video { background: #fee2e2; color: #991b1b; }
.rx-kl-type-presentation { background: #fef3c7; color: #92400e; }
.rx-kl-type-faq { background: #ede9fe; color: #5b21b6; }
.rx-kl-type-brochure { background: #d1fae5; color: #065f46; }
.rx-kl-title { font-size: 1rem; font-weight: 600; color: #104271; margin: 0 0 4px; }
.rx-kl-product { font-size: .8rem; color: #64748b; margin-bottom: 8px; }
.rx-kl-desc {
  font-size: .875rem; color: #475569; margin: 0; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.rx-kl-desc.is-open { display: block; -webkit-line-clamp: unset; }
.rx-kl-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }

/* Small square icon buttons (edit / delete) used on cards and tables. */
.rx-icon-btn {
  width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; color: #104271;
}
.rx-icon-btn:hover { background: #f1f5f9; border-color: #cbd5e1; color: #104271; }
.rx-icon-btn-danger { color: #b91c1c; }
.rx-icon-btn-danger:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* Program and people tables. */
.rx-an-table { font-size: .9rem; }
.rx-an-table thead th {
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #64748b;
  border-bottom: 1px solid #e2e8f0; background: transparent; white-space: nowrap;
}
.rx-an-table td { border-color: #eef2f7; }
.rx-an-table tbody tr:last-child td { border-bottom: 0; }
.rx-an-table th.rx-num, .rx-an-table td.rx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-an-bar-col { min-width: 180px; width: 26%; }
.rx-an-pct { min-width: 36px; text-align: right; }
.rx-an-search { max-width: 220px; }
.rx-tp-table .btn-primary { white-space: nowrap; }
.rx-chip-required { background: #fef3c7; color: #92400e; }
.rx-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2f7; color: #475569; }
.rx-pill-published { background: #d1fae5; color: #065f46; }
.rx-pill-draft { background: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; }
.rx-pill-archived { background: #e2e8f0; color: #334155; }
.rx-kl-desc { white-space: normal; }
.rx-kl-desc.is-open { white-space: pre-line; }
.rx-kl-foot .kl-more-btn { font-size: .8rem; font-weight: 600; text-decoration: none; }
.rx-icon-btn { width: 30px !important; min-width: 30px !important; flex: 0 0 30px; }

/* Targets: dividing your own target among your people. */
.rx-tg-alloc {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px;
  background: #f0f7ff; border: 1px solid #cfe3f7; border-radius: 10px;
}
.rx-tg-alloc > div { display: flex; flex-direction: column; }
.rx-tg-alloc span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
.rx-tg-alloc strong { font-size: .95rem; color: #104271; font-variant-numeric: tabular-nums; }
.rx-tg-alloc.is-over { background: #fef2f2; border-color: #fecaca; }
.rx-tg-alloc.is-over > div:last-child strong { color: #b91c1c; }

/* Targets: the Set a Target form. */
.rx-tg-form { padding: 20px 22px; }
.rx-tg-section { margin-bottom: 18px; }
.rx-tg-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 6px; }
.rx-tg-toggle .btn { font-weight: 600; }
.rx-tg-toggle .btn.active { background: #104271; border-color: #104271; color: #fff; }
.rx-tg-amounts { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.rx-tg-amounts .form-control { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rx-tg-link { height: 38px; display: flex; align-items: center; color: #94a3b8; }
.rx-tg-alloc small { font-size: .75rem; color: #64748b; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
  .rx-tg-amounts { grid-template-columns: 1fr 1fr; }
  .rx-tg-link { display: none; }
}
button.rx-tg-link {
  width: 34px; height: 38px; padding: 0; justify-content: center; position: relative;
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 8px; color: #94a3b8;
}
button.rx-tg-link.is-linked { border-style: solid; border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
button.rx-tg-link:hover { border-color: #104271; }
.rx-tg-unlink-x { position: absolute; left: 7px; right: 7px; top: 50%; height: 2px; background: #94a3b8; transform: rotate(-45deg); }
@media (max-width: 575.98px) {
  .rx-tg-amounts { grid-template-columns: 1fr auto 1fr; gap: 6px; }
  button.rx-tg-link { display: flex; }
}

/* Dashboard: sales & targets in rupees or packs. */
.rx-measure-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 10px; font-size: .8rem; color: #64748b; }
.rx-measure-toggle .btn { font-weight: 600; min-width: 58px; }
.rx-measure-toggle .btn.active { background: #104271; border-color: #104271; color: #fff; }

/* Reports: filter bar and the "comparing these dates" strip. */
.rx-report-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px;
}
.rx-report-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 150px; max-width: 220px; }
.rx-report-field-wide { flex-basis: 220px; max-width: 300px; }
.rx-report-field-auto { flex: 0 0 auto; min-width: 0; }
.rx-report-field > label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin: 0; }
.rx-report-field .rx-measure-toggle .btn { min-width: 58px; height: 31px; }
.rx-report-compare {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px;
  background: #f4f7fc; border: 1px solid #dde4f0; color: #4a5568; font-size: .875rem;
}
@media (max-width: 575.98px) {
  .rx-report-field, .rx-report-field-wide { flex: 1 1 100%; max-width: none; }
}

/* Reports leaderboard on a computer: rank badge before the name, achievement as a bar + %. */
@media (min-width: 768px) {
  .rx-lb-rank-sm {
    display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 10px;
    border-radius: 50%; font-size: .75rem; font-weight: 700; background: #eef2f7; color: #104271; vertical-align: middle;
  }
  .rx-lb-rank-sm.rx-lb-rank-1 { background: #fbbf24; color: #fff; }
  .rx-lb-rank-sm.rx-lb-rank-2 { background: #9ca3af; color: #fff; }
  .rx-lb-rank-sm.rx-lb-rank-3 { background: #c2410c; color: #fff; }
}
.rx-lb-ach-col { min-width: 190px; }
.rx-lb-ach { display: flex; align-items: center; gap: 10px; }
.rx-lb-ach-bar { flex: 1 1 auto; height: 6px; background: #e2e8f0; border-radius: 999px; min-width: 70px; }
.rx-lb-ach .badge { min-width: 58px; font-variant-numeric: tabular-nums; }
#leaderboardTable td { font-variant-numeric: tabular-nums; }
/* Filter bar: every control the same height, so Show in lines up with the dropdowns; Export at the right end. */
.rx-report-bar .select2-container .select2-selection--single,
.rx-report-bar .form-control-sm { min-height: 38px; }
.rx-report-field .rx-measure-toggle .btn,
.rx-report-export { height: 38px; display: inline-flex; align-items: center; }
.rx-report-actions { margin-left: auto; align-self: flex-end; }
.rx-report-export { font-weight: 600; padding: 0 14px; }
@media (max-width: 575.98px) {
  .rx-report-actions { margin-left: 0; }
}

/* Targets: combined totals strip above the list, and the Summary's total row. */
.rx-tg-totals {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 10px 16px; margin-bottom: 12px;
  background: #f0f7ff; border: 1px solid #cfe3f7; border-radius: 10px;
}
.rx-tg-totals > div:not(.rx-tg-totals-note) { display: flex; flex-direction: column; }
.rx-tg-totals span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.rx-tg-totals strong { font-size: 1.1rem; color: #104271; font-variant-numeric: tabular-nums; }
.rx-tg-totals-note { margin-left: auto; font-size: .78rem; color: #64748b; }
.rx-an-table tr.rx-an-total td { font-weight: 700; color: #104271; border-top: 2px solid #cbd5e1; border-bottom: 0; }
@media (max-width: 575.98px) { .rx-tg-totals-note { margin-left: 0; width: 100%; } }

/* ===== Lists on a phone: every rx-table row as a tidy card (pages without a custom card) =====
   First cell is the card's title; the rest are compact label/value lines; actions sit together at the
   end. Custom cards (td.rx-visit-card, leaderboard) keep their own look. */
@media (max-width: 767px) {
  .rx-table tbody tr {
    border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px;
    background: #fff !important; box-shadow: 0 1px 2px rgba(16, 66, 113, .04);
  }
  .table-striped.rx-table > tbody > tr > * { --bs-table-bg-type: transparent; box-shadow: none; }
  .rx-table tbody td:not(.rx-visit-card):not(.rx-lb-card) {
    border-bottom: none; padding: 3px 0; font-size: .9rem; align-items: baseline; gap: 12px; color: #1f2937;
  }
  .rx-table tbody td:not(.rx-visit-card):not(.rx-lb-card)::before {
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b;
  }
  /* The first visible cell is the card's heading. */
  .rx-table tbody tr > td:first-child:not(.rx-visit-card):not(.rx-lb-card):not(.d-none) {
    display: block; text-align: left; font-weight: 600; font-size: 1rem; color: #104271;
    padding: 0 0 6px; margin-bottom: 4px; border-bottom: 1px solid #eef2f7;
  }
  .rx-table tbody tr > td:first-child:not(.rx-visit-card):not(.rx-lb-card)::before { content: none; }
  /* Actions: together at the right, tap-sized. */
  .rx-table tbody td.table_btns, .rx-table tbody td[data-label="Actions"] {
    justify-content: flex-end; gap: 6px; margin-top: 6px; padding-top: 8px !important; border-top: 1px solid #eef2f7;
  }
  .rx-table tbody td.table_btns::before, .rx-table tbody td[data-label="Actions"]::before { content: none; }
  .rx-table tbody td.table_btns .table_btns_inner_wrap { justify-content: flex-end; gap: 6px; }
  .rx-table tbody td.table_btns .btn, .rx-table tbody td[data-label="Actions"] .btn {
    width: 36px; height: 34px; border-radius: 8px;
  }
  /* An action written as a link keeps its label for the desktop table ("Download PDF"); a <button> loses it
     to the rule above, but a link kept it and the letters spilled out of the icon-sized square. Any action
     carrying a phone-only icon shows just that icon here. */
  .rx-table tbody td.table_btns .btn:has(> i.d-md-none),
  .rx-table tbody td[data-label="Actions"] .btn:has(> i.d-md-none) {
    font-size: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  }
  .rx-table tbody td.table_btns .btn > i, .rx-table tbody td[data-label="Actions"] .btn > i { font-size: 14px; }

  /* Mobile list cards: the headline figure on the right. */
  .rx-card-figure { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; }
  .rx-card-figure strong { font-size: 1rem; color: #104271; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .rx-card-figure span { font-size: .78rem; color: #64748b; white-space: nowrap; }

  /* Summary / analytics tables (Targets summary, Training): each row stacks as labelled lines. */
  .rx-an-table thead { display: none; }
  .rx-an-table, .rx-an-table tbody, .rx-an-table tr, .rx-an-table td { display: block; width: 100%; }
  .rx-an-table tr { padding: 10px 0; border-bottom: 1px solid #eef2f7; }
  .rx-an-table tbody tr:last-child { border-bottom: 0; }
  .rx-an-table td { border: 0 !important; padding: 2px 0 !important; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .rx-an-table td::before { content: attr(data-label); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; text-align: left; flex-shrink: 0; }
  .rx-an-table td:first-child { display: block; text-align: left; font-weight: 600; color: #104271; padding-bottom: 4px !important; }
  .rx-an-table td:first-child::before { content: none; }
  .rx-an-table td > .d-flex, .rx-an-table .rx-lb-ach { flex: 1 1 auto; max-width: 70%; }
  .rx-an-table td.text-end.text-nowrap { justify-content: flex-end; gap: 6px; }
  .rx-an-table td.text-end.text-nowrap::before { content: none; }
  .rx-an-table tr.rx-an-total td:first-child { display: flex; }

  /* Summary tiles: an odd last tile spans the row; long rupee figures stay on one line. */
  .rx-tc-summary { grid-template-columns: 1fr 1fr; }
  .rx-tc-summary > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rx-tc-summary strong { font-size: 1.2rem; }
}
/* Sample Management on a phone: the stock actions as an even row of tiles. */
@media (max-width: 575.98px) {
  .rx-sm-actions { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .rx-sm-actions .btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 54px; font-size: .78rem; font-weight: 600; border-radius: 10px;
  }
  .rx-sm-actions .btn > i { font-size: 1.05rem; }
}

/* Targets Summary on a phone: one compact line per person / product with its share of the total. */
.rx-sum-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.rx-sum-row:last-child { border-bottom: 0; }
.rx-sum-main { flex: 1 1 auto; min-width: 0; }
.rx-sum-name { font-weight: 600; color: #104271; line-height: 1.3; }
.rx-sum-sub { font-size: .78rem; color: #64748b; margin-top: 1px; }
.rx-sum-share { height: 4px; background: #eef2f7; border-radius: 999px; margin-top: 6px; overflow: hidden; }
.rx-sum-share > i { display: block; height: 100%; background: #3b82f6; border-radius: 999px; }
.rx-sum-fig { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; }
.rx-sum-fig strong { font-size: .95rem; color: #1f2937; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-sum-fig span { font-size: .75rem; color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-sum-total { border-top: 2px solid #cbd5e1; margin-top: 2px; }
.rx-sum-total .rx-sum-name, .rx-sum-total .rx-sum-fig strong { color: #104271; }
.rx-sum-name .badge { font-size: .7rem; vertical-align: middle; margin-left: 4px; }
.rx-tc-summary strong.text-success { color: #047857 !important; }
.rx-tc-summary strong.text-danger { color: #b91c1c !important; }

/* Page-size picker: styled like the toolbar buttons beside it (no clear ×, never truncated). */
select.rx-per-page + .select2-container .select2-selection--single {
  border-radius: 8px; border-color: #cbd5e1; display: flex; align-items: center;
}
select.rx-per-page + .select2-container .select2-selection__rendered {
  color: #104271 !important; font-weight: 600; padding-right: 26px !important; overflow: visible;
}
@media (max-width: 767px) {
  .d-flex.flex-row.gap-2.align-items-center.justify-content-md-end.flex-wrap.flex-md-nowrap > select.rx-per-page + .select2-container {
    flex: 0 0 124px !important; min-width: 124px;
  }
}

/* Sales / Targets cards on a phone: Edit and Delete as the standard compact icon buttons
   (the same navy / red squares as every other list's card), right-aligned. */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card .rx-card-icons { justify-content: flex-end; gap: 6px; }
  .rx-table td.rx-visit-card .rx-card-icons .btn {
    font-size: 0; width: 36px; height: 34px; padding: 0; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .rx-table td.rx-visit-card .rx-card-icons .btn > i { font-size: 14px; display: inline-block !important; }
}

/* Totals strip above a list (Sales, Targets): even stat tiles + a quiet note, replacing the blue box. */
.rx-tg-totals { display: block; background: transparent; border: 0; padding: 0; margin-bottom: 12px; }
.rx-totals-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rx-totals-tile {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px;
  display: flex; flex-direction: column; min-width: 0;
}
.rx-totals-tile span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-totals-tile strong { font-size: 1.1rem; color: #104271; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-totals-tile:last-child { background: #eff6ff; border-color: #bfdbfe; }
.rx-totals-note { font-size: .75rem; color: #64748b; margin-top: 6px; }
@media (min-width: 768px) {
  .rx-totals-tiles { grid-template-columns: repeat(3, minmax(0, 220px)); }
}
.rx-tg-totals > div.rx-totals-tiles { display: grid; flex-direction: initial; }
.rx-tg-totals > div.rx-totals-note { display: block; }
/* The figure's own spans (full / short rupees) keep the figure's style, not the label's. */
.rx-totals-tile strong span { font-size: inherit; font-weight: inherit; text-transform: none; letter-spacing: normal; color: inherit; }
@media (max-width: 767px) {
  .rx-tg-totals > div.rx-totals-tiles { grid-template-columns: 1fr 1fr 1.35fr; gap: 6px; }
  .rx-totals-tile { padding: 7px 10px; }
  .rx-totals-tile strong { font-size: 1rem; text-overflow: clip; }
}
.rx-sum-sub .badge { font-size: .68rem; margin-left: 4px; }
.rx-card-figure a.small { margin-top: 2px; text-decoration: none; }
.rx-tc-summary strong span { font-size: inherit; font-weight: inherit; text-transform: none; letter-spacing: normal; color: inherit; }
/* Icon-only buttons still hold their (hidden, zero-width) label: no gap, or the icon sits off-centre. */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card .rx-card-icons .btn,
  .rx-table tbody td.table_btns .btn,
  .rx-table tbody td[data-label="Actions"] .btn { gap: 0 !important; }
}
td.rx-icon-actions .btn { gap: 0 !important; }

/* Phone list cards: room between the title, the chip and the detail lines. */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card .rx-visit-title { margin-bottom: 6px; }
  .rx-table td.rx-visit-card .rx-visit-meta { line-height: 1.4; }
  .rx-table td.rx-visit-card .rx-visit-meta + .rx-visit-meta { margin-top: 5px; }
  .rx-table td.rx-visit-card .rx-visit-meta .rx-chip { display: inline-block; padding: 3px 10px; }
  .rx-table td.rx-visit-card .rx-visit-meta.rx-cell-clamp { margin-top: 8px !important; }
  .rx-table td.rx-visit-card .rx-card-figure { padding-top: 1px; }
  .rx-table td.rx-visit-card .rx-visit-actions { margin-top: 12px; padding-top: 10px; }
}

/* ===== Summary rows, cleaner (Sales, Activities, Targets summaries on phones) =====
   Name and amount on one baseline, details and the secondary figure beneath, a full-width share bar. */
.rx-sum-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px;
  align-items: baseline; padding: 12px 0;
}
.rx-sum-row .rx-sum-main, .rx-sum-row .rx-sum-fig { display: contents; }
.rx-sum-row .rx-sum-name { grid-column: 1; grid-row: 1; font-size: .95rem; line-height: 1.3; min-width: 0; }
.rx-sum-row .rx-sum-sub { grid-column: 1; grid-row: 2; font-size: .78rem; color: #64748b; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rx-sum-row .rx-sum-fig > strong { grid-column: 2; grid-row: 1; text-align: right; font-size: .95rem; }
.rx-sum-row .rx-sum-fig > span, .rx-sum-row .rx-sum-fig > a { grid-column: 2; grid-row: 2; text-align: right; font-size: .75rem; color: #64748b; }
.rx-sum-row .rx-sum-share { grid-column: 1 / -1; grid-row: 3; height: 3px; margin-top: 8px; background: #eef2f7; }
.rx-sum-row .rx-sum-share > i { background: #104271; opacity: .55; }
.rx-sum-row.rx-sum-total .rx-sum-name, .rx-sum-row.rx-sum-total .rx-sum-fig > strong { font-weight: 700; color: #104271; }
/* Soft status pills instead of solid badges. */
.rx-sum-row .badge { font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; margin: 0; }
.rx-sum-row .badge.bg-success { background: #dcfce7 !important; color: #166534 !important; }
.rx-sum-row .badge.bg-warning { background: #fef3c7 !important; color: #92400e !important; }
.rx-sum-row .badge.bg-danger { background: #fee2e2 !important; color: #991b1b !important; }
.rx-sum-row .rx-sum-name .badge { margin-left: 6px; vertical-align: 1px; }
/* Summary cards on phones and tablets size to their content (no empty space under short lists). */
@media (max-width: 1199.98px) {
  #slSummaryTab .card.h-100, #acSummaryTab .card.h-100, #tgSummaryTab .card.h-100 { height: auto !important; }
}
.rx-sum-list { margin-top: 4px; }
/* Summary tabs: cards spaced by the row gap only (the theme's card margin doubled it). */
#slSummaryTab .row .card, #acSummaryTab .row .card, #tgSummaryTab .row .card { margin-bottom: 0; }

/* Incentive scheme > Who earns: one row per role, a three-way switch. */
.rx-earn-list { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.rx-earn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.rx-earn-row + .rx-earn-row { border-top: 1px solid #eef2f7; }
.rx-earn-role { display: flex; flex-direction: column; min-width: 0; }
.rx-earn-name { font-weight: 600; color: #1f2937; line-height: 1.3; }
.rx-earn-count { font-size: .75rem; color: #64748b; }
.rx-earn-toggle { flex-shrink: 0; }
.rx-earn-toggle .btn { font-weight: 600; font-size: .78rem; white-space: nowrap; }
.rx-earn-toggle .btn-outline-primary.active { background: #104271; border-color: #104271; color: #fff; }
.rx-earn-toggle .btn-outline-secondary.active { background: #64748b; border-color: #64748b; color: #fff; }
.rx-earn-hint { margin-top: 8px; font-size: .8rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 10px; }
@media (max-width: 575.98px) {
  .rx-earn-row { flex-direction: column; align-items: stretch; }
  .rx-earn-toggle { display: flex; }
  .rx-earn-toggle .btn { flex: 1 1 0; }
}
@media (max-width: 575.98px) {
  .rx-earn-toggle .btn { min-width: 0; font-size: .74rem; padding: 6px 4px; }
  .rx-earn-toggle .btn i { display: none; }
  .rx-earn-row { gap: 8px; }
}

/* Incentives > Team: the View statement button keeps its label on phones (the generic list rule
   turns table buttons into bare icon squares). */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card .rx-inc-view {
    font-size: .82rem !important; width: 100% !important; height: auto !important; padding: 8px 12px !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 8px; font-weight: 600;
  }
  .rx-table td.rx-visit-card .rx-inc-view > i { font-size: 14px; }
  .rx-table td.rx-visit-card .rx-visit-meta strong { color: #104271; }
}
.rx-inc-view { white-space: nowrap; font-weight: 600; }

/* Incentives > Schemes: one card per scheme — name and status, icon actions, the rules as small facts. */
.rx-scheme-item { padding: 14px 0; }
.rx-scheme-item + .rx-scheme-item { border-top: 1px solid #eef2f7; }
.rx-scheme-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rx-scheme-name { font-weight: 600; font-size: 1rem; color: #1f2937; margin-right: 6px; line-height: 1.35; }
.rx-scheme-head .rx-pill { vertical-align: 2px; }
.rx-scheme-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rx-scheme-facts span {
  display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: #475569;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 3px 10px;
}
.rx-scheme-facts i { color: #104271; font-size: .8rem; }

/* Incentives: the scheme in plain words, and what to do next. */
.rx-inc-explain { background: #fffdf5; border: 1px solid #f3e3b3; border-radius: 12px; }
.rx-inc-explain > summary {
  cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 600; color: #104271;
  display: flex; align-items: center; gap: 4px;
}
.rx-inc-explain > summary::-webkit-details-marker { display: none; }
.rx-inc-explain > summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; color: #64748b; transition: transform .15s; }
.rx-inc-explain[open] > summary::after { transform: rotate(180deg); }
.rx-inc-explain-body { padding: 0 16px 14px; font-size: .9rem; color: #334155; }
.rx-inc-explain-body ul { padding-left: 1.1rem; margin-bottom: 10px; }
.rx-inc-explain-body li { margin-bottom: 4px; }
.rx-inc-explain-example {
  background: #fff; border: 1px dashed #e5c46b; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
  font-weight: 600; color: #104271;
}
.rx-inc-explain-steps ol { padding-left: 1.2rem; margin: 6px 0 0; }
.rx-inc-explain-steps li { margin-bottom: 4px; }
.rx-inc-next { display: block; margin-top: 4px; font-size: .82rem; color: #475569; }
.rx-inc-key { font-size: .78rem; color: #64748b; margin-top: 4px; }
/* Auto-growing text boxes (main.js): no manual resizing needed. */
textarea.form-control:not([data-no-autogrow]) { resize: none; min-height: 58px; transition: height .08s; }

/* An on/off setting as one tidy row: title and meaning on the left, the switch on the right. */
.rx-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer;
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 14px; background: #fff; min-height: 58px;
}
.rx-toggle-text { display: flex; flex-direction: column; min-width: 0; }
.rx-toggle-title { font-weight: 600; color: #1f2937; line-height: 1.25; }
.rx-toggle-sub { font-size: .76rem; color: #64748b; }
.rx-toggle-row .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; float: none; }

/* Incentive scheme rules (slabs, products, cuts): small cards that read like sentences. */
.rx-rule-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.rx-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rx-rule-head > select, .rx-rule-head > .select2-container { flex: 1 1 auto; min-width: 0; }
.rx-rule-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.rx-rule-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.rx-rule-word { font-size: .88rem; color: #334155; white-space: nowrap; }
.rx-rule-num { width: 108px; flex: 0 0 auto; }
.rx-rule-rate { width: 130px; flex: 0 0 auto; }
.rx-rule-type, .rx-rule-line > .select2-container { flex: 1 1 200px; min-width: 0; }
.rx-rule-name { flex: 1 1 180px; min-width: 0; }
.rx-rule-preview { margin-top: 8px; font-size: .8rem; color: #104271; background: #f0f7ff; border-radius: 6px; padding: 6px 10px; }

/* Scheme rule cards: labelled fields in a grid (two across on phones, the wide ones full width). */
.rx-rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rx-rule-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
.rx-rule-field > span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.rx-rule-wide { grid-column: 1 / -1; }
.rx-rule-pays > input { flex: 0 0 34%; max-width: 34%; }
.rx-rule-pays > select { flex: 1 1 auto; }
@media (min-width: 768px) {
  .rx-rule-grid { grid-template-columns: 1fr 1fr 2fr; }
  .rx-rule-wide { grid-column: auto; }
  .rx-slab .rx-rule-grid .rx-rule-wide { grid-column: 3; }
}
@media (min-width: 768px) {
  .rx-cut .rx-rule-grid { grid-template-columns: 2fr 1fr 1fr; }
  .rx-cut .rx-rule-grid .rx-rule-wide:first-child { grid-column: 1; }
  .rx-cut .rx-rule-grid .rx-rule-wide:last-child { grid-column: 1 / -1; }
}
.rx-rule-grid { align-items: end; }

/* Log a Sale: this product's target progress for the month (sold so far + this sale). */
.rx-sale-progress { margin: 4px 0 18px; padding: 10px 12px; border: 1px solid #dbeafe; background: #f5f9ff; border-radius: 10px; font-size: .82rem; color: #334155; }
.rx-sp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rx-sp-head span { color: #104271; font-weight: 600; min-width: 0; }
.rx-sp-head strong { white-space: nowrap; font-variant-numeric: tabular-nums; color: #1f2937; }
.rx-sp-bar { display: flex; height: 8px; margin: 8px 0 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.rx-sp-bar > i { display: block; height: 100%; transition: width .2s; }
.rx-sp-done { background: #104271; }
.rx-sp-new { background: #60a5fa; }
.rx-sp-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: #64748b; }
.rx-sp-foot b { color: #1f2937; }
.rx-sp-good { color: #047857; font-weight: 600; }
.rx-sp-none { color: #64748b; }
/* Compact version: one line + a thin bar. */
.rx-sale-progress { margin: -4px 0 14px; padding: 7px 10px 8px; font-size: .78rem; border-radius: 8px; }
.rx-sp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: #475569; }
.rx-sp-row b { color: #104271; }
.rx-sp-nums { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-sale-progress .rx-sp-bar { height: 4px; margin: 6px 0 0; }
.rx-sale-progress.rx-sp-empty { padding: 6px 10px; background: transparent; border-style: dashed; }

/* Phone list cards: title and the headline figure (or status pill) share the top row; every detail
   line below runs the full width instead of squeezing beside the figure's column. */
@media (max-width: 767px) {
  .rx-table td.rx-visit-card > .d-flex.justify-content-between {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: start;
  }
  .rx-table td.rx-visit-card > .d-flex.justify-content-between > .min-w-0 { display: contents; }
  .rx-table td.rx-visit-card > .d-flex.justify-content-between > .min-w-0 > .rx-visit-title { grid-column: 1; grid-row: 1; }
  .rx-table td.rx-visit-card > .d-flex.justify-content-between > :not(.min-w-0) { grid-column: 2; grid-row: 1; }
  .rx-table td.rx-visit-card > .d-flex.justify-content-between > .min-w-0 > :not(.rx-visit-title) { grid-column: 1 / -1; }
}

/* Dashboard "Sales performance": this month against target with a pace marker, then month and area rows. */
.rx-perf { padding: 18px 20px 14px; }
.rx-perf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.rx-perf-head .rx-perf-month { display: block; margin-top: 2px; }
.rx-perf-month { font-size: .8rem; color: #64748b; }
.rx-perf-grid { display: grid; gap: 4px 40px; }
@media (min-width: 992px) { .rx-perf-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .rx-perf-grid.rx-perf-grid-solo { grid-template-columns: 1fr; } }
.rx-perf-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 230px; margin-top: 8px; padding: 24px 28px; border-radius: 12px; background: #f6f9fc; border: 1px dashed #cfdbe8; }
.rx-perf-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: #e3edf7; color: #104271; font-size: 1.3rem; margin-bottom: 4px; }
.rx-perf-empty strong { font-size: .95rem; color: #1e293b; }
.rx-perf-empty p { max-width: 340px; margin: 0 0 8px; font-size: .82rem; line-height: 1.5; color: #64748b; }
.rx-perf-now { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.rx-perf-fig strong { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--cb-primary); font-variant-numeric: tabular-nums; }
.rx-perf-fig span { font-size: .82rem; color: #64748b; }
.rx-perf-big { font-style: normal; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rx-perf-track { position: relative; height: 10px; border-radius: 5px; background: #e8eef5; margin: 10px 0 6px; }
.rx-perf-fill { display: block; height: 100%; border-radius: 5px; background: #94a3b8; }
.rx-perf-pace { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #334155; border-radius: 1px; }
.rx-perf-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; font-size: .78rem; color: #64748b; }
.rx-perf-note b { color: #334155; }
.rx-perf-ok { color: #16a34a; font-weight: 600; }
.rx-perf-section { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; margin: 16px 0 4px; }
.rx-perf-row:first-child { border-top: 0; }
.rx-perf-row.is-now .rx-perf-label { color: var(--cb-primary); }
.rx-perf-mini i { display: block; height: 100%; border-radius: 3px; background: #94a3b8; }
.is-good .rx-perf-fill, .rx-perf-mini.is-good i { background: #16a34a; }
.is-mid .rx-perf-fill, .rx-perf-mini.is-mid i { background: #f59e0b; }
.is-low .rx-perf-fill, .rx-perf-mini.is-low i { background: #dc2626; }
.rx-perf-big.is-good { color: #16a34a; } .rx-perf-big.is-mid { color: #d97706; } .rx-perf-big.is-low { color: #dc2626; }
@media (max-width: 575.98px) {
  .rx-perf { padding: 14px 14px 10px; }
}
.rx-perf-chart { margin: 0 -4px; min-height: 210px; }
@media (min-width: 992px) { .rx-perf-section-first { margin-top: 0; } }
.rx-perf-tip { padding: 8px 10px; font-size: .8rem; min-width: 170px; }
.rx-perf-tip b { display: block; margin-bottom: 4px; color: #0f172a; }
.rx-perf-tip div { display: flex; justify-content: space-between; gap: 14px; color: #64748b; }
.rx-perf-tip div span { color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums; }
.rx-perf-kpi { text-align: right; line-height: 1.2; flex-shrink: 0; }
.rx-perf-kpi strong { display: block; font-size: 1.3rem; font-weight: 700; color: var(--cb-primary); font-variant-numeric: tabular-nums; }
.rx-perf-kpi span { font-size: .75rem; color: #64748b; }
.rx-perf-row { padding: 10px 0; border-top: 1px solid #f1f5f9; }
.rx-perf-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rx-perf-label { font-weight: 600; color: #1e293b; font-size: .9rem; }
.rx-perf-pct { font-size: .95rem; font-variant-numeric: tabular-nums; color: #334155; }
.rx-perf-pct.is-good { color: #16a34a; } .rx-perf-pct.is-mid { color: #d97706; } .rx-perf-pct.is-low { color: #dc2626; }
.rx-perf-val { color: #64748b; font-size: .78rem; font-variant-numeric: tabular-nums; margin: 1px 0 6px; }
.rx-perf-mini { height: 8px; border-radius: 4px; background: #edf2f7; overflow: hidden; }
/* Reports "Visit Breakdown": the one-line guide above the chart. */
.rx-bd-note { font-size: .78rem; color: #64748b; margin-bottom: 6px; line-height: 1.5; }
.rx-bd-key { display: inline-block; vertical-align: middle; margin: 0 3px 0 6px; }
.rx-bd-key.rx-bd-line { width: 14px; height: 3px; border-radius: 2px; background: #2563eb; }
.rx-bd-key.rx-bd-bar { width: 8px; height: 10px; border-radius: 1px; background: #ef4444; opacity: .8; }
/* Samples → Limits & Alerts: an on/off switch, the rule as one sentence, and what's currently saved. */
.rx-sm-limit { max-width: 560px; }
.rx-sm-limit .card-body { padding: 18px 20px 20px; }
.rx-sm-limit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rx-sm-limit-head .form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.rx-sm-limit-status { font-size: .8rem; color: #64748b; margin-top: 4px; }
.rx-sm-limit-status b { color: #0f172a; }
.rx-sm-limit-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; margin-right: 6px; vertical-align: 1px; }
.rx-sm-limit-dot.is-on { background: #16a34a; }
.rx-sm-limit-intro { font-size: .85rem; color: #475569; margin: 12px 0 14px; }
.rx-sm-limit-rule { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; background: #f8fafc; min-width: 0; transition: opacity .15s; }
.rx-sm-limit-rule.is-off { opacity: .45; }
.rx-sm-limit-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; color: #1e293b; margin-bottom: 12px; }
.rx-sm-limit-qty { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rx-sm-limit-qty .form-control { width: 90px; text-align: center; font-weight: 700; }
.rx-sm-limit-period .btn { font-size: .85rem; }
.rx-sm-limit-who { font-size: .78rem; color: #64748b; margin: 12px 0 14px; }
@media (max-width: 575.98px) { .rx-sm-limit-save { width: 100%; } }
/* HR → Overview: headline figures, then one card per HR area (same look as the Dashboard cards). */
.rx-hr-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 992px) { .rx-hr-kpis { grid-template-columns: repeat(4, 1fr); } }
.rx-hr-kpis > div { background: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: rgba(0, 0, 0, .08) 0 1px 3px; }
.rx-hr-kpis span { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.rx-hr-kpis strong { display: block; font-size: 1.35rem; font-weight: 700; color: var(--cb-primary); font-variant-numeric: tabular-nums; line-height: 1.3; }
.rx-hr-kpis em { font-style: normal; font-size: .75rem; color: #94a3b8; }
.rx-hr-grid { display: grid; gap: 14px; align-items: start; }
@media (min-width: 992px) { .rx-hr-grid { grid-template-columns: 1fr 1fr; } }
.rx-hr-row { padding: 6px 0; }
.rx-hr-row-top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: #334155; margin-bottom: 4px; }
.rx-hr-row-top b { font-variant-numeric: tabular-nums; color: #0f172a; }
.rx-hr-bar { height: 7px; border-radius: 4px; background: #edf2f7; overflow: hidden; }
.rx-hr-bar i { display: block; height: 100%; border-radius: 4px; background: var(--cb-primary); }
.rx-hr-bar.is-ok i { background: #16a34a; }
.rx-hr-bar.is-warn i { background: #f59e0b; }
.rx-hr-miss { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #b45309; margin-top: 6px; }
.rx-hr-miss b { margin-left: auto; }
.rx-hr-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rx-hr-names span { font-size: .75rem; background: #f1f5f9; color: #334155; border-radius: 999px; padding: 3px 10px; }
.rx-hr-names span.is-more { background: transparent; color: #64748b; }
.rx-hr-big { font-size: 1.5rem; font-weight: 700; color: var(--cb-primary); font-variant-numeric: tabular-nums; margin: 4px 0; }
.rx-hr-big span { font-size: .8rem; font-weight: 400; color: #64748b; }
.rx-hr-pill { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: #f1f5f9; color: #334155; }
.rx-hr-pill-ok { background: #dcfce7; color: #166534; }
.rx-hr-pill-warn { background: #fef3c7; color: #92400e; }
.rx-hr-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.rx-hr-open { font-weight: 600; text-decoration: none; }
.rx-hr-link { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.rx-hr-link:hover { box-shadow: rgba(16, 66, 113, .18) 0 4px 14px; }
.rx-hr-link:active { transform: scale(.99); }
.rx-hr-link:focus-visible { outline: 2px solid var(--cb-primary); outline-offset: 2px; }
.rx-hr-chev { color: #94a3b8; font-size: 1rem; margin-top: 4px; }
.rx-hr-leave { font-weight: 400; color: #b45309; }
/* A card's full-width line under the title row (the title row keeps just the title and one figure). */
.rx-perf-sub { font-size: .8rem; color: #64748b; margin: -6px 0 8px; }
.rx-perf-head .rx-perf-kpi span b { font-weight: 600; }
/* HR → Attendance: the day's type as a small coloured chip. */
.rx-att-type { display: inline-flex; align-items: center; white-space: nowrap; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #eef2ff; color: #3730a3; }
.rx-att-type.rx-att-field_visit { background: #dcfce7; color: #166534; }
.rx-att-type.rx-att-cp { background: #e0f2fe; color: #075985; }
.rx-att-type.rx-att-head_office { background: #f1f5f9; color: #334155; }
.rx-att-type.rx-att-training, .rx-att-type.rx-att-meeting { background: #ede9fe; color: #5b21b6; }
.rx-att-type.rx-att-other_field_duty { background: #fef9c3; color: #854d0e; }
.rx-att-type.rx-att-leave { background: #fee2e2; color: #991b1b; }
@media (max-width: 575.98px) { .rx-att-filters .rx-report-field { flex: 1 1 45%; max-width: none; } }
@media (max-width: 575.98px) {
  /* Attendance filters: the shortcut and page size share a full-width row instead of spilling off the screen. */
  .rx-att-filters .rx-report-field-auto { flex: 1 1 100%; }
  .rx-att-filters .rx-report-field-auto > label { display: none; }
  .rx-att-filters .rx-report-field-auto .d-flex > * { flex: 1 1 0; min-width: 0; }
  .rx-att-filters .rx-report-field-auto .select2-container { width: 100% !important; }
}
@media (max-width: 575.98px) { .rx-att-filters .rx-att-person { flex: 1 1 100%; } }
/* HR → Attendance: a card per person that opens into a calendar of their days. */
.rx-att-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
@media (min-width: 768px) { .rx-att-summary { grid-template-columns: repeat(4, 1fr); } }
.rx-att-summary > div { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 8px; padding: 8px 12px; }
.rx-att-summary strong { display: block; font-size: 1.15rem; color: var(--cb-primary); font-variant-numeric: tabular-nums; }
.rx-att-summary span { font-size: .72rem; color: #64748b; }
.rx-att-people { display: grid; gap: 10px; }
@media (min-width: 992px) { .rx-att-people { grid-template-columns: 1fr 1fr; align-items: start; } }
.rx-att-person-card { border: 1px solid #e5eaf1; border-radius: 12px; background: #fff; overflow: hidden; }
.rx-att-person-card.is-open { border-color: #c7d4e5; box-shadow: rgba(16, 66, 113, .08) 0 4px 14px; }
.rx-att-head { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px; }
.rx-att-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rx-att-name { font-weight: 600; color: #0f172a; font-size: .95rem; }
.rx-att-role { font-size: .7rem; font-weight: 600; color: #64748b; background: #f1f5f9; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.rx-att-count { font-size: .8rem; color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-att-count b { color: #0f172a; font-size: .95rem; }
.rx-att-count em { font-style: normal; color: #7c3aed; }
.rx-att-bar { height: 7px; border-radius: 4px; background: #edf2f7; overflow: hidden; margin: 8px 0; }
.rx-att-bar i { display: block; height: 100%; border-radius: 4px; }
.rx-att-bar.is-ok i { background: #16a34a; } .rx-att-bar.is-mid i { background: #f59e0b; } .rx-att-bar.is-low i { background: #dc2626; }
.rx-att-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rx-att-types { display: flex; flex-wrap: wrap; gap: 5px; }
.rx-att-types .rx-att-type { font-size: .7rem; padding: 2px 8px; }
.rx-att-chev { color: #94a3b8; transition: transform .2s; }
.rx-att-person-card.is-open .rx-att-chev { transform: rotate(180deg); }
.rx-att-body:empty { display: none; }
.rx-att-body { border-top: 1px solid #f1f5f9; padding: 12px 14px 14px; }
.rx-att-month + .rx-att-month { margin-top: 12px; }
.rx-att-month-name { font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: 6px; }
.rx-att-week, .rx-att-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.rx-att-week span { font-size: .68rem; color: #94a3b8; font-weight: 600; }
.rx-att-grid > span.is-blank { visibility: hidden; }
.rx-att-day { aspect-ratio: 1; max-height: 40px; border-radius: 8px; border: 1px solid transparent; font-size: .78rem; font-variant-numeric: tabular-nums; background: #f8fafc; color: #334155; padding: 0; }
.rx-att-day.is-marked { background: #dcfce7; color: #166534; font-weight: 600; }
.rx-att-day.is-marked.rx-att-cp { background: #e0f2fe; color: #075985; }
.rx-att-day.is-marked.rx-att-head_office { background: #e2e8f0; color: #1e293b; }
.rx-att-day.is-marked.rx-att-training, .rx-att-day.is-marked.rx-att-meeting { background: #ede9fe; color: #5b21b6; }
.rx-att-day.is-marked.rx-att-other_field_duty { background: #fef9c3; color: #854d0e; }
.rx-att-day.is-marked.rx-att-leave { background: #fee2e2; color: #991b1b; }
.rx-att-day.is-missed { background: #fff; border-color: #fca5a5; color: #b91c1c; }
.rx-att-day.is-off { background: transparent; color: #cbd5e1; }
.rx-att-day.is-out { visibility: hidden; }
.rx-att-day.is-picked { outline: 2px solid var(--cb-primary); outline-offset: 1px; }
.rx-att-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .7rem; color: #64748b; margin-top: 10px; }
.rx-att-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -6px; vertical-align: -1px; }
.rx-att-key.is-marked { background: #dcfce7; } .rx-att-key.is-missed { background: #fff; border: 1px solid #fca5a5; } .rx-att-key.is-off { background: #e2e8f0; }
.rx-att-detail { margin-top: 10px; padding: 10px 12px; background: #f8fafc; border-radius: 8px; font-size: .82rem; color: #64748b; }
.rx-att-detail b { display: block; color: #0f172a; margin-bottom: 6px; }
.rx-att-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rx-att-entry + .rx-att-entry { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.rx-att-entry .rx-att-edit { margin-left: auto; }
.rx-att-how { font-size: .72rem; color: #64748b; align-self: center; margin-right: 2px; }
/* Attendance card: the bar split by how each day was marked, and a one-line key under it. */
.rx-att-split { display: flex; }
.rx-att-split .rx-att-seg { display: block; height: 100%; border-radius: 0; }
.rx-att-split .rx-att-seg:first-child { border-radius: 4px 0 0 4px; }
.rx-att-split .rx-att-seg:last-child { border-radius: 0 4px 4px 0; }
.rx-att-split .rx-att-seg:only-child { border-radius: 4px; }
.rx-att-seg.rx-att-field_visit, .rx-att-dot.rx-att-field_visit { background: #16a34a; }
.rx-att-seg.rx-att-cp, .rx-att-dot.rx-att-cp { background: #0ea5e9; }
.rx-att-seg.rx-att-head_office, .rx-att-dot.rx-att-head_office { background: #64748b; }
.rx-att-seg.rx-att-training, .rx-att-dot.rx-att-training, .rx-att-seg.rx-att-meeting, .rx-att-dot.rx-att-meeting { background: #8b5cf6; }
.rx-att-seg.rx-att-other_field_duty, .rx-att-dot.rx-att-other_field_duty { background: #eab308; }
.rx-att-seg.rx-att-leave, .rx-att-dot.rx-att-leave { background: #ef4444; }
.rx-att-mix { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .78rem; color: #475569; }
.rx-att-mix span { display: inline-flex; align-items: center; white-space: nowrap; }
.rx-att-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.rx-att-pct.is-ok { color: #16a34a; } .rx-att-pct.is-mid { color: #d97706; } .rx-att-pct.is-low { color: #dc2626; }
/* HR for someone who sees only themselves: their record as a profile card, and checklist rows. */
.rx-hr-self thead { display: none; }
.rx-table.rx-hr-self td.rx-hr-me-cell { display: block; padding: 0; border: 0; background: transparent; }
.rx-hr-me { border: 1px solid #e5eaf1; border-radius: 12px; padding: 14px 16px; background: #fff; max-width: 560px; }
.rx-hr-me-head { display: flex; align-items: center; gap: 12px; }
.rx-hr-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #e8eef7; color: var(--cb-primary); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rx-hr-me-name { font-weight: 700; color: #0f172a; font-size: 1rem; }
.rx-hr-me-role { font-size: .8rem; color: #64748b; }
.rx-hr-me-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rx-hr-me-facts > div { background: #f8fafc; border-radius: 8px; padding: 8px 10px; }
.rx-hr-me-facts span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 600; }
.rx-hr-me-facts b { font-size: .9rem; color: #0f172a; }
.rx-hr-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #1e293b; padding: 7px 0; border-top: 1px solid #f1f5f9; }
.rx-hr-check:first-of-type { border-top: 0; }
.rx-hr-check span { margin-left: auto; font-size: .78rem; }
.rx-hr-check.is-ok i, .rx-hr-check.is-ok span { color: #16a34a; }
.rx-hr-check.is-missing i, .rx-hr-check.is-missing span { color: #b45309; }
/* "Viewing as" → Switch user: a searchable list of the same organization's people. */
.rx-imp-switch { display: block; width: 100%; background: #fff; border: 1px solid #fcd34d; color: #92400e; border-radius: 8px; padding: .4rem .6rem; font-size: .85rem; font-weight: 600; margin-bottom: .5rem; }
.rx-imp-switch:hover { background: #fffbeb; }
.rx-imp-picker { margin-bottom: .6rem; }
.rx-imp-list { max-height: 240px; overflow-y: auto; margin-top: 6px; border: 1px solid #f1f5f9; border-radius: 8px; }
.rx-imp-user { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 0; border-top: 1px solid #f1f5f9; padding: 7px 10px; font-size: .85rem; color: #111827; }
.rx-imp-user:first-child { border-top: 0; }
.rx-imp-user:hover, .rx-imp-user:focus-visible { background: #fffbeb; }
.rx-imp-user span { font-size: .72rem; color: #6b7280; white-space: nowrap; }
.rx-imp-user.is-current { color: #9ca3af; cursor: default; }
.rx-imp-empty { padding: 8px 10px; font-size: .8rem; color: #6b7280; }
/* A deactivated person, wherever their past work still appears: faded name and a small red mark. */
.rx-person-off { color: #94a3b8; }
.rx-person-off .text-muted { color: #b6c0cd !important; }
.rx-person-off-mark { color: #dc2626; opacity: .8; font-size: .85em; margin-left: 4px; vertical-align: 1px; }
/* Pathway's "whose pathway" picker is wrapped only so it can be hidden on Team Activity — the wrapper
   must not become the flex item, or the select stops stretching like the date picker beside it. */
#pathwayRepWrap { display: contents; }
/* Offline calls (offline.js): the cloud icon in the header and its list of visits saved on the phone. */
.rx-offline-list .min-w-0 { min-width: 0; }
.rx-offline-spin { display: inline-block; animation: rx-offline-spin 1s linear infinite; }
@keyframes rx-offline-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rx-offline-spin { animation: none; } }
/* Dashboard "Still to visit today" (Today's Plan card): the name truncates instead of pushing Log call off. */
.rx-dtp-todo-text { min-width: 0; }
/* A table on an offline page with no copy kept on the phone (RxTable.load + offline.js). */
.rx-offline-empty { position: sticky; left: 0; }
/* Platform → Website: ranked lists with a bar scaled to the top entry. */
.rx-web-bar { margin-bottom: 0.75rem; }
.rx-web-bar:last-child { margin-bottom: 0; }
.rx-web-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; font-size: 0.875rem; }
.rx-web-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1f2937; }
.rx-web-bar-value { flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rx-web-bar-value .text-muted { font-weight: 400; font-size: 0.75rem; }
.rx-web-bar-track { height: 6px; border-radius: 3px; background: #eef2f7; margin-top: 4px; overflow: hidden; }
.rx-web-bar-track span { display: block; height: 100%; width: var(--rx-web-w, 0%); background: #104271; border-radius: 3px; }

/* Pathway's filters: the pickers are replaced by select2, which ignores the width on the original field —
   the date picker ended up so narrow that "Last 7 Days" wrapped onto two lines. */
#pathwayRepresentative + .select2 { min-width: 230px; }
#pathwayDatePreset + .select2 { min-width: 170px; }
.select2-container .select2-results__option { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Day by day: the areas visited wrap instead of stretching the table. */
.rx-fd-areas { max-width: 260px; white-space: normal; font-size: .85rem; color: #475569; }

/* Plan & Billing */
.rx-bill-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 20px;
  background: #fff;
  box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1);
}
.rx-bill-bar img {
  max-height: 32px;
  max-width: 140px;
  object-fit: contain;
}
.rx-bill-bar-org {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #012970;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#main.rx-bill-only {
  margin-left: 0;
  max-width: 1100px;
  margin-inline: auto;
}
.rx-bill-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding-top: 20px;
}
.rx-bill-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.2rem;
}
.rx-bill-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
}
.rx-bill-save {
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 0.25rem;
  opacity: 0.8;
}
.rx-bill-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.rx-bill-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rx-bill-plan:hover {
  border-color: #9fb5cc;
}
.rx-bill-plan.is-chosen {
  border-color: #104271;
  box-shadow: 0 0 0 0.2rem rgba(16, 66, 113, 0.12);
}
.rx-bill-plan > .form-check-input {
  position: absolute;
  top: 1.15rem;
  right: 1.1rem;
  margin: 0;
}
.rx-bill-plan-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 1.75rem;
}
.rx-bill-plan-name {
  font-family: "Nunito", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #012970;
}
.rx-bill-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.rx-bill-amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}
.rx-bill-per,
.rx-bill-min {
  font-size: 0.82rem;
  color: #6b7280;
}
.rx-bill-tagline {
  font-size: 0.88rem;
  color: #4b5563;
}
.rx-bill-modules {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #374151;
  border-top: 1px solid #eef1f5;
  padding-top: 0.6rem;
  flex: 1;
}
.rx-bill-modules i {
  color: #198754;
  margin-right: 0.35rem;
}
/* A module switched on for this organization alone: set apart under the modules of its current plan. */
.rx-bill-modules .rx-bill-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.4rem;
  margin-top: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: #eef4ff;
  color: #1e3a8a;
  font-weight: 600;
}
.rx-bill-modules .rx-bill-extra i {
  color: #2f5bea;
  margin-right: 0;
}
.rx-bill-modules .rx-bill-extra small {
  font-size: 0.75rem;
  font-weight: 400;
  color: #52607a;
}
.rx-bill-checkout {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr auto;
  align-items: end;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef1f5;
}
.rx-bill-checkout .btn {
  height: 44px;
  font-weight: 600;
}
.rx-bill-total-amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: #012970;
  font-variant-numeric: tabular-nums;
}
.rx-bill-local {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: #4b5563;
}
@media (max-width: 767.98px) {
  .rx-bill-checkout {
    grid-template-columns: 1fr;
  }
  .rx-bill-checkout .btn {
    width: 100%;
  }
}
/* Header: trial countdown, linking to Plan & Billing. */
.rx-trial-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0a58ca;
  background: #e7f1ff;
  text-decoration: none;
  white-space: nowrap;
}
.rx-trial-pill:hover {
  background: #d3e5ff;
  color: #084298;
}
.rx-trial-pill.is-ending {
  color: #997404;
  background: #fff3cd;
}
/* Plan & Billing: confirming a change to a card subscription, and a managed plan's module list. */
.rx-bill-confirm {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #b6d4fe;
  border-radius: 12px;
  background: #f1f7ff;
}
.rx-bill-confirm-lead {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: #1f2937;
}
.rx-bill-confirm-warn {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #997404;
}
/* Plan & Billing: pay by card or bank transfer (Pakistani organizations), and the bank transfer panel. */
.rx-bill-pay {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rx-bill-bank {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  background: #f8fafc;
}
.rx-bill-bank-title {
  font-weight: 700;
  color: #012970;
  margin: 0 0 0.75rem;
}
.rx-bill-bank-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}
.rx-bill-bank-details dt {
  font-weight: 600;
  color: #6b7280;
}
.rx-bill-bank-details dd {
  margin: 0;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
@media (max-width: 767.98px) {
  .rx-bill-pay .btn {
    flex: 1 1 100%;
  }
}
/* Day by day: how a day's distance was measured (by road from saved routes, or straight line). */
.rx-fd-basis {
  display: block;
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 400;
}
/* Plan & Billing: the cancel panel. */
.rx-bill-cancel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #f5c2c7;
  border-radius: 12px;
  background: #fff8f8;
  max-width: 640px;
}
/* Sign-in / sign-up: what RxRep is, and its pricing and policy links (auth/partials/legal_links). */
.rx-auth-legal {
  max-width: 460px;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}
.rx-auth-legal-about {
  margin: 0 0 0.35rem;
}
.rx-auth-legal nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
}
.rx-auth-legal a {
  color: #4b5563;
  text-decoration: none;
}
.rx-auth-legal a:hover {
  color: #104271;
  text-decoration: underline;
}
/* Sign-in / sign-up: slim bar back to the RxRep website (auth/partials/site_nav). */
.rx-auth-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 16px;
}
.rx-auth-topbar-logo img {
  max-height: 32px;
  max-width: 140px;
  object-fit: contain;
}
.rx-auth-topbar-links {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 600;
}
.rx-auth-topbar-links a {
  color: #374151;
  text-decoration: none;
}
.rx-auth-topbar-links a:hover {
  color: #104271;
}
.rx-auth-topbar-cta {
  border-radius: 999px;
  padding-inline: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
/* With the bar, the card centres in the space below it instead of the whole screen. */
.rx-auth-with-bar .rx-auth-wrap {
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
  padding-top: 1rem;
}
@media (max-width: 575.98px) {
  .rx-auth-topbar {
    gap: 0.75rem;
  }
  .rx-auth-topbar-links {
    gap: 0.9rem;
  }
  .rx-auth-topbar-wide {
    display: none;
  }
}
/* The sign-in card has the logo already — no second one in the bar; on phones the card sits under the bar, not mid-screen. */
.rx-auth-topbar-logo {
  display: none;
}
@media (max-width: 575.98px) {
  .rx-auth-with-bar .rx-auth-wrap {
    min-height: 0;
    justify-content: flex-start;
    padding-top: 0.5rem;
  }
}

/* Platform Admin > Invoices */
.rx-invoice-filter { min-width: 240px; }
.rx-invoice-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; margin-bottom: 10px; }
.rx-invoice-lines .rx-invoice-col-qty { width: 90px; }
.rx-invoice-lines .rx-invoice-col-price { width: 140px; }
.rx-invoice-lines .rx-invoice-col-amount { width: 130px; }
.rx-invoice-lines .rx-invoice-col-remove { width: 44px; }
.rx-invoice-lines td { min-width: 80px; }
.rx-invoice-lines td:first-child { min-width: 220px; }
.rx-invoice-totals td { border-bottom-width: 0; }
.rx-invoice-totals tr.fw-bold td { border-top: 2px solid #212529; }
.rx-invoice-totals input { max-width: 140px; margin-left: auto; }
.rx-invoice-preview { display: block; width: 100%; height: 80vh; min-height: 560px; border: 0; border-radius: 6px; }
.rx-invoice-logo-preview { max-height: 56px; max-width: 220px; padding: 6px; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; }
.rx-num { font-variant-numeric: tabular-nums; }

/* Role editor (users/modals/role_modal.blade.php) */
.rx-perm-legend { display: grid; gap: 4px; font-size: 13px; color: #495057; background: #f6f8fb; border: 1px solid #e3e8f0; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.rx-perm-module { border: 1px solid #dbe3ee; overflow: hidden; }
.rx-perm-module-head { background: #104271; color: #fff; border-bottom: 0; padding: 10px 16px; }
.rx-perm-module-head strong { font-size: 15px; }
.rx-perm-module-head small { color: rgba(255, 255, 255, .78); font-size: 12.5px; margin-top: 2px; }
.rx-perm-detail { padding: 6px 16px 12px; }
.rx-perm-group { background: #f3f6fa; border: 1px solid #e3e8f0; border-radius: 8px; padding: 0 12px; margin: 10px 0 4px; }
.rx-perm-group-title { font-size: 13px; font-weight: 700; color: #104271; padding: 9px 0 7px; border-bottom: 1px solid #dde4ee; }
.rx-perm-group .rx-perm-row { border-bottom-color: #e3e9f1; }
.rx-perm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.rx-perm-row:last-child { border-bottom: 0; }
.rx-perm-label { flex: 1 1 220px; min-width: 0; }
.rx-perm-label small { font-size: 12px; }
.rx-perm-options { display: flex; flex-wrap: wrap; gap: 4px; }
.rx-perm-option { border: 1px solid #ced4da; color: #495057; background: #fff; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.rx-perm-option:hover { border-color: #104271; color: #104271; }
.btn-check:checked + .rx-perm-option { background: #104271; border-color: #104271; color: #fff; }
.btn-check:checked + .rx-perm-option.rx-perm-none,
.btn-check:checked + .rx-perm-option.rx-perm-not_required { background: #6c757d; border-color: #6c757d; }
.btn-check:focus-visible + .rx-perm-option { box-shadow: 0 0 0 3px rgba(16, 66, 113, .25); }
.rx-perm-simple { padding: 12px 16px; }
.rx-perm-simple-note { display: block; color: #8a6d1f; font-size: 12px; margin-top: 6px; }
/* Simple view: modules with one choice hide their permission-by-permission list; the rest always show it. */
.rx-perm-simple-mode .rx-perm-module[data-simple] .rx-perm-detail { display: none; }
#permissionsContainer:not(.rx-perm-simple-mode) .rx-perm-simple { display: none; }
@media (max-width: 575px) { .rx-perm-options { width: 100%; } }

/* Dashboard "Get set up" checklist (components/getting_started.blade.php) */
.rx-setup { border-left: 4px solid #104271; }
/* The base .card-body has no top padding (cards start with a padded title); this card's title is unpadded. */
.rx-setup .card-body { padding-top: 20px; }
.rx-setup-progress { height: 6px; }
.rx-setup-progress .progress-bar { background: #104271; }
.rx-setup-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rx-setup-step { display: flex; gap: 12px; align-items: flex-start; }
.rx-setup-mark { flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #ced4da; color: #adb5bd; font-size: 12px; background: #fff; }
.rx-setup-step.is-done .rx-setup-mark { background: #198754; border-color: #198754; color: #fff; }
.rx-setup-title { font-weight: 600; }
.rx-setup-step.is-done .rx-setup-title { color: #6c757d; text-decoration: line-through; font-weight: 500; }
.rx-setup-text { font-size: 13px; color: #6c757d; }
/* "Hide for now": a quiet text action, not a boxed button (no border, no browser button chrome). */
.rx-setup-hide { border: 0; background: none; padding: 4px 0; font-size: 13px; color: #6c757d; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; line-height: 1.2; }
.rx-setup-hide:hover, .rx-setup-hide:focus-visible { color: #104271; }

/* Platform Admin > Solution Articles (platform/solutions/*) */
.rx-sol-col-order { width: 70px; }
.rx-sol-prefix { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6c757d; font-size: 13px; }
.rx-sol-icon-preview { display: inline-block; width: 1.1em; text-align: center; color: #104271; }
.rx-sol-row { display: flex; gap: 10px; align-items: flex-start; background: #f6f8fb; border: 1px solid #e3e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.rx-sol-row-fields { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.rx-sol-field { flex: 1 1 220px; min-width: 0; }
.rx-sol-field-icon { flex: 0 0 170px; }
.rx-sol-field-textarea { flex-basis: 100%; }
.rx-sol-field .form-label { margin-bottom: 2px; color: #6c757d; }
.rx-sol-row-tools { display: flex; flex-direction: column; gap: 4px; }
.rx-sol-related { columns: 2 260px; }
.rx-sol-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border-top: 1px solid #e3e8f0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); margin-bottom: 20px; }
@media (max-width: 575px) { .rx-sol-field-icon { flex-basis: 100%; } .rx-sol-row { flex-direction: column; } .rx-sol-row-tools { flex-direction: row; } }

/* Sign-in screens with the brand panel (auth/partials/brand_panel): form on the left, RxRep on the right.
   Large screens only; phones keep the single centred card. Colours and type follow the website. */
@media (min-width: 992px) {
  .rx-auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 46%);
    grid-template-rows: auto 1fr;
    grid-template-areas: "bar brand" "form brand";
  }
  .rx-auth-split .rx-auth-topbar { grid-area: bar; width: 100%; }
  .rx-auth-split .rx-auth-wrap { grid-area: form; min-height: 0; }
  .rx-auth-split .rx-auth-brand { grid-area: brand; display: flex; }
  .rx-auth-split .rx-auth-title { font-family: "Figtree", "Nunito", sans-serif; font-weight: 800; letter-spacing: -0.02em; }
}
.rx-auth-brand {
  display: none;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 48px clamp(32px, 5vw, 72px);
  color: #e8eefc;
  font-family: "Figtree", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(90% 70% at 85% 10%, rgba(47, 91, 234, 0.55) 0%, rgba(47, 91, 234, 0) 60%),
    linear-gradient(160deg, #0f2a4a 0%, #13366b 55%, #1d4fc4 100%);
  overflow: hidden;
}
.rx-auth-brand-inner { max-width: 470px; display: grid; gap: 22px; }
.rx-auth-brand-eyebrow {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.rx-auth-brand-title {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.rx-auth-brand-intro { margin: -8px 0 0; font-size: 16px; line-height: 1.55; color: #c9d6f2; }
.rx-auth-brand-mock {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.rx-auth-brand-visit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: #1f2a37;
  box-shadow: 0 8px 22px rgba(8, 20, 45, 0.25);
}
.rx-auth-brand-visit > div { flex: 1 1 auto; min-width: 0; }
.rx-auth-brand-visit b { display: block; font-size: 14px; }
.rx-auth-brand-visit small { display: block; font-size: 12px; color: #6b7686; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-auth-brand-avatar {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf0ff;
  color: #2f5bea;
  font-size: 17px;
}
.rx-auth-brand-avatar.is-warn { background: #fff4e0; color: #b45309; }
.rx-auth-brand-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.rx-auth-brand-pill.is-ok { background: #e7f6ec; color: #15803d; }
.rx-auth-brand-pill.is-sync { background: #e8f0fe; color: #2346c7; }
.rx-auth-brand-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rx-auth-brand-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: #d5e0f7; }
.rx-auth-brand-points li b { color: #fff; font-weight: 700; }
.rx-auth-brand-points i { flex: 0 0 auto; margin-top: 2px; color: #8fb0ff; font-size: 17px; }
.rx-auth-brand-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  color: #b3c3e6;
}
.rx-auth-brand-trust i { margin-right: 6px; }
@media (min-width: 992px) and (max-height: 720px) {
  .rx-auth-brand-mock { display: none; }
}
.rx-auth-brand-trust a { color: inherit; text-decoration: none; }
.rx-auth-brand-trust a:hover { color: #fff; text-decoration: underline; }
/* Sign-in headings wrap evenly instead of leaving one word alone on a line. */
.rx-auth-title { text-wrap: balance; }
/* Waiting-for-approval page: where the sign-up has got to. */
.rx-auth-steps { list-style: none; margin: 0 0 1.1rem; padding: 0.9rem 1rem; display: grid; gap: 0.55rem; background: #f6f8fb; border: 1px solid #e6ebf2; border-radius: 12px; font-size: 0.9rem; color: #374151; }
.rx-auth-steps li { display: flex; align-items: center; gap: 0.55rem; }
.rx-auth-steps .is-done i { color: #16a34a; }
.rx-auth-steps .is-now { font-weight: 600; color: #104271; }
.rx-auth-steps .is-now i { color: #b45309; }
/* Login: a quiet way into the free trial under the form. */
.rx-auth-new { margin: 1rem 0 0; text-align: center; font-size: 0.88rem; color: #6b7280; }
.rx-auth-new a { color: #104271; font-weight: 600; }
/* With the brand panel beside the form, it already says what RxRep is — the line under the card is for phones. */
@media (min-width: 992px) { .rx-auth-split .rx-auth-legal-about { display: none; } }
/* Sign-up beside the brand panel: room for two fields to a line. */
@media (min-width: 992px) { .rx-auth-split .rx-auth-card-wide { max-width: 560px; } }
/* Beside the brand panel the form sits straight on a plain white half — no card inside a box. Phones keep the card. */
@media (min-width: 992px) {
  .rx-auth-split { background: #fff; }
  .rx-auth-split .rx-auth-card { background: transparent; border: 0; box-shadow: none; padding: 0; max-width: 420px; }
  .rx-auth-split .rx-auth-card-wide { max-width: 560px; }
  .rx-auth-split .rx-auth-wrap { padding-left: 32px; padding-right: 32px; }
}
/* Sign-up: the price line under the button stays on one line where there's room. */
.rx-auth-price { font-size: 0.8rem; text-align: center; }
/* Phones and tablets: the form sits straight on the white page too — no card border or shadow. */
@media (max-width: 991.98px) {
  .rx-auth-card { border: 0; box-shadow: none; background: transparent; padding-left: 4px; padding-right: 4px; }
}

/* Plan & Billing: "Your plan" for organizations whose plan is arranged with us. */
.rx-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding-top: 1.25rem; }
.rx-plan-sub { margin: 0.35rem 0 1.1rem; color: #6b7280; font-size: 0.9rem; }
.rx-plan-modules { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rx-plan-module { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.9rem 0.35rem 0.4rem; border: 1px solid #e5eaf0; border-radius: 999px; background: #f8fafc; color: #1f2937; font-size: 0.88rem; font-weight: 500; white-space: nowrap; }
.rx-plan-module i { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #d1e7dd; color: #0f5132; font-size: 0.78rem; }
.rx-plan-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-top: 1.25rem; padding: 1rem 1.25rem; border-radius: 0.75rem; background: #eef4fb; }
.rx-plan-help strong { display: block; color: #012970; }
.rx-plan-help span { display: block; font-size: 0.88rem; color: #4b5563; }

/* Plan & Billing on phones: each invoice is a card instead of a table that runs off the screen. */
.rx-inv-list { display: flex; flex-direction: column; gap: 0.75rem; }
.rx-inv-card { padding: 1rem; border: 1px solid #e5eaf0; border-radius: 0.75rem; background: #fff; }
.rx-inv-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.rx-inv-no { font-weight: 600; color: #1f2937; word-break: break-all; }
.rx-inv-amount { margin: 0.35rem 0 0.6rem; font-size: 1.4rem; font-weight: 700; color: #104271; font-variant-numeric: tabular-nums; }
.rx-inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 0 0 0.9rem; }
.rx-inv-meta dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #6b7280; }
.rx-inv-meta dd { margin: 0; font-size: 0.9rem; color: #1f2937; }

/* Plan & Billing: the small line under "Paid until" when service is kept running past what has been paid. */
.rx-bill-note { margin-top: 0.25rem; font-size: 0.8rem; line-height: 1.35; color: #4b5563; }

/* Users > Report: one person's work over a few days. */
.rx-rep-body {
  padding-top: 1rem;
}
.rx-rep-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.rx-rep-who {
  flex: 1 1 14rem;
  min-width: 0;
}
.rx-rep-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #104271;
}
.rx-rep-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.rx-rep-presets .btn {
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}
.rx-rep-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.rx-rep-custom .form-control {
  width: auto;
}
.rx-rep-tiles {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.rx-rep-group + .rx-rep-group {
  margin-top: 1rem;
}
.rx-rep-group-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}
.rx-rep-delta {
  font-size: 0.75rem;
  color: #6b7280;
}
.rx-rep-up {
  color: #15803d;
}
.rx-rep-down {
  color: #b91c1c;
}
.rx-rep-empty {
  color: #6b7280;
}
.rx-rep-days {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.rx-rep-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 2.6rem;
  font-size: 0.7rem;
  color: #6b7280;
}
.rx-rep-day-bar {
  display: flex;
  align-items: flex-end;
  width: 1.4rem;
  height: 3.5rem;
  background: #eef0f3;
  border-radius: 4px;
  overflow: hidden;
}
.rx-rep-day-bar span {
  display: block;
  width: 100%;
  background: #104271;
}
.rx-rep-day-n {
  font-weight: 600;
  color: #104271;
}
.rx-rep-copybox {
  position: fixed;
  left: -9999px;
  top: 0;
}
.rx-rep-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rx-rep-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid #eef0f3;
}
.rx-rep-item-text {
  flex: 1 1 auto;
  min-width: 0;
}
.rx-rep-item-main {
  font-weight: 600;
  color: #1f2937;
  overflow-wrap: anywhere;
}
.rx-rep-item-sub {
  font-size: 0.8rem;
  color: #6b7280;
  overflow-wrap: anywhere;
}
.rx-rep-item-side {
  flex: 0 0 auto;
  font-weight: 600;
  color: #104271;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rx-rep-card-empty .card-body {
  padding-bottom: 0.75rem;
}
/* Phones: the dashboard's compact look: small type, tight cards, 2-up tiles, one row of period chips. */
@media (max-width: 575.98px) {
  .rx-rep-body {
    padding: 0.7rem 0.8rem;
  }
  #repBody .card,
  #main .section > .card {
    margin-bottom: 0.6rem;
  }
  .rx-rep-toolbar {
    gap: 0.5rem;
  }
  .rx-rep-who {
    order: 1;
    flex: 1 1 0;
  }
  .rx-rep-name {
    font-size: 1rem;
  }
  .rx-rep-dl-wrap {
    order: 2;
  }
  .rx-rep-dl-wrap .btn,
  .rx-rep-toolbar #repCopy {
    padding: 0.3rem 0.55rem;
  }
  .rx-rep-dl-wrap .dropdown-toggle::after {
    display: none;
  }
  .rx-rep-toolbar #repCopy {
    order: 2;
    padding: 0.3rem 0.55rem;
  }
  .rx-rep-toolbar #repCopy .bi {
    margin: 0 !important;
  }
  .rx-rep-copy-text {
    display: none;
  }
  .rx-rep-presets {
    order: 3;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .rx-rep-presets::-webkit-scrollbar {
    display: none;
  }
  .rx-rep-presets .btn {
    flex: 0 0 auto;
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  #repRange {
    font-size: 0.72rem;
    margin-top: 0.6rem !important;
  }
  .rx-rep-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.6rem !important;
  }
  .rx-rep-tiles .rx-glance-tile {
    padding: 0.5rem 0.65rem;
    gap: 0.1rem;
  }
  .rx-rep-tiles .rx-glance-icon {
    display: none;
  }
  .rx-rep-tiles .rx-glance-label {
    font-size: 0.72rem;
  }
  .rx-rep-tiles .rx-glance-value {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
  }
  .rx-rep-tiles .rx-rep-delta {
    font-size: 0.68rem;
  }
  .rx-rep-tiles .rx-glance-tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  #repBody .card-title {
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 0.35rem;
  }
  #repBody .card-body > .small {
    font-size: 0.72rem;
    margin-bottom: 0.4rem;
  }
  .rx-rep-item {
    padding: 0.4rem 0;
    gap: 0.5rem;
  }
  .rx-rep-item-main {
    font-size: 0.86rem;
  }
  .rx-rep-item-sub {
    font-size: 0.72rem;
  }
  .rx-rep-item-side {
    font-size: 0.82rem;
  }
  .rx-rep-item .badge {
    font-size: 0.62rem;
  }
  .rx-rep-days {
    gap: 0.3rem;
    margin-bottom: 0.4rem;
  }
  .rx-rep-day {
    min-width: 2rem;
    font-size: 0.62rem;
  }
  .rx-rep-day-bar {
    width: 1.1rem;
    height: 2.4rem;
  }
  .rx-rep-empty {
    font-size: 0.8rem;
  }
  #repBody .rx-rep-toggle {
    padding: 0.2rem 0;
    font-size: 0.8rem;
  }
}
.rx-rep-plan {
  margin: 0.25rem 0 0.75rem;
}
.rx-rep-plan .progress {
  height: 0.6rem;
}
.rx-rep-plan .progress-bar {
  background: #104271;
}
.rx-rep-plan-legend {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Users > Team report: everyone in the Users list side by side. */
.rx-team-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rx-team-sort .form-select {
  width: auto;
}
.rx-team-head,
.rx-team-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.6fr) repeat(var(--rx-team-cols, 6), minmax(0, 1fr));
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid #eef0f3;
}
.rx-team-head {
  border-top: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
}
.rx-team-head span:not(:first-child),
.rx-team-stat {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rx-team-name {
  display: block;
  font-weight: 600;
  color: #104271;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.rx-team-name:hover {
  text-decoration: underline;
}
.rx-team-role {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
}
.rx-team-stat-label {
  display: none;
}
.rx-team-zero {
  color: #b6bcc6;
}
.rx-team-none {
  display: none;
}
@media (max-width: 767.98px) {
  .rx-team-head {
    display: none;
  }
  .rx-team-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.5rem 0;
    gap: 0.3rem 0.5rem;
  }
  .rx-team-who {
    grid-column: 1 / -1;
  }
  .rx-team-stat {
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: #104271;
  }
  .rx-team-zero {
    display: none;
  }
  .rx-team-none {
    display: block;
    grid-column: 1 / -1;
    font-size: 0.78rem;
    color: #9aa1ad;
  }
  .rx-team-stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: #6b7280;
  }
  .rx-rep-dl-wrap .bi.me-1 {
    margin: 0 !important;
  }
}

/* Appearance switch (Auto / Light / Dark) in the profile menu. */
.rx-theme-item {
  padding: 0.35rem 1rem 0.5rem;
}
.rx-theme-label {
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}
.rx-theme-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
}
.rx-theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.4rem 0.2rem;
  font-size: 0.72rem;
  color: #4b5563;
  background: #f4f6f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
}
.rx-theme-btn i {
  font-size: 1rem;
}
.rx-theme-btn:hover {
  background: #e8eef6;
}
.rx-theme-btn.active {
  color: #fff;
  background: #104271;
  border-color: #104271;
}

.rx-theme-switching,
.rx-theme-switching *,
.rx-theme-switching *::before,
.rx-theme-switching *::after {
  transition: none !important;
}

/* Platform Admin > Website: a demo request's details panel */
.rx-lead-row { cursor: pointer; }
.rx-lead-row:hover > td { background: #f4f8fc; }
.rx-lead-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.rx-lead-facts { display: grid; grid-template-columns: 11rem 1fr; gap: .6rem 1rem; margin: 0; font-size: .92rem; }
.rx-lead-facts dt { color: #64748b; font-weight: 600; }
.rx-lead-facts dd { margin: 0; overflow-wrap: anywhere; }
.rx-lead-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rx-lead-chip { background: #e8f0f8; color: #104271; border-radius: 999px; padding: .15rem .7rem; font-size: .82rem; }
@media (max-width: 575px) { .rx-lead-facts { grid-template-columns: 1fr; gap: .15rem; } .rx-lead-facts dd { margin-bottom: .6rem; } }

/* Distribution > Distributors: the four action buttons are wider than the 182px most tables give them and spilled over the new
   Invoices and Stock columns; here the Actions column sizes to its buttons, and the summary cells stay on their own lines. */
#distributorTable th.table_btns,
#distributorTable td.table_btns { min-width: 0; max-width: none; width: 1%; white-space: nowrap; }
#distributorTable td[data-label="Invoices"],
#distributorTable td[data-label="Stock"] { white-space: nowrap; }

/* Medicine page: product header, fact tiles, knowledge sections */
.rx-med-hero .card-body { padding: 1.5rem; }
.rx-med-hero-main { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rx-med-icon { flex: 0 0 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; background: #e8f0f8; color: var(--cb-primary, #104271); }
.rx-med-title { flex: 1 1 260px; min-width: 0; }
.rx-med-title h2 { margin: 0 0 .25rem; line-height: 1.25; font-size: 1.5rem; font-weight: 700; color: var(--cb-primary, #104271); overflow-wrap: anywhere; }
.rx-med-sub { color: #64748b; margin-top: .15rem; }
.rx-med-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.rx-med-tag { display: inline-flex; align-items: center; background: #eef3f8; color: #35506c; border-radius: 999px; padding: .15rem .7rem; font-size: .8rem; font-weight: 600; }
.rx-med-tag-sample { background: #e3f6ec; color: #17794a; }
.rx-med-actions { margin-left: auto; }
.rx-med-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.rx-med-fact { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid #e3ebf3; border-radius: 14px; padding: .85rem 1rem; }
.rx-med-fact-icon { flex: 0 0 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: #eef3f8; color: var(--cb-primary, #104271); font-size: 1.05rem; }
.rx-med-fact-label { color: #64748b; font-size: .78rem; }
.rx-med-fact-value { font-weight: 700; overflow-wrap: anywhere; }
.rx-med-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.rx-med-section { background: #fff; border: 1px solid #e3ebf3; border-radius: 14px; padding: 1.1rem 1.25rem; }
.rx-med-section-wide { grid-column: 1 / -1; }
.rx-med-section h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-size: .95rem; font-weight: 700; color: var(--cb-primary, #104271); }
.rx-med-text { white-space: pre-line; line-height: 1.6; }
.rx-med-section-safety { background: #fff8e8; border-color: #f3dfae; }
.rx-med-section-safety h3 { color: #8a5a00; }
.rx-med-empty { text-align: center; padding: 2.25rem 1.25rem; }
.rx-med-empty-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e8f0f8; color: var(--cb-primary, #104271); font-size: 1.8rem; margin-bottom: .75rem; }
.rx-med-empty h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .4rem; }
.rx-med-empty p { max-width: 520px; margin: 0 auto 1rem; color: #64748b; }
.rx-med-items { display: grid; gap: .5rem; }
.rx-med-item { display: flex; align-items: center; gap: .75rem; border: 1px solid #e3ebf3; border-radius: 12px; padding: .65rem .85rem; }
.rx-med-item-body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 991px) { .rx-med-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .rx-med-sections { grid-template-columns: 1fr; }
  .rx-med-actions { margin-left: 0; width: 100%; }
  .rx-med-actions .btn { width: 100%; }
  .rx-med-hero .card-body { padding: 1rem; }
  .rx-med-title h2 { font-size: 1.3rem; }
}
@media (max-width: 479px) { .rx-med-facts { grid-template-columns: 1fr; } }

/* Distribution > Stock: a summary of the chosen distributor, and products with no stock set back */
.rx-stock-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.rx-stock-chip { background: #f4f8fc; border: 1px solid #e3ebf3; border-radius: 12px; padding: .65rem .9rem; }
.rx-stock-chip span { display: block; color: #64748b; font-size: .78rem; }
.rx-stock-chip strong { font-size: 1rem; overflow-wrap: anywhere; }
.rx-table tr.rx-stock-zero td:not(.table_btns) { color: #8a97a8; font-weight: 400; }
@media (max-width: 767px) { .rx-stock-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Distribution > History: one entry per row so it reads on a phone as well as a desktop */
.rx-hist-item { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid #e9eef4; }
.rx-hist-item:last-child { border-bottom: 0; }
.rx-hist-main { min-width: 0; }
.rx-hist-title { font-weight: 600; overflow-wrap: anywhere; }
.rx-hist-meta { color: #64748b; font-size: .85rem; margin-top: .1rem; }
.rx-hist-qty { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Distribution > Stock: the history button and distributor picker stay inside the card on a phone */
.rx-stock-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; }
.rx-stock-picker { flex: 1 1 220px; max-width: 320px; min-width: 0; }
.rx-stock-picker .select2-container { width: 100% !important; max-width: 100%; }
@media (max-width: 767px) { .rx-stock-picker { max-width: none; } }

/* Tables: number columns breathe, and the Sales medicine name stays on one line where there is room */
.rx-table th.rx-num, .rx-table td.rx-num { padding-left: 1.5rem; }
#salesTable th[data-column="medicine.name"], #salesTable td[data-label="Medicine"] { min-width: 230px; }
#salesTable th[data-column="week_start"], #salesTable td[data-label="Week"] { padding-left: 1.5rem; }

/* Call & Location Policy: the control stays compact, its explanation gets a readable line length */
.rx-policy-field > .form-control, .rx-policy-field > select, .rx-policy-field > .select2-container { max-width: 360px; }
.rx-policy-field .form-text { max-width: 680px; }

/* Announcements feed: the three filters sit in one row instead of stacking full width */
.rx-feed-filters > .select2-container { width: 190px !important; flex: 0 0 auto; }
.rx-feed-filters > #fdSearch { flex: 1 1 220px; min-width: 180px; }

/* Phone user cards: a long email wraps instead of making the whole card wider than the screen */
.rx-user-contact a.text-truncate { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* Profile: the card row stuck out 2px on a phone and gave the whole page a sideways scrollbar */
.section.profile { overflow-x: clip; }

/* Phone: grid row gutters are a hair wider than the page padding; clip that sliver so no page scrolls sideways */
@media (max-width: 575px) {
  #main { overflow-x: clip; }
}

/* Tablets and small laptops: wide tables scroll sideways, so the Actions column stays pinned to the right edge */
@media (min-width: 768px) and (max-width: 1399px) {
  .rx-table td[class*="table_btns"], .rx-table th[class*="table_btns"], .rx-table td.rx-row-actions, .rx-table th.rx-row-actions, .rx-table td.rx-icon-actions, .rx-table thead th.text-end:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background-color: #fff;
    box-shadow: -10px 0 10px -10px rgba(0, 0, 0, .18);
  }
  .rx-table.table-striped > tbody > tr:nth-of-type(odd) > td[class*="table_btns"], .rx-table.table-striped > tbody > tr:nth-of-type(odd) > td.rx-row-actions, .rx-table.table-striped > tbody > tr:nth-of-type(odd) > td.rx-icon-actions {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, .05), -10px 0 10px -10px rgba(0, 0, 0, .18);
  }
}

/* Add stock / Adjust popup: what the distributor will hold afterwards */
.rx-stock-after { margin-top: .75rem; padding: .5rem .75rem; background: #f4f8fc; border: 1px solid #e3ebf3; border-radius: 10px; font-weight: 600; }
.rx-stock-after.text-danger { background: #fdf2f2; border-color: #f3d0d0; }

/* Invoice numbers in lists open the invoice */
a.rx-invoice-link { color: var(--cb-primary, #104271); font-weight: 600; text-decoration: none; }
a.rx-invoice-link:hover, a.rx-invoice-link:focus-visible { text-decoration: underline; }

/* Visit Planning > Upcoming Plan: tiles on the left, one column per day of the week ahead filling the right */
.rx-upcoming { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: stretch; }
.rx-upcoming-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rx-upcoming-tiles .rx-totals-tile:last-child { background: #f8fafc; border-color: #e2e8f0; }
.rx-upcoming-tiles .rx-totals-tile small { display: block; font-size: .78rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-upcoming-week { min-width: 0; }
.rx-upcoming-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.rx-upcoming-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; }
.rx-upcoming-day.is-empty { opacity: .6; }
.rx-upcoming-count { font-size: .9rem; font-weight: 700; color: #104271; min-height: 1.2em; }
.rx-upcoming-bar { display: flex; align-items: flex-end; width: 100%; max-width: 44px; height: 64px; background: #e9eef4; border-radius: 6px; overflow: hidden; }
.rx-upcoming-bar span { display: block; width: 100%; background: var(--cb-primary, #104271); border-radius: 6px; }
.rx-upcoming-day.is-empty .rx-upcoming-bar span { display: none; }
.rx-upcoming-name { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
.rx-upcoming-date { font-size: .85rem; color: #1e293b; }
@media (min-width: 992px) {
  .rx-upcoming { grid-template-columns: 280px minmax(0, 1fr); gap: 1.5rem; }
  .rx-upcoming-tiles { grid-template-columns: 1fr; align-content: start; }
}
.rx-vp-warn { color: #92400e; }
.rx-path-deleted { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: .5rem .75rem; font-size: .85rem; }

/* Summary tables (Sales, Targets, Activities): number columns share one width, so the cards line up with each other */
.rx-sum-table { table-layout: fixed; width: 100%; }
.rx-sum-table th.rx-num, .rx-sum-table td.rx-num { width: 17%; }
.rx-sum-table th:first-child, .rx-sum-table td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575px) { .rx-sum-table th.rx-num, .rx-sum-table td.rx-num { width: 21%; } }

/* Phones and tablets: two tiles side by side, Next visit across the full width, nothing cut short */
@media (max-width: 991px) {
  .rx-upcoming-tiles { grid-template-columns: 1fr 1fr; }
  .rx-upcoming-tiles .rx-totals-tile:last-child { grid-column: 1 / -1; }
  .rx-upcoming-tiles .rx-totals-tile span, .rx-upcoming-tiles .rx-totals-tile strong, .rx-upcoming-tiles .rx-totals-tile small { white-space: normal; overflow: visible; }
}

/* Visit plan approvals on a phone: status on its own line, the three decisions sharing one full-width row */
@media (max-width: 767px) {
  .vp-period-actions { width: 100%; flex-wrap: wrap; }
  .vp-period-actions .badge { flex: 0 0 auto; }
  .vp-period-actions .vp-break { flex-basis: 100%; height: 0; }
  .vp-period-actions .btn { flex: 1 1 0; white-space: nowrap; padding-left: .4rem; padding-right: .4rem; }
}

/* Row actions: Delete is quiet (outlined, pale) until pointed at, so a list is not a column of red buttons */
.rx-table .btn-sm.btn-danger, .table_btns .btn-sm.btn-danger, .rx-visit-actions .btn-sm.btn-danger, .rx-card-icons .btn-sm.btn-danger {
  background-color: transparent;
  border-color: #f1c5c5;
  color: #b42318;
}
.rx-table .btn-sm.btn-danger:hover, .table_btns .btn-sm.btn-danger:hover, .rx-visit-actions .btn-sm.btn-danger:hover, .rx-card-icons .btn-sm.btn-danger:hover,
.rx-table .btn-sm.btn-danger:focus-visible, .table_btns .btn-sm.btn-danger:focus-visible, .rx-visit-actions .btn-sm.btn-danger:focus-visible, .rx-card-icons .btn-sm.btn-danger:focus-visible {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

/* Tablets and small laptops: tables use the room they have instead of a hard minimum on every column */
@media (min-width: 768px) and (max-width: 1399px) {
  .rx-table tr > td, .rx-table tr > th { min-width: 0; }
  .rx-table td button.btn, .rx-table td a.btn { min-width: 0; }
  .rx-table td[class*="table_btns"], .rx-table th[class*="table_btns"], .rx-table td.rx-row-actions, .rx-table td.rx-icon-actions {
    min-width: 0; max-width: none; width: 1%; white-space: nowrap;
  }
  .rx-table th, .rx-table td { padding-left: .4rem; padding-right: .4rem; }
  #salesTable th[data-column="medicine.name"], #salesTable td[data-label="Medicine"] { min-width: 0; }
  #salesTable th[data-column="week_start"], #salesTable td[data-label="Week"] { padding-left: .4rem; }
  #salesTable td[data-label="Week"] { white-space: normal; min-width: 5.5rem; }
}
/* Secondary columns (IDs, phone numbers, variants) step aside on tablets; the phone cards and the desktop table show them */
@media (min-width: 768px) and (max-width: 1299px) {
  .rx-table .rx-hide-tablet { display: none !important; }
}

/* Phones: a tall popup scrolls inside itself, so its Save and Close buttons are never below the fold */
@media (max-width: 767px) {
  .modal-dialog:not(.modal-fullscreen-sm-down) .modal-content { max-height: calc(100dvh - 1rem); }
  .modal-content > form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
  .modal-content .modal-body { overflow-y: auto; min-height: 0; }
}

/* New Invoice on a phone: each line item is its own small card instead of a table that scrolls sideways */
@media (max-width: 575px) {
  .rx-invoice-items thead { display: none; }
  .rx-invoice-items, .rx-invoice-items tbody, .rx-invoice-items tfoot { display: block; width: 100%; }
  .rx-invoice-items tbody tr {
    display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .5rem; align-items: end;
    padding: .65rem; margin-bottom: .6rem; border: 1px solid #e3ebf3; border-radius: 10px; background: #fbfdff;
  }
  .rx-invoice-items tbody td { display: block; padding: 0; border: 0; min-width: 0 !important; width: auto; }
  .rx-invoice-items tbody td:first-child { grid-column: 1 / -1; }
  .rx-invoice-items tbody td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .68rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #64748b; }
  .rx-invoice-items td button.btn { min-width: 0; }
  .rx-invoice-items .invoice-item-total { padding-bottom: .35rem; font-weight: 600; }
  .rx-invoice-items tfoot tr { display: flex; justify-content: space-between; align-items: baseline; padding: .4rem .2rem 0; border-top: 2px solid #104271; }
  .rx-invoice-items tfoot td { display: block; padding: 0; border: 0; min-width: 0 !important; }
  .rx-invoice-items tfoot td:empty { display: none; }
}

/* Every popup: the way out (Close, Cancel) on the left, the main action on the right */
.modal-footer > .btn-secondary, .modal-footer > .btn-outline-secondary, .modal-footer > .btn-light,
.modal-footer > .btn-outline-primary, .modal-footer > [data-bs-dismiss="modal"] { order: 1; }
.modal-footer > .btn-primary, .modal-footer > .btn-success, .modal-footer > .btn-danger, .modal-footer > .btn-warning, .modal-footer > .btn-info { order: 2; }
.modal-footer > [data-bs-dismiss="modal"].btn-primary, .modal-footer > [data-bs-dismiss="modal"].btn-success { order: 2; }

/* Google place suggestions under a name field (Clinic / hospital, Pharmacy name) and its "Find nearby" link */
.rx-suggest-host { position: relative; }
.rx-name-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 1060; max-height: 260px; overflow-y: auto; box-shadow: 0 6px 18px rgba(15, 30, 55, .15); }
.rx-name-suggest .list-group-item { text-align: left; }
.rx-nearby-link { position: absolute; right: 0; top: 4px; font-size: 12px; text-decoration: none; line-height: 1.5; }
.rx-nearby-link:hover { text-decoration: underline; }

/* "Clear pin" link under the map in the doctor / pharmacy pin picker */
.rx-clear-pin { font-size: .8125rem; white-space: nowrap; text-decoration: none; line-height: 1.5; }
.rx-clear-pin:hover { text-decoration: underline; }

/* LIST TOOLBARS AND FILTER PANELS (every list page: Doctors, Pharmacies, Users, Medicine, Sales, ...)
   Same look on every page and every screen size. Colours come from Bootstrap's theme variables, so dark mode follows.
   Desktop and tablet: the Filter panel is a popover, one width everywhere. Phone: the toolbar becomes a tidy grid and
   the panel a bottom sheet. */

/* The Filter panel, all sizes */
.rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) { min-width: 340px !important; }
.rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .form-label {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--bs-secondary-color);
  margin-bottom: .25rem !important;
}
.rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .border-top .btn-secondary {
  background: transparent;
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
}

@media (max-width: 575.98px) {
  /* toolbar: search on a full row, rows-per-page + Filter side by side, secondary buttons share a row, Add is full width */
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap { gap: .5rem !important; width: 100%; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .input-group { flex: 1 1 100%; max-width: none !important; min-width: 0 !important; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .rx-per-page,
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .rx-per-page + .select2-container,
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .dropdown,
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .btn { flex: 1 1 calc(50% - .25rem); max-width: none !important; min-width: 0; }
  /* any other select in the toolbar is a filter: a full row of its own */
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .select2-container,
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .form-select:not(.rx-per-page) { flex: 1 1 100%; width: auto !important; max-width: none !important; min-width: 0; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .rx-per-page + .select2-container { flex-basis: calc(50% - .25rem); }
  /* the main button(s) get a full row, and so does any field that sits among the buttons (a month or date box) */
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .btn-primary { flex: 1 1 100%; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .form-control { flex: 1 1 100%; max-width: none !important; min-width: 0; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .btn-primary .bi { flex-shrink: 0; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .dropdown > .btn { width: 100%; }
  /* every control is at least 44px tall to tap */
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap .btn,
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap .form-control,
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap .form-select { min-height: 44px; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .select2-container .select2-selection--single { min-height: 44px; display: flex; align-items: center; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .select2-container .select2-selection__arrow { height: 100%; }

  /* the Filter panel as a bottom sheet */
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    transform: none !important;
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: 85vh;
    z-index: 1060;
    border: 0;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, .28) !important;
    background: var(--bs-body-bg);
  }
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .dropdown-header {
    text-align: center;
    font-size: 1rem;
    background: var(--bs-body-bg);
  }
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .dropdown-header::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto .75rem;
    border-radius: 2px;
    background: var(--bs-border-color);
  }
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .border-top { background: var(--bs-body-bg); }
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .form-select,
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .form-control { min-height: 44px; font-size: 1rem; }
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) .border-top .btn { min-height: 46px; font-size: 1rem; }
  /* dims the page behind the open sheet; tapping it closes the sheet like any tap outside */
  body:has(.rx-table-wrapper .dropdown-menu.show .rx-apply-filters-btn)::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, .45);
  }
}

/* Tablet and small laptops: the toolbar sits on its own row under the title (not squeezed beside it, which left the buttons
   wrapping raggedly and one orphaned), left-aligned; on a tablet the search takes a full row of its own. */
@media (min-width: 768px) and (max-width: 1399.98px) {
  .rx-table-wrapper .d-flex.flex-column.flex-md-row:has(> .d-flex.flex-wrap.flex-xxl-nowrap) { flex-direction: column !important; align-items: stretch !important; }
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap { justify-content: flex-start !important; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .input-group { flex: 1 1 100%; max-width: none !important; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .rx-table-wrapper .d-flex.flex-wrap.flex-xxl-nowrap > .input-group { flex-basis: 150px; }
}

/* the Filter sheet keeps its own scroll: a swipe at its top closes it (main.js) instead of scrolling or refreshing the page behind */
@media (max-width: 575.98px) {
  .rx-table-wrapper .dropdown-menu:has(.rx-apply-filters-btn) { overscroll-behavior: contain; }
}

/* A card's heading with action buttons beside it (Visit Planning › Planned Visits). Buttons never wrap their own text; on a
   phone the heading gets its own line and the buttons share the line below at equal width. */
.rx-card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.rx-card-head .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .rx-card-head { flex-direction: column; align-items: stretch; }
  .rx-card-head-actions .btn { flex: 1 1 0; min-width: 0; min-height: 44px; }
}

/* Sample Management › Current Stock: each product is a tile of equal height, name on top, pack size under it, the count last */
.rx-stock-tile { height: 100%; padding: .75rem .85rem; display: flex; flex-direction: column; gap: .1rem; }
.rx-stock-name { font-weight: 600; line-height: 1.25; }
.rx-stock-pack { font-size: .8125rem; color: var(--bs-secondary-color); min-height: 1.2em; }
.rx-stock-qty { margin-top: auto; padding-top: .35rem; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

/* A date range filter (From, To, Apply, Clear): one row on a desktop, a tidy grid on a phone (Sample Management › Reports) */
.rx-range-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.rx-range-actions { display: flex; gap: .5rem; }
@media (max-width: 575.98px) {
  .rx-range-filter { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .rx-range-filter input[type="date"] { min-height: 44px; font-size: 1rem; }
  .rx-range-filter .rx-range-actions { grid-column: 1 / -1; }
  .rx-range-filter .rx-range-actions .btn { flex: 1 1 0; min-height: 44px; font-size: 1rem; }
}

/* Announcements › Manage: a row is the announcement on the left, its status and actions on the right; on a phone they stack, the
   title gets the full width and the actions wrap underneath. */
.rx-mg-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.rx-mg-main { min-width: 0; }
.rx-mg-side { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 575.98px) {
  .rx-mg-row { flex-direction: column; align-items: stretch; }
  .rx-mg-side { justify-content: flex-start; }
  .rx-mg-side .btn { min-height: 40px; }
  /* New Announcement / Alert: a full-width button, like the main action on every list page */
  #anManagePane > .text-end .btn { width: 100%; min-height: 44px; }
  /* My Feed filters: category and priority side by side, search on its own row, all easy to tap */
  .rx-feed-filters { display: grid !important; grid-template-columns: 1fr 1fr; gap: .5rem !important; }
  .rx-feed-filters > .select2-container { width: auto !important; min-width: 0; }
  .rx-feed-filters > #fdSearch { grid-column: 1 / -1; min-width: 0; min-height: 44px; font-size: 1rem; }
  .rx-feed-filters .select2-selection--single { min-height: 44px; display: flex; align-items: center; }
  .rx-feed-filters .select2-selection__arrow { height: 100%; }
}

/* A one-line "add" row (a text box and its Add button above a short list, e.g. HR › Departments): a fixed width beside the
   list on a computer, the full width of the list on a phone so the two line up. */
.rx-add-row { max-width: 320px; }
@media (max-width: 575.98px) {
  .rx-add-row { max-width: none; }
  .rx-add-row .form-control, .rx-add-row .btn { min-height: 44px; font-size: 1rem; }
}

/* Reports filter bar: the "Show in" switch and Export centre their text; on a phone the switch is two equal halves and Export
   a full-width button, like the main buttons on every list page. */
.rx-report-field .rx-measure-toggle .btn,
.rx-report-export { justify-content: center; }
@media (max-width: 575.98px) {
  .rx-report-field-auto { flex: 1 1 100%; }
  .rx-report-field .rx-measure-toggle { width: 100%; }
  .rx-report-field .rx-measure-toggle .btn { flex: 1 1 0; height: 44px; }
  .rx-report-actions { width: 100%; margin-left: 0; }
  .rx-report-actions .dropdown { width: 100%; }
  .rx-report-actions .rx-report-export { width: 100%; height: 44px; }
}

/* A short inline settings form ("Due within [15] days  Save"): side by side on a computer; on a phone the field takes the full
   width and Save is a full-width button under it. */
.rx-days-input { max-width: 100px; }
@media (max-width: 575.98px) {
  .rx-inline-form .rx-days-input { max-width: none; }
  .rx-inline-form .form-control, .rx-inline-form .input-group-text { min-height: 44px; font-size: 1rem; }
  .rx-inline-form .btn { width: 100%; min-height: 44px; font-size: 1rem; }
}

/* DETAIL LISTS AND ACTION ROWS (Profile, and any page that shows a few labelled facts or a short set of buttons)
   A detail row is a small label over its value on a phone and label beside value on a computer. An action row is buttons side
   by side on a computer and full-width, one under the other, on a phone, so no button wraps its own text. */
.rx-detail-list { display: flex; flex-direction: column; }
.rx-detail-row { display: flex; flex-direction: column; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--bs-border-color); }
.rx-detail-row:last-child { border-bottom: 0; }
.rx-detail-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.rx-detail-value { word-break: break-word; }
@media (min-width: 768px) {
  .rx-detail-row { flex-direction: row; gap: 1rem; }
  .rx-detail-label { flex: 0 0 180px; padding-top: .2rem; }
}
.rx-action-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 575.98px) {
  .rx-action-row { flex-direction: column; align-items: stretch; }
  .rx-action-row .btn { width: 100%; min-height: 44px; font-size: 1rem; }
  /* the main button of a form, full width like the rest of the app on a phone */
  .rx-form-actions .btn { width: 100%; min-height: 44px; font-size: 1rem; }
  .rx-form-actions .btn + .btn { margin-top: .5rem; }
}

/* A filter bar of labelled fields above a list (Activity Log: From, To, Person, Search). Same field size and label style as the
   list toolbars; on a phone every control is at least 44px tall to tap. */
.rx-filter-bar .form-label { font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--bs-secondary-color); }
@media (max-width: 575.98px) {
  .rx-filter-bar .form-control, .rx-filter-bar .form-select, .rx-filter-bar .btn { min-height: 44px; font-size: 1rem; }
}

/* Previous / next page buttons are easy to tap on a phone */
@media (max-width: 575.98px) {
  .rx-page-prev, .rx-page-next, .btn.disabled:has(+ .rx-page-next), .rx-page-prev + .btn { min-height: 44px; min-width: 44px; }
}

/* Visit Planning on a phone: the main "Plan a visit" button is a full-width 44px button, and each recommendation's "Add to plan" is easy to tap */
@media (max-width: 575.98px) {
  #vpAddVisitBtn { width: 100%; min-height: 44px; font-size: 1rem; }
  .vp-recommend-add-btn { width: 100%; min-height: 44px; font-size: 1rem; }
}

/* Phone: small buttons that sit in a page (not in a table row, menu or dialog) are at least 40px tall, so they are easy to tap */
@media (max-width: 575.98px) {
  #main .btn-sm:not(.btn-close) { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
  #main table .btn-sm, #main .dropdown-menu .btn-sm, #main .modal .btn-sm, #main .rx-sm-limit-period .btn-sm { min-height: 0; }
}

/* Tablet: the Sales table fits without sliding sideways */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .rx-table-wrapper[data-renderer="salesTable"] .rx-table :is(th, td) { padding-left: .4rem; padding-right: .4rem; }
}

/* Small laptops: summary tables (Targets, Sales, Activities > Summary) fit without sliding sideways */
@media (min-width: 768px) and (max-width: 1299.98px) {
  .rx-sum-table :is(th, td), .rx-an-table :is(th, td) { padding-left: .5rem; padding-right: .5rem; }
}
@media (min-width: 768px) and (max-width: 1299.98px) {
  .rx-sum-table { font-size: .85rem; }
  .rx-sum-table th.rx-num, .rx-sum-table td.rx-num { white-space: normal; }
}
@media (min-width: 768px) and (max-width: 1299.98px) {
  .rx-sum-table th { white-space: normal; }
  .rx-sum-table td.rx-num { padding-left: .3rem; padding-right: .3rem; }
}

/* Phone cards: the eye (call details) button is a square 40px button, not a narrow tall box */
.rx-list-lastcall .btn { width: 40px; height: 40px; min-height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rx-list-lastcall { gap: .5rem; margin-top: .6rem; }

/* Pagination: the previous / page / next buttons share one height and centre their content */
.btn-group > .rx-page-prev, .btn-group > .rx-page-next, .btn-group > .rx-page-prev + .btn { display: inline-flex; align-items: center; justify-content: center; }

/* Map popups: Directions and Add call are the same size and line up, whatever the element behind them (link or button) */
.rx-map-pop-actions { display: flex; gap: .5rem; }
.rx-map-pop-actions .btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; white-space: nowrap; }

/* An icon-only small button (the eye "view details" button on the Pathway timeline): a square, whatever the page's small-button rules say */
#main .btn-sm.rx-square-btn, .btn-sm.rx-square-btn { width: 30px; height: 30px; min-height: 30px; padding: 0; font-size: .85rem; border-color: var(--bs-border-color); color: var(--bs-secondary-color); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Platform Admin > Organizations on a phone: the name is the card's heading, then status, plan and users.
   ID, code, modules and currency stay for the desktop table. */
@media (max-width: 767.98px) {
  #organizationTable tbody td[data-label="ID"],
  #organizationTable tbody td[data-label="Code"],
  #organizationTable tbody td[data-label="Modules"],
  #organizationTable tbody td[data-label="Currency"] { display: none; }
  #organizationTable tbody td[data-label="Name"] {
    display: block; text-align: left; font-size: 1rem; font-weight: 600; color: #104271;
    padding: 0 0 6px; margin-bottom: 4px; border-bottom: 1px solid #eef2f7;
  }
  #organizationTable tbody td[data-label="Name"]::before { content: none; }
}

/* Platform Admin > Organizations: the name, then its status, then the phone (opens WhatsApp) and email in small type, all stacked in the Name cell */
.rx-org-cell { min-width: 0; }
.rx-org-cell .rx-org-status { margin: 2px 0; }
.rx-org-cell .rx-org-status .badge { font-size: 10px; font-weight: 500; padding: .25em .55em; }
/* Each line is an icon and its text side by side; on the desktop table the column grows to fit an email on one line, on a phone a very long one may wrap inside the card */
.rx-org-cell .rx-org-contact { display: flex; align-items: baseline; gap: .35rem; font-size: .75rem; font-weight: 400; line-height: 1.45; color: var(--bs-secondary-color); white-space: nowrap; }
.rx-org-cell .rx-org-contact i { flex: 0 0 auto; }
.rx-org-cell .rx-org-contact a { color: inherit; text-decoration: none; }
.rx-org-cell .rx-org-contact a:hover { text-decoration: underline; }
/* "active 34 minutes ago" is its own line under the user count and never breaks in the middle on the desktop table */
#organizationTable .rx-org-active { white-space: nowrap; }
@media (max-width: 767.98px) {
  .rx-org-cell .rx-org-contact { white-space: normal; overflow-wrap: anywhere; }
  #organizationTable .rx-org-active { white-space: normal; }
}

/* Limited mode: a sign-up waiting for approval (Verify your identity page and the bar on the pages it can use). */
.rx-auth .rx-auth-field .form-control { border-radius: 12px; border-color: #dde3ea; }
.rx-auth .rx-auth-field .form-control:focus { border-color: #104271; box-shadow: 0 0 0 0.2rem rgba(16, 66, 113, 0.12); }
.rx-auth .rx-auth-field input[type="file"].form-control { padding: 0.55rem 0.75rem; font-size: 0.9rem; }
.rx-limited-start { margin: 0 0 1.1rem; }
.rx-limited-start-grid { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .rx-limited-start-grid { grid-template-columns: 1fr 1fr; } }
.rx-limited-start-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; border: 1px solid #dde3ea; border-radius: 12px; background: #fff; color: #104271; text-decoration: none; }
.rx-limited-start-link:hover { border-color: #104271; background: #f6f8fb; }
.rx-limited-start-link > i { font-size: 1.4rem; }
.rx-limited-start-link span { display: grid; line-height: 1.25; }
.rx-limited-start-link small { color: #6b7280; font-size: 0.78rem; }
.rx-limited-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0 0 1rem; padding: 0.6rem 0.9rem; border: 1px solid #f1d9a8; border-radius: 10px; background: #fff8e6; color: #7a4b00; font-size: 0.88rem; }
.rx-limited-bar .btn { white-space: nowrap; }
.rx-pd-proof { margin: 0.25rem 0; padding: 0.4rem 0.6rem; border-left: 3px solid #104271; background: rgba(16, 66, 113, 0.05); border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
/* Verify your identity: the steps read as short rows (title, small line under it), the form and the setup buttons are separate sections. */
.rx-auth-steps li { align-items: flex-start; }
.rx-auth-steps li > i { margin-top: 0.15rem; flex-shrink: 0; }
.rx-auth-steps li > span { display: grid; gap: 0.1rem; line-height: 1.3; color: #374151; }
.rx-auth-steps li > span small { font-weight: 400; font-size: 0.8rem; color: #6b7280; }
.rx-auth-steps li > span a { color: #104271; font-weight: 600; overflow-wrap: anywhere; }
.rx-auth-section { margin: 0 0 1.25rem; padding-top: 1.1rem; border-top: 1px solid #e6ebf2; }
.rx-auth-section-title { margin: 0 0 0.6rem; font-size: 1.05rem; font-weight: 700; color: #1f2937; text-align: left; }
.rx-auth-section-note { margin: 0 0 0.9rem; font-size: 0.85rem; line-height: 1.45; color: #6b7280; }
.rx-auth .form-text { margin-top: 0.3rem; font-size: 0.78rem; color: #6b7280; }
.rx-auth textarea.form-control { padding: 0.65rem 0.85rem; font-size: 1rem; }
.rx-limited-start-link { color: #1f2937; }
.rx-limited-start-link strong { font-weight: 700; }
.rx-limited-start-link > i { color: #104271; }
/* Dashboard for a sign-up waiting for approval: the same cards as the rest of the app. Theme variables, so light and dark both work. */
.rx-verify-steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.75rem; }
.rx-verify-steps li { display: flex; align-items: flex-start; gap: 0.65rem; color: var(--bs-secondary-color); }
.rx-verify-steps li > i { margin-top: 0.1rem; font-size: 1.05rem; flex-shrink: 0; }
.rx-verify-steps li > span { display: grid; gap: 0.1rem; line-height: 1.3; color: var(--bs-body-color); }
.rx-verify-steps li > span small { font-size: 0.8rem; color: var(--bs-secondary-color); }
.rx-verify-steps li > span a { font-weight: 600; overflow-wrap: anywhere; }
.rx-verify-steps .is-done > i { color: #16a34a; }
.rx-verify-steps .is-now > i { color: #d97706; }
.rx-verify-steps .is-now > span { font-weight: 600; }
.rx-verify-heading { margin: 0 0 0.35rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); font-weight: 700; }
.rx-verify-card .form-text { font-size: 0.78rem; }
.rx-verify-card .rx-limited-start-grid { grid-template-columns: 1fr; }
.rx-verify-card .rx-limited-start-link { background: var(--bs-body-bg); border-color: var(--bs-border-color); color: var(--bs-body-color); }
.rx-verify-card .rx-limited-start-link:hover { border-color: var(--bs-primary); background: var(--bs-tertiary-bg); }
.rx-verify-card .rx-limited-start-link > i { color: var(--bs-primary); }
.rx-verify-card .rx-limited-start-link small { color: var(--bs-secondary-color); }
/* Dashboard for a sign-up waiting for approval: a welcome line and big action tiles on top, the verification card below. */
.rx-verify-welcome { margin: 0 0 1rem; }
.rx-verify-welcome-title { margin: 0 0 0.25rem; font-size: 1.35rem; font-weight: 700; }
.rx-verify-tiles { display: grid; gap: 0.85rem; grid-template-columns: 1fr; margin: 0 0 1.25rem; }
@media (min-width: 768px) { .rx-verify-tiles { grid-template-columns: repeat(3, 1fr); } }
.rx-verify-tile { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border: 1px solid var(--bs-border-color); border-radius: 14px; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); transition: border-color 0.15s, box-shadow 0.15s; }
.rx-verify-tile:hover { border-color: var(--bs-primary); box-shadow: 0 4px 14px rgba(16, 66, 113, 0.12); color: var(--bs-body-color); }
.rx-verify-tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: rgba(16, 66, 113, 0.1); color: var(--bs-primary); font-size: 1.4rem; }
.rx-verify-tile-text { display: grid; gap: 0.1rem; line-height: 1.3; min-width: 0; flex: 1; }
.rx-verify-tile-text strong { font-size: 1rem; font-weight: 700; }
.rx-verify-tile-text small { font-size: 0.8rem; color: var(--bs-secondary-color); }
.rx-verify-tile-go { color: var(--bs-secondary-color); font-size: 1.1rem; flex-shrink: 0; }
.rx-verify-tile.is-todo .rx-verify-tile-icon { background: rgba(217, 119, 6, 0.14); color: #d97706; }
.rx-verify-tile.is-done .rx-verify-tile-icon { background: rgba(22, 163, 74, 0.13); color: #16a34a; }
/* The limited-access bar is one short line: a lock icon, the words, and a link. */
.rx-limited-bar { flex-wrap: nowrap; justify-content: flex-start; gap: 0.5rem; padding: 0.5rem 0.85rem; }
.rx-limited-bar > i { font-size: 1rem; flex-shrink: 0; }
.rx-limited-bar a { font-weight: 700; color: inherit; text-decoration: underline; white-space: nowrap; }
/* Four tiles (areas, medicines, branding, unlock) fill the row whatever the width. */
@media (min-width: 768px) { .rx-verify-tiles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
/* Setup tiles show a green check once done; the welcome block says how many are done. */
.rx-verify-tile-check { color: #16a34a; font-size: 1.3rem; flex-shrink: 0; }
.rx-verify-tile.is-done .rx-verify-tile-icon { background: rgba(22, 163, 74, 0.13); color: #16a34a; }
.rx-verify-progress { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.4rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: rgba(22, 163, 74, 0.12); color: #15803d; font-size: 0.8rem; font-weight: 600; }
/* Help strip on the sign-up dashboard: WhatsApp and email as real buttons. */
.rx-verify-help { margin-top: 1.1rem; padding: 0.9rem 1rem; border: 1px solid var(--bs-border-color); border-radius: 12px; background: var(--bs-tertiary-bg); display: grid; gap: 0.75rem; }
.rx-verify-help-text { display: grid; gap: 0.15rem; line-height: 1.3; }
.rx-verify-help-text small { color: var(--bs-secondary-color); font-size: 0.8rem; }
.rx-verify-help-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rx-verify-help-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 600; overflow-wrap: anywhere; }
.rx-verify-help-actions .btn i { font-size: 1.1rem; }
.rx-verify-wa { background: #25d366; border-color: #25d366; color: #fff; }
.rx-verify-wa:hover, .rx-verify-wa:focus { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
@media (max-width: 575px) { .rx-verify-help-actions .btn { flex: 1 1 100%; } }
/* Setup tiles, final layout: equal tiles that fill the row (5 across on a wide screen, 3, 2, or 1 as it narrows), never cramped. */
.rx-verify-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); align-items: stretch; }
@media (min-width: 768px) { .rx-verify-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); } }
.rx-verify-tile { min-height: 84px; }
.rx-verify-tile-text strong { overflow-wrap: anywhere; }
.rx-verify-welcome p { max-width: 70ch; }
/* Add area: the type is chosen with big tappable chips. */
.rx-type-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rx-type-chip { position: relative; margin: 0; cursor: pointer; }
.rx-type-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rx-type-chip span { display: inline-block; padding: 0.55rem 1.1rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: var(--bs-body-bg); color: var(--bs-body-color); font-weight: 600; }
.rx-type-chip input:checked + span { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.rx-type-chip input:focus-visible + span { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.rx-type-chip input:disabled + span { opacity: 0.6; cursor: default; }
/* Header help button: the WhatsApp mark in its own green, so it reads as "talk to us" next to the grey bell and gear. */
.header-nav .nav-icon.rx-wa-help i { color: #25d366; font-size: 22px; }
.header-nav .nav-icon.rx-wa-help:hover i { color: #1ebe5b; }
/* Help & feedback: the list of what they have sent. */
.rx-support-item { padding: 0.75rem 0; border-top: 1px solid var(--bs-border-color); }
.rx-support-item:first-of-type { border-top: 0; padding-top: 0; }
.rx-support-text { overflow-wrap: anywhere; white-space: pre-wrap; color: var(--bs-body-color); }
/* Sign-up dashboard on a wide screen: the steps become one progress bar across the top, and the setup tiles and the form sit side by side. */
.rx-verify-steps-card .rx-verify-steps { margin: 0; }
.rx-verify-card .rx-verify-tiles, .rx-verify-tiles { margin-bottom: 0; }
@media (min-width: 992px) {
  .rx-verify-steps-card .rx-verify-steps { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
  .rx-verify-steps-card .rx-verify-steps li { flex-direction: column; align-items: flex-start; gap: 0.4rem; padding-top: 0.75rem; border-top: 4px solid var(--bs-border-color); border-radius: 2px; }
  .rx-verify-steps-card .rx-verify-steps li.is-done { border-top-color: #16a34a; }
  .rx-verify-steps-card .rx-verify-steps li.is-now { border-top-color: #d97706; }
  .rx-verify-steps-card .rx-verify-steps li > i { margin-top: 0; font-size: 1.25rem; }
  .rx-verify-welcome-title { font-size: 1.6rem; }
}
/* Inside the Start your setup card the tiles are quieter: no shadow, two to a row. */
.card .rx-verify-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card .rx-verify-tile { box-shadow: none; }
/* Sign-up dashboard grid: tiles, then the form, then support on a phone; tiles and support left, the form right on a wide screen. */
.rx-verify-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.rx-verify-grid > .card { margin: 0; }
.rx-verify-a-help .rx-verify-help { margin-top: 0; }
@media (min-width: 992px) {
  .rx-verify-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "tiles form" "help form" "steps steps"; grid-template-rows: auto 1fr auto; }
  .rx-verify-grid.is-setup-done { grid-template-areas: "steps steps" "tiles form" "help form"; grid-template-rows: auto auto 1fr; }
  .rx-verify-a-steps { grid-area: steps; }
  .rx-verify-a-tiles { grid-area: tiles; }
  .rx-verify-a-form { grid-area: form; }
  .rx-verify-a-help { grid-area: help; }
}
/* Setup tiles inside their card: two to a row (one on a small phone); the phone-only Unlock tile takes the full width. */
.card .rx-verify-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card .rx-verify-tile.d-lg-none { grid-column: 1 / -1; }
@media (max-width: 479.98px) { .card .rx-verify-tiles { grid-template-columns: minmax(0, 1fr); } }
/* The setup tiles go one per row whenever their own card is narrow (a tablet, or a laptop with the menu open), not only on a phone. */
.rx-verify-a-tiles > .card-body { container-type: inline-size; }
@container (max-width: 559px) {
  .card .rx-verify-tiles { grid-template-columns: minmax(0, 1fr); }
}
/* The "Unlock all features to add more" window. */
.rx-limit-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(217, 119, 6, 0.14); color: #d97706; font-size: 1.7rem; }
/* The note under the area type buttons: small, quiet, and the link never splits across two lines. */
.rx-types-note { margin-top: 0.6rem; font-size: 0.85rem; line-height: 1.4; color: var(--bs-secondary-color); }
.rx-types-note a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.rx-types-note a:hover { text-decoration: underline; }
/* The line under the welcome heading on the sign-up dashboard: smaller, so it is two or three lines on a phone, not five. */
.rx-verify-welcome > p { font-size: 0.9rem; line-height: 1.5; max-width: 64ch; }
/* The email code typed right inside the "Confirm your email" step. */
.rx-code-form { display: flex; gap: 0.5rem; align-items: center; margin: 0.35rem 0 0.15rem; max-width: 20rem; }
.rx-code-form .form-control { letter-spacing: 0.15em; font-weight: 600; }
.rx-code-form .btn { white-space: nowrap; }
/* Steps: each icon is centred on the first line of its text (the check sat lower than the words), and steps still to do read as buttons. */
.rx-verify-steps li > i:first-child { display: inline-flex; align-items: center; justify-content: center; height: 1.3rem; margin-top: 0; line-height: 1; }
.rx-verify-steps li.is-link { cursor: pointer; }
.rx-verify-steps li.is-link:hover > span > :first-child { text-decoration: underline; }
.rx-verify-steps li.is-link:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 3px; border-radius: 6px; }
.rx-step-go { margin-left: auto; align-self: flex-start; height: 1.3rem; display: inline-flex; align-items: center; color: var(--bs-secondary-color); flex-shrink: 0; }
@media (min-width: 992px) { .rx-step-go { display: none; } }
/* "Enter your code": a small button that opens the code box inside the Confirm your email step. */
.rx-verify-steps .rx-code-open { justify-self: start; margin: 0.35rem 0 0.1rem; }
/* The Unlock all features card: a coloured header, what they get, a drop zone for the card photo, a big button. Made to be noticed. */
.rx-unlock-card { border: 0; box-shadow: 0 8px 28px rgba(16, 66, 113, 0.16); overflow: hidden; }
.rx-unlock-card > .card-body { padding: 0 20px 22px; }
.rx-unlock-head { display: flex; gap: 0.9rem; align-items: center; margin: 0 -20px 1.1rem; padding: 1.15rem 20px; background: linear-gradient(135deg, #0f3d6b, #1c6fb7); color: #fff; }
.rx-unlock-badge { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, 0.18); font-size: 1.4rem; }
.rx-unlock-title { margin: 0 0 0.15rem; padding: 0; font-size: 1.2rem; font-weight: 700; color: #fff; }
.rx-unlock-sub { margin: 0; font-size: 0.85rem; line-height: 1.4; color: rgba(255, 255, 255, 0.9); }
.rx-unlock-perks { list-style: none; margin: 0 0 1.15rem; padding: 0; display: grid; gap: 0.5rem; }
.rx-unlock-perks li { display: flex; gap: 0.6rem; align-items: center; font-size: 0.9rem; }
.rx-unlock-perks li i { flex-shrink: 0; width: 1.25rem; text-align: center; color: var(--bs-primary); }
.rx-file-input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.rx-dropzone { display: flex; gap: 0.85rem; align-items: center; margin: 0; padding: 0.95rem; border: 2px dashed rgba(16, 66, 113, 0.35); border-radius: 14px; background: rgba(16, 66, 113, 0.04); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.rx-dropzone:hover, .rx-file-input:focus-visible + .rx-dropzone { border-color: var(--bs-primary); background: rgba(16, 66, 113, 0.09); }
.rx-dropzone.has-files { border-style: solid; border-color: #16a34a; background: rgba(22, 163, 74, 0.08); }
.rx-dropzone-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: var(--bs-primary); color: #fff; font-size: 1.3rem; }
.rx-dropzone.has-files .rx-dropzone-icon { background: #16a34a; }
.rx-dropzone-text { display: grid; gap: 0.1rem; min-width: 0; line-height: 1.3; }
.rx-dropzone-text small { color: var(--bs-secondary-color); font-size: 0.78rem; overflow-wrap: anywhere; }
.rx-unlock-form .form-control, .rx-unlock-form .input-group-text { border-radius: 10px; }
.rx-unlock-form .input-group > .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rx-unlock-form .input-group > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; background: transparent; color: var(--bs-secondary-color); }
.rx-unlock-submit { font-weight: 700; border-radius: 12px; padding: 0.8rem 1rem; box-shadow: 0 6px 16px rgba(16, 66, 113, 0.25); }

/* Sign-up dashboard: the setup tiles come first; the progress steps sit under them, and move to the top once every setup tile is done. */
.rx-verify-grid.is-setup-done > .rx-verify-a-steps { order: -1; }
