

/* ================= tokens ================= */
:root {
  --font: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 12.5px; --fs-md: 13.5px; --fs-base: 14px;
  --fs-lg: 15px; --fs-xl: 17px; --fs-2xl: 20px; --fs-3xl: 26px;

  --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --blur: 18px;

  --bg: #eef1ed;
  --wash-1: rgb(171 219 202 / 0.75);
  --wash-2: rgb(193 214 236 / 0.8);
  --wash-3: rgb(244 228 202 / 0.85);
  --glass: rgb(255 255 255 / 0.62);
  --glass-strong: rgb(252 253 251 / 0.96);
  --glass-rim: rgb(255 255 255 / 0.7);
  --glass-top: rgb(255 255 255 / 0.9);
  --glass-shine: linear-gradient(180deg, rgb(255 255 255 / 0.35), rgb(255 255 255 / 0) 40%);
  --tile: rgb(255 255 255 / 0.7);
  --tile-2: rgb(22 24 27 / 0.06);
  --tile-rim: rgb(22 24 27 / 0.07);

  --ink: #16181b;
  --ink-2: #33373d;
  --muted: #646a72;
  --faint: #767b82;
  --line: rgb(22 24 27 / 0.08);
  --line-2: rgb(22 24 27 / 0.14);

  --accent: #1d7a5c;
  --accent-fill: #17191c;
  --accent-text: #19684f;
  --accent-ink: #ffffff;
  --accent-soft: rgb(29 122 92 / 0.12);
  --accent-glow: rgb(23 25 28 / 0.35);
  --amber: #f3b63f;
  --amber-ink: #241a05;

  --good: #1d7a5c; --good-soft: rgb(29 122 92 / 0.13);
  --warn: #a8690b; --warn-soft: rgb(243 182 63 / 0.25);
  --bad: #c9402f;  --bad-soft: rgb(201 64 47 / 0.11);
  --info: #2a62a8; --info-soft: rgb(42 98 168 / 0.11);

  --shadow: 0 1px 2px rgb(40 60 60 / 0.04), 0 18px 40px -28px rgb(40 60 60 / 0.35);
  --shadow-lg: 0 2px 8px rgb(40 60 60 / 0.08), 0 30px 70px -30px rgb(40 60 60 / 0.45);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0f1214;
  --wash-1: rgb(32 110 92 / 0.32);
  --wash-2: rgb(44 70 120 / 0.32);
  --wash-3: rgb(150 100 30 / 0.2);
  --glass: rgb(28 32 36 / 0.62);
  --glass-strong: rgb(26 30 34 / 0.97);
  --glass-rim: rgb(255 255 255 / 0.06);
  --glass-top: rgb(255 255 255 / 0.05);
  --glass-shine: linear-gradient(180deg, rgb(255 255 255 / 0.03), rgb(255 255 255 / 0) 40%);
  --tile: rgb(255 255 255 / 0.04);
  --tile-2: rgb(255 255 255 / 0.08);
  --tile-rim: rgb(255 255 255 / 0.07);

  --ink: #eef0ec;
  --ink-2: #cfd3d0;
  --muted: #959c9c;
  --faint: #7d8585;
  --line: rgb(255 255 255 / 0.07);
  --line-2: rgb(255 255 255 / 0.14);

  --accent: #4cc39a;
  --accent-fill: #eef0ec;
  --accent-text: #6fd3ae;
  --accent-ink: #121416;
  --accent-soft: rgb(76 195 154 / 0.15);
  --accent-glow: rgb(0 0 0 / 0.5);

  --good: #4cc39a; --good-soft: rgb(76 195 154 / 0.15);
  --warn: #f0b84d; --warn-soft: rgb(240 184 77 / 0.16);
  --bad: #f07563;  --bad-soft: rgb(240 117 99 / 0.15);
  --info: #7cacec; --info-soft: rgb(124 172 236 / 0.15);

  --shadow: 0 18px 44px -30px rgb(0 0 0 / 0.9);
  --shadow-lg: 0 2px 8px rgb(0 0 0 / 0.35), 0 30px 70px -28px rgb(0 0 0 / 0.9);
  color-scheme: dark;
}

/* ================= base ================= */
html, html body {
  background: var(--bg) !important;
  color: var(--ink) !important;
  font-family: var(--font) !important;
  font-size: var(--fs-base);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body .h1, html body .h2, html body .h3, html body .h4, html body .h5, html body .h6 {
  color: var(--ink) !important;
  font-family: var(--font) !important;
  font-weight: 650;
  letter-spacing: -0.015em;
}
html body a { color: var(--accent-text); }
html body a:hover, html body a:focus { color: var(--ink); }
html body ::selection { background: var(--accent-soft); color: var(--ink); }
html body ::placeholder { color: var(--faint) !important; }
html body .text-muted { color: var(--muted) !important; }
html body .text-main, html body .text-dark { color: var(--ink) !important; }
html body label { color: var(--ink-2) !important; font-weight: 650; font-size: var(--fs-sm); }
html body :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Red "hint" text written inline in pages (style="color: red") */
html body [style*="color: red"], html body [style*="color:red"] { color: var(--bad) !important; font-size: var(--fs-sm); }

/* ================= backdrop (drifting colour washes) ================= */
.mm-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); transition: background 0.5s var(--ease); }
.mm-wash { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); will-change: transform; }
.mm-wash--1 { left: -20vmax; top: -30vmax; background: radial-gradient(closest-side, var(--wash-1), transparent); animation: mm-drift-a 38s ease-in-out infinite alternate; }
.mm-wash--2 { right: -25vmax; top: -20vmax; background: radial-gradient(closest-side, var(--wash-2), transparent); animation: mm-drift-b 46s ease-in-out infinite alternate; }
.mm-wash--3 { right: -10vmax; bottom: -40vmax; background: radial-gradient(closest-side, var(--wash-3), transparent); animation: mm-drift-a 52s ease-in-out infinite alternate-reverse; }
@keyframes mm-drift-a { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes mm-drift-b { to { transform: translate(-10vmax, 8vmax) scale(0.94); } }

html body #container:not(.cls-container),
html body #container .boxed,
html body #content-container,
html body #container.boxed-layout {
  background: transparent !important;
}
html body #container { position: relative; z-index: 1; }
html body #content-container:before { display: none !important; }

/* ================= glass helper ================= */
.mm-glass,
html body .panel,
html body #navbar,
html body #mainnav {
  background: var(--glass-shine), var(--glass) !important;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35);
  backdrop-filter: blur(var(--blur)) saturate(1.35);
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--glass-top), var(--shadow) !important;
  border: 0 !important;
}

/* ================= top navbar ================= */
html body #navbar {
  border-radius: 0;
  box-shadow: 0 1px 0 var(--line) !important;
}
html body #navbar .navbar-header,
html body #navbar-container,
html body #navbar .navbar-content,
html body #navbar .navbar-brand {
  background: transparent !important;
  box-shadow: none !important;
}
/* Nifty paints the dark logo block with a pseudo-element, not the header itself */
html body #navbar .navbar-header:before,
html body #container .navbar-header:before {
  background: transparent !important;
}
html body #navbar .brand-title,
html body #navbar .brand-text {
  color: var(--ink) !important;
  background: transparent !important;
  font-family: var(--font) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}
/* "TELEMETRY TOOLS" must fit the 220px brand area next to the logo */
html body #navbar .brand-title { padding-right: 8px; white-space: nowrap; overflow: visible; }
html body #navbar .brand-text { font-size: 16px; white-space: nowrap; }
html body #navbar .brand-icon {
  border-radius: 12px;
}
html body #navbar .navbar-top-links > li > a,
html body #navbar .navbar-top-links > li > a i,
html body #navbar .navbar-top-links .mm-theme-btn {
  color: var(--ink) !important;
}
html body #navbar .navbar-top-links > li > a:hover,
html body #navbar .navbar-top-links > li > a:focus,
html body #navbar .navbar-top-links > .open > a {
  background: transparent !important;
}
/* Round glass action buttons (bell, user, theme) - MURMURA .roundBtn */
html body #navbar .navbar-top-links:last-child > li > a,
.mm-theme-btn {
  display: grid !important;
  place-items: center;
  width: 40px; height: 40px;
  margin: 10px 4px;
  padding: 0 !important;
  border: 0;
  border-radius: 50% !important;
  background: var(--glass-strong) !important;
  box-shadow: inset 0 0 0 1px var(--glass-rim), var(--shadow);
  transition: transform 0.25s var(--ease);
  cursor: pointer;
  line-height: 1;
}
html body #navbar .navbar-top-links:last-child > li > a:hover,
.mm-theme-btn:hover { transform: translateY(-1px); }
html body #navbar .navbar-top-links:last-child > li > a .ic-user { float: none !important; margin: 0 !important; }
html body #navbar .badge-header { box-shadow: 0 0 0 2px var(--glass-strong); }
.mm-theme-btn svg { width: 18px; height: 18px; display: block; }
.mm-theme-btn .mm-moon { display: none; }
:root[data-theme='dark'] .mm-theme-btn .mm-sun { display: none; }
:root[data-theme='dark'] .mm-theme-btn .mm-moon { display: block; }

/* Sidebar toggle: round glass button (same family as the theme / bell buttons) */
html body #navbar .tgl-menu-btn > a.mm-menu-btn {
  display: grid !important; place-items: center;
  width: 40px; height: 40px; margin: 10px 8px; padding: 0 !important;
  border-radius: 50% !important;
  background: var(--glass-strong) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--glass-rim), var(--shadow);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
  line-height: 1;
}
html body #navbar .tgl-menu-btn > a.mm-menu-btn:hover { transform: translateY(-1px); background: var(--tile-2) !important; }
html body #navbar .tgl-menu-btn > a.mm-menu-btn svg { width: 18px; height: 18px; display: block; }
/* Chevron points left when the menu is open, right when it is collapsed */
.mm-menu-chev { transform-origin: 13.5px 12px; transition: transform 0.45s cubic-bezier(0.34, 1.8, 0.5, 1); }
#container.mainnav-sm .mm-menu-chev, #container.mainnav-out .mm-menu-chev { transform: rotate(180deg); }

/* ================= sidebar (#mainnav) ================= */
html body #mainnav-container { background: transparent !important; }
html body #mainnav {
  border-radius: var(--r-lg);
  margin: 12px 0 12px 12px;
  height: calc(100% - 24px) !important;
  overflow: hidden;
}
html body #mainnav .nano,
html body #mainnav .nano-content,
html body #mainnav-menu-wrap,
html body #mainnav-menu,
html body #mainnav .list-group,
html body #mainnav .list-group-item,
html body #mainnav-profile,
html body #mainnav-profile .profile-wrap {
  background: transparent !important;
  border: 0 !important;
}
html body #mainnav-profile { border-bottom: 1px solid var(--line) !important; }
/* Compact profile row */
html body #mainnav-profile.mm-profile {
  display: flex !important; align-items: center; gap: 12px;
  margin: 12px 10px 6px; padding: 10px 12px !important;
  border: 0 !important; border-radius: var(--r-md);
  background: var(--tile) !important; box-shadow: inset 0 0 0 1px var(--tile-rim);
}
.mm-avatar {
  position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(160deg, #f6ead2, #e7d3ae); color: #3b2f22;
  font-weight: 700; font-size: 13px; letter-spacing: 0.02em; line-height: 1;
}
/* Photo avatar: picture fills the circle, ring separates it from the tile */
.mm-avatar.mm-avatar-img { background: var(--tile-2); box-shadow: 0 0 0 2px var(--glass-strong), 0 6px 14px -8px rgb(0 0 0 / 0.5); }
.mm-avatar.mm-avatar-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mm-avatar-dot {
  position: absolute; right: -1px; bottom: -1px; width: 31%; height: 31%; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 2px var(--glass-strong);
}
.mm-profile-text { display: grid; min-width: 0; line-height: 1.25; }
html body #mainnav-profile .mm-profile-text .mnp-name {
  margin: 0; font-size: var(--fs-md); font-weight: 700; color: var(--ink) !important;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-profile-text small { color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; }
/* Collapsed (icon-only) sidebar: just the avatar */
#container.mainnav-sm #mainnav-profile.mm-profile { justify-content: center; padding: 8px !important; margin: 10px 6px; }
#container.mainnav-sm .mm-profile-text { display: none; }
html body #mainnav-profile .mnp-name { color: var(--ink) !important; font-weight: 700; }
html body #mainnav-profile .mnp-desc { color: var(--muted) !important; }
html body #mainnav-profile .img-circle { box-shadow: 0 0 0 3px var(--glass-strong), var(--shadow); }
html body #mainnav-profile .list-group-item { color: var(--ink-2) !important; border-radius: var(--r-pill); margin: 2px 10px; }
html body #mainnav-profile .list-group-item:hover { background: var(--tile-2) !important; }

html body #mainnav-menu .list-header {
  color: var(--faint) !important;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 22px 6px;
}
html body #mainnav-menu > li > a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 2px 10px;
  padding: 10px 14px !important;
  border-radius: var(--r-pill) !important;
  color: var(--ink-2) !important;
  font-weight: 600;
  font-size: var(--fs-md);
  background: transparent !important;
  border: 0 !important;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
html body #mainnav-menu > li > a i { color: inherit !important; font-size: 17px; width: auto; margin: 0; }
/* Per-page line icons (MURMURA / lucide style) */
html body #mainnav-menu .mm-nav-ico {
  flex: none; width: 19px; height: 19px; display: block;
  color: var(--muted);
  transition: color 0.25s var(--ease), transform 0.35s cubic-bezier(0.34, 1.8, 0.5, 1);
}
html body #mainnav-menu > li > a:hover .mm-nav-ico { color: var(--ink); transform: translateY(-1px) scale(1.08); }
html body #mainnav-menu > li.active-link > a .mm-nav-ico { color: var(--accent-ink); }
/* Collapsed (icon-only) sidebar: centre the icon */
#container.mainnav-sm #mainnav-menu > li > a { justify-content: center; }
#container.mainnav-sm #mainnav-menu .mm-nav-ico { width: 20px; height: 20px; }
html body #mainnav-menu > li > a:hover {
  background: var(--tile-2) !important;
  color: var(--ink) !important;
}
/* Active page = MURMURA ink pill */
html body #mainnav-menu > li.active-link > a,
html body #mainnav-menu > li.active-link > a:hover {
  color: var(--accent-ink) !important;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 60%), var(--accent-fill) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 10px 22px -12px var(--accent-glow) !important;
}
html body #mainnav-menu > li.active-link > a:before,
html body #mainnav-menu > li > a:before { display: none !important; }

/* ================= page head ================= */
html body #page-head { background: transparent !important; }
html body #page-head .page-header,
html body #page-title,
html body .page-header {
  color: var(--ink) !important;
  font-size: var(--fs-3xl) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em;
}
html body #page-head .breadcrumb { background: transparent !important; padding-left: 20px; }
html body #page-head .breadcrumb li,
html body #page-head .breadcrumb li a,
html body #page-head .breadcrumb .active { color: var(--muted) !important; font-weight: 600; font-size: var(--fs-sm); }
html body #page-head .breadcrumb .active { color: var(--ink) !important; }
html body #page-head .breadcrumb > li + li:before { border-color: var(--faint) !important; }

/* ================= panels = MURMURA cards ================= */
html body .panel {
  border-radius: var(--r-lg) !important;
  overflow: visible;
  margin-bottom: 16px;
}
html body .panel .panel-heading,
html body .panel .panel-footer {
  background: transparent !important;
  border: 0 !important;
  color: var(--ink) !important;
}
html body .panel .panel-heading { padding: 0 20px; min-height: 52px; }
html body .panel .panel-title {
  color: var(--ink) !important;
  font-size: var(--fs-lg) !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
  line-height: 52px;
}
html body .panel .panel-body { background: transparent !important; color: var(--ink-2); padding-top: 6px; }
html body .panel-footer { border-top: 1px solid var(--line) !important; }
html body .card {
  background: var(--tile) !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  box-shadow: inset 0 0 0 1px var(--tile-rim);
}
html body .well { background: var(--tile) !important; border: 0 !important; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--tile-rim); }
html body hr { border-color: var(--line) !important; }

/* ================= buttons ================= */
html body .btn {
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  font-family: var(--font);
  font-weight: 650;
  font-size: var(--fs-md);
  padding: 8px 18px;
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
html body .btn:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.08s; }
html body .btn.btn-sm, html body .btn-group-sm > .btn { padding: 5px 13px; font-size: var(--fs-sm); }
html body .btn.btn-xs { padding: 2px 10px; font-size: var(--fs-xs); }

/* primary (ink pill) */
html body .btn-primary,
html body .btn-success,
html body .btn-dark {
  color: var(--accent-ink) !important;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 60%), var(--accent-fill) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 10px 24px -12px var(--accent-glow) !important;
}
html body .btn-primary:hover,
html body .btn-success:hover,
html body .btn-dark:hover {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), inset 0 0 0 1px rgb(255 255 255 / 0.12), 0 14px 30px -10px var(--accent-glow) !important;
  transform: translateY(-1px);
}
/* secondary (glass / soft) */
html body .btn-default,
html body .btn-info,
html body .btn-trans {
  color: var(--ink) !important;
  background: var(--glass-shine), var(--glass) !important;
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--glass-top) !important;
}
html body .btn-default:hover,
html body .btn-info:hover { background: var(--tile-2) !important; }
/* highlight (amber "create" spark) */
html body .btn-warning,
html body .btn-mint {
  color: var(--amber-ink) !important;
  background: var(--amber) !important;
  box-shadow: 0 10px 24px -8px rgb(243 182 63 / 0.7) !important;
}
html body .btn-danger {
  color: #fff !important;
  background: var(--bad) !important;
  box-shadow: 0 10px 24px -12px rgb(201 64 47 / 0.6) !important;
}
html body .btn-link { color: var(--accent-text) !important; background: transparent !important; box-shadow: none !important; }

/* ================= form controls ================= */
html body .form-control,
html body input[type="text"].form-control,
html body select.form-control,
html body textarea.form-control,
html body .form-control[style] {
  height: 40px;
  padding: 0 14px;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  background-color: var(--tile) !important;
  background-image: none;
  color: var(--ink) !important;
  font-family: var(--font);
  font-size: var(--fs-md) !important;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line-2) !important;
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
html body textarea.form-control { height: auto; padding: 10px 14px; }
html body select.form-control {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23959aa1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
}
html body select.form-control option { background: var(--glass-strong); color: var(--ink); }
html body .form-control:focus {
  outline: none;
  background-color: var(--tile-2) !important;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft) !important;
}
html body .form-control[disabled], html body .form-control[readonly] { opacity: 0.65; }
html body .input-group-addon {
  background: var(--tile-2) !important;
  border: 0 !important;
  color: var(--muted) !important;
  border-radius: var(--r-md) !important;
}
/* daterange "Period" box (a div styled like an input) */
html body #reportrange,
html body [id*="reportrange"] {
  display: flex; align-items: center;
  height: 40px;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  background: var(--tile) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--line-2) !important;
  cursor: pointer;
}
html body #reportrange * { color: var(--ink) !important; }

/* ================= tables ================= */
html body .table { color: var(--ink-2) !important; background: transparent !important; font-size: var(--fs-md); }
html body .table > thead > tr > th,
html body .table > thead > tr > td {
  background: transparent !important;
  color: var(--muted) !important;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0 !important;
  border-bottom: 1px solid var(--line-2) !important;
  padding: 12px 12px;
}
html body .table > tbody > tr > td,
html body .table > tbody > tr > th,
html body .table > tfoot > tr > td {
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  padding: 10px 12px;
  vertical-align: middle;
  background: transparent !important;
}
html body .table-bordered { border: 0 !important; }
html body .table-striped > tbody > tr:nth-of-type(odd) > td,
html body .table-striped > tbody > tr:nth-of-type(odd) > th { background: var(--tile) !important; }
html body .table-hover > tbody > tr:hover > td,
html body .table > tbody > tr:hover > td { background: var(--tile-2) !important; }
html body .table a { color: var(--ink) !important; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
html body .table a:hover { text-decoration-color: var(--accent); color: var(--accent-text) !important; }
html body .table-responsive { border: 0 !important; }

/* DataTables chrome */
html body .dataTables_wrapper,
html body .dataTables_wrapper label,
html body .dataTables_info { color: var(--muted) !important; font-weight: 600; font-size: var(--fs-sm); }
html body .dataTables_wrapper .dataTables_filter input,
html body .dataTables_wrapper .dataTables_length select {
  height: 34px;
  padding: 0 12px;
  margin-left: 6px;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  background-color: var(--tile) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--line-2) !important;
}
html body .dataTables_wrapper .dataTables_length select { padding-right: 26px; }
html body .pagination > li > a,
html body .pagination > li > span {
  margin: 0 2px;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  background: transparent !important;
  color: var(--ink-2) !important;
  font-weight: 650;
  min-width: 34px;
  text-align: center;
}
html body .pagination > li > a:hover { background: var(--tile-2) !important; color: var(--ink) !important; }
html body .pagination > .active > a,
html body .pagination > .active > a:hover,
html body .pagination > .active > span {
  color: var(--accent-ink) !important;
  background: var(--accent-fill) !important;
  box-shadow: 0 8px 18px -10px var(--accent-glow);
}
html body .pagination > .disabled > a { opacity: 0.4; }
html body table.dataTable thead .sorting:after,
html body table.dataTable thead .sorting_asc:after,
html body table.dataTable thead .sorting_desc:after { color: var(--faint); opacity: 0.8; }

/* ================= labels / badges / alerts ================= */
html body .label, html body .badge {
  border-radius: var(--r-pill) !important;
  font-weight: 700;
  font-size: var(--fs-2xs);
  padding: 4px 9px;
}
html body .label-success, html body .badge-success { background: var(--good-soft) !important; color: var(--good) !important; }
html body .label-warning, html body .badge-warning { background: var(--warn-soft) !important; color: var(--warn) !important; }
html body .label-danger, html body .badge-danger { background: var(--bad-soft) !important; color: var(--bad) !important; }
html body .label-info, html body .badge-info, html body .label-primary, html body .badge-primary { background: var(--info-soft) !important; color: var(--info) !important; }
html body .label-default, html body .badge-default { background: var(--tile-2) !important; color: var(--muted) !important; }
html body #navbar .badge-header { padding: 0; width: 9px; height: 9px; min-width: 0; background: var(--bad) !important; }
html body .alert { border: 0 !important; border-radius: var(--r-md) !important; }
html body .alert-success { background: var(--good-soft) !important; color: var(--good) !important; }
html body .alert-warning { background: var(--warn-soft) !important; color: var(--warn) !important; }
html body .alert-danger { background: var(--bad-soft) !important; color: var(--bad) !important; }
html body .alert-info { background: var(--info-soft) !important; color: var(--info) !important; }

/* ================= floating layers ================= */
html body .dropdown-menu,
html body .daterangepicker,
html body .datepicker.dropdown-menu,
html body .modal-content,
html body .popover {
  background: var(--glass-shine), var(--glass-strong) !important;
  color: var(--ink) !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--glass-top), var(--shadow-lg) !important;
}
html body .dropdown-menu > li > a,
html body .dropdown-menu .head-list a { color: var(--ink-2) !important; border-radius: var(--r-sm); }
html body .dropdown-menu > li > a:hover,
html body .dropdown-menu .head-list a:hover { background: var(--tile-2) !important; color: var(--ink) !important; }
html body .modal-header, html body .modal-footer { border-color: var(--line) !important; }
html body .modal-header .close { color: inherit; opacity: 0.8; text-shadow: none; }
html body .modal-header .close:hover { opacity: 1; }
html body .modal-backdrop.in { opacity: 0.35; }

/* daterangepicker internals */
html body .daterangepicker:before, html body .daterangepicker:after { display: none !important; }
html body .daterangepicker .calendar-table,
html body .daterangepicker .drp-calendar,
html body .daterangepicker .ranges,
html body .daterangepicker .calendar,
html body .daterangepicker .drp-buttons { background: transparent !important; border-color: var(--line) !important; color: var(--ink) !important; }
html body .daterangepicker td, html body .daterangepicker th { color: var(--ink-2) !important; border-radius: var(--r-sm) !important; border-color: transparent !important; background: transparent; }
html body .daterangepicker td.off,
html body .daterangepicker td.off.in-range,
html body .daterangepicker td.off.start-date,
html body .daterangepicker td.off.end-date,
html body .daterangepicker td.off.active { color: var(--faint) !important; background: transparent !important; border-radius: var(--r-sm) !important; }
html body .daterangepicker td.available:hover, html body .daterangepicker th.available:hover { background: var(--tile-2) !important; }
html body .daterangepicker td.in-range { background: var(--accent-soft) !important; color: var(--ink) !important; border-radius: 0 !important; }
html body .daterangepicker td.active,
html body .daterangepicker td.active:hover,
html body .daterangepicker .ranges li.active {
  background: var(--accent-fill) !important;
  color: var(--accent-ink) !important;
  border-radius: var(--r-sm) !important;
}
html body .daterangepicker .ranges li { color: var(--ink-2) !important; border-radius: var(--r-pill) !important; font-weight: 600; }
html body .daterangepicker .ranges li:hover { background: var(--tile-2) !important; }
html body .daterangepicker select,
html body .daterangepicker input { background: var(--tile) !important; color: var(--ink) !important; border: 0 !important; border-radius: var(--r-xs) !important; box-shadow: inset 0 0 0 1px var(--line-2); }
html body .daterangepicker .applyBtn { color: var(--accent-ink) !important; background: var(--accent-fill) !important; }

/* ================= misc ================= */
html body #footer {
  background: transparent !important;
  border: 0 !important;
  color: var(--muted) !important;
  font-size: var(--fs-xs);
  box-shadow: none !important;
}
html body .scroll-top.btn {
  background: var(--accent-fill) !important;
  color: var(--accent-ink) !important;
  border-radius: 50% !important;
  box-shadow: 0 10px 22px -10px var(--accent-glow) !important;
}
html body .pace .pace-progress { background: var(--amber) !important; }
html body .nav-tabs { border-color: var(--line) !important; }
html body .nav-tabs > li > a { color: var(--muted) !important; border: 0 !important; border-radius: var(--r-pill) !important; font-weight: 650; }
html body .nav-tabs > li.active > a,
html body .nav-tabs > li.active > a:hover { color: var(--accent-ink) !important; background: var(--accent-fill) !important; }

/* Page-level loaders built for the old dark theme (e.g. ModemData "Loading data...") */
html body [class*="loader"][class*="raw-data"] { background: color-mix(in srgb, var(--bg) 75%, transparent) !important; color: var(--ink) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: var(--r-lg); }

/* Highcharts: let the chart sit on the glass card */
html body .highcharts-background { fill: transparent !important; }
html body .highcharts-title, html body .highcharts-axis-labels text, html body .highcharts-legend-item text { fill: var(--ink-2) !important; color: var(--ink-2) !important; }

/* ================= legacy WebForms GridViews (emit inline colours) ================= */
html body table.GridText th, html body table[rules] th[scope="col"] {
  background: var(--tile-2) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
html body table.GridText td, html body table[rules] td { color: var(--ink-2) !important; background-color: transparent !important; border-color: var(--line) !important; }

/* ================= jQuery UI widgets (datepicker, dialog, spinner) ================= */
html body .ui-widget, html body .ui-widget input, html body .ui-widget select, html body .ui-widget button { font-family: var(--font) !important; }
html body .ui-widget-content { background: var(--glass-strong) !important; color: var(--ink) !important; border-color: var(--line-2) !important; }
html body .ui-widget-header { background: var(--accent-fill) !important; color: var(--accent-ink) !important; border-color: var(--line-2) !important; border-radius: var(--r-sm); }
html body .ui-state-default, html body .ui-widget-content .ui-state-default { background: var(--tile) !important; color: var(--ink) !important; border-color: var(--line-2) !important; }
html body .ui-state-hover, html body .ui-widget-content .ui-state-hover { background: var(--tile-2) !important; color: var(--ink) !important; }
html body .ui-state-active, html body .ui-state-highlight, html body .ui-widget-content .ui-state-active { background: var(--accent-soft) !important; color: var(--accent-text) !important; border-color: var(--accent) !important; }
html body .ui-datepicker, html body .ui-dialog { border-radius: var(--r-md) !important; box-shadow: var(--shadow-lg); }

/* ================= motion support (js/murmura-motion.js) ================= */
/* Sliding ink pill behind the active sidebar link (MURMURA usePill) */
html body #mainnav-menu { position: relative; }
html body #mainnav-menu > li { position: relative; z-index: 1; }
html body #mainnav-menu > li.mm-pill {
  position: absolute; z-index: 0; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; opacity: 0;
  list-style: none; pointer-events: none;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 60%), var(--accent-fill);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 10px 22px -12px var(--accent-glow);
}
/* With the pill in place the link itself stays transparent; only its text turns light */
html.mm-has-pill body #mainnav-menu > li.active-link > a,
html.mm-has-pill body #mainnav-menu > li.active-link > a:hover {
  background: transparent !important;
  box-shadow: none !important;
}

/* Hide what is about to animate in, so it does not flash before GSAP starts (removed by JS, 1.5s safety) */
html.mm-preload #page-content .panel,
html.mm-preload #page-title,
html.mm-preload #page-head .breadcrumb { visibility: hidden; }

/* SplitText title roll (MURMURA .word / .ch) */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.ch { display: inline-block; }

/* ================= loading = MURMURA shimmer skeleton ================= */
/*
 * MURMURA never spins: it shows skeleton bars where content will appear with a light sweep
 * (page.module.css .skel + @keyframes shimmer). Every legacy loader is restyled into that one
 * card. Pages still show / hide them by the same ids, so no page JS changed.
 *   Query / RawData_Report / TelemetryMasterSimcardList  .loader (#data-loader)
 *   ModemData                                            .raw-data-spinner
 *   RawData_Report2                                      .loading (full-screen)
 *   IndexNew                                             .loading-text
 *   anything new:                                        <div class="mm-loader"></div>
 */
:root { --skel-sheen: rgb(255 255 255 / 0.55); }
:root[data-theme='dark'] { --skel-sheen: rgb(255 255 255 / 0.07); }
@keyframes mm-shimmer {
  from { background-position: 180% 0, 18px 20px, 18px 44px, 18px 68px; }
  to   { background-position: -80% 0, 18px 20px, 18px 44px, 18px 68px; }
}

html body .mm-loader,
html body .loader,
html body .raw-data-spinner,
html body .loading-text::before,
html body .loading:not(:required)::after {
  content: '';
  display: block;
  box-sizing: border-box;
  width: min(360px, 86%);
  height: 98px;
  margin: 24px auto;
  padding: 0;
  border: 0 !important;
  border-radius: var(--r-lg);
  background-color: var(--tile) !important;
  background-image:
    linear-gradient(100deg, transparent 30%, var(--skel-sheen) 50%, transparent 70%),
    linear-gradient(var(--tile-2), var(--tile-2)),
    linear-gradient(var(--tile-2), var(--tile-2)),
    linear-gradient(var(--tile-2), var(--tile-2)) !important;
  background-size: 220% 100%, 42% 12px, 84% 12px, 64% 12px !important;
  background-repeat: no-repeat !important;
  background-position: 180% 0, 18px 20px, 18px 44px, 18px 68px;
  box-shadow: inset 0 0 0 1px var(--tile-rim), var(--shadow) !important;
  color: transparent;
  font-size: 0;
  -webkit-mask: none !important; mask: none !important;
  transform: none !important;
  animation: mm-shimmer 1.4s linear infinite !important;
}
/* the old dot-ring / spinner pseudo elements */
html body .loader::before,
html body .loader::after,
html body .raw-data-spinner::before,
html body .raw-data-spinner::after { content: none !important; display: none !important; animation: none !important; }

/* Query / RawData_Report / SIM list: inline card above the results */
html body #data-loader.loader { position: relative; }

/* ModemData: soft glass veil over the table while it reloads */
html body .raw-data-loader {
  background: color-mix(in srgb, var(--bg) 60%, transparent) !important;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: var(--r-lg);
}
html body .raw-data-loader-content { gap: 2px !important; color: var(--muted) !important; font-weight: 600; width: 100%; }
html body .raw-data-loader .raw-data-spinner { margin: 0 auto 6px; }

/* RawData_Report2: full-screen veil + centred card */
html body .loading:not(:required) { width: 0; height: 0; }
html body .loading::before {
  background: color-mix(in srgb, var(--bg) 70%, transparent) !important;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
html body .loading:not(:required)::after {
  position: fixed; left: 50%; top: 50%; margin: 0;
  translate: -50% -50%;
  box-shadow: inset 0 0 0 1px var(--glass-rim), var(--shadow-lg) !important;
  background-color: var(--glass-strong) !important;
}

/* IndexNew chart placeholders: skeleton above the "Loading..." caption */
html body .loading-text { color: var(--muted) !important; font-weight: 600; text-align: center; }
html body .loading-text .fa-spinner, html body .loading-text .fa-spin { display: none !important; }
html body .loading-text::before { margin: 0 auto 10px; }

/* ================= dropdowns (js enhancer: .mm-dd) ================= */
.mm-dd { position: relative; display: block; width: 100%; min-width: 0; }
/* native select kept for forms / page JS, visually hidden */
.mm-dd > select.mm-dd-native {
  position: absolute !important; inset: 0; width: 100% !important; height: 100% !important;
  opacity: 0 !important; pointer-events: none !important; margin: 0 !important;
}
.mm-dd-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px 0 14px;
  border: 0; border-radius: var(--r-md); cursor: pointer; text-align: left;
  background: var(--tile); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 500 var(--fs-md) / 1 var(--font);
  transition: box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.mm-dd--sm .mm-dd-btn { height: 36px; }
.mm-dd-btn:hover { background: var(--tile-2); }
.mm-dd-btn:focus-visible, .mm-dd.is-open .mm-dd-btn {
  outline: none; background: var(--tile-2);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft);
}
.mm-dd-btn:disabled, .mm-dd.is-disabled .mm-dd-btn { opacity: 0.55; cursor: not-allowed; }
.mm-dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-dd-label.mm-dd-placeholder { color: var(--faint); }
.mm-dd-chev { flex: none; width: 14px; height: 14px; color: var(--faint); transition: transform 0.45s cubic-bezier(0.34, 1.8, 0.5, 1), color 0.25s var(--ease); }
.mm-dd.is-open .mm-dd-chev { transform: rotate(180deg); color: var(--accent); }

.mm-dd-pop {
  position: fixed; z-index: 20050; display: flex; flex-direction: column;
  max-width: min(420px, calc(100vw - 16px)); padding: 6px; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--glass-shine), var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35); backdrop-filter: blur(var(--blur)) saturate(1.35);
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--glass-top), var(--shadow-lg);
  color: var(--ink); font-family: var(--font); outline: none;
}
.mm-dd-search {
  flex: none; width: 100%; height: 34px; margin: 0 0 6px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: var(--tile); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 500 var(--fs-sm) var(--font); outline: none;
}
.mm-dd-search:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--accent-soft); }
.mm-dd-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.mm-dd-group { padding: 8px 10px 4px; color: var(--faint); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mm-dd-opt {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: var(--fs-md); font-weight: 600; cursor: pointer; user-select: none;
}
.mm-dd-opt.is-active { background: var(--tile-2); color: var(--ink); }
.mm-dd-opt.is-selected { color: var(--ink); }
.mm-dd-opt.is-disabled { opacity: 0.45; cursor: not-allowed; }
.mm-dd-opt[hidden], .mm-dd-group[hidden] { display: none; }
.mm-dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-dd-check {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-fill); color: var(--accent-ink); opacity: 0; transform: scale(0.5);
  transition: opacity 0.2s var(--ease), transform 0.35s cubic-bezier(0.34, 1.8, 0.5, 1);
}
.mm-dd-check svg { width: 12px; height: 12px; }
.mm-dd-opt.is-selected .mm-dd-check { opacity: 1; transform: scale(1); }
.mm-dd-empty { padding: 10px; color: var(--muted); font-size: var(--fs-sm); text-align: center; }

/* Fallback for selects without the enhancer (standalone pages, DataTables length, JS off) */
html body select:not(.mm-dd-native):not([multiple]):not([size]) {
  height: auto; min-height: 34px; padding: 4px 30px 4px 12px;
  border: 0 !important; border-radius: var(--r-md) !important;
  background-color: var(--tile) !important; color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--line-2) !important;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23959aa1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important;
  font-family: var(--font); font-size: var(--fs-md);
}
html body select option { background: var(--glass-strong); color: var(--ink); }

/* Toasts (MM.toast) - bottom-right stack, glass pills */
#mm-toasts {
  position: fixed; z-index: 20000; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none; max-width: calc(100vw - 40px);
}
.mm-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  min-width: 240px; max-width: 420px; padding: 10px 10px 10px 12px;
  border-radius: var(--r-md);
  background: var(--glass-shine), var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35); backdrop-filter: blur(var(--blur)) saturate(1.35);
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--glass-top), var(--shadow-lg);
  color: var(--ink); font-family: var(--font); font-weight: 600; font-size: var(--fs-md);
}
.mm-toast-ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.mm-toast-ico svg { width: 16px; height: 16px; }
.mm-toast--good .mm-toast-ico { background: var(--good-soft); color: var(--good); }
.mm-toast--bad .mm-toast-ico { background: var(--bad-soft); color: var(--bad); }
.mm-toast--warn .mm-toast-ico { background: var(--warn-soft); color: var(--warn); }
.mm-toast--info .mm-toast-ico { background: var(--info-soft); color: var(--info); }
.mm-toast-msg { flex: 1; min-width: 0; line-height: 1.35; }
.mm-toast-x {
  flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.mm-toast-x:hover { background: var(--tile-2); color: var(--ink); }
@media (max-width: 760px) { #mm-toasts { left: 16px; right: 16px; align-items: stretch; } .mm-toast { max-width: none; } }

/* "+1" style feedback that floats up (MM.floatUp) */
.float-up { position: fixed; z-index: 2000; pointer-events: none; white-space: nowrap; font-weight: 700; font-size: var(--fs-lg); color: var(--good); text-shadow: 0 2px 10px rgb(0 0 0 / 0.25); }

/* Value just changed (MM.bump) */
.is-flash { animation: mm-flash 1s var(--ease); }
@keyframes mm-flash { 0% { color: var(--accent-text); } 100% { color: inherit; } }

/* Live dot: breathing core + expanding ring  <span class="live"></span> */
.live { position: relative; display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--good); color: var(--good); animation: mm-breathe 2.4s ease-in-out infinite; }
.live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: mm-breathe-ring 2.4s ease-out infinite; }
@keyframes mm-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.8); } }
@keyframes mm-breathe-ring { 0% { opacity: 0.5; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.8); } }

/* View Transitions theme reveal (MURMURA) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Panels lift a touch on hover, like MURMURA glass cards brightening their edge */
html body .panel { transition: box-shadow 0.35s var(--ease); }

/* ================= login (MURMURA signin.module.css) ================= */
/* The page keeps its own background image; only the form is MURMURA. */
html body #container.cls-container { background: transparent !important; position: relative; z-index: 1; }
/* Login background layer: always "cover"; only its transform animates on load */
.mm-login-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url(../img/login.png) center / cover no-repeat;
  transform-origin: 50% 50%;
  will-change: transform;
}
html body .cls-container #bg-overlay { background: rgb(10 14 18 / 0.18) !important; }
html body .cls-content { padding-top: 12vh; }
html body .cls-content .mm-signin {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 28px !important;
  border-radius: var(--r-xl) !important;
  text-align: left;
  background: var(--glass-shine), var(--glass-strong) !important;
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--glass-top), var(--shadow-lg) !important;
}
.mm-signin .mm-form { display: grid; gap: 18px; }
.mm-signin .mm-brand { display: flex; align-items: center; gap: 14px; }
.mm-signin .mm-brand b { display: block; font-size: var(--fs-xl); font-weight: 650; color: var(--ink); }
/* Text-only brand, centred above the title */
.mm-signin .mm-brand--center { justify-content: center; }
.mm-signin .mm-brand--center b { font-size: var(--fs-lg); font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.mm-signin .mm-brand small { color: var(--muted); font-size: var(--fs-xs); }
/* Light glass tile so the blue globe logo stays visible (it disappears on the dark ink tile) */
.mm-signin .mm-logo {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, #ffffff, #eef2f0);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 #fff, 0 10px 22px -12px rgb(40 60 60 / 0.45);
}
.mm-signin .mm-logo img { display: block; width: 38px; height: 38px; object-fit: contain; }
html body .mm-signin .mm-title { font-size: 40px !important; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 4px; font-weight: 650; }
.mm-signin .mm-sub { color: var(--muted); margin: 0; }
/* Brand, title and subtitle all centred */
html body .mm-signin .mm-title, .mm-signin .mm-sub { text-align: center; }
.mm-signin .mm-field { display: grid; gap: 7px; margin: 0; }
html body .mm-signin .mm-field label { margin: 0; font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2) !important; }
html body .mm-signin .mm-field .form-control { height: 46px; padding: 0 16px; font-size: var(--fs-base) !important; }
/* Password field with show / hide eye */
.mm-signin .mm-pwd { position: relative; }
html body .mm-signin .mm-pwd .form-control { padding-right: 50px; }
.mm-signin .mm-pwd-btn {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.mm-signin .mm-pwd-btn:hover { background: var(--tile-2); color: var(--ink); }
.mm-signin .mm-pwd-btn svg { width: 18px; height: 18px; }
.mm-signin .mm-pwd-btn .mm-eye-off { display: none; }
.mm-signin .mm-pwd-btn[aria-pressed='true'] { color: var(--ink); }
.mm-signin .mm-pwd-btn[aria-pressed='true'] .mm-eye { display: none; }
.mm-signin .mm-pwd-btn[aria-pressed='true'] .mm-eye-off { display: block; }

.mm-signin .mm-remember { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); }
.mm-signin .mm-switch {
  position: relative; flex: none; width: 42px; height: 24px; border: 0; padding: 0; border-radius: var(--r-pill); cursor: pointer;
  background: var(--tile-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background 0.3s var(--ease);
}
.mm-signin .mm-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.3); transition: transform 0.4s var(--ease);
}
.mm-signin .mm-switch[aria-checked='true'] { background: var(--accent-fill); }
.mm-signin .mm-switch[aria-checked='true']::after { transform: translateX(18px); }
html body .mm-signin .mm-submit { width: 100%; height: 46px; font-size: var(--fs-lg) !important; padding: 0 22px; }
.mm-signin .mm-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: var(--fs-sm); }
.mm-signin .mm-error[hidden] { display: none; }
html.mm-preload .mm-signin { visibility: hidden; }

/* Theme cross-fade */
.mm-theme-anim, .mm-theme-anim *, .mm-theme-anim *::before, .mm-theme-anim *::after {
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease), fill 0.45s var(--ease), box-shadow 0.45s var(--ease) !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .mm-wash { animation: none !important; }
  .mm-theme-anim, .mm-theme-anim * { transition: none !important; }
}

/* Phones: Nifty hides the sidebar off-canvas; keep it opaque so text stays readable */
@media (max-width: 767px) {
  html body #mainnav { margin: 8px; background: var(--glass-shine), var(--glass-strong) !important; }
  html body #navbar .brand-text { display: none; }
}

/* ------------------------------------------------------------------ confirm dialog (mmConfirm) */
.mm-confirm-backdrop {
  position: fixed; inset: 0; z-index: 20001;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5, 8, 14, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mm-confirm {
  width: 100%; max-width: 400px; padding: 22px 22px 18px;
  border-radius: var(--r-lg);
  background: var(--glass-shine), var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35); backdrop-filter: blur(var(--blur)) saturate(1.35);
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--glass-top), var(--shadow-lg);
  color: var(--ink); font-family: var(--font); text-align: center;
}
.mm-confirm-ico {
  display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--info-soft); color: var(--info);
}
.mm-confirm-ico svg { width: 24px; height: 24px; }
.mm-confirm--danger .mm-confirm-ico { background: var(--bad-soft); color: var(--bad); }
.mm-confirm--warn .mm-confirm-ico { background: var(--warn-soft); color: var(--warn); }
.mm-confirm-title { margin: 0 0 6px; font-size: var(--fs-lg); font-weight: 700; color: var(--ink); }
.mm-confirm-msg { margin: 0 0 20px; font-size: var(--fs-md); color: var(--muted); line-height: 1.5; word-break: break-word; }
.mm-confirm-actions { display: flex; gap: 10px; }
.mm-confirm-btn {
  flex: 1; height: 40px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: 600 var(--fs-md) var(--font); transition: transform .15s var(--ease), filter .15s var(--ease);
}
.mm-confirm-btn:hover { filter: brightness(1.1); }
.mm-confirm-btn:active { transform: scale(0.97); }
.mm-confirm-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mm-confirm-cancel { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.mm-confirm-ok { background: var(--accent); color: var(--accent-ink); }
.mm-confirm--danger .mm-confirm-ok { background: var(--bad); color: #fff; }

/* kept from the old theme sample stylesheet (removed): inputs never show a background image */
input { background-image: none !important; }

/* ------------------------------------------------------------------ required-field validation */
html body .form-control.mm-invalid,
html body .form-control.mm-invalid:focus {
  box-shadow: inset 0 0 0 1px var(--bad), 0 0 0 3px var(--bad-soft) !important;
  border-color: var(--bad) !important;
}
.mm-field-error {
  margin-top: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--bad);
  display: flex; align-items: center; gap: 6px;
}
.mm-field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--bad-soft); font-size: 11px; }
html body .mm-dd.mm-invalid .mm-dd-btn,
html body textarea.mm-invalid {
  box-shadow: inset 0 0 0 1px var(--bad), 0 0 0 3px var(--bad-soft) !important;
  border-color: var(--bad) !important;
}

/* ------------------------------------------------------------------ daterangepicker time selects
 * The calendar fixes these at 50px; the global select padding (12px + 30px arrow) left ~8px for
 * the text, so "10" showed as "1(" and "AM" as "A". Compact padding + a width that fits. */
html body .daterangepicker .calendar-time { display: flex; align-items: center; justify-content: center; gap: 4px; }
html body .daterangepicker .calendar-time select.hourselect,
html body .daterangepicker .calendar-time select.minuteselect,
html body .daterangepicker .calendar-time select.secondselect,
html body .daterangepicker .calendar-time select.ampmselect {
  width: 60px !important; min-width: 60px; min-height: 32px; height: 32px;
  margin: 0 !important;
  padding: 0 22px 0 10px !important;
  font-size: var(--fs-sm) !important; font-weight: 600; text-align: left; text-overflow: clip;
  background-position: right 8px center !important;
  cursor: pointer;
}
html body .daterangepicker .calendar-time select.ampmselect { width: 66px !important; min-width: 66px; margin-left: 4px !important; }
html body .daterangepicker .calendar-time select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------------------ table empty state */
html body table.dataTable td.dataTables_empty { padding: 0 !important; background: transparent !important; }
.mm-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 36px 16px; text-align: center; color: var(--muted); font-family: var(--font);
}
.mm-empty strong { color: var(--ink); font-size: var(--fs-md); font-weight: 700; }
.mm-empty span { font-size: var(--fs-sm); max-width: 360px; }
.mm-empty b { color: var(--ink); font-weight: 600; }
.mm-empty .mm-empty-ico {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px;
  border-radius: 50%; background: var(--tile-2); color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--tile-rim);
}
.mm-empty .mm-empty-ico svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ table loading overlay */
html body .mm-table-loading { position: relative; min-height: 160px; }
html body .mm-table-loading > * { opacity: 0.35; transition: opacity .2s var(--ease); pointer-events: none; }
html body .mm-table-loading::after {
  content: ''; position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(360px, 86%); height: 98px; border-radius: var(--r-lg);
  background-color: var(--tile);
  background-image:
    linear-gradient(100deg, transparent 30%, var(--skel-sheen) 50%, transparent 70%),
    linear-gradient(var(--tile-2), var(--tile-2)),
    linear-gradient(var(--tile-2), var(--tile-2)),
    linear-gradient(var(--tile-2), var(--tile-2));
  background-size: 220% 100%, 42% 12px, 84% 12px, 64% 12px;
  background-repeat: no-repeat;
  background-position: 180% 0, 18px 20px, 18px 44px, 18px 68px;
  box-shadow: inset 0 0 0 1px var(--tile-rim), var(--shadow-lg);
  animation: mm-shimmer 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) { html body .mm-table-loading::after { animation: none; } }

/* ------------------------------------------------------------------ phone layout (≤767px only)
 * Desktop is untouched. On phones: 16px side gutters, wide tables scroll inside their panel
 * instead of pushing the page sideways, action buttons sit side by side at full width, and the
 * date picker fits the screen. */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }
  html body #content-container #page-content { padding-left: 16px !important; padding-right: 16px !important; }
  html body #page-head, html body #page-title { padding-left: 16px !important; padding-right: 16px !important; }
  html body #page-content .panel-body { padding: 14px !important; }
  html body #page-content .panel-heading { padding-left: 14px !important; padding-right: 14px !important; }

  /* wide tables scroll inside their panel (pages set overflow-x: inherit inline) */
  html body .table-responsive { overflow-x: auto !important; -webkit-overflow-scrolling: touch; border: 0; }
  html body .pq-guide-table { display: block; overflow-x: auto; }
  html body table.dataTable { width: 100% !important; }
  html body .dataTables_wrapper td, html body .dataTables_wrapper th { white-space: nowrap; }

  /* DataTables "Show N entries" and "Search" stack, search fills the row */
  html body .dataTables_wrapper .dataTables_length,
  html body .dataTables_wrapper .dataTables_filter { float: none !important; text-align: left !important; margin-bottom: 10px; }
  html body .dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 8px; width: 100%; }
  html body .dataTables_wrapper .dataTables_filter input { flex: 1; width: auto !important; margin-left: 0 !important; }
  html body .dataTables_wrapper .dataTables_info,
  html body .dataTables_wrapper .dataTables_paginate { float: none !important; text-align: center !important; margin-top: 8px; }

  /* View Data / Download / Send: side by side, full width, primary action first */
  html body #page-content .form-group:has(> .btn.pull-right),
  html body #page-content [class*="col-"]:has(> .btn.pull-right) {
    display: flex; flex-direction: row-reverse; flex-wrap: wrap; gap: 8px;
  }
  html body #page-content .btn.pull-right {
    float: none !important; flex: 1 1 140px; margin: 0 !important; min-height: 40px;
  }
  html body #page-content [class*="col-"] + [class*="col-"] > .form-group:has(> .btn.pull-right) { margin-top: 4px; }

  /* inline fixed widths */
  html body #page-content [style*="width: 230px"] { width: 100% !important; max-width: 100%; }
  html body #page-content .form-control, html body #page-content .mm-dd { max-width: 100%; }

  /* date picker fits the screen: ranges on top, one calendar at a time */
  html body .daterangepicker { left: 16px !important; right: 16px !important; width: auto !important; max-width: none; }
  html body .daterangepicker .ranges { float: none !important; width: 100% !important; }
  html body .daterangepicker .ranges ul { display: flex; flex-wrap: wrap; gap: 4px; width: 100% !important; }
  html body .daterangepicker .drp-calendar { float: none !important; max-width: none !important; width: 100% !important; }
  html body .daterangepicker .drp-calendar.right { display: none !important; }
  html body .daterangepicker .drp-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
  html body .daterangepicker .drp-selected { width: 100%; text-align: center; }

  /* modals use the full width with a gutter */
  html body .modal-dialog { margin: 16px !important; width: auto !important; }
}
