/* =======================================================================
   Medimood — unified theme (light + dark)
   ======================================================================= */

:root {
  /* Core palette */
  --primary-brown:   #4e342e;
  --dark-red:        #5c0000;
  --accent-gold:     #d4af37;
  --accent-white:    #ffffff;
  --accent-black:    #000000;
  --dark-gray:       #333333;
  --light-gray:      #eeeeee;
  --light-bg:        #faf9f7;

  /* UI helpers */
  --sidebar-gradient:  linear-gradient(115deg, var(--primary-brown) 0%, var(--dark-red) 100%);
  --transition-speed:  .3s;
  --card-shadow:       0 4px 12px rgba(0,0,0,.1);
  --card-hover-shadow: 0 6px 18px rgba(0,0,0,.15);
}

/* =======================================================================
   GLOBAL RESET & ACCESSIBILITY
   ======================================================================= */
*,
*:before,
*:after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  background: var(--light-bg);
  color: var(--accent-black);
  font-family: "Roboto", sans-serif;
  transition: background var(--transition-speed), color var(--transition-speed);
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
a:focus-visible,
button:focus-visible,
.card:focus-visible {
  outline: 2px dashed var(--accent-gold);
  outline-offset: 3px;
}
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--accent-gold);
  color: var(--accent-black);
  z-index: 10000;
  transition: top var(--transition-speed);
}
.skip-to-content:focus {
  top: 0;
}

/* =======================================================================
   SIDEBAR
   ======================================================================= */
nav.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  min-height: 100vh;
  padding-top: 70px;
  background: var(--sidebar-gradient);
  overflow-y: auto;
  transition: width var(--transition-speed) ease;
  scrollbar-width: none;
}
nav.sidebar::-webkit-scrollbar { display: none; }
nav.sidebar.collapsed { width: 60px; }

nav.sidebar a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  margin-bottom: 6px;
  color: var(--accent-white);
  font-size: .9rem;
  text-decoration: none;
  border-radius: 4px;
  position: relative;
  transition: background var(--transition-speed), color var(--transition-speed);
}
nav.sidebar a i {
  margin-right: 12px;
  font-size: 1.1rem;
}
nav.sidebar a:hover,
nav.sidebar a.active {
  background: rgba(255,255,255,.1);
}
nav.sidebar a.active {
  border-left: 4px solid var(--accent-gold);
}
nav.sidebar.collapsed a span {
  display: none;
}

/* Tooltip when collapsed */
nav.sidebar a::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  margin-left: 10px;
  background: var(--primary-brown);
  color: var(--accent-white);
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: .8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed);
}
nav.sidebar a:hover::after,
nav.sidebar a.active::after {
  opacity: 1;
}

/* =======================================================================
   HEADER
   ======================================================================= */
header.header {
  position: fixed;
  top: 0;
  left: 240px;
  width: calc(100% - 240px);
  height: 80px;
  padding: 15px 30px;
  background: var(--accent-white);
  border-bottom: 3px solid var(--accent-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  transition: left var(--transition-speed), width var(--transition-speed);
  z-index: 1000;
}
header.header.expanded {
  left: 60px;
  width: calc(100% - 60px);
}

#sidebarToggle {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--primary-brown);
  cursor: pointer;
  transition: transform .2s;
}
#sidebarToggle:hover {
  transform: scale(1.2);
  color: var(--dark-red);
}
.logo img {
  height: 45px;
  cursor: pointer;
  transition: transform var(--transition-speed);
}
.logo img:hover {
  transform: scale(1.1);
}
.notifications,
.profile img {
  cursor: pointer;
  transition: transform var(--transition-speed);
}
.notifications:hover,
.profile img:hover {
  transform: scale(1.1);
}
.badge-notification {
  font-size: .7rem;
}

/* =======================================================================
   MAIN CONTENT
   ======================================================================= */
main.content {
  position: fixed;
  top: 80px;
  left: 240px;
  right: 0;
  bottom: 60px;
  padding: 30px;
  overflow: auto;
  transition: left var(--transition-speed);
}
main.content.expanded {
  left: 60px;
}
.fade-in {
  animation: fadeIn .8s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* =======================================================================
   DASHBOARD CARDS
   ======================================================================= */
.dashboard-cards .card {
  border: none;
  border-radius: 12px;
  background: var(--accent-white);
  color: var(--accent-black);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.dashboard-cards .card:hover,
.dashboard-cards .card:focus {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}
.card-header {
  background: var(--primary-brown);
  color: var(--accent-white);
  font-weight: 600;
}
.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--dark-red);
}
.metric-label {
  font-size: .9rem;
}
.active-assessments-card {
  background: linear-gradient(135deg,#faefe5 0%,#f7e3cf 100%);
  border: 2px solid #e0c9b6;
}
.active-today-card {
  background: linear-gradient(135deg,#eefaf5 0%,#d9f4e9 100%);
  border: 2px solid #a7dcc8;
}

/* =======================================================================
   BUTTONS
   ======================================================================= */
.btn-primary {
  background: var(--dark-red) !important;
  border-color: var(--dark-red) !important;
  color: var(--accent-white) !important;
  font-weight: bold;
  transition: background var(--transition-speed), border-color var(--transition-speed);
}
.btn-primary:hover {
  background: #400000 !important;
  border-color: #400000 !important;
}
.btn-secondary {
  background: #6f6f6f !important;
  border-color: #6f6f6f !important;
  color: var(--accent-white) !important;
}
.btn-secondary:hover {
  background: var(--dark-red) !important;
  border-color: var(--dark-red) !important;
}
.btn-info {
  background: var(--accent-gold) !important;
  border-color: var(--accent-gold) !important;
  color: var(--accent-black) !important;
}
.btn-info:hover {
  background: #b8860b !important;
  border-color: #b8860b !important;
  color: var(--accent-white) !important;
}
.btn-warning {
  background: #a65340 !important;
  border-color: #a65340 !important;
  color: var(--accent-white) !important;
}
.btn-warning:hover {
  background: #8b3f2d !important;
  border-color: #8b3f2d !important;
}
.btn-danger {
  background: #8b0000 !important;
  border-color: #8b0000 !important;
  color: var(--accent-white) !important;
}
.btn-danger:hover {
  background: #5c0000 !important;
  border-color: #5c0000 !important;
}
.btn-rounded {
  border-radius: 50px;
}
.btn-custom-apply {
  background: linear-gradient(45deg,#4e342e,#5c0000);
  color: var(--accent-white) !important;
  border: none !important;
  font-weight: bold;
}
.btn-custom-apply:hover {
  background: linear-gradient(45deg,#5c0000,#4e342e);
}

/* =======================================================================
   DATATABLE STYLES
   ======================================================================= */
table.table thead {
  background: #f2f2f2;
  color: var(--dark-gray);
}
table.table tbody tr:hover {
  background: #f9f1eb;
}
table.table-striped tbody tr:nth-of-type(odd) {
  background: #faf6f4;
}

/* =======================================================================
   MODAL & SPINNER
   ======================================================================= */
.modal-content {
  border-radius: 10px;
  overflow: hidden;
}
.modal-header {
  background: var(--primary-brown);
  border-bottom: 3px solid var(--accent-gold);
  color: var(--accent-white);
}
.spinner {
  width: 3rem;
  height: 3rem;
  margin: auto;
  border: .4em solid rgba(0,0,0,.1);
  border-top: .4em solid var(--dark-red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =======================================================================
   FOOTER
   ======================================================================= */
footer.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(120deg,var(--primary-brown) 0%,var(--accent-gold) 50%,var(--dark-red) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-white);
}
footer.footer a {
  color: var(--accent-white);
  text-decoration: none;
  margin: 0 15px;
  transition: color var(--transition-speed);
}
footer.footer a:hover {
  color: var(--dark-red);
}
@keyframes goldPulse {
  0%,100% { box-shadow: 0 0 5px rgba(212,175,55,.5), inset 0 0 5px rgba(212,175,55,.5); }
  50%    { box-shadow: 0 0 15px rgba(212,175,55,.8), inset 0 0 15px rgba(212,175,55,.8); }
}
footer.footer a.enterprise-link {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  background: linear-gradient(90deg,var(--dark-red),var(--accent-gold));
  color: var(--accent-white) !important;
  font-weight: 700;
  text-transform: uppercase;
  animation: goldPulse 2s infinite;
  transition: transform var(--transition-speed), background var(--transition-speed);
}
footer.footer a.enterprise-link:hover {
  transform: translateY(-2px) scale(1.06);
  background: linear-gradient(90deg,var(--accent-gold),var(--dark-red));
}

/* =======================================================================
   PROFILE PHOTO PREVIEW
   ======================================================================= */
.profile-photo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-photo-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

/* =======================================================================
   FORM CHECKBOX
   ======================================================================= */
.form-check-input:checked {
  background: var(--primary-brown) !important;
  border-color: var(--dark-red) !important;
  box-shadow: none !important;
}

/* =======================================================================
   INTRO.JS OVERRIDES
   ======================================================================= */
.introjs-tooltip {
  background: var(--accent-gold) !important;
  color: var(--accent-black) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  font-size: .9rem !important;
}
.introjs-bullets ul li a {
  background: var(--dark-red) !important;
}
.introjs-progressbar {
  background: var(--dark-red) !important;
}
.introjs-helperLayer {
  background: rgba(0,0,0,.4) !important;
}

/* =======================================================================
   DARK MODE
   ======================================================================= */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}
body.dark-mode nav.sidebar {
  background: #1f1f1f;
}
body.dark-mode nav.sidebar a {
  color: #999;
}
body.dark-mode nav.sidebar a:hover,
body.dark-mode nav.sidebar a.active {
  background: #333;
  color: #fff;
}
body.dark-mode header.header {
  background: #1f1f1f;
  border-bottom: 1px solid var(--accent-gold);
}
body.dark-mode .card {
  background: #263238;
  color: #e0e0e0;
}
body.dark-mode .btn-secondary {
  background: #555 !important;
  border-color: #555 !important;
}
body.dark-mode .modal-header {
  background: #1f1f1f;
  border-bottom: 3px solid var(--accent-gold);
}
body.dark-mode table thead {
  background: #333 !important;
  color: #fff !important;
}
body.dark-mode table tbody tr:hover {
  background: rgba(255,255,255,.05);
}
body.dark-mode .form-control,
body.dark-mode .form-select {
  background: #1f1f1f;
  color: #e0e0e0;
  border-color: #444;
}
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  border-color: var(--dark-red);
  box-shadow: 0 0 8px rgba(92,0,0,.5);
}
/* ============================================================
   SUBSCRIPTION / PRICING PLANS (EQUAL HEIGHT BLOCKS)
   ============================================================ */

.subscription-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 -0.75rem;
  align-items: stretch;
}

.subscription-container .col {
  flex: 1 1 calc(33.333% - 1.5rem);
  padding: 0 0.75rem;
  display: flex;
}

.pricing-plan {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--accent-white);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-speed);
  /* ensure equal height */
  height: 100%;
}

.pricing-plan:hover {
  box-shadow: var(--card-hover-shadow);
}

.pricing-plan .plan-header {
  background: var(--dark-red);
  color: var(--accent-white);
  padding: 1rem;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

.pricing-plan .plan-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
}

.pricing-plan .plan-body {
  flex-grow: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.plan-features li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-brown);
  font-weight: bold;
}

.plan-cta {
  text-align: center;
  margin-top: auto;
}

.plan-cta .btn {
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .subscription-container .col {
    flex: 1 1 calc(50% - 1.5rem);
  }
}
@media (max-width: 575px) {
  .subscription-container .col {
    flex: 1 1 100%;
  }
}
:root {
      --main-gray: #898784;
      --dark-brown: #4e342e;
      --soft-brown: #c1a892;
      --deep-red: #a6423a;
      --white: #fff;
      --black: #000;
    }
    body {
      font-family: 'Roboto', sans-serif;
      background: linear-gradient(135deg, #f8f8f8, #ebe8e5);
      color: var(--black);
      overflow-x: hidden;
      position: relative;
      /* Removed padding-top to eliminate blank space above navbar */
      margin: 0;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    /* Full Width Container */
    .container-page {
      width: 100%;
      padding: 20px;
    }
    /* Navbar */
    .navbar {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      position: sticky;
      top: 0;
      z-index: 999;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .navbar-brand {
      font-weight: 700;
      font-size: 1.5rem;
    }
    /* Hero Section for Assessment Title */
    .hero-section {
      text-align: center;
      background: linear-gradient(135deg, #dfdbd6, #c8c3bc);
      padding: 60px 20px;
      border-radius: 15px;
      margin: 20px 0;
      position: relative;
      overflow: hidden;
    }
    .hero-section::before,
    .hero-section::after {
      content: "";
      position: absolute;
      width: 200px;
      height: 200px;
      background: rgba(255,255,255,0.3);
      border-radius: 50%;
      z-index: 0;
    }
    .hero-section::before {
      top: -50px;
      right: -50px;
      animation: float 6s ease-in-out infinite alternate;
    }
    .hero-section::after {
      bottom: -50px;
      left: -50px;
      animation: float 8s ease-in-out infinite alternate;
    }
    @keyframes float {
      0% { transform: translateY(0); }
      100% { transform: translateY(30px); }
    }
    .hero-section h2 {
      font-size: 2rem;
      font-weight: 700;
      color: var(--deep-red);
      background: linear-gradient(90deg, var(--deep-red), var(--dark-brown));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: shimmer 4s linear infinite;
      position: relative;
      z-index: 1;
      text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    @keyframes shimmer {
      0% { background-position: -100%; }
      100% { background-position: 100%; }
    }
    /* Header descriptive text */
    p.mb-4 {
      color: #444;
    }
    .summary-card {
      border-radius: 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      transition: transform 0.3s, box-shadow 0.3s;
      cursor: pointer;
      background: var(--white);
    }
    .summary-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    }
    .summary-card .card-body i {
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.2); }
      100% { transform: scale(1); }
    }
    .card-header {
      background-color: var(--main-gray) !important;
      color: var(--white) !important;
      font-weight: 600;
      border-top-left-radius: 12px;
      border-top-right-radius: 12px;
    }
    .chart-container {
      position: relative;
      margin: auto;
      height: 400px;
      width: 100%;
    }
    table.dataTable tbody tr:hover {
      background-color: rgba(0,0,0,0.03);
    }
    .badge.bg-success {
      background-color: rgba(67, 160, 71, 0.8) !important;
    }
    .badge.bg-danger {
      background-color: rgba(211, 47, 47, 0.8) !important;
    }
    .modal-header {
      background-color: var(--deep-red);
      color: var(--white);
    }
    .modal-title {
      font-weight: 500;
    }
    @media (max-width: 768px) {
      .summary-card .card-body {
        padding: 1rem;
      }
    }
    /* Footer */
    footer {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      color: var(--white);
      padding: 15px;
      text-align: center;
      font-size: 0.9rem;
      width: 100%;
      margin-top: auto;
    }
:root {
      --main-gray: #898784;
      --dark-brown: #4e342e;
      --soft-brown: #c1a892;
      --deep-red: #a6423a;
      --white: #fff;
      --black: #000;
      --light-bg: #f8f8f8;
    }
    body {
      background: linear-gradient(135deg, var(--light-bg), #ebe8e5);
      font-family: 'Roboto', sans-serif;
      overflow-x: hidden;
      position: relative;
      color: var(--black);
      padding-bottom: 60px;
      margin: 0;
    }
    .navbar {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      position: sticky;
      top: 0;
      z-index: 999;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .navbar-brand {
      font-weight: 700;
      font-size: 1.5rem;
    }
    .hero-section {
      text-align: center;
      background: linear-gradient(135deg, #dfdbd6, #c8c3bc);
      padding: 60px 20px;
      border-radius: 15px;
      margin-bottom: 30px;
      position: relative;
      overflow: hidden;
    }
    .hero-section::before {
      content: "";
      position: absolute;
      top: -50px;
      right: -50px;
      width: 200px;
      height: 200px;
      background: rgba(255,255,255,0.3);
      border-radius: 50%;
      animation: float 6s ease-in-out infinite alternate;
    }
    .hero-section::after {
      content: "";
      position: absolute;
      bottom: -50px;
      left: -50px;
      width: 200px;
      height: 200px;
      background: rgba(255,255,255,0.3);
      border-radius: 50%;
      animation: float 8s ease-in-out infinite alternate;
    }
    @keyframes float {
      0%   { transform: translateY(0); }
      100% { transform: translateY(30px); }
    }
    .hero-section h1 {
      font-size: 2rem;
      font-weight: 700;
      color: var(--deep-red);
      background: linear-gradient(90deg, var(--deep-red), var(--dark-brown));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: shimmer 4s linear infinite;
      position: relative;
      z-index: 1;
      text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    @keyframes shimmer {
      0%   { background-position: -100%; }
      100% { background-position: 100%; }
    }
    .hero-section i {
      animation: iconPulse 2s infinite;
    }
    @keyframes iconPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
    }
    .table thead th {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      color: var(--white);
      position: sticky;
      top: 0;
      z-index: 1;
      border: none;
    }
    .table-hover tbody tr:hover {
      background-color: rgba(166,66,58,0.1);
      transition: background-color 0.3s;
    }
    .btn-rounded {
      border-radius: 50px;
    }
    .badge {
      font-size: 0.85em;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button {
      padding: 0.5em 1em;
      margin-left: 2px;
      border: none;
      border-radius: 5px;
      background-color: rgba(137,135,132,0.3);
      color: var(--black);
      transition: background 0.3s;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
      background-color: var(--main-gray);
      color: var(--white);
    }
    .dataTables_length, .dataTables_filter {
      display: none;
    }
    .modal-header {
      background-color: var(--main-gray);
      color: var(--white);
    }
    .modal-title {
      font-weight: bold;
    }
    .btn-primary {
      background-color: var(--deep-red);
      border-color: var(--deep-red);
      transition: 0.3s;
      box-shadow: 0 4px 10px rgba(166,66,58,0.3);
    }
    .btn-primary:hover {
      background-color: #7e322a;
      border-color: #7e322a;
      box-shadow: 0 6px 14px rgba(166,66,58,0.4);
    }
    .btn-secondary {
      background-color: var(--dark-brown);
      border-color: var(--dark-brown);
      transition: 0.3s;
      box-shadow: 0 4px 10px rgba(78,52,46,0.3);
    }
    .btn-secondary:hover {
      background-color: #3a2925;
      border-color: #3a2925;
      box-shadow: 0 6px 14px rgba(78,52,46,0.4);
    }
    .btn-danger {
      background-color: #c44;
      border-color: #c44;
      transition: 0.3s;
    }
    .btn-danger:hover {
      background-color: #a33;
      border-color: #a33;
    }
    .btn-warning {
      background-color: #db8b00;
      border-color: #db8b00;
      transition: 0.3s;
    }
    .btn-warning:hover {
      background-color: #b97300;
      border-color: #b97300;
    }
    .btn-info {
      background-color: #2b7ddf;
      border-color: #2b7ddf;
      transition: 0.3s;
    }
    .btn-info:hover {
      background-color: #1c5ea8;
      border-color: #1c5ea8;
    }
    .spinner-border {
      width: 3rem;
      height: 3rem;
      color: var(--deep-red);
    }
    #scrollTopBtn {
      position: fixed;
      bottom: 40px;
      right: 40px;
      background: var(--main-gray);
      color: var(--white);
      border: none;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      text-align: center;
      line-height: 50px;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(137,135,132,0.3);
      display: none;
      transition: background 0.3s, transform 0.3s;
      z-index: 9999;
    }
    #scrollTopBtn:hover {
      background: var(--dark-brown);
      transform: scale(1.1);
    }
    .card-container {
      border-radius: 15px;
      background: #fff;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
      padding: 20px;
    }
    /* Full-width container */
    .container-page {
      width: 100%;
      padding: 20px;
      box-sizing: border-box;
    }
    /* Footer */
    footer {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      color: var(--white);
      padding: 15px;
      text-align: center;
      font-size: 0.9rem;
      width: 100%;
      position: absolute;
      bottom: 0;
      left: 0;
    }
:root {
      --main-gray: #898784;
      --dark-brown: #4e342e;
      --deep-red: #a6423a;
      --white: #fff;
      --black: #000;
      --light-bg: #f8f8f8;
    }
    
    html, body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      background: linear-gradient(135deg, var(--light-bg), #ebe8e5);
      font-family: 'Roboto', sans-serif;
      color: var(--black);
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
    }
    
    /* Container Page (Full Width Layout) */
    .container-page {
      width: 100%;
      padding: 20px;
    }
    
    /* NAVBAR */
    .navbar {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      position: sticky;
      top: 0;
      z-index: 999;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      padding: 0 20px;
    }
    .navbar-brand {
      font-weight: 700;
      font-size: 1.5rem;
      color: var(--white) !important;
    }
    
    /* HERO SECTION */
    .hero-section {
      text-align: center;
      background: linear-gradient(135deg, #dfdbd6, #c8c3bc);
      padding: 60px 20px;
      border-radius: 15px;
      margin: 20px;
      position: relative;
      overflow: hidden;
    }
    .hero-section::before,
    .hero-section::after {
      content: "";
      position: absolute;
      width: 200px;
      height: 200px;
      background: rgba(255,255,255,0.3);
      border-radius: 50%;
      z-index: 0;
    }
    .hero-section::before {
      top: -50px;
      right: -50px;
      animation: float 6s ease-in-out infinite alternate;
    }
    .hero-section::after {
      bottom: -50px;
      left: -50px;
      animation: float 8s ease-in-out infinite alternate;
    }
    @keyframes float {
      0% { transform: translateY(0); }
      100% { transform: translateY(30px); }
    }
    .hero-section h2 {
      font-size: 2rem;
      font-weight: 700;
      color: var(--deep-red);
      background: linear-gradient(90deg, var(--deep-red), var(--dark-brown));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: shimmer 4s linear infinite;
      position: relative;
      z-index: 1;
      text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    @keyframes shimmer {
      0% { background-position: -100%; }
      100% { background-position: 100%; }
    }
    
    /* MAIN CONTENT */
    .main-content {
      padding: 30px 20px;
      flex: 1;
    }
    
    /* Card and Button styles */
    .card {
      border-radius: 15px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.1);
      background: var(--white);
      transition: transform 0.3s;
    }
    .card:hover {
      transform: translateY(-5px);
    }
    .btn-rounded {
      border-radius: 50px;
    }
    .btn-primary {
      background-color: var(--deep-red) !important;
      border-color: var(--deep-red) !important;
      transition: background-color 0.3s, border-color 0.3s;
      box-shadow: 0 4px 10px rgba(166,66,58,0.3);
    }
    .btn-primary:hover {
      background-color: #7e322a !important;
      border-color: #7e322a !important;
      box-shadow: 0 6px 14px rgba(166,66,58,0.4);
    }
    
    /* Table styling */
    .table thead th {
      background-color: var(--main-gray);
      color: var(--white);
      position: sticky;
      top: 0;
      z-index: 1;
      border: none;
    }
    .table tbody tr:hover {
      background-color: rgba(137,135,132,0.1);
    }
    
    /* MODAL */
    .modal-header {
      background-color: var(--deep-red) !important;
      color: var(--white) !important;
    }
    .modal-content {
      border-radius: 15px;
    }
    
    /* DATATABLES BUTTONS */
    .dataTables_wrapper .dt-buttons {
      float: none;
      text-align: center;
      margin-bottom: 10px;
    }
    
    /* SCROLL TO TOP BUTTON */
    #scrollTopBtn {
      position: fixed;
      bottom: 40px;
      right: 40px;
      background: var(--main-gray);
      color: var(--white);
      border: none;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      text-align: center;
      line-height: 50px;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(137,135,132,0.3);
      display: none;
      transition: background 0.3s, transform 0.3s;
      z-index: 9999;
    }
    #scrollTopBtn:hover {
      background: var(--dark-brown);
      transform: scale(1.1);
    }
    
    /* DATE FILTER */
    .date-filter {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 1rem;
    }
    .date-filter .form-label {
      margin-bottom: 0;
      font-weight: 500;
    }
    .date-filter .form-control {
      max-width: 200px;
    }
    
    /* FOOTER */
    footer {
      background: linear-gradient(to right, var(--main-gray), var(--dark-brown));
      color: var(--white);
      padding: 15px;
      text-align: center;
      font-size: 0.9rem;
      width: 100%;
    }


/* ============================================================
   ENTERPRISE dashboard shell + premium health trend chart
   ============================================================ */
    #startTutorial{color:var(--accent-gold);border:2px solid var(--accent-gold);background:transparent}
    #startTutorial:hover{color:#000;background:var(--accent-gold);border:2px solid var(--accent-gold)}

    .dashboard-cards .card,
    .dashboard-cards .card .card-body,
    .dashboard-cards .card .card-header{transition:none!important;transform:none!important;box-shadow:none!important}
    .dashboard-cards .card:hover,
    .dashboard-cards .card:focus,
    .dashboard-cards .card:active{transform:none!important;box-shadow:none!important}

    .health-metrics-trends .card,
    .health-metrics-trends .card .card-header,
    .health-metrics-trends .card .card-body{transition:none!important;transform:none!important;box-shadow:none!important}
    .health-metrics-trends{margin-bottom:0!important}
    .health-metrics-trends .card,
    .content>section:last-of-type,
    .content>section:last-of-type .card{margin-bottom:0!important}
    .health-metrics-trends .card-body{padding:.5rem!important}

    #healthMetricsTrendChart{display:block;width:100%!important;height:350px!important;contain:layout paint size;user-select:none}

    html,body{height:100%}
    body{margin:0;display:flex;flex-direction:column;min-height:100vh;overflow-y:hidden}
    header.header{flex:0 0 auto}
    main.content{flex:1 0 auto;padding-top:.4rem!important;padding-bottom:0!important}
    #home-dashboard{margin-bottom:1rem!important}
    footer.footer{flex:0 0 auto;margin-top:0!important;padding-top:4px!important;padding-bottom:4px!important}

    @media (prefers-reduced-motion:reduce){
      *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
      html:focus-within{scroll-behavior:auto!important}
    }

    .tenant-pill{font-size:.78rem;border:1px solid var(--accent-gold);padding:2px 8px;border-radius:999px;color:var(--accent-gold);background:transparent;line-height:1.2}
    .tenant-pill .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent-gold);margin-right:6px}
    .patient-pill{font-size:.78rem;border:1px dashed var(--dark-brown);padding:2px 8px;border-radius:999px;color:var(--dark-brown);background:#fff7e6;line-height:1.2}
    .patient-pill .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--dark-brown);margin-right:6px}

    #toast-container{top:1rem;right:1rem}
    #patientSearchTable_wrapper .dataTables_filter{display:none}
    .btn-icon{display:inline-flex;align-items:center;gap:.35rem}
    .kv{display:flex;gap:.5rem;align-items:center}
    .kv .k{min-width:110px;color:#6c757d}
    .badge-soft{background:#f8f9fa;color:#6c757d;border:1px solid #dee2e6}
    #providerInlineCard .card-header{border-bottom:1px solid #eee}
    .modal-body .table{margin-bottom:0}
    .dt-buttons .btn{margin-right:.35rem}

#trendHeader{
  background: linear-gradient(135deg, #4e342e 0%, #5c0000 48%, #b8860b 100%) !important;
  color: var(--accent-white) !important;
  border-bottom: 1px solid rgba(255,255,255,.12);
  letter-spacing: .02em;
  position: relative;
  overflow: hidden;
}
#trendHeader::after{
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: linear-gradient(110deg, rgba(255,255,255,.16), rgba(255,255,255,0));
  pointer-events: none;
}
.filter-controls{
  gap: 1rem;
}
.filter-controls .form-select{
  min-width: 230px;
  border-radius: 999px;
  border: 1px solid rgba(78,52,46,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,242,236,.98));
  box-shadow: 0 10px 24px rgba(78,52,46,.08);
  padding-right: 2.2rem;
}
.filter-controls .form-select:focus{
  border-color: rgba(92,0,0,.45);
  box-shadow: 0 0 0 .18rem rgba(92,0,0,.10), 0 10px 24px rgba(78,52,46,.10);
}
.filter-controls .btn{
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
}
.health-metrics-trends{
  position: relative;
}
.health-metrics-trends .card{
  border: 1px solid rgba(78,52,46,.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,247,243,.98) 100%);
  box-shadow: 0 22px 45px rgba(78,52,46,.12), 0 6px 18px rgba(92,0,0,.08);
  overflow: hidden;
}
.health-metrics-trends .card-body{
  background:
    radial-gradient(circle at 10% 10%, rgba(212,175,55,.10), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(92,0,0,.08), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(248,244,239,.98));
}
#healthMetricsTrendChart{
  height: 390px !important;
}
@media (max-width: 991.98px){
  .filter-controls{
    flex-direction: column;
    align-items: stretch !important;
  }
  .filter-controls > div{
    width: 100%;
  }
  .filter-controls .form-select{
    width: 100% !important;
  }
  .filter-controls .btn{
    margin-bottom: .5rem;
  }
  #healthMetricsTrendChart{
    height: 360px !important;
  }
}
@media (max-width: 575.98px){
  #healthMetricsTrendChart{
    height: 320px !important;
  }
}
body.dark-mode .filter-controls .form-select{
  background: linear-gradient(180deg, rgba(38,50,56,.95), rgba(31,31,31,.98));
  border-color: rgba(212,175,55,.18);
  color: #e0e0e0;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
body.dark-mode .health-metrics-trends .card{
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 34%),
    linear-gradient(180deg, rgba(38,50,56,.98) 0%, rgba(24,28,31,.98) 100%);
  border-color: rgba(212,175,55,.10);
  box-shadow: 0 20px 42px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.22);
}
body.dark-mode .health-metrics-trends .card-body{
  background:
    radial-gradient(circle at 10% 10%, rgba(212,175,55,.10), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(92,0,0,.10), transparent 26%),
    linear-gradient(180deg, rgba(38,50,56,.90), rgba(24,28,31,.98));
}


/* SUPPORT PAGE PREMIUM REFINEMENTS */
.support-page main.content.support-page-shell {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.14), transparent 26%),
    radial-gradient(circle at left 20%, rgba(92,0,0,.08), transparent 28%);
}

.support-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 30px;
  background:
    linear-gradient(140deg, rgba(255,255,255,.96) 0%, rgba(251,246,240,.98) 45%, rgba(245,234,224,.96) 100%);
  border: 1px solid rgba(212,175,55,.22);
  box-shadow: 0 24px 60px rgba(78,52,46,.12);
}

.support-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .95fr);
  gap: 24px;
  align-items: center;
}

.support-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .55;
  pointer-events: none;
}

.support-hero__glow--one {
  width: 220px;
  height: 220px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(212,175,55,.42) 0%, rgba(212,175,55,0) 72%);
}

.support-hero__glow--two {
  width: 260px;
  height: 260px;
  bottom: -140px;
  left: -80px;
  background: radial-gradient(circle, rgba(166,66,58,.24) 0%, rgba(166,66,58,0) 72%);
}

.support-kicker,
.support-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(92,0,0,.08);
  color: var(--dark-red);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.support-title {
  margin: 16px 0 12px;
  font-size: clamp(1.9rem, 2.4vw, 3rem);
  line-height: 1.08;
  color: #3f241e;
  font-weight: 800;
}

.support-subtitle {
  max-width: 780px;
  color: #675b56;
  font-size: 1rem;
  line-height: 1.75;
}

.support-hero__badges {
  display: grid;
  gap: 14px;
}

.support-stat-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 20px;
  box-shadow: 0 18px 35px rgba(78,52,46,.08);
  backdrop-filter: blur(8px);
}

.support-stat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, var(--dark-red) 0%, var(--accent-gold) 100%);
  box-shadow: 0 12px 24px rgba(92,0,0,.24);
}

.support-stat-card strong {
  display: block;
  color: #412822;
  font-size: .98rem;
}

.support-stat-card small {
  color: #7a6f6a;
  font-size: .82rem;
}

.support-section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.support-section-title-wrap--compact {
  margin-top: 10px;
}

.support-section-title {
  margin: 10px 0 0;
  font-size: clamp(1.2rem, 1.55vw, 1.7rem);
  color: #432620;
  font-weight: 800;
}

.support-feature-grid .card,
.support-faq-shell,
.support-resource-grid .resource-card {
  border: 1px solid rgba(212,175,55,.14);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(78,52,46,.08);
}

.support-feature-grid .card .card-header,
.support-faq-shell .card-header,
.support-resource-grid .resource-card .card-header {
  background: linear-gradient(135deg, rgba(78,52,46,.98) 0%, rgba(92,0,0,.97) 72%, rgba(131,63,37,.95) 100%) !important;
  color: #fff !important;
  border-bottom: none;
  min-height: 76px;
}

.support-feature-grid .card .card-body,
.support-resource-grid .resource-card .card-body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(252,248,244,.98) 100%);
}

.support-feature-grid .card p,
.support-resource-grid .resource-card p,
.support-faq-shell .accordion-body,
.support-faq-shell .mt-3.small.text-muted {
  color: #6f6662 !important;
  line-height: 1.75;
}

.support-feature-grid .card .btn,
.support-resource-grid .resource-card .btn {
  min-height: 46px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(92,0,0,.14);
}

.support-faq-shell .card-body {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,245,240,.98));
}

.support-faq-shell .accordion-item {
  border: 1px solid rgba(78,52,46,.08);
  border-radius: 18px !important;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 24px rgba(78,52,46,.04);
}

.support-faq-shell .accordion-button {
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,244,239,1) 100%);
  color: #402621;
  font-weight: 700;
  padding: 18px 20px;
  box-shadow: none !important;
}

.support-faq-shell .accordion-button:not(.collapsed) {
  color: var(--dark-red);
}

.support-faq-shell .accordion-button::after {
  background-color: rgba(212,175,55,.14);
  border-radius: 50%;
  padding: 12px;
  background-position: center;
}

.support-resource-grid .resource-card {
  position: relative;
}

.support-resource-grid .resource-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(212,175,55,.09), transparent 36%, transparent 64%, rgba(92,0,0,.06));
  pointer-events: none;
}

.support-resource-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(92,0,0,.08);
  border: 1px solid rgba(212,175,55,.24);
  color: var(--dark-red);
  font-weight: 700;
  white-space: nowrap;
}

.support-load-more {
  min-width: 150px;
  box-shadow: 0 14px 28px rgba(78,52,46,.16);
}

#supportCardsContainer .support-resource-col {
  margin-bottom: 20px;
}

#backToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  border-radius: 999px;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 30px rgba(78,52,46,.18);
  z-index: 999;
}

#contextModal {
  display: none !important;
}

.support-page .resource-card .featured {
  color: #ffd669;
}

.support-page .resource-actions .btn {
  padding: .35rem .6rem;
}

@media (max-width: 991.98px) {
  .support-hero__content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .support-hero {
    padding: 22px;
    border-radius: 24px;
  }

  .support-section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}


.support-ready .support-hero,
.support-ready .support-feature-grid .col-md-4,
.support-ready .support-faq-shell,
.support-ready .support-resource-col {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.support-ready .support-hero.is-visible,
.support-ready .support-feature-grid .col-md-4.is-visible,
.support-ready .support-faq-shell.is-visible,
.support-ready .support-resource-col.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* SUPPORT PAGE CONSISTENCY + CLEAN NON-ADMIN VIEW */
.support-page #ctxPill,
.support-page #selectAllWrap,
.support-page #btnBulkDelete,
.support-page #btnAddResource,
.support-page #resourceModal,
.support-page #contextModal,
.support-page .resource-actions,
.support-page .resource-select {
  display: none !important;
}

.support-page .support-feature-grid .card,
.support-page .support-resource-grid .resource-card,
.support-page .support-faq-shell {
  transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease;
}

.support-page .support-feature-grid .card:hover,
.support-page .support-resource-grid .resource-card:hover,
.support-page .support-faq-shell:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(78,52,46,.13);
  border-color: rgba(212,175,55,.24);
}

.support-page .support-feature-grid .card .card-header,
.support-page .support-resource-grid .resource-card .card-header,
.support-page .support-faq-shell .card-header {
  position: relative;
}

.support-page .support-feature-grid .card .card-header::after,
.support-page .support-resource-grid .resource-card .card-header::after,
.support-page .support-faq-shell .card-header::after {
  content: '';
  position: absolute;
  inset: auto 18px 12px 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.62), rgba(255,255,255,.04));
}

.support-page .support-feature-grid .card .btn,
.support-page .support-resource-grid .resource-card .btn,
.support-page .support-load-more {
  border-radius: 999px !important;
}

.support-page .support-resource-grid .resource-card .badge {
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  font-weight: 600;
  letter-spacing: .01em;
}

.support-page .support-resource-grid .resource-card .card-body,
.support-page .support-feature-grid .card .card-body {
  position: relative;
}

.support-page .support-resource-grid .resource-card .card-body::after,
.support-page .support-feature-grid .card .card-body::after {
  content: '';
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.10), rgba(212,175,55,0) 70%);
  pointer-events: none;
}

.support-page .support-load-more {
  min-height: 44px;
  padding-inline: 1.1rem;
}

.support-page .support-resource-count {
  box-shadow: 0 10px 22px rgba(78,52,46,.10);
}

body.dark-mode.support-page main.content.support-page-shell {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 24%),
    radial-gradient(circle at left 20%, rgba(92,0,0,.14), transparent 28%),
    linear-gradient(180deg, rgba(18,18,18,.98), rgba(18,18,18,.98));
}

body.dark-mode.support-page .support-hero {
  background: linear-gradient(145deg, rgba(33,33,33,.98) 0%, rgba(41,32,28,.98) 100%);
  border-color: rgba(212,175,55,.18);
  box-shadow: 0 24px 58px rgba(0,0,0,.34);
}

body.dark-mode.support-page .support-title,
body.dark-mode.support-page .support-section-title,
body.dark-mode.support-page .support-stat-card strong,
body.dark-mode.support-page .support-faq-shell .accordion-button {
  color: #f2ece8;
}

body.dark-mode.support-page .support-subtitle,
body.dark-mode.support-page .support-stat-card small,
body.dark-mode.support-page .support-feature-grid .card p,
body.dark-mode.support-page .support-resource-grid .resource-card p,
body.dark-mode.support-page .support-faq-shell .accordion-body,
body.dark-mode.support-page .support-faq-shell .mt-3.small.text-muted {
  color: rgba(240,232,228,.76) !important;
}

body.dark-mode.support-page .support-stat-card,
body.dark-mode.support-page .support-feature-grid .card,
body.dark-mode.support-page .support-resource-grid .resource-card,
body.dark-mode.support-page .support-faq-shell,
body.dark-mode.support-page .support-faq-shell .accordion-item {
  background: linear-gradient(180deg, rgba(35,35,35,.98), rgba(24,24,24,.98));
  border-color: rgba(212,175,55,.16);
}

body.dark-mode.support-page .support-feature-grid .card .card-body,
body.dark-mode.support-page .support-resource-grid .resource-card .card-body,
body.dark-mode.support-page .support-faq-shell .card-body,
body.dark-mode.support-page .support-faq-shell .accordion-button {
  background: linear-gradient(180deg, rgba(32,32,32,.98), rgba(24,24,24,.98));
}


/* MM PREMIUM DASHBOARD VISUAL UPGRADE V1 */


/* MM premium dashboard visual enhancement */
section[aria-label="Health Metric Trend Chart"]{position:relative;margin-top:.75rem!important;padding:1rem!important;border-radius:1.45rem!important;background:radial-gradient(circle at 6% 8%,rgba(212,175,55,.22),transparent 26%),radial-gradient(circle at 92% 0%,rgba(92,0,0,.15),transparent 30%),linear-gradient(135deg,rgba(255,255,255,.98),rgba(250,247,243,.95))!important;border:1px solid rgba(78,52,46,.10)!important;box-shadow:0 24px 55px rgba(78,52,46,.10),inset 0 1px 0 rgba(255,255,255,.86)!important}
.filter-controls{gap:1rem!important;padding:.82rem .95rem!important;border-radius:1.1rem!important;border:1px solid rgba(78,52,46,.12)!important;background:rgba(255,255,255,.82)!important;box-shadow:0 14px 34px rgba(78,52,46,.08)!important;backdrop-filter:blur(12px)}
.filter-controls label{margin-bottom:0!important;color:#4e342e!important;font-weight:800!important;letter-spacing:.01em}.filter-controls .form-select{min-width:245px!important;border-radius:999px!important;border:1px solid rgba(78,52,46,.18)!important;background:#fff!important;color:#1f2937!important;font-weight:700!important;box-shadow:0 8px 22px rgba(78,52,46,.08)!important}.filter-controls .form-select:focus{border-color:rgba(212,175,55,.85)!important;box-shadow:0 0 0 .18rem rgba(212,175,55,.18),0 12px 26px rgba(78,52,46,.10)!important}.filter-controls .btn{border-radius:999px!important;font-weight:800!important;letter-spacing:.01em;padding:.43rem .78rem!important;border:0!important;box-shadow:0 10px 22px rgba(15,23,42,.13)!important;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease!important}.filter-controls .btn:hover{transform:translateY(-1px);filter:saturate(1.12);box-shadow:0 14px 28px rgba(15,23,42,.18)!important}
.health-metrics-trends-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1.25rem!important;margin-top:.85rem!important}.health-metric-chart-card{position:relative!important;overflow:hidden!important;border:1px solid rgba(78,52,46,.10)!important;border-radius:1.35rem!important;background:radial-gradient(circle at top right,rgba(212,175,55,.15),transparent 28%),radial-gradient(circle at bottom left,rgba(92,0,0,.08),transparent 30%),linear-gradient(180deg,#fff 0%,#fbf8f4 100%)!important;box-shadow:0 22px 48px rgba(78,52,46,.12),0 8px 20px rgba(92,0,0,.07)!important;transition:transform .18s ease,box-shadow .18s ease!important}.health-metric-chart-card:hover{transform:translateY(-2px)!important;box-shadow:0 28px 58px rgba(78,52,46,.16),0 10px 24px rgba(92,0,0,.09)!important}.health-metric-chart-card::before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#5c0000 0%,#d4af37 28%,#2563eb 52%,#06b6d4 74%,#7c3aed 100%);z-index:3}.health-metric-chart-card::after{content:"";position:absolute;width:190px;height:190px;right:-82px;bottom:-98px;border-radius:50%;background:radial-gradient(circle,rgba(212,175,55,.16),rgba(212,175,55,0) 68%);pointer-events:none}.health-metric-chart-card .card-header{position:relative!important;z-index:4!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:.9rem!important;padding:1rem 1.1rem .88rem!important;border:0!important;border-bottom:1px solid rgba(78,52,46,.10)!important;background:linear-gradient(135deg,rgba(78,52,46,.98),rgba(92,0,0,.96) 55%,rgba(141,84,20,.94))!important;color:#fff!important}.health-metric-chart-card .header-copy{display:flex!important;flex-direction:column!important;gap:.24rem!important;min-width:0!important}.health-metric-chart-card .chart-title{font-weight:900!important;font-size:1.02rem!important;color:#fff!important;line-height:1.18!important;letter-spacing:.01em!important}.health-metric-chart-card .chart-subtitle{font-size:.8rem!important;color:rgba(255,255,255,.78)!important;line-height:1.35!important}.health-metric-chart-card .chart-badge{white-space:nowrap!important;font-size:.74rem!important;padding:.42rem .74rem!important;border-radius:999px!important;background:rgba(255,255,255,.14)!important;color:#fff!important;font-weight:900!important;border:1px solid rgba(255,255,255,.24)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 10px 22px rgba(0,0,0,.12)!important}.health-metric-chart-card .card-body{position:relative!important;z-index:2!important;padding:1rem!important;background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(252,249,244,.95))!important}.health-metric-chart-wrap{position:relative!important;height:352px!important;min-height:352px!important;border-radius:1.05rem!important;overflow:hidden!important;padding:.35rem!important;background:radial-gradient(circle at 14% 10%,rgba(37,99,235,.10),transparent 27%),radial-gradient(circle at 86% 5%,rgba(212,175,55,.13),transparent 28%),linear-gradient(180deg,rgba(255,255,255,.92),rgba(248,250,252,.92))!important;border:1px solid rgba(148,163,184,.16)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.88)!important}.health-metric-chart-wrap canvas,.health-metric-chart-wrap .health-metric-plot,#healthMetricsTrendChart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;user-select:none}.health-chart-footer-note{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:.75rem!important;padding-top:.72rem!important;color:#667085!important;font-size:.78rem!important;border-top:1px solid rgba(148,163,184,.15)!important;margin-top:.72rem!important}.health-chart-legend-pill{display:inline-flex!important;align-items:center!important;gap:.42rem!important;padding:.34rem .64rem!important;border-radius:999px!important;background:#fff!important;border:1px solid rgba(148,163,184,.20)!important;color:#344054!important;font-weight:800!important;box-shadow:0 5px 14px rgba(15,23,42,.05)!important}.health-chart-legend-dot{width:.58rem!important;height:.58rem!important;border-radius:50%!important;display:inline-block!important;box-shadow:0 0 0 3px rgba(255,255,255,.92)!important}
@media(max-width:1199.98px){.health-metric-chart-wrap{height:330px!important;min-height:330px!important}}@media(max-width:991.98px){section[aria-label="Health Metric Trend Chart"]{padding:.8rem!important}.filter-controls{flex-direction:column!important;align-items:stretch!important}.filter-controls>div{width:100%!important}.filter-controls .form-select{width:100%!important;min-width:0!important}.filter-controls .btn{margin-bottom:.4rem!important}.health-metrics-trends-grid{grid-template-columns:1fr!important}.health-metric-chart-wrap{height:330px!important;min-height:330px!important}}@media(max-width:575.98px){.health-metric-chart-card .card-header{flex-direction:column!important}.health-metric-chart-wrap{height:310px!important;min-height:310px!important}.health-chart-footer-note{align-items:flex-start!important;flex-direction:column!important}}
body.dark-mode section[aria-label="Health Metric Trend Chart"]{background:linear-gradient(135deg,rgba(31,41,55,.98),rgba(17,24,39,.96))!important;border-color:rgba(212,175,55,.14)!important}body.dark-mode .filter-controls,body.dark-mode .health-metric-chart-card,body.dark-mode .health-metric-chart-card .card-body,body.dark-mode .health-metric-chart-wrap{background:linear-gradient(180deg,rgba(31,41,55,.96),rgba(17,24,39,.94))!important;border-color:rgba(212,175,55,.14)!important}body.dark-mode .health-chart-footer-note,body.dark-mode .health-metric-chart-card .chart-subtitle{color:rgba(255,255,255,.70)!important}

/* =======================================================================
   MediMood enterprise visual refinement pack
   Scope: dashboard cards, filters, chart board, modals, tables
   ======================================================================= */
:root {
  --mm-enterprise-ink: #111827;
  --mm-enterprise-muted: #667085;
  --mm-enterprise-surface: #ffffff;
  --mm-enterprise-soft: #fbf7f1;
  --mm-enterprise-line: rgba(78, 52, 46, .12);
  --mm-enterprise-blue: #2563eb;
  --mm-enterprise-cyan: #06b6d4;
  --mm-enterprise-violet: #7c3aed;
  --mm-enterprise-green: #10b981;
  --mm-enterprise-orange: #f97316;
  --mm-enterprise-red: #ef4444;
  --mm-enterprise-shadow: 0 22px 55px rgba(78, 52, 46, .12);
  --mm-enterprise-shadow-soft: 0 12px 30px rgba(15, 23, 42, .08);
  --mm-enterprise-radius: 22px;
}

body {
  background:
    radial-gradient(circle at 6% 4%, rgba(212, 175, 55, .12), transparent 28%),
    radial-gradient(circle at 96% 2%, rgba(92, 0, 0, .09), transparent 32%),
    linear-gradient(135deg, #fbfaf7 0%, #f3eee7 48%, #f8fafc 100%);
}

main.content {
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.16)),
    radial-gradient(circle at top left, rgba(212,175,55,.09), transparent 28%);
  scroll-behavior: smooth;
}

.dashboard-cards .card,
.card-open {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(78,52,46,.11) !important;
  border-radius: 20px !important;
  box-shadow: var(--mm-enterprise-shadow-soft) !important;
  background:
    radial-gradient(circle at 92% 12%, rgba(212,175,55,.16), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,252,247,.94)) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease !important;
}

.dashboard-cards .card::before,
.card-open::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #5c0000, #d4af37, #2563eb, #06b6d4, #7c3aed);
  opacity: .92;
  z-index: 1;
}

.dashboard-cards .card::after,
.card-open::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  bottom: -48px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212,175,55,.18), rgba(212,175,55,0) 68%);
  z-index: -1;
}

.dashboard-cards .card:hover,
.dashboard-cards .card:focus,
.card-open:hover,
.card-open:focus {
  transform: translateY(-4px) !important;
  border-color: rgba(212,175,55,.34) !important;
  box-shadow: 0 24px 58px rgba(78,52,46,.16) !important;
  filter: saturate(1.04);
}

.metric-value {
  color: #5c0000 !important;
  font-size: clamp(1.55rem, 1.2rem + .8vw, 2.05rem) !important;
  font-weight: 900 !important;
  letter-spacing: -.025em;
  line-height: 1.05;
}

.metric-label {
  color: #475467 !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  letter-spacing: .005em;
}

section[aria-label="Health Metric Trend Chart"] {
  position: relative;
  margin-top: 1rem !important;
  padding: 1.15rem !important;
  border: 1px solid var(--mm-enterprise-line) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 7% 10%, rgba(212,175,55,.18), transparent 30%),
    radial-gradient(circle at 96% 0%, rgba(37,99,235,.12), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(250,247,243,.94)) !important;
  box-shadow: var(--mm-enterprise-shadow) !important;
}

section[aria-label="Health Metric Trend Chart"]::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.74);
  pointer-events: none;
}

.filter-controls {
  position: relative;
  z-index: 2;
  gap: 1rem !important;
  padding: .9rem 1rem !important;
  border: 1px solid rgba(78,52,46,.13) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.86) !important;
  box-shadow: 0 14px 34px rgba(78,52,46,.08) !important;
  backdrop-filter: blur(14px);
}

.filter-controls label {
  color: #4e342e !important;
  font-weight: 900 !important;
  letter-spacing: .01em;
}

.filter-controls .form-select {
  min-width: 255px !important;
  height: 40px;
  border-radius: 999px !important;
  border: 1px solid rgba(78,52,46,.18) !important;
  background-color: #fff !important;
  color: #1f2937 !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(78,52,46,.07) !important;
}

.filter-controls .form-select:focus {
  border-color: rgba(212,175,55,.9) !important;
  box-shadow: 0 0 0 .2rem rgba(212,175,55,.18), 0 12px 24px rgba(78,52,46,.10) !important;
}

.filter-controls .btn {
  min-width: 74px;
  border-radius: 999px !important;
  font-weight: 900 !important;
  letter-spacing: .01em;
  border: 0 !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.14) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

.filter-controls .btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.12);
  box-shadow: 0 14px 28px rgba(15,23,42,.18) !important;
}

.health-metrics-trends-grid {
  position: relative;
  z-index: 2;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
  margin-top: 1rem !important;
}

.health-metric-chart-card {
  position: relative !important;
  overflow: hidden !important;
  min-width: 0;
  border: 1px solid rgba(78,52,46,.11) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 96% 0%, rgba(212,175,55,.18), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(92,0,0,.07), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbf8f4 100%) !important;
  box-shadow: 0 22px 52px rgba(78,52,46,.12), 0 8px 18px rgba(92,0,0,.06) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.health-metric-chart-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(212,175,55,.28) !important;
  box-shadow: 0 28px 64px rgba(78,52,46,.17), 0 10px 24px rgba(92,0,0,.08) !important;
}

.health-metric-chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #5c0000 0%, #d4af37 28%, #2563eb 54%, #06b6d4 74%, #7c3aed 100%);
  z-index: 3;
}

.health-metric-chart-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -78px;
  bottom: -96px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212,175,55,.17), rgba(212,175,55,0) 68%);
  pointer-events: none;
}

.health-metric-chart-card .card-header {
  position: relative !important;
  z-index: 4 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: .9rem !important;
  padding: 1.05rem 1.12rem .94rem !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.18) !important;
  background:
    radial-gradient(circle at 96% 0%, rgba(212,175,55,.22), transparent 36%),
    linear-gradient(135deg, #4e342e 0%, #5c0000 58%, #8d5414 100%) !important;
  color: #fff !important;
}

.health-metric-chart-card .header-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: .25rem !important;
  min-width: 0 !important;
}

.health-metric-chart-card .chart-title {
  color: #fff !important;
  font-size: 1.04rem !important;
  font-weight: 950 !important;
  letter-spacing: .005em !important;
  line-height: 1.18 !important;
}

.health-metric-chart-card .chart-subtitle {
  color: rgba(255,255,255,.78) !important;
  font-size: .8rem !important;
  line-height: 1.35 !important;
}

.health-metric-chart-card .chart-badge {
  flex: 0 0 auto;
  white-space: nowrap !important;
  padding: .42rem .76rem !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 22px rgba(0,0,0,.12) !important;
  font-size: .74rem !important;
  font-weight: 950 !important;
}

.health-metric-chart-card .card-body {
  position: relative !important;
  z-index: 2 !important;
  padding: 1rem !important;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(252,249,244,.96)) !important;
}

.health-metric-chart-wrap {
  position: relative !important;
  height: 360px !important;
  min-height: 360px !important;
  overflow: hidden !important;
  padding: .45rem !important;
  border: 1px solid rgba(148,163,184,.16) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 14% 8%, rgba(37,99,235,.10), transparent 26%),
    radial-gradient(circle at 88% 6%, rgba(212,175,55,.14), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,250,252,.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 22px rgba(15,23,42,.045) !important;
}

.health-metric-chart-wrap canvas,
.health-metric-chart-wrap .health-metric-plot,
#healthMetricsTrendChart {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  user-select: none;
}

.health-chart-footer-note {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .75rem !important;
  margin-top: .75rem !important;
  padding-top: .75rem !important;
  border-top: 1px solid rgba(148,163,184,.15) !important;
  color: #667085 !important;
  font-size: .78rem !important;
  line-height: 1.35;
}

.health-chart-legend-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: .42rem !important;
  padding: .34rem .64rem !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #344054 !important;
  box-shadow: 0 5px 14px rgba(15,23,42,.05) !important;
  font-weight: 850 !important;
}

.health-chart-legend-dot {
  width: .58rem !important;
  height: .58rem !important;
  display: inline-block !important;
  border-radius: 999px !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.92) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.table .form-control,
.table .form-select {
  border-radius: 999px !important;
  border-color: rgba(78,52,46,.16) !important;
}

table.table {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

table.table thead {
  background: linear-gradient(135deg, rgba(78,52,46,.08), rgba(212,175,55,.12)) !important;
}

table.table thead th {
  color: #3f2b27 !important;
  font-weight: 900 !important;
  letter-spacing: .01em;
}

.modal-content {
  border: 1px solid rgba(78,52,46,.14) !important;
  border-radius: 22px !important;
  box-shadow: 0 30px 70px rgba(15,23,42,.22) !important;
}

.modal-header {
  background:
    radial-gradient(circle at 96% 0%, rgba(212,175,55,.24), transparent 34%),
    linear-gradient(135deg, #4e342e, #5c0000) !important;
}

@media (max-width: 1199.98px) {
  .health-metric-chart-wrap {
    height: 338px !important;
    min-height: 338px !important;
  }
}

@media (max-width: 991.98px) {
  section[aria-label="Health Metric Trend Chart"] {
    padding: .85rem !important;
  }

  .filter-controls {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .filter-controls > div {
    width: 100% !important;
  }

  .filter-controls .form-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .filter-controls .btn {
    margin-bottom: .4rem !important;
  }

  .health-metrics-trends-grid {
    grid-template-columns: 1fr !important;
  }

  .health-metric-chart-wrap {
    height: 330px !important;
    min-height: 330px !important;
  }
}

@media (max-width: 575.98px) {
  .health-metric-chart-card .card-header {
    flex-direction: column !important;
  }

  .health-metric-chart-wrap {
    height: 310px !important;
    min-height: 310px !important;
  }

  .health-chart-footer-note {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

body.dark-mode {
  background: radial-gradient(circle at top left, rgba(212,175,55,.10), transparent 28%), #111827 !important;
}

body.dark-mode main.content,
body.dark-mode section[aria-label="Health Metric Trend Chart"],
body.dark-mode .filter-controls,
body.dark-mode .health-metric-chart-card,
body.dark-mode .health-metric-chart-card .card-body,
body.dark-mode .health-metric-chart-wrap {
  background: linear-gradient(180deg, rgba(31,41,55,.96), rgba(17,24,39,.94)) !important;
  border-color: rgba(212,175,55,.16) !important;
}

body.dark-mode .dashboard-cards .card,
body.dark-mode .card-open {
  background: linear-gradient(180deg, rgba(31,41,55,.98), rgba(17,24,39,.94)) !important;
  border-color: rgba(212,175,55,.16) !important;
}

body.dark-mode .metric-label,
body.dark-mode .health-chart-footer-note,
body.dark-mode .health-metric-chart-card .chart-subtitle {
  color: rgba(255,255,255,.70) !important;
}

body.dark-mode .metric-value,
body.dark-mode .health-chart-legend-pill,
body.dark-mode table.table thead th {
  color: #fff7d6 !important;
}

body.dark-mode .health-chart-legend-pill {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.16) !important;
}

/* Original portal refinement, 2026-09-09. Preserve layout, chart colors and score semantics. */
.dashboard-cards .card-open .metric-value {
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.dashboard-cards .card-open .metric-label {
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.dashboard-cards .card-open .card-body > div:last-child { min-width: 0; }
body:not(.dark-mode) .dashboard-cards .card-open .metric-label { color: #455468 !important; }
body.dark-mode .dashboard-cards .card-open .metric-label { color: #d2dbe6 !important; }
.dashboard-cards .card-open { transition: box-shadow 160ms ease, border-color 160ms ease; }
body:not(.dark-mode) .dashboard-cards .card-open:hover {
  box-shadow: 0 6px 20px rgba(22,42,67,.13) !important;
}
body :is(button, a, input, select, textarea, [role="button"], summary):focus-visible {
  outline: 3px solid #1268a8 !important;
  outline-offset: 3px !important;
}
body.dark-mode :is(button, a, input, select, textarea, [role="button"], summary):focus-visible {
  outline-color: #84cdf5 !important;
}
.table :is(td, th) { vertical-align: middle; }
.table tbody :is(button, .btn, a):focus-visible { outline-offset: 1px !important; }
@media (prefers-reduced-motion: reduce) {
  .dashboard-cards .card-open,
  .dashboard-cards .card-open:hover {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* Readability follow-up: retain the original cards, charts and layout. */
.dashboard-cards .card-open .metric-label {
  font-size: .9375rem !important;
  line-height: 1.5 !important;
}
.health-metric-chart-card .chart-title { line-height: 1.4 !important; }
.health-metric-chart-card .chart-subtitle {
  font-size: .875rem !important;
  line-height: 1.5 !important;
  color: #f0f3f7 !important;
}
.health-metric-chart-card .chart-badge {
  font-size: .875rem !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.health-chart-footer-note {
  font-size: .875rem !important;
  line-height: 1.5 !important;
  flex-wrap: wrap !important;
}
.health-chart-legend-pill { white-space: normal; }
body:not(.dark-mode) .health-chart-footer-note { color: #475467 !important; }
body.dark-mode .health-chart-footer-note { color: #d2dbe6 !important; }
.health-metric-chart-card .card-header { flex-wrap: wrap !important; }
.table :is(.btn, button) {
  min-height: 32px;
  min-width: 32px;
}

/* Restrained original-brand palette. Does not alter clinical chart series or status colors. */
body:not(.dark-mode) { background: #f4f6f8 !important; }
body:not(.dark-mode) main.content { background: transparent !important; }
body:not(.dark-mode) .dashboard-cards .card-open {
  background: #ffffff !important;
  border-color: #dce2e8 !important;
  box-shadow: 0 4px 16px rgba(28,39,54,.07) !important;
}
body:not(.dark-mode) .dashboard-cards .card-open::before {
  background: linear-gradient(90deg,#650f24 0%,#650f24 88%,#b69a52 88%,#b69a52 100%) !important;
}
body:not(.dark-mode) .dashboard-cards .card-open::after { background: none !important; }
body:not(.dark-mode) .dashboard-cards .card-open:hover {
  border-color: #bda0a8 !important;
  box-shadow: 0 7px 22px rgba(28,39,54,.12) !important;
}
body:not(.dark-mode) section[aria-label="Health Metric Trend Chart"],
body:not(.dark-mode) .health-metric-chart-card,
body:not(.dark-mode) .health-metric-chart-card .card-body {
  background: #ffffff !important;
  border-color: #dce2e8 !important;
  box-shadow: 0 4px 16px rgba(28,39,54,.06) !important;
}
body:not(.dark-mode) .health-metric-chart-card .card-header {
  background: #571729 !important;
  border-bottom-color: #571729 !important;
}
body:not(.dark-mode) .health-metric-chart-card::before {
  background: #b69a52 !important;
}
body:not(.dark-mode) .health-metric-chart-card::after { background: none !important; }
body:not(.dark-mode) .health-metric-chart-wrap {
  background: #f9fafb !important;
  border-color: #e3e8ee !important;
  box-shadow: none !important;
}
body:not(.dark-mode) .btn-primary {
  --bs-btn-bg: #650f24;
  --bs-btn-border-color: #650f24;
  --bs-btn-hover-bg: #4c0b1b;
  --bs-btn-hover-border-color: #4c0b1b;
  --bs-btn-active-bg: #4c0b1b;
  --bs-btn-active-border-color: #4c0b1b;
  background: #650f24 !important;
  border-color: #650f24 !important;
  color: #ffffff !important;
}
body:not(.dark-mode) .btn-primary:is(:hover,:active) {
  background: #4c0b1b !important;
  border-color: #4c0b1b !important;
}
