:root {
  --bg: #eaf5ff;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --blue: #2563eb;
  --teal: #06b6d4;
  --mint: #10b981;
  --coral: #fb7185;
  --pink: #f5b8d4;
  --sky: #93c5fd;
  --green: #a7f3d0;
  --amber: #fbbf24;
  --violet: #8b5cf6;
  --indigo: #4f46e5;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --glow: 0 18px 60px rgba(37, 99, 235, 0.2);
  --hero-bg:
    linear-gradient(120deg, rgba(15, 23, 42, 0.96) 0%, rgba(29, 78, 216, 0.94) 42%, rgba(15, 118, 110, 0.94) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px);
  --body-bg:
    linear-gradient(135deg, rgba(79, 70, 229, 0.16), transparent 28%),
    linear-gradient(215deg, rgba(251, 113, 133, 0.18), transparent 29%),
    linear-gradient(45deg, transparent 0 48%, rgba(14, 165, 233, 0.08) 48% 52%, transparent 52%),
    linear-gradient(180deg, #ecfeff 0%, var(--bg) 42%, #fff7ed 100%);
  --card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(251, 113, 133, 0.05));
  --panel-bg: #fff;
  --nav-bg: #fff;
  --nav-color: #075985;
  --table-head-bg: #eff6ff;
  --table-head-color: #334155;
  --theme-radius: 8px;
  --line-card-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(6, 182, 212, 0.92) 50%, rgba(244, 63, 94, 0.92));
  --line-wave-bg: linear-gradient(90deg, #38bdf8, #a78bfa, #fb7185, #fbbf24);
}

body[data-theme="default"] {
  color-scheme: light;
}

body[data-theme="executive"] {
  --bg: #0b1728;
  --card: #10233a;
  --line: rgba(148, 209, 230, 0.2);
  --text: #eaf6ff;
  --muted: #a8bdd2;
  --blue: #22d3ee;
  --teal: #34d399;
  --mint: #10b981;
  --coral: #fb7185;
  --hero-bg:
    linear-gradient(120deg, rgba(7, 16, 30, 0.98), rgba(15, 64, 86, 0.96) 48%, rgba(10, 85, 81, 0.92)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  --body-bg:
    radial-gradient(circle at 82% 0%, rgba(34, 211, 238, 0.2), transparent 28%),
    linear-gradient(135deg, #071524 0%, #0c2035 52%, #102a43 100%);
  --card-bg: linear-gradient(160deg, rgba(16, 35, 58, 0.96), rgba(10, 24, 42, 0.94));
  --panel-bg: rgba(16, 35, 58, 0.96);
  --nav-bg: rgba(16, 35, 58, 0.92);
  --nav-color: #cffafe;
  --table-head-bg: #0e2a44;
  --table-head-color: #e0f2fe;
  --line-card-bg: linear-gradient(135deg, #071524, #0f4056 52%, #0a5551);
  --line-wave-bg: linear-gradient(90deg, #22d3ee, #34d399, #fb7185, #fbbf24);
}

body[data-theme="bright-health"] {
  --bg: #eaf8ff;
  --blue: #0ea5e9;
  --teal: #10b981;
  --mint: #22c55e;
  --coral: #f97316;
  --hero-bg: linear-gradient(120deg, #ffffff, #e5f7ff 52%, #e9fff3);
  --body-bg:
    radial-gradient(circle at 18% 8%, rgba(59, 130, 246, 0.16), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(16, 185, 129, 0.18), transparent 30%),
    linear-gradient(135deg, #e8f7ff 0%, #f0fff7 55%, #fff7e8 100%);
  --card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 253, 246, 0.8));
  --table-head-bg: #e0f2fe;
  --table-head-color: #075985;
  --line-card-bg: linear-gradient(135deg, #0ea5e9, #10b981 56%, #f97316);
  --line-wave-bg: linear-gradient(90deg, #38bdf8, #22c55e, #f97316, #fbbf24);
}

body[data-theme="canva-pop"] {
  --theme-radius: 18px;
  --blue: #2563eb;
  --teal: #06b6d4;
  --mint: #10b981;
  --coral: #fb7185;
  --violet: #8b5cf6;
  --hero-bg: linear-gradient(120deg, #233a91, #2563eb 40%, #06b6d4 72%, #10b981);
  --body-bg: linear-gradient(135deg, #fff1f2 0%, #e0f2fe 35%, #ecfdf5 66%, #fff7ed 100%);
  --card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(240, 249, 255, 0.7));
  --line-card-bg: linear-gradient(135deg, #233a91, #2563eb 42%, #06b6d4 72%, #10b981);
  --line-wave-bg: linear-gradient(90deg, #60a5fa, #8b5cf6, #fb7185, #10b981);
}

body[data-theme="mint-calm"] {
  --bg: #e9fbf4;
  --blue: #0f766e;
  --teal: #14b8a6;
  --mint: #10b981;
  --coral: #fb7185;
  --hero-bg: linear-gradient(120deg, #064e3b, #0f766e 52%, #14b8a6);
  --body-bg: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 52%, #f0fdf4 100%);
  --card-bg: linear-gradient(145deg, #ffffff, #ecfdf5);
  --table-head-bg: #ccfbf1;
  --table-head-color: #0f766e;
  --line-card-bg: linear-gradient(135deg, #064e3b, #0f766e 56%, #14b8a6);
  --line-wave-bg: linear-gradient(90deg, #34d399, #14b8a6, #93c5fd, #fb7185);
}

body[data-theme="sunrise-care"] {
  --bg: #fff7ed;
  --blue: #f97316;
  --teal: #06b6d4;
  --mint: #10b981;
  --coral: #f43f5e;
  --amber: #f59e0b;
  --hero-bg: linear-gradient(120deg, #7c2d12, #f97316 48%, #fb7185);
  --body-bg: radial-gradient(circle at 20% 0%, rgba(251, 146, 60, 0.22), transparent 28%), linear-gradient(135deg, #fff7ed, #fff1f2 55%, #eff6ff);
  --card-bg: linear-gradient(145deg, #ffffff, #fff7ed);
  --table-head-bg: #ffedd5;
  --table-head-color: #9a3412;
  --line-card-bg: linear-gradient(135deg, #7c2d12, #f97316 52%, #fb7185);
  --line-wave-bg: linear-gradient(90deg, #fbbf24, #fb923c, #fb7185, #38bdf8);
}

body[data-theme="violet-modern"] {
  --bg: #f5f3ff;
  --blue: #7c3aed;
  --teal: #06b6d4;
  --mint: #10b981;
  --coral: #ec4899;
  --violet: #8b5cf6;
  --hero-bg: linear-gradient(120deg, #312e81, #7c3aed 56%, #ec4899);
  --body-bg: radial-gradient(circle at 85% 12%, rgba(236, 72, 153, 0.18), transparent 30%), linear-gradient(135deg, #f5f3ff, #eef2ff 50%, #ecfeff);
  --card-bg: linear-gradient(145deg, #ffffff, #f5f3ff);
  --table-head-bg: #ede9fe;
  --table-head-color: #5b21b6;
  --line-card-bg: linear-gradient(135deg, #312e81, #7c3aed 58%, #ec4899);
  --line-wave-bg: linear-gradient(90deg, #a78bfa, #ec4899, #06b6d4, #fbbf24);
}

body[data-theme="ocean-deep"] {
  --bg: #e0f2fe;
  --blue: #0369a1;
  --teal: #0891b2;
  --mint: #14b8a6;
  --coral: #fb7185;
  --hero-bg: linear-gradient(120deg, #082f49, #0369a1 48%, #0f766e);
  --body-bg: linear-gradient(135deg, #e0f2fe, #ecfeff 54%, #f0fdfa);
  --card-bg: linear-gradient(145deg, #ffffff, #e0f2fe);
  --table-head-bg: #bae6fd;
  --table-head-color: #075985;
  --line-card-bg: linear-gradient(135deg, #082f49, #0369a1 52%, #0f766e);
  --line-wave-bg: linear-gradient(90deg, #38bdf8, #0891b2, #14b8a6, #fbbf24);
}

body[data-theme="rose-clinic"] {
  --bg: #fff1f2;
  --blue: #e11d48;
  --teal: #06b6d4;
  --mint: #10b981;
  --coral: #fb7185;
  --pink: #f9a8d4;
  --hero-bg: linear-gradient(120deg, #881337, #e11d48 52%, #fb7185);
  --body-bg: linear-gradient(135deg, #fff1f2, #fdf2f8 50%, #eff6ff);
  --card-bg: linear-gradient(145deg, #ffffff, #fff1f2);
  --table-head-bg: #ffe4e6;
  --table-head-color: #9f1239;
  --line-card-bg: linear-gradient(135deg, #881337, #e11d48 52%, #fb7185);
  --line-wave-bg: linear-gradient(90deg, #fb7185, #f9a8d4, #06b6d4, #fbbf24);
}

body[data-theme="slate-pro"] {
  --bg: #eef2f7;
  --blue: #334155;
  --teal: #0f766e;
  --mint: #10b981;
  --coral: #f97316;
  --hero-bg: linear-gradient(120deg, #0f172a, #334155 54%, #0f766e);
  --body-bg: linear-gradient(135deg, #f8fafc, #e2e8f0 55%, #ecfeff);
  --card-bg: linear-gradient(145deg, #ffffff, #f8fafc);
  --table-head-bg: #e2e8f0;
  --table-head-color: #1e293b;
  --line-card-bg: linear-gradient(135deg, #0f172a, #334155 54%, #0f766e);
  --line-wave-bg: linear-gradient(90deg, #94a3b8, #0f766e, #f97316, #38bdf8);
}

body[data-theme="thai-med"] {
  --bg: #f0fdf4;
  --blue: #0f766e;
  --teal: #0ea5e9;
  --mint: #22c55e;
  --coral: #ef4444;
  --amber: #f59e0b;
  --hero-bg: linear-gradient(120deg, #14532d, #0f766e 48%, #0ea5e9);
  --body-bg: linear-gradient(135deg, #f0fdf4, #e0f2fe 50%, #fff7ed);
  --card-bg: linear-gradient(145deg, #ffffff, #f0fdf4);
  --table-head-bg: #dcfce7;
  --table-head-color: #166534;
  --line-card-bg: linear-gradient(135deg, #14532d, #0f766e 48%, #0ea5e9);
  --line-wave-bg: linear-gradient(90deg, #22c55e, #0ea5e9, #f59e0b, #ef4444);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding-left: 236px;
  background: var(--body-bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body.has-maintenance-admin-banner {
  padding-top: 70px;
}

body.has-news-banner {
  padding-top: 68px;
}

body.has-maintenance-admin-banner.has-news-banner {
  padding-top: 138px;
}

.maintenance-admin-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2147483000;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px 10px calc(236px + 22px);
  color: #fff;
  background: linear-gradient(90deg, #b91c1c, #f97316 48%, #7c2d12);
  box-shadow: 0 16px 40px rgba(124, 45, 18, 0.28);
  font-weight: 900;
}

.maintenance-admin-banner[hidden] {
  display: none;
}

.maintenance-admin-banner span {
  flex: 1;
  font-size: 14px;
  opacity: 0.92;
}

.maintenance-admin-banner button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #9a3412;
  background: #fff;
  font-weight: 950;
  cursor: pointer;
}

.news-ticker {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 13;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 56px;
  align-items: center;
  gap: 14px;
  padding: 9px 22px 9px calc(236px + 22px);
  color: #0f172a;
  background:
    linear-gradient(90deg, #fde047 0%, #fb923c 42%, #fb7185 72%, #60a5fa 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 16px);
  box-shadow:
    0 18px 46px rgba(251, 146, 60, 0.28),
    inset 0 -2px 0 rgba(15, 23, 42, 0.12);
}

body.has-maintenance-admin-banner .news-ticker {
  top: 70px;
}

.news-ticker[hidden] {
  display: none;
}

.news-ticker-label {
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.news-ticker-track {
  overflow: hidden;
  white-space: nowrap;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 18px rgba(255, 255, 255, 0.32);
}

.news-ticker-track span {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  animation: news-marquee 24s linear infinite;
}

@keyframes news-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-ticker-track span {
    padding-left: 0;
    animation: none;
  }
}

body.has-news-banner .app-sidebar {
  top: 78px;
  max-height: calc(100vh - 96px);
}

body.has-maintenance-admin-banner.has-news-banner .app-sidebar {
  top: 148px;
  max-height: calc(100vh - 166px);
}

body.capture-mode .news-ticker {
  display: none;
}

header {
  border-bottom: 0;
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: #fff;
  box-shadow: var(--shadow);
}

header::before {
  content: "";
  position: absolute;
  inset: auto -8% -44px -8%;
  height: 118px;
  background: linear-gradient(90deg, #38bdf8, #a78bfa, #fb7185, #fbbf24);
  clip-path: polygon(0 42%, 17% 22%, 36% 48%, 55% 18%, 76% 44%, 100% 24%, 100% 100%, 0 100%);
  opacity: 0.86;
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0 54px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  max-width: 780px;
  font-size: clamp(32px, 5.5vw, 62px);
  line-height: 1.1;
  text-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

#contractMonitorView .hero h1 {
  max-width: min(1180px, 100%);
  font-size: clamp(40px, 4.7vw, 72px);
  line-height: 1.04;
  text-wrap: balance;
}

#contractMonitorView .hero p {
  max-width: min(1180px, 100%);
}

h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

h3 {
  margin-bottom: 14px;
  font-size: 17px;
}

.eyebrow {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dbeafe;
  padding: 8px 12px;
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.sub {
  margin-top: 14px;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.badges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 260px;
  align-content: flex-start;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  padding: 12px 14px;
  color: #fff;
  backdrop-filter: blur(16px);
  font-size: 12px;
  font-weight: 700;
}

.badge strong {
  display: block;
  color: #fff;
  font-size: 22px;
}

.badges .badge.new-high {
  border-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.42), rgba(245, 158, 11, 0.32));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
}

.badges .badge span {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  background: #fff;
  color: #e11d48;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 950;
}

.badges .badge span[hidden] {
  display: none;
}

.app-sidebar {
  position: fixed;
  z-index: 12;
  top: 18px;
  left: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 200px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--theme-radius);
  background: var(--card-bg);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
  padding: 12px;
  backdrop-filter: blur(18px);
  scrollbar-color: rgba(37, 99, 235, 0.46) rgba(219, 234, 254, 0.55);
  scrollbar-width: thin;
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.sidebar-title-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.sidebar-toggle {
  flex: 0 0 auto;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.6;
}

.nav {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: rgba(37, 99, 235, 0.46) rgba(219, 234, 254, 0.55);
  scrollbar-width: thin;
}

.nav::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 18px;
  margin-top: -18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--card-bg));
  pointer-events: none;
}

.nav::-webkit-scrollbar {
  width: 7px;
}

.nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.55), rgba(6, 182, 212, 0.52));
}

.nav::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.52);
}

.nav button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  width: 100%;
  border: 1px solid #bae6fd;
  background: var(--nav-bg);
  color: var(--nav-color);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.1);
  text-align: left;
  min-height: 58px;
  height: auto;
  padding: 10px 12px;
}

.nav-label {
  display: block;
  min-width: 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.nav button svg {
  justify-self: center;
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

.nav button.active {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

#commandCenterNav {
  grid-template-columns: 28px minmax(0, 1fr);
  justify-content: stretch;
  gap: 8px;
  min-height: 66px;
  padding: 10px;
}

#commandCenterNav svg {
  width: 25px;
  height: 25px;
}

.command-center-label {
  display: grid;
  gap: 1px;
  line-height: 1.08;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  font-size: clamp(13px, 0.72vw, 15px);
  text-wrap: balance;
}

.command-center-label span {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
}

.account-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(186, 230, 253, 0.92);
  border-radius: 9px;
  background: var(--card-bg);
  padding: 10px;
  color: var(--text);
}

.account-panel[hidden] {
  display: none;
}

.account-panel span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.account-panel strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.account-panel small {
  color: #2563eb;
  font-size: 11px;
  font-weight: 850;
}

.account-panel .actions {
  display: grid;
  grid-template-columns: 1fr;
}

.account-panel button {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.pwa-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(186, 230, 253, 0.86);
  border-radius: 12px;
  background:
    radial-gradient(circle at 88% 16%, rgba(34, 211, 238, 0.22), transparent 46%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.82));
  padding: 10px;
  color: var(--text);
}

.pwa-panel span {
  color: #075985;
  font-size: 12px;
  font-weight: 950;
}

.pwa-panel small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.pwa-panel button {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.sidebar-version {
  display: grid;
  gap: 1px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.82);
  padding: 7px 9px;
  color: rgba(15, 23, 42, 0.58);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.sidebar-version strong {
  color: rgba(37, 99, 235, 0.86);
  font-size: 11px;
  line-height: 1.2;
}

.sidebar-version span {
  color: rgba(15, 23, 42, 0.4);
  font-style: italic;
}

body.sidebar-collapsed {
  padding-left: 88px;
}

body.sidebar-collapsed .maintenance-admin-banner {
  padding-left: calc(88px + 22px);
}

body.sidebar-collapsed .news-ticker {
  padding-left: calc(88px + 22px);
}

body.sidebar-collapsed .app-sidebar {
  width: 58px;
  padding: 10px;
}

body.sidebar-collapsed .sidebar-title,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .account-panel,
body.sidebar-collapsed .pwa-panel,
body.sidebar-collapsed .sidebar-version {
  display: none;
}

body.sidebar-collapsed .nav button {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 0;
}

body.capture-mode {
  padding-left: 0;
}

body.capture-mode .app-sidebar {
  display: none;
}

main {
  display: grid;
  gap: 24px;
  padding: 26px 0 48px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--theme-radius);
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--coral), var(--amber));
}

main > .card:first-child {
  border: 0;
  margin-top: -42px;
  background: var(--card-bg);
  box-shadow: var(--glow);
}

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

.compact-filters {
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(186, 230, 253, 0.84);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.86), rgba(255, 255, 255, 0.74));
}

.compact-filters .actions {
  align-self: end;
}

.input-group {
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.76)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent);
  padding: 16px;
}

.input-group + .input-group {
  margin-top: 14px;
}

.input-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 16px;
}

.group-index {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.computed-field input {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
  font-size: 18px;
  font-weight: 900;
}

.reporter-display {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.reporter-display strong {
  display: flex;
  min-height: 43px;
  align-items: center;
  border: 1px solid #bae6fd;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.9)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.08));
  padding: 10px 11px;
  color: #0f172a;
  font-size: 15px;
}

.dashboard-settings {
  margin-top: 14px;
  border: 1px solid rgba(186, 230, 253, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.82)),
    linear-gradient(90deg, rgba(139, 92, 246, 0.09), transparent);
  padding: 12px;
}

.news-preview {
  border: 1px solid rgba(186, 230, 253, 0.92);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 254, 255, 0.84));
  padding: 12px;
}

.news-preview strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
}

.news-preview-bar {
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #fde047, #fb923c, #fb7185, #60a5fa);
  color: #0f172a;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(251, 146, 60, 0.18);
}

.push-admin-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 94% 10%, rgba(14, 165, 233, 0.18), transparent 130px),
    linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.11);
}

.push-admin-panel strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
}

.push-admin-panel p {
  margin: 4px 0 0;
  color: #526174;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.push-admin-status {
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
}

.push-admin-status.ready {
  border-color: rgba(16, 185, 129, 0.26);
  background: rgba(236, 253, 245, 0.92);
  color: #047857;
}

.push-admin-status.warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.94);
  color: #b45309;
}

.push-admin-status.error {
  border-color: rgba(244, 63, 94, 0.24);
  background: rgba(255, 241, 242, 0.94);
  color: #be123c;
}

.push-message-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  gap: 12px;
}

.push-image-field {
  grid-column: 1 / -1;
}

.push-image-field small {
  color: #64748b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.push-template-panel,
.push-delivery-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.16), transparent 120px),
    rgba(255, 255, 255, 0.72);
}

.push-delivery-panel {
  border-color: rgba(134, 239, 172, 0.72);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.14), transparent 120px),
    rgba(255, 255, 255, 0.76);
}

.push-template-list,
.push-delivery-list {
  display: grid;
  gap: 9px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.push-template-empty {
  padding: 14px;
  border: 1px dashed rgba(14, 165, 233, 0.34);
  border-radius: 14px;
  color: #64748b;
  font-weight: 850;
  text-align: center;
}

.push-template-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(191, 219, 254, 0.86);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.08);
}

.push-template-item strong {
  font-size: 14px;
}

.push-template-item p {
  margin: 3px 0 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.push-template-item small {
  display: block;
  margin-top: 4px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 850;
  word-break: break-all;
}

.push-template-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.push-template-actions button {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 12px;
}

.push-delivery-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(191, 219, 254, 0.86);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.08);
}

.push-delivery-item.ready {
  border-color: rgba(134, 239, 172, 0.92);
}

.push-delivery-item.warning {
  border-color: rgba(253, 224, 71, 0.95);
  background: rgba(255, 251, 235, 0.96);
}

.push-delivery-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.push-delivery-head strong {
  display: block;
  font-size: 14px;
}

.push-delivery-head p,
.push-delivery-image,
.push-delivery-item time {
  margin: 3px 0 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.push-delivery-head span {
  align-self: start;
  border: 1px solid rgba(147, 197, 253, 0.84);
  border-radius: 999px;
  padding: 5px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.push-delivery-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.push-delivery-metrics b {
  display: block;
  border-radius: 12px 12px 4px 4px;
  background: rgba(219, 234, 254, 0.82);
  color: #0f172a;
  padding: 7px 8px 2px;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.push-delivery-metrics small {
  display: block;
  border-radius: 4px 4px 12px 12px;
  background: rgba(219, 234, 254, 0.52);
  color: #64748b;
  padding: 1px 8px 7px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.push-delivery-errors {
  display: grid;
  gap: 5px;
}

.push-delivery-errors span {
  border-radius: 10px;
  background: rgba(254, 226, 226, 0.8);
  color: #991b1b;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 850;
}

.push-device-log {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(186, 230, 253, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
}

.push-device-log[hidden] {
  display: none;
}

.compact-toolbar {
  gap: 10px;
  align-items: center;
}

.compact-toolbar p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
}

.compact-table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid rgba(191, 219, 254, 0.86);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
}

.compact-table-wrap table {
  min-width: 900px;
}

.push-device-log td,
.push-device-log th {
  font-size: 12px;
  vertical-align: top;
}

.device-user-cell strong,
.device-meta-cell strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.device-user-cell span,
.device-meta-cell span,
.device-endpoint-cell {
  color: #64748b;
  font-weight: 760;
}

.device-endpoint-cell {
  max-width: 220px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.push-message-grid label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 950;
}

.push-message-grid input {
  width: 100%;
}

.notification-bell {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(135deg, #2563eb, #06b6d4 58%, #22c55e);
  color: #fff;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}

.notification-bell svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.6;
}

.notification-bell.has-unread {
  animation: bellPulse 1.7s ease-in-out infinite;
}

.notification-bell span {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

@keyframes bellPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}

.notification-center-card {
  width: min(620px, calc(100vw - 24px));
}

.notification-center-empty {
  border: 1px dashed rgba(125, 211, 252, 0.86);
  border-radius: 16px;
  background: rgba(240, 249, 255, 0.86);
  color: #075985;
  font-weight: 900;
  padding: 18px;
  text-align: center;
}

.notification-center-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.notification-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(186, 230, 253, 0.94);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.14), transparent 120px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.86));
  padding: 13px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

.notification-item-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  font-size: 21px;
}

.notification-item strong,
.notification-item p,
.notification-item span {
  display: block;
}

.notification-item strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.notification-item p {
  margin: 5px 0;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.notification-item span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
}

.settings-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #bae6fd;
  background: #fff;
  color: #075985;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.08);
}

.settings-toggle span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.settings-panel {
  margin-top: 12px;
}

.settings-panel[hidden] {
  display: none;
}

.settings-panel .notice {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 11px;
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input[readonly] {
  cursor: default;
  color: #4f6380;
  background: linear-gradient(135deg, #eef7ff 0%, #f8fbff 100%);
  border-color: rgba(78, 161, 255, 0.34);
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: default;
  color: #4f6380;
  background: linear-gradient(135deg, #eef7ff 0%, #f8fbff 100%);
  border-color: rgba(78, 161, 255, 0.34);
  opacity: 1;
}

.is-readonly .checkbox-field,
.is-readonly .contract-fieldset {
  background: linear-gradient(135deg, rgba(239, 247, 255, 0.72), rgba(248, 251, 255, 0.88));
}

input:focus,
select:focus,
textarea:focus {
  border-color: #38bdf8;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 50px;
}

.password-field button {
  position: absolute;
  right: 6px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: none;
}

.password-field button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.password-field button:hover {
  box-shadow: none;
  filter: none;
  transform: none;
}

button {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  padding: 10px 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

button:hover {
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
  filter: saturate(1.08);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
  filter: grayscale(0.25);
  transform: none;
}

button:disabled:hover {
  box-shadow: none;
  filter: grayscale(0.25);
  transform: none;
}

button.secondary {
  border: 1px solid #bae6fd;
  background: #fff;
  color: #075985;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.1);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.download-button:hover {
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.download-button.secondary {
  border: 1px solid #bae6fd;
  background: #fff;
  color: #075985;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.1);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar .badge {
  border-color: #bae6fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-select {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.inline-select select {
  width: auto;
  min-width: 132px;
  padding: 8px 10px;
  border-color: #bae6fd;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
}

.trend-custom-range input {
  width: 142px;
  padding: 8px 10px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.hospital-dashboard-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hospital-dashboard-stats .hospital-name-stat {
  grid-column: 1 / -1;
  min-height: 136px;
  padding: 24px 118px 24px 28px;
  border-color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, 0.44) 0 0.1px, transparent 96px),
    radial-gradient(circle at 10% 100%, rgba(251, 191, 36, 0.34) 0 0.1px, transparent 150px),
    linear-gradient(125deg, var(--blue) 0%, var(--teal) 48%, var(--coral) 100%);
  box-shadow:
    0 28px 72px rgba(37, 99, 235, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #fff;
}

.hospital-dashboard-stats .hospital-name-stat::before {
  width: 0;
}

.hospital-dashboard-stats .hospital-name-stat .stat-icon {
  right: 24px;
  top: 24px;
  width: 70px;
  height: 70px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 8px);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.hospital-dashboard-stats .hospital-name-stat .stat-icon svg {
  width: 38px;
  height: 38px;
}

.hospital-dashboard-stats .hospital-name-stat span,
.hospital-dashboard-stats .hospital-name-stat strong,
.hospital-dashboard-stats .hospital-name-stat small {
  color: #fff;
}

.hospital-dashboard-stats .hospital-name-stat strong {
  max-width: 100%;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.hospital-dashboard-stats .hospital-name-stat small {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 7px 10px;
  backdrop-filter: blur(12px);
}

.stat {
  position: relative;
  min-height: 132px;
  padding: 18px 82px 18px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--theme-radius);
  background:
    radial-gradient(circle at 85% 16%, var(--accent, #60a5fa) 0 0.1px, transparent 58px),
    linear-gradient(135deg, #ffffff 0%, var(--accent-soft, #eff6ff) 100%);
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.12);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.stat:hover {
  box-shadow: 0 26px 62px rgba(15, 23, 42, 0.16);
  transform: translateY(-3px);
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--accent, var(--blue)), var(--accent-strong, #0f172a));
}

.stat::after {
  content: none;
}

.stat-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent-soft, #dbeafe), rgba(255, 255, 255, 0.42)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0 2px, transparent 2px 7px);
  color: var(--accent, var(--blue));
}

.stat-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.stat strong {
  display: block;
  margin-top: 18px;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

#contractMonitorStats {
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 20px;
}

#contractMonitorStats .stat {
  min-height: 250px;
  padding: 30px 28px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  gap: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  background:
    radial-gradient(circle at 91% 18%, rgba(255, 255, 255, 0.92) 0 0.1px, transparent 92px),
    radial-gradient(circle at 78% 36%, var(--accent-soft, #dbeafe), transparent 168px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, var(--accent-soft, #eff6ff) 100%);
  box-shadow:
    0 26px 68px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#contractMonitorStats .stat::before {
  width: 6px;
  border-radius: 18px 0 0 18px;
}

#contractMonitorStats .stat-icon {
  position: static;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  opacity: 0.98;
  box-shadow:
    0 18px 40px rgba(37, 99, 235, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

#contractMonitorStats .stat-icon svg {
  width: 42px;
  height: 42px;
}

#contractMonitorStats .stat strong {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 10px;
  max-width: 100%;
}

#contractMonitorStats .stat > span {
  grid-column: 1;
  max-width: 100%;
  color: #334155;
  font-size: clamp(17px, 1.1vw, 21px);
  font-weight: 950;
  line-height: 1.18;
}

#contractMonitorStats .stat small {
  grid-column: 1 / -1;
  max-width: 100%;
  margin-top: 6px;
  color: #475569;
  font-size: clamp(14px, 0.92vw, 16px);
  font-weight: 900;
  line-height: 1.3;
}

#contractMonitorStats .stat strong:not(.contract-stat-value) {
  color: #0f172a;
  font-size: clamp(64px, 5.4vw, 94px);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.contract-stat-value {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 22px;
  color: #0f172a;
  font-size: clamp(74px, 6.2vw, 112px);
  line-height: 0.82;
  letter-spacing: 0;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

#contractMonitorStats .contract-stat-value span,
#contractMonitorStats .contract-stat-value em {
  display: inline-block;
}

#contractMonitorStats .contract-stat-value span {
  color: #0f172a;
  font-size: 1em;
  font-weight: 950;
  line-height: 0.82;
  white-space: nowrap;
  min-width: 0;
}

#contractMonitorStats .contract-stat-value em {
  color: #475569;
  font-size: clamp(20px, 1.35vw, 28px);
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  padding: 0 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.install-onepage {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(96, 165, 250, 0.36), transparent 190px),
    radial-gradient(circle at 86% 0%, rgba(45, 212, 191, 0.24), transparent 220px),
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.install-onepage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(186, 230, 253, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(6, 182, 212, 0.88)),
    var(--hero-bg);
  padding: 24px;
  color: #fff;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.22);
}

.install-kicker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 950;
}

.install-onepage-hero h3 {
  margin-top: 10px;
  color: #fff;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
}

.install-onepage-hero p {
  max-width: 720px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 850;
  line-height: 1.5;
}

.install-onepage-hero button {
  min-width: 210px;
  border-color: rgba(255, 255, 255, 0.58);
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.install-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.install-critical-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  border: 2px solid rgba(249, 115, 22, 0.95);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 10%, rgba(239, 68, 68, 0.16), transparent 130px),
    radial-gradient(circle at 96% 8%, rgba(251, 191, 36, 0.28), transparent 120px),
    linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.94));
  padding: 14px 16px;
  color: #78350f;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.14);
}

.install-critical-note b {
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.install-critical-note span {
  color: #92400e;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.55;
}

.install-critical-note em {
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #fff;
  padding: 2px 8px;
  font-style: normal;
  white-space: nowrap;
}

.install-guide-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(186, 230, 253, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  padding: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.install-platform-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

.install-platform-icon svg {
  width: 36px;
  height: 36px;
}

.install-guide-card.ios .install-platform-icon {
  background: linear-gradient(135deg, #0f172a, #64748b);
}

.install-guide-card.notify .install-platform-icon {
  background: linear-gradient(135deg, #fb7185, #f59e0b);
}

.install-guide-card b {
  display: block;
  color: #0f172a;
  font-size: 18px;
  margin-bottom: 8px;
}

.install-guide-card ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
}

.install-guide-card li.install-important-step {
  margin-top: 5px;
  border: 1px solid rgba(249, 115, 22, 0.76);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  color: #7c2d12;
  padding: 8px 10px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.12);
}

.install-onepage-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  border: 1px solid rgba(186, 230, 253, 0.88);
  border-radius: 16px;
  background: rgba(240, 249, 255, 0.86);
  padding: 12px 14px;
  color: #075985;
  font-weight: 900;
}

.stat.new-high {
  border-color: rgba(251, 191, 36, 0.82);
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.88) 0 0.1px, transparent 64px),
    linear-gradient(135deg, #fff7ed 0%, #fef3c7 48%, #ffe4e6 100%);
  box-shadow:
    0 24px 70px rgba(249, 115, 22, 0.28),
    0 0 0 1px rgba(251, 191, 36, 0.24);
}

.stat-badge {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d48, #f59e0b);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.24);
}

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

.grid2 .card,
.split .card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(251, 113, 133, 0.08));
}

.donut-wrap {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(180px, 0.8fr);
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 360px;
}

.donut-stage {
  position: relative;
  width: min(560px, 100%);
  min-height: 360px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.donut {
  position: relative;
  z-index: 1;
  width: min(260px, 54vw);
  height: min(260px, 54vw);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--sky) 0 94%, var(--pink) 94% 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 18px 36px rgba(37, 99, 235, 0.18),
    0 0 0 12px rgba(255, 255, 255, 0.56);
}

.donut::after {
  content: attr(data-total);
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: white;
  color: #475569;
  text-align: center;
  font-weight: 800;
  font-size: 20px;
}

.region-callouts {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.region-callouts path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.region-callouts text {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.region-callouts .callout-card {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(226, 232, 240, 0.95);
  stroke-width: 1;
  filter: drop-shadow(0 9px 18px rgba(15, 23, 42, 0.11));
}

.region-callouts .callout-value {
  fill: #475569;
  font-size: 12px;
  font-weight: 800;
}

.legend {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.legend div {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  padding: 8px 10px;
  justify-content: space-between;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 18px;
  align-items: center;
}

.service-donut-panel {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 300px;
}

.service-donut {
  display: grid;
  width: min(260px, 70vw);
  height: min(260px, 70vw);
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 18px 40px rgba(15, 23, 42, 0.12),
    0 0 0 12px rgba(255, 255, 255, 0.56);
}

.service-donut::after {
  content: attr(data-total);
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  font-size: 27px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.service-donut.has-svg::after {
  content: none;
}

.service-donut svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.service-legend {
  display: grid;
  width: min(320px, 100%);
  gap: 8px;
}

.service-legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.service-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 12%, var(--service-glow), transparent 88px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  padding: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--service-color);
}

.service-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.service-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--service-soft);
  color: var(--service-color);
}

.service-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.4;
}

.service-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.service-card strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
}

.service-card small {
  display: block;
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.service-track {
  margin-top: 14px;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.service-fill {
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: var(--service-color);
  box-shadow: inset -12px 0 18px rgba(255, 255, 255, 0.18);
}

.bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar-row b:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track {
  height: 30px;
  overflow: hidden;
  border-radius: 6px;
  background: #e0f2fe;
}

.bar {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  background: var(--sky);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset -14px 0 20px rgba(255, 255, 255, 0.18);
}

.full-width-card {
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid #eef2f7;
  padding: 11px 10px;
  text-align: left;
}

th {
  background: var(--table-head-bg);
  color: var(--table-head-color);
}

td.num,
th.num {
  text-align: right;
}

th.action-col,
td.action-col {
  width: 54px;
  min-width: 54px;
  text-align: center;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #e0f2fe);
  color: #075985;
  padding: 0;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.icon-button:hover {
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  transform: translateY(-1px);
}

.icon-button.line-action {
  border-color: #86efac;
  background: linear-gradient(135deg, #ffffff, #dcfce7);
  color: #166534;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.14);
}

.icon-button.line-action:hover {
  background: linear-gradient(135deg, #dcfce7, #ccfbf1);
}

.icon-button.danger-action {
  border-color: #fecdd3;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  color: #be123c;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.14);
}

.icon-button.danger-action:hover {
  background: linear-gradient(135deg, #ffe4e6, #fed7aa);
}

tbody tr:nth-child(even) {
  background: #fff7ed;
}

tbody tr:hover {
  background: #ecfeff;
}

.highlight-table {
  border: 0;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.12);
}

.highlight-table th {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
}

.highlight-table tbody tr:nth-child(3n + 1) {
  background: #eff6ff;
}

.highlight-table tbody tr:nth-child(3n + 2) {
  background: #ecfdf5;
}

.highlight-table tbody tr:nth-child(3n) {
  background: #fff7ed;
}

.highlight-table td:first-child {
  font-weight: 800;
  color: #1d4ed8;
}

.trend-card {
  min-height: 340px;
}

.trend-chart {
  width: 100%;
  min-height: 290px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 18px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  align-items: stretch;
}

.admin-layout > .card {
  min-height: 0;
}

.user-admin-layout {
  grid-template-columns: 1fr;
  align-items: start;
}

.admin-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.user-form-stack {
  grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr);
  align-items: start;
  gap: 12px;
}

.user-form-stack .card {
  padding: 18px;
}

.user-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reset-password-card .toolbar {
  gap: 10px;
}

.reset-password-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reset-password-card .notice {
  font-size: 12px;
  padding: 9px 10px;
}

.master-settings {
  display: grid;
  gap: 16px;
}

.master-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.master-summary-item {
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 254, 255, 0.82)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.1), transparent);
  padding: 14px;
}

.master-summary-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.master-summary-item strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.master-setting-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(251, 113, 133, 0.07));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.master-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  padding: 14px 16px;
}

.master-setting-head h3 {
  margin: 0;
}

.master-setting-body {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.master-editor {
  border: 1px solid rgba(186, 230, 253, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.master-list {
  min-width: 0;
}

.master-list table {
  min-width: 0;
  table-layout: fixed;
}

.master-list th,
.master-list td {
  padding: 10px 8px;
}

.master-list th.action-col,
.master-list td.action-col {
  width: 54px;
}

.master-list th:nth-child(2),
.master-list td:nth-child(2) {
  width: 48%;
}

.master-list th:nth-child(3),
.master-list td:nth-child(3) {
  width: 32%;
}

.checkbox-field {
  display: grid;
  grid-column: span 2;
  gap: 9px;
  margin: 0;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  padding: 12px;
}

.checkbox-field legend {
  padding: 0 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.checkbox-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.checkbox-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  justify-items: start;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #f8fafc),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent);
  padding: 12px;
  color: #0f172a;
  font-weight: 850;
  line-height: 1.18;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.checkbox-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.checkbox-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.55);
  background:
    linear-gradient(135deg, #dbeafe, #ecfeff),
    linear-gradient(90deg, rgba(251, 113, 133, 0.16), transparent);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.checkbox-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.dashboard-multi-filter,
.dashboard-sitecontrol-filter {
  grid-column: span 2;
  align-self: stretch;
  max-height: 210px;
  overflow: auto;
}

.dashboard-multi-filter .checkbox-options,
.dashboard-sitecontrol-filter .checkbox-options {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.dashboard-multi-filter .checkbox-option,
.dashboard-sitecontrol-filter .checkbox-option {
  min-height: 44px;
  padding: 9px 10px;
  font-size: 13px;
}

.multi-filter-dropdown {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
  z-index: 1;
}

.multi-filter-label {
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.multi-filter-menu {
  position: relative;
}

.multi-filter-dropdown:has(.multi-filter-menu[open]) {
  z-index: 2147481000;
}

.card:has(.multi-filter-menu[open]),
.filters:has(.multi-filter-menu[open]) {
  overflow: visible;
  position: relative;
  z-index: 2147480000;
}

.multi-filter-menu summary {
  display: flex;
  min-height: 46px;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 900;
}

.multi-filter-menu summary::-webkit-details-marker {
  display: none;
}

.multi-filter-menu summary::after {
  content: "⌄";
  color: #2563eb;
  font-size: 16px;
  font-weight: 950;
}

.multi-filter-menu[open] summary {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.multi-filter-panel {
  position: absolute;
  z-index: 2147481100;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 10px;
  min-width: min(420px, 86vw);
  max-height: min(380px, calc(100vh - 180px));
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.95);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.14), transparent 120px),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
  padding: 12px;
}

.multi-filter-search {
  min-height: 42px;
}

.multi-filter-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.single-filter-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.multi-filter-actions button {
  min-height: 38px;
  padding: 8px 10px;
}

.multi-filter-options {
  display: grid;
  max-height: 240px;
  overflow: auto;
  gap: 7px;
  padding-right: 4px;
}

.multi-filter-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 9px 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.multi-filter-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.multi-filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-filter-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}

.import-panel {
  display: grid;
  gap: 16px;
}

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

.import-file {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  padding: 14px;
}

.import-file span {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.import-result {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: #334155;
  padding: 14px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.65;
}

.import-result strong {
  color: #0f172a;
  font-size: 18px;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.export-tile {
  display: grid;
  gap: 10px;
  align-content: space-between;
  min-height: 128px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #f0f9ff),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent);
  padding: 14px;
}

.export-tile strong {
  color: #0f172a;
  font-size: 15px;
}

.export-tile span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

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

.report-summary-card {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.86));
  color: #fff;
  padding: 14px;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.18);
}

.report-summary-card span {
  display: block;
  font-size: 12px;
  font-weight: 850;
  opacity: 0.86;
}

.report-summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 28px;
  line-height: 1;
}

.report-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.report-card .table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.report-card .table-wrap table {
  min-width: 920px;
}

.report-card .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9);
}

.admin-scroll-table {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.admin-scroll-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9);
}

.hospital-scroll-table {
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  max-height: none;
  width: 100%;
  overflow: auto;
}

.hospital-list-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  height: 100%;
}

.hospital-list-card .filters {
  flex: 0 0 auto;
}

.hospital-scroll-table table {
  width: 100%;
  min-width: 1280px;
}

.hospital-scroll-table th,
.hospital-scroll-table td {
  vertical-align: top;
}

.hospital-scroll-table th:nth-child(2),
.hospital-scroll-table td:nth-child(2) {
  min-width: 240px;
}

.hospital-scroll-table th:nth-child(8),
.hospital-scroll-table td:nth-child(8),
.hospital-scroll-table th:nth-child(9),
.hospital-scroll-table td:nth-child(9) {
  min-width: 160px;
}

.report-card .export-grid {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.usage-online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #047857;
  font-weight: 900;
}

.usage-online::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.usage-offline {
  color: #64748b;
  font-weight: 850;
}

.executive-progress-list {
  display: grid;
  gap: 12px;
}

.executive-progress-item {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 254, 255, 0.84)),
    #fff;
  padding: 12px;
}

.executive-progress-item .toolbar {
  margin-bottom: 10px;
}

.executive-progress-item h5 {
  margin: 0;
  color: #075985;
  font-size: 14px;
}

.executive-progress-detail {
  min-height: 118px;
}

.confirm-line {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
  padding: 12px;
  color: #9f1239;
  font-weight: 900;
}

.confirm-line input {
  width: 18px;
  height: 18px;
  accent-color: #e11d48;
}

.admin-menu-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.admin-menu-group {
  border: 1px solid rgba(186, 230, 253, 0.92);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.78));
  padding: 12px;
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.08);
}

.admin-menu-group[hidden] {
  display: none;
}

.admin-menu-group.active {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.12);
}

.admin-menu-group-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.admin-menu-group-head span {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.admin-menu-group-head small {
  color: #64748b;
  font-weight: 850;
  text-align: right;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tabs button {
  border: 1px solid #bae6fd;
  background: #fff;
  color: #075985;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.1);
}

.admin-tabs button.active {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
}

.admin-section[hidden] {
  display: none;
}

.permission-matrix-wrap {
  display: grid;
  gap: 18px;
}

.permission-group {
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.9));
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.permission-group h4 {
  margin: 0;
  padding: 14px 16px;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(219,234,254,.9), rgba(207,250,254,.72));
}

.permission-table-wrap {
  overflow-x: auto;
}

.permission-table {
  min-width: 860px;
}

.permission-table th {
  background: #f8fafc;
  color: #334155;
  text-align: center;
}

.permission-table td:first-child,
.permission-table th:first-child {
  text-align: left;
  min-width: 220px;
}

.permission-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}

.permission-check input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.permission-check.disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.theme-option {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 148px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--card-bg);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  padding: 12px;
  text-align: left;
}

.theme-option.active {
  border-color: var(--blue);
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.18);
}

.theme-preview {
  overflow: hidden;
  height: 62px;
  border-radius: 8px;
  background: var(--preview-bg);
}

.theme-preview::after {
  content: "";
  display: block;
  width: 74%;
  height: 12px;
  margin: 38px 10px 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.theme-option strong {
  color: var(--text);
  font-size: 14px;
}

.theme-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.admin-gate {
  display: grid;
  max-width: 460px;
  gap: 12px;
}

.notice {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  color: #075985;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
}

.notice.success {
  border-color: #86efac;
  background: linear-gradient(135deg, #dcfce7, #ecfeff);
  color: #166534;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 18px;
  top: 18px;
  max-width: min(360px, calc(100% - 36px));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(29, 78, 216, 0.94));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  color: #fff;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 18px;
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.94)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(251, 113, 133, 0.1));
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.28);
  padding: 20px;
}

.news-popup-card {
  width: min(560px, 100%);
  border: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(253, 224, 71, 0.7), transparent 34%),
    radial-gradient(circle at 88% 16%, rgba(96, 165, 250, 0.52), transparent 36%),
    linear-gradient(135deg, #ffffff, #eff6ff 48%, #ecfeff);
  text-align: center;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.34);
}

.news-popup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #fb7185, #2563eb);
  color: #fff;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.22);
}

.news-popup-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: clamp(24px, 4vw, 34px);
}

.news-popup-card p {
  margin: 0 auto 20px;
  max-width: 480px;
  color: #1e293b;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.65;
  white-space: pre-wrap;
}

.news-popup-card .actions {
  justify-content: center;
}

#helpView .admin-documentation-block {
  display: none !important;
}

.modal-snooze-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 4px auto 16px;
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 850;
}

.modal-snooze-option input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.pwa-install-card {
  width: min(680px, 100%);
}

.pwa-steps {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pwa-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(186, 230, 253, 0.88);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.84));
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.pwa-step-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

.pwa-step strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 4px;
}

.pwa-step span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.line-summary-text {
  width: 100%;
  min-height: 260px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px;
  font: 800 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.line-image-modal .modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.line-image-card {
  position: relative;
  overflow: hidden;
  width: min(620px, 100%);
  margin: 0 auto;
  border-radius: 18px;
  background:
    var(--line-card-bg),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  color: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  padding: 22px;
}

.line-image-card::after {
  content: "";
  position: absolute;
  inset: auto -12% -70px -12%;
  height: 150px;
  background: var(--line-wave-bg);
  clip-path: polygon(0 40%, 18% 18%, 38% 48%, 56% 20%, 76% 46%, 100% 22%, 100% 100%, 0 100%);
  opacity: 0.9;
}

.line-image-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.line-image-head {
  display: grid;
  gap: 7px;
}

.line-image-kicker {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 950;
}

.line-image-head h3 {
  color: #fff;
  font-size: 30px;
  line-height: 1.15;
}

.line-image-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-image-meta span {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.line-total-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.line-total-card span,
.line-mini-card span,
.line-section-title {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.line-total-card strong {
  display: block;
  color: #fff;
  font-size: 54px;
  line-height: 1;
}

.line-service-grid,
.line-call-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.line-call-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.line-mini-card {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 12px;
}

.line-mini-card span {
  color: #475569;
}

.line-mini-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.line-mini-card small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.line-note-card {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.26);
  padding: 13px;
}

.line-note-card p {
  margin-top: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.55;
}

.line-image-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 850;
}

.line-watermark {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.32);
  font-size: 10px;
  font-style: italic;
  font-weight: 750;
  letter-spacing: 0;
  text-shadow: none;
}

.executive-report-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: stretch;
}

.executive-report-panel {
  position: sticky;
  top: 18px;
}

.executive-line-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.executive-site-control-line-card {
  margin-top: 18px;
}

.executive-site-control-report-text {
  min-height: 520px;
}

.executive-summary-preview {
  display: grid;
  gap: 12px;
}

.executive-metric {
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 10%, rgba(251, 113, 133, 0.18), transparent 92px),
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.95));
  padding: 14px;
}

.executive-metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.executive-metric strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
}

.executive-report-text {
  flex: 1 1 auto;
  height: auto;
  min-height: 680px;
  border: 1px solid rgba(147, 197, 253, 0.9);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  color: #0f172a;
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dashboard-watermark {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  padding: 0 4px 2px;
  color: rgba(15, 23, 42, 0.24);
  font-size: 11px;
  font-style: italic;
  font-weight: 750;
  letter-spacing: 0;
  pointer-events: none;
  user-select: none;
}

.line-caption {
  width: 100%;
  min-height: 260px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  color: #0f172a;
  font-weight: 800;
  resize: vertical;
}

button.loading {
  cursor: wait;
  filter: saturate(0.95);
  opacity: 0.82;
}

button.loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-top-color: #fff;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: -2px;
  animation: telemed-spin 720ms linear infinite;
}

@keyframes telemed-spin {
  to {
    transform: rotate(360deg);
  }
}

.danger-zone {
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
  padding: 12px;
}

.danger {
  background: linear-gradient(135deg, #e11d48, #f97316);
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.24);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-wait {
  background: #fef3c7;
  color: #92400e;
}

.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.status-warning {
  background: #fef3c7;
  color: #92400e;
}

.status-danger {
  background: #ffe4e6;
  color: #be123c;
}

.contract-fieldset {
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 12px;
  background:
    radial-gradient(circle at 96% 0%, rgba(45, 212, 191, 0.18), transparent 120px),
    linear-gradient(135deg, rgba(240, 249, 255, 0.84), rgba(255, 255, 255, 0.94));
  padding: 14px;
}

.contract-fieldset legend {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  padding: 0 8px;
}

.contract-period-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.contract-period-toolbar strong,
.contract-period-toolbar span {
  display: block;
}

.contract-period-toolbar span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.contract-period-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.contract-period-item {
  border: 1px solid rgba(186, 230, 253, 0.92);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.9));
  color: #0f172a;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 10px 12px;
  text-align: left;
}

.contract-period-item.active {
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16);
}

.contract-period-item b {
  font-size: 14px;
}

.contract-period-item span,
.contract-period-item small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.contract-period-remove {
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 10px;
  background: #fff1f2;
  color: #be123c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  margin-top: 4px;
  padding: 6px 8px;
}

.contract-monthly-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 254, 255, 0.86));
  color: #075985;
  padding: 11px 12px;
  font-weight: 950;
}

.contract-monthly-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: #0ea5e9;
}

.contract-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.contract-preview {
  grid-column: 1 / -1;
  min-height: auto;
  display: grid;
  gap: 8px;
}

.contract-preview-empty,
.empty-state {
  border: 1px dashed #bae6fd;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  padding: 14px;
  font-weight: 800;
}

.contract-file-preview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.contract-file-preview-button {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  color: #0f172a;
  padding: 8px 10px;
  text-align: left;
  box-shadow: none;
}

.contract-file-remove {
  align-self: center;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
  color: #be123c;
  cursor: pointer;
  font-weight: 950;
  min-height: 42px;
  padding: 0 10px;
  box-shadow: none;
}

.contract-file-remove:hover {
  border-color: #fb7185;
  box-shadow: 0 10px 22px rgba(244, 63, 94, 0.16);
}

.contract-file-preview-button img,
.contract-file-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.contract-file-icon {
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-weight: 950;
}

.contract-file-preview-button small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.contract-file-modal {
  width: min(920px, 96vw);
}

.contract-file-modal-body {
  display: grid;
  max-height: min(72vh, 760px);
  overflow: auto;
  place-items: center;
  border-radius: 12px;
  background: #0f172a;
  padding: 14px;
}

.contract-file-modal-body img,
.contract-file-modal-body iframe {
  width: 100%;
  min-height: 68vh;
  border: 0;
  border-radius: 8px;
  object-fit: contain;
}

.contract-file-modal-body img {
  height: auto;
  min-height: 0;
  background: #fff;
}

.contract-budget-bars,
.contract-alert-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.contract-chart-grid {
  align-items: stretch;
}

.contract-timeline-card {
  overflow: hidden;
}

.contract-timeline-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.contract-timeline-list.expanded {
  max-height: none;
  overflow: visible;
}

.contract-timeline-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.12), transparent 180px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.78));
  padding: 14px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.08);
}

.contract-timeline-item.alert {
  border-color: rgba(251, 113, 133, 0.58);
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 63, 94, 0.12), transparent 190px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 242, 0.82));
}

.contract-timeline-item.expired,
.contract-timeline-item.missing {
  border-color: rgba(251, 191, 36, 0.62);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.16), transparent 190px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 235, 0.82));
}

.contract-timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.contract-timeline-rail::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: -22px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(#60a5fa, #2dd4bf);
  opacity: 0.45;
}

.contract-timeline-rail span {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.contract-timeline-item.alert .contract-timeline-rail span {
  background: linear-gradient(135deg, #ef4444, #fb7185);
}

.contract-timeline-item.expired .contract-timeline-rail span,
.contract-timeline-item.missing .contract-timeline-rail span {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.contract-timeline-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.contract-timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.contract-timeline-head b,
.contract-timeline-head span {
  display: block;
}

.contract-timeline-head b {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.contract-timeline-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
  margin-top: 2px;
}

.contract-timeline-meta,
.contract-timeline-money {
  display: grid;
  gap: 8px;
}

.contract-timeline-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contract-timeline-money {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contract-timeline-meta span,
.contract-timeline-money div {
  border: 1px solid rgba(186, 230, 253, 0.76);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 850;
}

.contract-timeline-meta b,
.contract-timeline-money b {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  margin-top: 2px;
}

.contract-timeline-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.96);
}

.contract-timeline-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.18);
}

.contract-chart {
  display: grid;
  gap: 12px;
  min-height: 0;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.contract-chart-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(180px, 2fr) 64px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(186, 230, 253, 0.85);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 249, 255, 0.72));
  padding: 10px 12px;
}

.contract-chart-row b,
.contract-chart-row span,
.contract-chart-row strong {
  display: block;
}

.contract-chart-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  margin-top: 2px;
}

.contract-chart-row strong {
  text-align: right;
  color: #0f172a;
}

.contract-chart-track {
  height: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.contract-chart-track div {
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

.contract-donut-wrap {
  display: grid;
  grid-template-columns: minmax(190px, 260px) 1fr;
  gap: 18px;
  align-items: center;
}

.contract-donut-wrap svg {
  width: min(260px, 100%);
  filter: drop-shadow(0 18px 28px rgba(37, 99, 235, 0.14));
}

.contract-donut-total {
  fill: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.contract-donut-caption {
  fill: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.contract-donut-legend {
  display: grid;
  gap: 10px;
}

.contract-donut-legend-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}

.contract-donut-legend-item i {
  width: 14px;
  height: 14px;
  border-radius: 5px;
}

.contract-donut-legend-item span,
.contract-donut-legend-item b,
.contract-donut-legend-item small {
  font-weight: 900;
}

.contract-donut-legend-item small {
  color: #64748b;
}

.contract-budget-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 2fr) 80px;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  padding: 10px;
}

.contract-budget-row span,
.contract-budget-row small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.contract-budget-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.contract-budget-track div {
  height: 100%;
  border-radius: inherit;
}

.contract-alert-item {
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  padding: 12px;
}

.contract-alert-item.alert,
.contract-alert-item.expired {
  border-color: #fecdd3;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
}

.contract-alert-item.missing {
  border-color: #fde68a;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.contract-alert-item b,
.contract-alert-item span {
  display: block;
}

.contract-alert-item span {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.line-contract-alert-card {
  margin-top: 16px;
}

.line-alert-preview-wrap {
  margin-top: 14px;
}

.line-alert-preview {
  min-height: 220px;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.55;
  font-weight: 800;
  color: #1e3a8a;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.88));
  border-color: rgba(186, 230, 253, 0.95);
}

.line-alert-json-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: #0f172a;
}

.permission-role-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.permission-role-tabs button {
  width: auto;
}

.permission-preview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.45fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: end;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, 0.82);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.14), transparent 180px),
    rgba(240, 249, 255, 0.76);
}

.permission-preview-panel strong {
  display: block;
  font-size: 18px;
}

.permission-preview-panel p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.role-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.role-preview-summary span {
  border: 1px solid rgba(147, 197, 253, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #075985;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 920;
}

.permission-matrix-wrap {
  display: grid;
  gap: 18px;
}

.permission-role-card {
  border: 1px solid rgba(186, 230, 253, 0.95);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.7));
  padding: 16px;
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.08);
}

.permission-role-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.permission-role-head h4 {
  margin: 0;
  font-size: 22px;
}

.permission-role-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 800;
}

.permission-role-head span {
  flex: 0 0 auto;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 10px;
  font-weight: 950;
}

.permission-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.permission-detail-section {
  display: grid;
  gap: 8px;
  align-content: start;
}

.permission-detail-section h5 {
  margin: 0 0 4px;
  font-size: 16px;
}

.permission-menu-box {
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.92), rgba(236, 254, 255, 0.55));
  padding: 12px;
}

.permission-menu-box + .permission-menu-box {
  margin-top: 10px;
}

.permission-menu-box-head {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.permission-menu-box-head b {
  color: #075985;
  font-size: 15px;
}

.permission-menu-box-head small {
  color: #64748b;
  font-weight: 800;
}

.permission-menu-box-items {
  display: grid;
  gap: 8px;
}

.permission-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(186, 230, 253, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
  cursor: pointer;
}

.permission-tile.checked {
  border-color: rgba(37, 99, 235, 0.55);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(240, 253, 250, 0.72));
}

.permission-tile.disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.permission-tile input {
  width: 18px;
  height: 18px;
}

.permission-tile-main b,
.permission-tile-main small {
  display: block;
}

.permission-tile-main small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.permission-tile em {
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  padding: 5px 8px;
}

.contract-monitor-table {
  max-height: 560px;
}

.contract-monitor-table.compact tbody tr:nth-child(n + 11) {
  display: none;
}

.contract-monitor-modal .modal-card {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
}

.contract-monitor-modal .modal-body {
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.contract-monitor-expanded {
  max-height: calc(88vh - 160px);
  overflow: auto;
  padding-right: 4px;
}

.contract-monitor-expanded .contract-chart,
.contract-monitor-expanded .contract-budget-bars,
.contract-monitor-expanded .contract-alert-list,
.contract-monitor-expanded .contract-monitor-table {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.view[hidden] {
  display: none;
}

.view {
  display: grid;
  gap: 24px;
}

.mode {
  display: inline-flex;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .contract-file-grid {
    grid-template-columns: 1fr;
  }

  .contract-file-preview-item,
  .contract-chart-row,
  .contract-donut-wrap,
  .contract-donut-legend-item,
  .contract-timeline-meta,
  .contract-timeline-money {
    grid-template-columns: 1fr;
  }

  .contract-timeline-item {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 12px;
  }

  .contract-timeline-head {
    flex-direction: column;
  }

  .contract-file-preview-item {
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .contract-chart-row strong {
    text-align: left;
  }

  .contract-fieldset .form-grid {
    grid-template-columns: 1fr !important;
  }

  .contract-budget-row {
    grid-template-columns: 1fr;
  }

  .contract-file-modal-body iframe {
    min-height: 58vh;
  }

  body,
  body.sidebar-collapsed {
    padding-left: 0;
  }

  body.has-maintenance-admin-banner {
    padding-top: 112px;
  }

  body.has-news-banner {
    padding-top: 70px;
  }

  body.has-maintenance-admin-banner.has-news-banner {
    padding-top: 182px;
  }

  .maintenance-admin-banner,
  body.sidebar-collapsed .maintenance-admin-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 72px 12px 14px;
  }

  .news-ticker,
  body.sidebar-collapsed .news-ticker {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 60px;
    padding: 9px 72px 9px 12px;
  }

  .news-ticker-track {
    font-size: 16px;
  }

  body.has-maintenance-admin-banner .news-ticker {
    top: 112px;
  }

  .app-sidebar {
    position: fixed;
    top: 10px;
    right: 10px;
    left: auto;
    width: min(330px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    border-radius: 9px;
    grid-template-rows: auto auto auto auto;
    scrollbar-color: rgba(37, 99, 235, 0.5) rgba(219, 234, 254, 0.6);
    scrollbar-width: thin;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .nav::after {
    display: none;
  }

  .nav button {
    min-height: 46px;
    gap: 8px;
    padding: 8px 9px;
    grid-template-columns: 24px minmax(0, 1fr);
  }

  #commandCenterNav {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 7px;
    min-height: 54px;
    padding: 8px 9px;
  }

  .nav button svg {
    width: 18px;
    height: 18px;
  }

  #commandCenterNav svg {
    width: 20px;
    height: 20px;
  }

  .command-center-label {
    font-size: 10.2px;
    line-height: 1.05;
  }

  .nav-label {
    font-size: 11.5px;
    line-height: 1.16;
    text-wrap: initial;
  }

  body.sidebar-collapsed .app-sidebar {
    width: 54px;
    height: 54px;
    overflow: hidden;
    padding: 8px;
  }

  body.has-news-banner .app-sidebar,
  body.sidebar-collapsed.has-news-banner .app-sidebar {
    top: 72px;
    max-height: calc(100vh - 84px);
  }

  body.has-maintenance-admin-banner.has-news-banner .app-sidebar,
  body.sidebar-collapsed.has-maintenance-admin-banner.has-news-banner .app-sidebar {
    top: 184px;
    max-height: calc(100vh - 196px);
  }

  body.sidebar-collapsed .sidebar-head {
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-title,
  body.sidebar-collapsed .nav,
  body.sidebar-collapsed .account-panel,
  body.sidebar-collapsed .pwa-panel,
  body.sidebar-collapsed .sidebar-version {
    display: none;
  }

  .topbar,
  .grid2,
  .split,
  .admin-layout,
  .user-admin-layout,
  .master-setting-body {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filters,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reset-password-grid,
  .user-form-grid,
  .user-form-stack {
    grid-template-columns: 1fr;
  }

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

  #contractMonitorStats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hospital-dashboard-stats .hospital-name-stat {
    padding-right: 82px;
  }

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

@media (max-width: 640px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .filters,
  .form-grid,
  .stats,
  .service-layout,
  .service-grid,
  .master-summary,
  .checkbox-options,
  .import-grid,
  .export-grid,
  .report-summary-grid,
  .push-message-grid,
  .executive-report-layout {
    grid-template-columns: 1fr;
  }

  #contractMonitorStats {
    grid-template-columns: 1fr;
  }

  #contractMonitorStats .stat {
    min-height: 188px;
    padding: 22px 22px 20px;
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .contract-stat-value {
    gap: 4px 12px;
    font-size: clamp(52px, 15vw, 76px);
  }

  #contractMonitorStats .contract-stat-value em {
    padding-bottom: 0;
    font-size: clamp(18px, 5.5vw, 26px);
  }

  #contractMonitorStats .stat strong:not(.contract-stat-value) {
    font-size: clamp(40px, 12vw, 58px);
  }

  .install-onepage-hero,
  .install-guide-grid {
    grid-template-columns: 1fr;
  }

  .install-onepage-hero button {
    width: 100%;
  }

  .executive-report-panel {
    position: static;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .hospital-dashboard-stats .hospital-name-stat {
    padding-right: 22px;
  }

  .donut-stage {
    width: 100%;
    min-height: 320px;
  }

  .bar-row {
    grid-template-columns: 92px 1fr;
  }

.theme-grid {
  grid-template-columns: 1fr;
}
}

.health-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #075985;
}

.health-pill.critical {
  background: #fee2e2;
  color: #b91c1c;
}

.health-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

.health-pill.info {
  background: #dbeafe;
  color: #1d4ed8;
}

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

.help-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,249,255,.92));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.help-card b {
  display: block;
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 6px;
}

.help-card span {
  display: block;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

.release-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.release-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(239,246,255,.95), rgba(255,255,255,.98));
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.release-item input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  flex: 0 0 auto;
}

.release-item strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
}

.health-action {
  white-space: nowrap;
}

.wow-command-center {
  border-radius: 26px;
  padding: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(37,99,235,.96), rgba(6,182,212,.9) 48%, rgba(251,113,133,.9)),
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.28), transparent 34%);
  box-shadow: 0 28px 70px rgba(37, 99, 235, 0.24);
  overflow: hidden;
  position: relative;
}

#dashboardView.dashboard-only > #wowCommandCenter,
#dashboardView.dashboard-only > #wowInsightGrid,
#dashboardView.dashboard-only > #wowCallTrackingGrid,
#dashboardView.dashboard-only > #wowFollowupGrid,
#dashboardView.dashboard-only > #wowExecutiveGrid,
#dashboardView.dashboard-only > #wowStrategyGrid,
#dashboardView.dashboard-only > #wowOpsGrid {
  display: none;
}

#dashboardView.command-center-only > :not(#wowCommandCenter):not(#wowInsightGrid):not(#wowCallTrackingGrid):not(#wowFollowupGrid):not(#wowExecutiveGrid):not(#wowStrategyGrid):not(#wowOpsGrid) {
  display: none;
}

.wow-command-center::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .28;
  pointer-events: none;
}

.wow-hero,
.wow-kpi-grid {
  position: relative;
  z-index: 1;
}

.wow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 18px;
  align-items: start;
}

.wow-command-center .command-center-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)),
    linear-gradient(90deg, rgba(15, 23, 42, 0.24), rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 18px 42px rgba(15, 23, 42, 0.18);
  padding: 12px 20px 12px 14px;
  color: #fff;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}

.wow-command-center .command-center-badge::before {
  content: "";
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 64% 34%, #fff 0 5px, transparent 6px),
    linear-gradient(135deg, #fef08a, #22d3ee 52%, #60a5fa);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 14px 30px rgba(15, 23, 42, 0.18);
}

.wow-hero h2 {
  color: #fff;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.05;
  margin: 4px 0 8px;
}

.wow-hero p:not(.eyebrow) {
  color: rgba(255,255,255,.88);
  font-size: 18px;
  font-weight: 850;
  margin: 0;
}

.wow-score {
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 22px;
  padding: 16px;
  background: rgba(15,23,42,.18);
  backdrop-filter: blur(10px);
  text-align: center;
}

.command-center-side {
  display: grid;
  gap: 10px;
}

.command-center-date-control {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  font-weight: 950;
}

.command-center-date-control input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  padding: 10px 12px;
  box-shadow: 0 12px 28px rgba(15,23,42,.16);
}

.command-center-today-button {
  width: 100%;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.12));
  color: #fff;
  font-weight: 950;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34);
}

.wow-score span,
.wow-score small {
  display: block;
  color: rgba(255,255,255,.84);
  font-weight: 900;
}

.wow-score strong {
  display: block;
  font-size: 42px;
  line-height: 1;
  margin: 8px 0;
}

.wow-kpi-grid,
.wow-grid,
.achievement-grid,
.team-share-grid {
  display: grid;
  gap: 14px;
}

.wow-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.wow-kpi {
  position: relative;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}

.wow-kpi.new-high {
  border-color: rgba(251, 191, 36, 0.9);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.38), rgba(245, 158, 11, 0.34));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28), 0 0 0 1px rgba(254, 240, 138, 0.2);
}

.wow-kpi .stat-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
}

.wow-kpi span,
.wow-kpi small {
  color: rgba(255,255,255,.86);
  font-weight: 850;
}

.wow-kpi strong {
  display: block;
  font-size: 30px;
  color: #fff;
  margin: 4px 0;
}

.wow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.wow-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wow-strategy-grid,
.wow-ops-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wow-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.wow-panel > .toolbar {
  flex: 0 0 auto;
}

#wowInsightGrid .wow-panel {
  min-height: 405px;
}

#wowFollowupGrid .wow-panel,
#wowCallTrackingGrid .wow-panel,
#wowExecutiveGrid .wow-panel {
  min-height: 300px;
}

#wowStrategyGrid .wow-panel,
#wowOpsGrid .wow-panel {
  min-height: 370px;
}

.activity-panel {
  min-height: 405px;
}

.activity-panel .toolbar {
  min-width: 0;
}

.activity-feed,
.smart-alerts,
.followup-list,
.issue-feed {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.activity-feed {
  align-content: start;
  flex: 1 1 auto;
}

.smart-alerts,
.followup-list,
.achievement-grid,
.team-share-grid,
.league-table,
.checklist-list,
.snapshot-box,
.scorecard-list,
.anomaly-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.activity-item,
.alert-item,
.followup-item,
.achievement-card,
.team-share-card,
.issue-feed-item {
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.86));
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

.activity-item {
  border-radius: 13px;
  display: grid;
  gap: 4px;
  padding: 9px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

.activity-item b,
.alert-item b,
.followup-item b,
.achievement-card b,
.team-share-card b,
.issue-feed-item b {
  display: block;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 4px;
}

.activity-item b {
  overflow: hidden;
  margin-bottom: 2px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item span,
.alert-item span,
.followup-item span,
.achievement-card span,
.team-share-card span,
.issue-feed-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 750;
}

.activity-item span {
  overflow-wrap: anywhere;
}

.activity-item span {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-time {
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
}

.call-tracking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.call-tracking-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 104px;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .38);
  border-radius: 18px;
  padding: 13px 13px 13px 16px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.9), transparent 34%),
    linear-gradient(135deg, rgba(239,246,255,.98), rgba(255,255,255,.9));
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
}

.call-tracking-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #2563eb, #06b6d4);
}

.call-tracking-card.call::before { background: linear-gradient(180deg, #06b6d4, #14b8a6); }
.call-tracking-card.success::before { background: linear-gradient(180deg, #22c55e, #84cc16); }
.call-tracking-card.pause::before { background: linear-gradient(180deg, #f59e0b, #fb7185); }
.call-tracking-card.missed::before { background: linear-gradient(180deg, #8b5cf6, #6366f1); }
.call-tracking-card.cancel::before { background: linear-gradient(180deg, #ef4444, #f97316); }

.call-tracking-card span {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.call-tracking-card strong {
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: .95;
  letter-spacing: 0;
}

.call-tracking-card small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 850;
}

.issue-feed {
  flex: 1 1 auto;
  align-content: start;
}

.issue-feed-item {
  display: grid;
  gap: 5px;
  border-color: rgba(251, 113, 133, .28);
  background:
    radial-gradient(circle at 95% 0%, rgba(251, 113, 133, .12), transparent 42%),
    linear-gradient(135deg, #fff7ed, #ffffff 58%, #f8fafc);
}

.issue-feed-item.calm {
  border-color: rgba(34, 197, 94, .26);
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.issue-feed-item small {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.alert-item.critical {
  background: linear-gradient(135deg, #fff1f2, #fff);
  border-color: #fecdd3;
}

.alert-item.warning {
  background: linear-gradient(135deg, #fffbeb, #fff);
  border-color: #fde68a;
}

.alert-item.success {
  background: linear-gradient(135deg, #ecfdf5, #fff);
  border-color: #bbf7d0;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.thailand-map-card {
  border: 1px solid rgba(125, 211, 252, .38);
  border-radius: 22px;
  min-height: 330px;
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.94), transparent 31%),
    radial-gradient(circle at 82% 16%, rgba(20,184,166,.26), transparent 34%),
    radial-gradient(circle at 54% 92%, rgba(59,130,246,.24), transparent 32%),
    linear-gradient(135deg, #eaf7ff 0%, #d9f9ff 45%, #f4fbff 100%);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 20px 44px rgba(15, 23, 42, .09);
}

.thai-real-map-stage {
  position: relative;
  height: 330px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px 40px;
  cursor: zoom-in;
}

.thai-real-map-canvas {
  position: relative;
  z-index: 1;
  width: auto;
  height: min(100%, 292px);
  max-width: min(100%, 380px);
  aspect-ratio: 1526.684 / 2698.859;
  border-radius: 24px;
  overflow: visible;
  background:
    linear-gradient(145deg, rgba(255,255,255,.68), rgba(255,255,255,.22));
  border: 1px solid rgba(255,255,255,.64);
  filter:
    drop-shadow(0 22px 28px rgba(15, 23, 42, .18));
}

.thai-real-map {
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: contain;
  padding: 0;
  border-radius: 24px;
  background: transparent;
  border: 0;
  filter:
    saturate(1.18)
    contrast(1.06);
  opacity: .96;
  z-index: 1;
}

.thai-map-expand-hint {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(125, 211, 252, .55);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.86);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
  backdrop-filter: blur(10px);
}

.thai-map-expand-hint svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.thai-map-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 43% 25%, rgba(37, 99, 235, .18), transparent 24%),
    radial-gradient(circle at 60% 45%, rgba(20, 184, 166, .20), transparent 28%),
    radial-gradient(circle at 47% 78%, rgba(249, 115, 22, .16), transparent 24%);
  pointer-events: none;
  z-index: 2;
}

.thai-real-dot {
  --dot-size: 22px;
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  min-width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--dot-color);
  color: #fff;
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 12px 22px rgba(15, 23, 42, .22);
}

.thai-real-dot span {
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  padding: 0 5px;
}

.thai-real-dot b {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: #0f172a;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  padding: 3px 7px;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

.thai-map-empty {
  position: absolute;
  z-index: 3;
  inset: auto 18px 46%;
  text-align: center;
  color: #64748b;
  font-weight: 950;
}

.thai-map-caption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.thai-map-caption span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.success-hero {
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(37, 99, 235, .96), rgba(6, 182, 212, .92) 52%, rgba(16, 185, 129, .92)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 1px, transparent 1px 18px);
}

.success-hero h2 {
  margin: 6px 0 4px;
  color: #fff;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.05;
}

.success-hero .sub {
  margin: 0;
  max-width: 900px;
  color: rgba(255,255,255,.9);
  font-weight: 850;
  line-height: 1.5;
}

.success-hero .badge {
  color: #1d4ed8;
  background: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.78);
}

.success-rate-filters {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.success-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.success-kpi {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border: 1px solid rgba(125, 211, 252, .58);
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(circle at 90% 16%, rgba(59, 130, 246, .22), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(240,249,255,.78));
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.success-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 105px;
  height: 105px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(37,99,235,.16), rgba(6,182,212,.08));
  transform: rotate(12deg);
}

.success-kpi.success::after,
.success-kpi.conversion::after {
  background: linear-gradient(135deg, rgba(34,197,94,.22), rgba(6,182,212,.10));
}

.success-kpi span,
.success-kpi small {
  position: relative;
  z-index: 1;
  display: block;
  color: #64748b;
  font-weight: 900;
}

.success-kpi strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 14px 0 8px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.success-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 16px;
  align-items: stretch;
}

.success-donut-card {
  min-height: 430px;
}

.success-team-list,
.success-hospital-rank,
.success-followup-list {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.success-team-item,
.success-rank-item,
.success-followup-item {
  border: 1px solid rgba(125, 211, 252, .55);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,249,255,.82));
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.success-team-item,
.success-rank-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.success-team-item .service-track,
.success-rank-item .service-track {
  grid-column: 1 / -1;
}

.success-team-item b,
.success-rank-item b,
.success-followup-item b {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.success-team-item span,
.success-rank-item small,
.success-followup-item span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-weight: 850;
  line-height: 1.35;
}

.success-team-item strong,
.success-rank-item strong {
  color: #1d4ed8;
  font-size: 28px;
  font-weight: 950;
}

.rank-no {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-weight: 950;
}

.success-rank-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.success-followup-item {
  border-color: rgba(251, 191, 36, .72);
  background: linear-gradient(135deg, rgba(255,251,235,.96), rgba(255,255,255,.88));
}

.success-followup-item.calm {
  border-color: rgba(52, 211, 153, .72);
  background: linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.88));
}

.success-rate-trend {
  min-height: 360px;
  overflow-x: auto;
  overflow-y: hidden;
}

.success-rate-trend svg {
  min-width: 760px;
}

.success-grid-line {
  stroke: #dbeafe;
  stroke-width: 1;
}

.success-rate-trend text {
  fill: #64748b;
  font-weight: 850;
}

.success-point-label {
  fill: #0f172a !important;
  font-size: 16px;
  font-weight: 950 !important;
}

.success-date-label {
  fill: #475569 !important;
  font-size: 12px;
  font-weight: 900 !important;
}

.success-table-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.success-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 6px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 950;
  text-align: inherit;
  cursor: pointer;
}

.table-sort-button.num {
  justify-content: flex-end;
}

.table-sort-button [data-sort-indicator] {
  min-width: 12px;
  font-size: 10px;
  opacity: 0.9;
}

.table-sort-button.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.map-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(59,130,246,.28), transparent 32%),
    radial-gradient(circle at 84% 20%, rgba(20,184,166,.28), transparent 34%),
    rgba(15, 23, 42, .82);
  backdrop-filter: blur(16px);
}

.map-lightbox.open {
  display: flex;
}

.map-lightbox-panel {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(236,254,255,.90));
  box-shadow: 0 34px 120px rgba(15, 23, 42, .46);
  overflow: auto;
  overscroll-behavior: contain;
}

.map-lightbox-head {
  position: absolute;
  inset: 18px 18px auto 18px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  pointer-events: none;
}

.map-lightbox-title {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  max-width: min(620px, calc(100% - 84px));
  border: 1px solid rgba(125, 211, 252, .46);
  border-radius: 18px;
  padding: 10px 14px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  backdrop-filter: blur(12px);
}

.map-lightbox-title strong {
  color: #0f172a;
  font-size: clamp(18px, 2.5vw, 30px);
  font-weight: 950;
  line-height: 1.1;
}

.map-lightbox-title span {
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.map-lightbox-close {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15,23,42,.22);
}

.map-lightbox-body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 92px 28px 38px;
  min-width: min(760px, 100%);
  min-height: min(640px, calc(100vh - 32px));
  overflow: auto;
}

.map-lightbox-body .thai-real-map-stage {
  width: min(100%, 980px);
  height: min(78vh, 900px);
  aspect-ratio: auto;
  min-height: 0;
  box-sizing: border-box;
  padding: 0;
  cursor: default;
}

.map-lightbox-body .thai-real-map-canvas {
  width: auto;
  height: 100%;
  max-height: none;
  max-width: 100%;
  aspect-ratio: 1526.684 / 2698.859;
}

.map-lightbox-body .thai-real-map {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 30px;
}

.map-lightbox-body .thai-map-glow,
.map-lightbox-body .thai-map-expand-hint,
.map-lightbox-body .thai-map-caption {
  display: none;
}

.heat-tile {
  border-radius: 14px;
  padding: 10px;
  color: #fff;
  min-height: 64px;
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.heat-tile strong,
.heat-tile span {
  display: block;
}

.heat-tile strong {
  font-size: 13px;
}

.heat-tile span {
  font-size: 19px;
  font-weight: 950;
}

.achievement-grid,
.team-share-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-summary-draft {
  flex: 1 1 auto;
  min-height: 190px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
  color: #0f172a;
  font-weight: 800;
  line-height: 1.7;
  padding: 14px;
  resize: vertical;
}

.wow-strategy-grid,
.wow-ops-grid {
  align-items: stretch;
}

.war-room-card {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.9), transparent 28%),
    linear-gradient(135deg, #0f172a, #1d4ed8 52%, #0891b2);
  color: #fff;
}

.war-room-card h3,
.war-room-card .badge {
  color: #fff;
}

.war-room-panel {
  display: grid;
  gap: 12px;
}

.war-room-main {
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}

.war-room-main span,
.war-room-main small {
  display: block;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}

.war-room-main strong {
  display: block;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1;
  margin: 8px 0;
}

.war-room-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.war-room-metrics div,
.war-room-highlight,
.snapshot-card {
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}

.war-room-metrics b,
.war-room-highlight b,
.snapshot-card b {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.war-room-metrics span,
.war-room-highlight span,
.snapshot-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

.anomaly-list,
.scorecard-list,
.league-table,
.checklist-list,
.snapshot-box {
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

#smartAnomalyList,
#hospitalScorecardList {
  max-height: none;
  height: 100%;
  flex: 1 1 auto;
  align-content: start;
  padding-bottom: 6px;
}

#smartAnomalyList .alert-item {
  min-height: 92px;
  align-content: center;
}

#hospitalScorecardList .scorecard-item {
  min-height: 126px;
}

.scorecard-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid rgba(125, 211, 252, .36);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  box-shadow: 0 14px 32px rgba(14, 165, 233, .08);
}

.scorecard-item b,
.league-row b,
.checklist-item b {
  display: block;
  color: #0f172a;
}

.wow-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.wow-audit-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  border: 1px solid rgba(125, 211, 252, .48);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,249,255,.9));
  box-shadow: 0 16px 36px rgba(14, 165, 233, .08);
}

.wow-audit-item.needs-check {
  border-color: rgba(251, 191, 36, .72);
  background: linear-gradient(135deg, rgba(255,251,235,.98), rgba(255,247,237,.92));
}

.wow-audit-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .18);
}

.wow-audit-item.needs-check .wow-audit-index {
  background: linear-gradient(135deg, #f59e0b, #fb7185);
}

.wow-audit-item b {
  display: block;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
}

.wow-audit-item span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  margin-top: 4px;
}

.wow-audit-item > strong {
  align-self: start;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(34, 197, 94, .12);
  color: #15803d;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.wow-audit-item.needs-check > strong {
  background: rgba(245, 158, 11, .14);
  color: #b45309;
}

.upgrade-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.upgrade-pack-card {
  min-height: 178px;
  border: 1px solid rgba(125, 211, 252, .44);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(239,246,255,.9));
  box-shadow: 0 18px 42px rgba(37, 99, 235, .08);
}

.upgrade-pack-card.setup {
  border-color: rgba(251, 191, 36, .62);
  background: linear-gradient(145deg, rgba(255,251,235,.98), rgba(255,247,237,.92));
}

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

.upgrade-pack-top span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 950;
}

.upgrade-pack-top strong {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(34, 197, 94, .12);
  color: #15803d;
  font-size: 12px;
  font-weight: 950;
}

.upgrade-pack-card.setup .upgrade-pack-top strong {
  background: rgba(245, 158, 11, .14);
  color: #b45309;
}

.upgrade-pack-card b,
.upgrade-pack-card small,
.upgrade-pack-card p {
  display: block;
}

.upgrade-pack-card b {
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
}

.upgrade-pack-card small {
  color: #2563eb;
  font-weight: 950;
  margin-top: 5px;
}

.upgrade-pack-card p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(10px);
}

.onboarding-card {
  width: min(720px, 100%);
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,246,255,.94));
  box-shadow: 0 30px 90px rgba(15, 23, 42, .25);
}

.onboarding-hero {
  border-radius: 22px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4 58%, #22c55e);
}

.onboarding-hero span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.18);
  font-weight: 950;
}

.onboarding-hero h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
}

.onboarding-hero p {
  margin: 0;
  font-weight: 800;
  line-height: 1.55;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.onboarding-steps button {
  border: 1px solid rgba(125, 211, 252, .5);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  color: #0f172a;
  background: #fff;
  cursor: pointer;
}

.onboarding-steps b,
.onboarding-steps span {
  display: block;
}

.onboarding-steps span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.scorecard-item span,
.scorecard-item small,
.league-row small,
.checklist-item small {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 780;
}

.scorecard-item strong {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #075985;
  background: linear-gradient(135deg, #bae6fd, #e0f2fe);
  font-size: 20px;
}

.score-bar {
  grid-column: 1 / -1;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.score-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

.league-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(135deg, #fff, #f8fafc);
}

.league-rank {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  color: #1d4ed8;
  font-weight: 950;
}

.league-row strong {
  color: #0f172a;
  font-size: 22px;
}

.league-row em {
  border-radius: 999px;
  padding: 4px 8px;
  font-style: normal;
  font-weight: 950;
  font-size: 12px;
}

.league-row em.up {
  background: #dcfce7;
  color: #047857;
}

.league-row em.down {
  background: #fee2e2;
  color: #b91c1c;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.checklist-item > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: #fff;
  background: #64748b;
}

.checklist-item.done > span {
  background: #10b981;
}

.checklist-item.todo > span {
  background: #f97316;
}

.checklist-item.info > span {
  background: #2563eb;
}

.mini-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.permission-ok {
  color: #047857;
  font-weight: 900;
}

.permission-no {
  color: #94a3b8;
  font-weight: 900;
}

.backup-coverage-grid,
.system-monitor-grid,
.permission-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.backup-coverage-card,
.system-monitor-card,
.permission-audit-card,
.one-page-guide-card {
  border: 1px solid rgba(125, 211, 252, .72);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,249,255,.84));
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.backup-coverage-card span,
.system-monitor-card span,
.permission-audit-card span {
  display: block;
  color: #64748b;
  font-weight: 850;
}

.backup-coverage-card strong,
.system-monitor-card strong,
.permission-audit-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
  color: #0f172a;
}

.backup-coverage-card small,
.system-monitor-card small,
.permission-audit-card small {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-weight: 750;
  line-height: 1.35;
}

.system-monitor-card.ok {
  border-color: rgba(52, 211, 153, .78);
  background: linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.88));
}

.system-monitor-card.warn {
  border-color: rgba(251, 191, 36, .84);
  background: linear-gradient(135deg, rgba(255,251,235,.96), rgba(255,255,255,.88));
}

.one-page-guide {
  margin-top: 10px;
}

.one-page-guide-card b {
  display: block;
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 10px;
}

.one-page-guide-card ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.one-page-guide-card li {
  color: #334155;
  font-weight: 760;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .help-grid,
  .release-checklist {
    grid-template-columns: 1fr;
  }

  .wow-hero,
  .wow-kpi-grid,
  .wow-grid,
  .wow-grid-wide,
  .wow-strategy-grid,
  .wow-ops-grid,
  .success-rate-filters,
  .success-kpi-grid,
  .success-chart-grid,
  .call-tracking-grid,
  .achievement-grid,
  .team-share-grid,
  .war-room-metrics {
    grid-template-columns: 1fr;
  }

  .permission-role-head,
  .permission-detail-grid,
  .permission-preview-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .permission-role-head span {
    width: 100%;
    text-align: center;
  }

  .wow-command-center {
    padding: 16px;
    border-radius: 20px;
  }

  .wow-command-center .command-center-badge {
    width: 100%;
    justify-content: flex-start;
    border-radius: 18px;
    font-size: 18px;
  }

  .wow-command-center .command-center-badge::before {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .wow-score {
    text-align: left;
  }

  .command-center-side {
    grid-template-columns: 1fr 96px;
    align-items: end;
  }

  .command-center-side .wow-score {
    grid-column: 1 / -1;
  }
}
