/*
 * MHSM Admin Panel
 * All custom selectors use the mhsmadm- prefix to prevent CSS conflicts.
 * Edit colors, spacing and component styles in this file.
 */

:root {
  --mhsmadm-green-950: #062d22;
  --mhsmadm-green-900: #0a3c2d;
  --mhsmadm-green-800: #10543d;
  --mhsmadm-green-700: #197451;
  --mhsmadm-green-600: #249066;
  --mhsmadm-green-100: #e9f7f0;
  --mhsmadm-green-50: #f3fbf7;
  --mhsmadm-gold: #d6ad48;
  --mhsmadm-navy: #16304e;
  --mhsmadm-blue: #3878d8;
  --mhsmadm-amber: #d88717;
  --mhsmadm-red: #d64e52;
  --mhsmadm-purple: #7d60c7;
  --mhsmadm-text: #233649;
  --mhsmadm-muted: #738195;
  --mhsmadm-border: #dfe8e4;
  --mhsmadm-bg: #f3f7f5;
  --mhsmadm-surface: #ffffff;
  --mhsmadm-sidebar: 270px;
  --mhsmadm-shadow: 0 14px 36px rgba(16, 66, 49, 0.09);
}

.mhsmadm-app,
.mhsmadm-app *,
.mhsmadm-app *::before,
.mhsmadm-app *::after,
.mhsmadm-login,
.mhsmadm-login *,
.mhsmadm-login *::before,
.mhsmadm-login *::after {
  box-sizing: border-box;
}

body.mhsmadm-app,
body.mhsmadm-login {
  margin: 0;
  color: var(--mhsmadm-text);
  background: var(--mhsmadm-bg);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* Login page */
.mhsmadm-login {
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% 12%, rgba(214, 173, 72, 0.19), transparent 25rem),
    radial-gradient(circle at 94% 86%, rgba(61, 176, 128, 0.2), transparent 28rem),
    var(--mhsmadm-green-950);
}

.mhsmadm-login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 1fr) minmax(440px, 0.9fr);
}

.mhsmadm-login-brand {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px clamp(34px, 7vw, 100px);
  color: #fff;
}

.mhsmadm-login-brand::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.03), 0 0 0 90px rgba(255, 255, 255, 0.02);
  content: "";
}

.mhsmadm-brand-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.mhsmadm-brand-mark {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 15px;
  background: linear-gradient(135deg, var(--mhsmadm-gold), #f2d983);
  color: var(--mhsmadm-green-950);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.mhsmadm-brand-lockup strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
}

.mhsmadm-brand-lockup span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mhsmadm-login-message {
  position: relative;
  max-width: 620px;
  z-index: 1;
}

.mhsmadm-login-message p:first-child {
  margin-bottom: 16px;
  color: #8fe2bd;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mhsmadm-login-message h1 {
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 400;
  line-height: 1.04;
}

.mhsmadm-login-message p:last-child {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
}

.mhsmadm-login-footnote {
  position: relative;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.82rem;
  z-index: 1;
}

.mhsmadm-login-panel {
  display: grid;
  place-items: center;
  padding: 38px;
  background: #f8fbf9;
}

.mhsmadm-login-card {
  width: min(100%, 480px);
  padding: 38px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(4, 44, 32, 0.17);
  animation: mhsmadm-rise 0.6s ease both;
}

.mhsmadm-login-card h2 {
  margin: 0 0 8px;
  color: var(--mhsmadm-green-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
}

.mhsmadm-login-card > p {
  margin-bottom: 28px;
  color: var(--mhsmadm-muted);
}

.mhsmadm-field {
  margin-bottom: 18px;
}

.mhsmadm-field label,
.mhsmadm-form-label {
  display: block;
  margin-bottom: 7px;
  color: #33475b;
  font-size: 0.88rem;
  font-weight: 600;
}

.mhsmadm-input-wrap {
  position: relative;
}

.mhsmadm-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  color: #8a9aab;
  transform: translateY(-50%);
  pointer-events: none;
}

.mhsmadm-input-wrap input {
  padding-left: 46px;
}

.mhsmadm-app .form-control,
.mhsmadm-app .form-select,
.mhsmadm-login .form-control,
.mhsmadm-login .form-select {
  min-height: 48px;
  border-color: #cfdcd6;
  border-radius: 11px;
  color: var(--mhsmadm-text);
  font-size: 0.93rem;
}

.mhsmadm-app textarea.form-control {
  min-height: 108px;
}

.mhsmadm-app .form-control:focus,
.mhsmadm-app .form-select:focus,
.mhsmadm-login .form-control:focus,
.mhsmadm-login .form-select:focus {
  border-color: var(--mhsmadm-green-600);
  box-shadow: 0 0 0 4px rgba(36, 144, 102, 0.12);
}

.mhsmadm-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  cursor: pointer;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--mhsmadm-muted);
  transform: translateY(-50%);
}

.mhsmadm-password-toggle svg {
  position: static;
  transform: none;
}

.mhsmadm-login-error {
  display: none;
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #f1b9bc;
  border-radius: 9px;
  background: #fff1f2;
  color: #a62e35;
  font-size: 0.88rem;
}

.mhsmadm-login-error.is-visible {
  display: block;
}

.mhsmadm-demo-box {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed #acd5c3;
  border-radius: 11px;
  background: var(--mhsmadm-green-50);
  color: #476358;
  font-size: 0.82rem;
}

.mhsmadm-demo-box strong {
  color: var(--mhsmadm-green-800);
}

/* Shared admin layout */
.mhsmadm-layout {
  min-height: 100vh;
}

.mhsmadm-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--mhsmadm-sidebar);
  overflow-y: auto;
  flex-direction: column;
  padding: 22px 15px;
  background: linear-gradient(180deg, var(--mhsmadm-green-950), #08291f);
  color: #fff;
  z-index: 1040;
  transition: transform 0.3s ease;
}

.mhsmadm-sidebar .mhsmadm-brand-lockup {
  padding: 5px 7px 22px;
}

.mhsmadm-sidebar .mhsmadm-brand-mark {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.mhsmadm-sidebar-label {
  margin: 13px 11px 7px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mhsmadm-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mhsmadm-nav-link {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.91rem;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.mhsmadm-nav-link svg {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
}

.mhsmadm-nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: translateX(2px);
}

.mhsmadm-nav-link.is-active {
  background: linear-gradient(135deg, rgba(41, 157, 112, 0.34), rgba(41, 157, 112, 0.18));
  color: #75e1af;
  box-shadow: inset 3px 0 0 #55cf98;
}

.mhsmadm-sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
}

.mhsmadm-main {
  min-height: 100vh;
  margin-left: var(--mhsmadm-sidebar);
}

.mhsmadm-topbar {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--mhsmadm-border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  z-index: 1020;
}

.mhsmadm-topbar-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.mhsmadm-topbar h1 {
  margin: 0;
  color: var(--mhsmadm-green-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.mhsmadm-topbar p {
  margin: 1px 0 0;
  color: var(--mhsmadm-muted);
  font-size: 0.78rem;
}

.mhsmadm-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 10px;
  background: #fff;
  color: var(--mhsmadm-green-800);
}

.mhsmadm-menu-button svg {
  width: 22px;
  height: 22px;
}

.mhsmadm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mhsmadm-icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 11px;
  background: #fff;
  color: var(--mhsmadm-green-800);
}

.mhsmadm-icon-button svg {
  width: 19px;
  height: 19px;
}

.mhsmadm-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px 5px 5px;
  border: 1px solid #cfe7dc;
  border-radius: 999px;
  background: var(--mhsmadm-green-50);
  color: var(--mhsmadm-green-900);
}

.mhsmadm-user-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 50%;
  background: var(--mhsmadm-green-800);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.mhsmadm-user-chip span:last-child {
  max-width: 150px;
  overflow: hidden;
  font-size: 0.83rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mhsmadm-content {
  padding: 27px 28px 42px;
}

.mhsmadm-page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.mhsmadm-page-intro h2 {
  margin: 0 0 5px;
  color: var(--mhsmadm-green-950);
  font-size: 1.35rem;
  font-weight: 600;
}

.mhsmadm-page-intro p {
  margin: 0;
  color: var(--mhsmadm-muted);
}

.mhsmadm-btn {
  display: inline-flex;
  min-height: 43px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mhsmadm-btn svg {
  width: 17px;
  height: 17px;
}

.mhsmadm-btn:hover {
  transform: translateY(-1px);
}

.mhsmadm-btn-primary {
  background: var(--mhsmadm-green-800);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 84, 61, 0.18);
}

.mhsmadm-btn-primary:hover {
  background: var(--mhsmadm-green-700);
  color: #fff;
}

.mhsmadm-btn-outline {
  border-color: #c8d8d1;
  background: #fff;
  color: var(--mhsmadm-green-800);
}

.mhsmadm-btn-danger {
  border-color: #f0babc;
  background: #fff5f5;
  color: var(--mhsmadm-red);
}

.mhsmadm-btn-sm {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.79rem;
}

.mhsmadm-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}

.mhsmadm-metric {
  position: relative;
  overflow: hidden;
  min-height: 135px;
  padding: 21px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 16px;
  background: var(--mhsmadm-surface);
  box-shadow: var(--mhsmadm-shadow);
  animation: mhsmadm-rise 0.45s ease both;
}

.mhsmadm-metric::after {
  position: absolute;
  right: -32px;
  bottom: -45px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(36, 144, 102, 0.06);
  content: "";
}

.mhsmadm-metric-icon {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--mhsmadm-green-100);
  color: var(--mhsmadm-green-700);
}

.mhsmadm-metric-icon svg {
  width: 20px;
  height: 20px;
}

.mhsmadm-metric-value {
  display: block;
  margin: 12px 0 4px;
  color: var(--mhsmadm-green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  line-height: 1;
}

.mhsmadm-metric-label {
  color: #7b8d85;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mhsmadm-metric-trend {
  display: block;
  margin-top: 11px;
  color: var(--mhsmadm-green-600);
  font-size: 0.76rem;
}

.mhsmadm-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 20px;
  margin-bottom: 22px;
}

.mhsmadm-panel {
  overflow: hidden;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 16px;
  background: var(--mhsmadm-surface);
  box-shadow: var(--mhsmadm-shadow);
}

.mhsmadm-panel-head {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid #e6eeea;
}

.mhsmadm-panel-head h3 {
  margin: 0;
  color: var(--mhsmadm-green-950);
  font-size: 1rem;
  font-weight: 600;
}

.mhsmadm-panel-body {
  padding: 20px;
}

.mhsmadm-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(145px, 0.7fr)) auto;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--mhsmadm-shadow);
  margin-bottom: 18px;
}

.mhsmadm-search-wrap {
  position: relative;
}

.mhsmadm-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  color: #8ca096;
  transform: translateY(-50%);
}

.mhsmadm-search-wrap .form-control {
  padding-left: 42px;
}

.mhsmadm-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.mhsmadm-table {
  width: 100%;
  min-width: 930px;
  margin: 0;
  border-collapse: collapse;
}

.mhsmadm-table th {
  padding: 12px 14px;
  border-bottom: 1px solid #e3ebe7;
  background: #f7faf8;
  color: #748b80;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.mhsmadm-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8eeeb;
  color: #405448;
  font-size: 0.85rem;
  vertical-align: middle;
}

.mhsmadm-table tbody tr {
  transition: background 0.18s ease;
}

.mhsmadm-table tbody tr:hover {
  background: #f7fcf9;
}

.mhsmadm-table tbody tr:last-child td {
  border-bottom: 0;
}

.mhsmadm-applicant-cell strong {
  display: block;
  color: #17291f;
  font-size: 0.9rem;
  font-weight: 600;
}

.mhsmadm-applicant-cell span,
.mhsmadm-applicant-cell small {
  display: block;
  color: var(--mhsmadm-muted);
}

.mhsmadm-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.mhsmadm-badge-success { background: #dff7e9; color: #137347; }
.mhsmadm-badge-warning { background: #fff0c5; color: #9a6005; }
.mhsmadm-badge-danger { background: #ffe2e3; color: #ad3036; }
.mhsmadm-badge-info { background: #e2efff; color: #2866b4; }
.mhsmadm-badge-neutral { background: #eef2f0; color: #63756c; }
.mhsmadm-badge-purple { background: #ede7fb; color: #6447ac; }

.mhsmadm-progress-dots {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.mhsmadm-progress-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9e2dd;
}

.mhsmadm-progress-dots i.is-complete {
  background: #3db078;
}

.mhsmadm-progress-text {
  color: #839289;
  font-size: 0.73rem;
}

.mhsmadm-table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mhsmadm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--mhsmadm-border);
  color: var(--mhsmadm-muted);
  font-size: 0.82rem;
}

.mhsmadm-page-buttons {
  display: flex;
  gap: 6px;
}

.mhsmadm-page-button {
  display: grid;
  min-width: 34px;
  height: 34px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--mhsmadm-green-800);
}

.mhsmadm-page-button.is-active {
  border-color: var(--mhsmadm-green-800);
  background: var(--mhsmadm-green-800);
  color: #fff;
}

.mhsmadm-chart {
  position: relative;
  height: 240px;
  padding: 20px 10px 12px 44px;
}

.mhsmadm-chart-grid {
  position: absolute;
  inset: 20px 10px 36px 44px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #e6eeea 25%);
}

.mhsmadm-bars {
  position: relative;
  display: flex;
  height: 180px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  z-index: 1;
}

.mhsmadm-bar-group {
  display: flex;
  height: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.mhsmadm-bar {
  position: relative;
  width: min(18px, 35%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #55c591, var(--mhsmadm-green-700));
  animation: mhsmadm-grow 0.7s ease both;
}

.mhsmadm-bar.is-secondary {
  background: linear-gradient(180deg, #f1cb70, var(--mhsmadm-amber));
}

.mhsmadm-bar-labels {
  display: flex;
  justify-content: space-around;
  margin-top: 9px;
  color: #809086;
  font-size: 0.7rem;
}

.mhsmadm-donut-wrap {
  display: grid;
  min-height: 235px;
  place-items: center;
}

.mhsmadm-donut {
  position: relative;
  display: grid;
  width: 160px;
  height: 160px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--mhsmadm-green-600) 0 45%, #e9bb4d 45% 78%, #dce5e1 78% 100%);
}

.mhsmadm-donut::after {
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.mhsmadm-donut strong {
  position: relative;
  color: var(--mhsmadm-green-950);
  font-family: Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  z-index: 1;
}

.mhsmadm-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  color: #6d7e75;
  font-size: 0.75rem;
}

.mhsmadm-legend span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--legend-color, #ccc);
  content: "";
}

.mhsmadm-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--mhsmadm-green-950), var(--mhsmadm-green-800));
  color: #fff;
  box-shadow: var(--mhsmadm-shadow);
}

.mhsmadm-detail-hero h2 {
  margin: 0 0 5px;
  font-family: Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.mhsmadm-detail-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.mhsmadm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mhsmadm-detail-hero .mhsmadm-btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mhsmadm-detail-section {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 66, 49, 0.05);
}

.mhsmadm-detail-section h3 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #dceae3;
  background: var(--mhsmadm-green-50);
  color: var(--mhsmadm-green-900);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.mhsmadm-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.mhsmadm-detail-item {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1fr);
  min-height: 52px;
  border-bottom: 1px solid #edf1ef;
}

.mhsmadm-detail-item:nth-child(odd) {
  border-right: 1px solid #edf1ef;
}

.mhsmadm-detail-item dt,
.mhsmadm-detail-item dd {
  margin: 0;
  padding: 14px 16px;
  font-size: 0.84rem;
}

.mhsmadm-detail-item dt {
  color: #718179;
  font-weight: 600;
}

.mhsmadm-detail-item dd {
  color: #20372c;
}

.mhsmadm-tabs {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  padding: 6px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 12px;
  background: #fff;
}

.mhsmadm-tab {
  min-height: 36px;
  cursor: pointer;
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64766d;
  font-size: 0.81rem;
  white-space: nowrap;
}

.mhsmadm-tab.is-active {
  background: var(--mhsmadm-green-800);
  color: #fff;
}

.mhsmadm-form-card {
  padding: 21px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--mhsmadm-shadow);
}

.mhsmadm-form-card h3 {
  margin: 0 0 18px;
  color: var(--mhsmadm-green-900);
  font-size: 1rem;
  font-weight: 600;
}

.mhsmadm-empty {
  padding: 42px 20px;
  color: var(--mhsmadm-muted);
  text-align: center;
}

.mhsmadm-empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  color: #b3c2bb;
}

.mhsmadm-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mhsmadm-profile-banner {
  padding: 25px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--mhsmadm-green-950), var(--mhsmadm-green-800));
  color: #fff;
}

.mhsmadm-profile-banner h2 {
  margin: 0 0 5px;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
}

.mhsmadm-profile-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.mhsmadm-column-list,
.mhsmadm-field-list {
  display: grid;
  gap: 9px;
}

.mhsmadm-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  border: 1px solid #e1e9e5;
  border-radius: 10px;
  background: #fbfdfc;
}

.mhsmadm-setting-row strong {
  display: block;
  color: #263c31;
  font-size: 0.87rem;
  font-weight: 600;
}

.mhsmadm-setting-row span {
  color: var(--mhsmadm-muted);
  font-size: 0.76rem;
}

.mhsmadm-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
}

.mhsmadm-switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.mhsmadm-switch span {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #ccd8d2;
  transition: 0.2s;
}

.mhsmadm-switch span::before {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  content: "";
  transition: 0.2s;
}

.mhsmadm-switch input:checked + span {
  background: var(--mhsmadm-green-600);
}

.mhsmadm-switch input:checked + span::before {
  transform: translateX(18px);
}

.mhsmadm-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(4, 30, 22, 0.58);
  backdrop-filter: blur(5px);
  z-index: 1100;
}

.mhsmadm-modal.is-open {
  display: grid;
  animation: mhsmadm-fade 0.2s ease both;
}

.mhsmadm-modal-dialog {
  width: min(100%, 650px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  animation: mhsmadm-rise 0.28s ease both;
}

.mhsmadm-modal-head,
.mhsmadm-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--mhsmadm-border);
}

.mhsmadm-modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--mhsmadm-border);
  border-bottom: 0;
}

.mhsmadm-modal-head h3 {
  margin: 0;
  color: var(--mhsmadm-green-950);
  font-size: 1.05rem;
  font-weight: 600;
}

.mhsmadm-modal-body {
  padding: 20px;
}

.mhsmadm-close {
  display: grid;
  width: 36px;
  height: 36px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 9px;
  background: #fff;
  color: #61736a;
  font-size: 1.2rem;
}

.mhsmadm-toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(360px, calc(100% - 40px));
  gap: 9px;
  z-index: 1200;
}

.mhsmadm-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-left: 4px solid var(--mhsmadm-green-600);
  border-radius: 10px;
  background: #fff;
  color: #30473c;
  box-shadow: 0 14px 35px rgba(3, 34, 24, 0.2);
  animation: mhsmadm-slide 0.28s ease both;
}

.mhsmadm-toast.is-error {
  border-left-color: var(--mhsmadm-red);
}

.mhsmadm-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(4, 31, 23, 0.48);
  z-index: 1030;
}

.mhsmadm-overlay.is-visible {
  display: block;
}

.mhsmadm-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mhsmadm-stat-item {
  padding: 16px;
  border: 1px solid var(--mhsmadm-border);
  border-radius: 12px;
  background: #fff;
}

.mhsmadm-stat-item strong {
  display: block;
  color: var(--mhsmadm-green-900);
  font-size: 1.35rem;
  font-weight: 600;
}

.mhsmadm-stat-item span {
  color: var(--mhsmadm-muted);
  font-size: 0.76rem;
}

.mhsmadm-progress-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 2fr) 70px;
  align-items: center;
  gap: 15px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1ef;
}

.mhsmadm-progress-row:last-child {
  border-bottom: 0;
}

.mhsmadm-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ece8;
}

.mhsmadm-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mhsmadm-green-700), #50c38d);
  animation: mhsmadm-grow-x 0.65s ease both;
}

.mhsmadm-progress-row strong {
  color: #294035;
  font-size: 0.85rem;
  font-weight: 600;
}

.mhsmadm-progress-row span:last-child {
  color: var(--mhsmadm-muted);
  font-size: 0.8rem;
  text-align: right;
}

.mhsmadm-hidden {
  display: none !important;
}

@keyframes mhsmadm-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mhsmadm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mhsmadm-slide {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes mhsmadm-grow {
  from { height: 0; }
}

@keyframes mhsmadm-grow-x {
  from { width: 0; }
}

@media (max-width: 1399.98px) {
  .mhsmadm-metrics {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .mhsmadm-filter-bar {
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 991.98px) {
  .mhsmadm-login-shell {
    grid-template-columns: 1fr;
  }

  .mhsmadm-login-brand {
    min-height: 360px;
    padding: 38px 32px;
  }

  .mhsmadm-login-message h1 {
    font-size: 2.7rem;
  }

  .mhsmadm-login-footnote {
    display: none;
  }

  .mhsmadm-sidebar {
    transform: translateX(-100%);
  }

  .mhsmadm-sidebar.is-open {
    transform: translateX(0);
  }

  .mhsmadm-main {
    margin-left: 0;
  }

  .mhsmadm-menu-button {
    display: grid;
  }

  .mhsmadm-grid-2,
  .mhsmadm-settings-grid {
    grid-template-columns: 1fr;
  }

  .mhsmadm-detail-list {
    grid-template-columns: 1fr;
  }

  .mhsmadm-detail-item:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 767.98px) {
  .mhsmadm-login-panel {
    padding: 20px 14px 34px;
  }

  .mhsmadm-login-card {
    padding: 28px 21px;
    border-radius: 18px;
  }

  .mhsmadm-login-brand {
    min-height: 315px;
    padding: 28px 22px;
  }

  .mhsmadm-login-message h1 {
    font-size: 2.15rem;
  }

  .mhsmadm-topbar {
    min-height: 68px;
    padding: 11px 14px;
  }

  .mhsmadm-topbar h1 {
    font-size: 1.15rem;
  }

  .mhsmadm-topbar p,
  .mhsmadm-user-chip span:last-child,
  .mhsmadm-topbar-actions > .mhsmadm-icon-button {
    display: none;
  }

  .mhsmadm-user-chip {
    padding-right: 5px;
  }

  .mhsmadm-content {
    padding: 20px 13px 34px;
  }

  .mhsmadm-page-intro,
  .mhsmadm-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .mhsmadm-page-intro .d-flex {
    width: 100%;
  }

  .mhsmadm-page-intro .mhsmadm-btn {
    flex: 1;
  }

  .mhsmadm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .mhsmadm-metric {
    min-height: 125px;
    padding: 17px;
  }

  .mhsmadm-metric-value {
    font-size: 1.7rem;
  }

  .mhsmadm-filter-bar {
    grid-template-columns: 1fr;
  }

  .mhsmadm-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mhsmadm-progress-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mhsmadm-progress-row span:last-child {
    text-align: left;
  }

  .mhsmadm-detail-item {
    grid-template-columns: 1fr;
  }

  .mhsmadm-detail-item dt {
    padding-bottom: 3px;
  }

  .mhsmadm-detail-item dd {
    padding-top: 3px;
  }
}

@media (max-width: 420px) {
  .mhsmadm-metrics {
    grid-template-columns: 1fr;
  }

  .mhsmadm-stat-strip {
    grid-template-columns: 1fr;
  }
}

@media print {
  .mhsmadm-sidebar,
  .mhsmadm-topbar,
  .mhsmadm-page-intro .d-flex,
  .mhsmadm-filter-bar,
  .mhsmadm-table-actions,
  .mhsmadm-pagination,
  .mhsmadm-toast-container,
  .mhsmadm-detail-actions {
    display: none !important;
  }

  .mhsmadm-main {
    margin: 0;
  }

  .mhsmadm-content {
    padding: 0;
  }

  body.mhsmadm-app {
    background: #fff;
  }

  .mhsmadm-panel,
  .mhsmadm-detail-section,
  .mhsmadm-detail-hero {
    box-shadow: none;
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mhsmadm-app *,
  .mhsmadm-app *::before,
  .mhsmadm-app *::after,
  .mhsmadm-login *,
  .mhsmadm-login *::before,
  .mhsmadm-login *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
