/* ZMikhmon ROS67 — shell polish (layout only; colors inherit from theme) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --shell-font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --shell-radius: 10px;
}

body {
  font-family: var(--shell-font) !important;
  letter-spacing: 0.01em;
}

/* Brand weight only — keep default navbar height (50px) */
#brand {
  letter-spacing: 0.04em;
  font-weight: 700 !important;
  margin-right: 8px;
}

#cpage {
  font-weight: 500;
  opacity: 0.95;
}

/* —— Top-right toolbar: modern text links + logout CTA —— */
.navbar-right.znav-tools {
  display: flex;
  align-items: center;
  gap: 0;
  height: 50px;
  float: right;
  padding: 0 12px 0 8px;
  box-sizing: border-box;
}
.navbar-right.znav-tools > a,
.navbar-right.znav-tools > select,
.navbar-right.znav-tools > label,
.navbar-right.znav-tools > span {
  float: none;
}
.znav-timer,
.znav-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  line-height: 22px;
  box-sizing: border-box;
  transition: color 0.15s ease;
}
.znav-timer::after,
.znav-field::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  margin-top: -6px;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.znav-timer:hover,
.znav-field:hover,
.znav-field:focus-within {
  color: #fff;
}
.znav-timer {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: default;
}
.znav-select,
.navbar-right .znav-select {
  float: none !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 14px 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.75)' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0 center !important;
  background-size: 10px 6px !important;
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  font-family: var(--shell-font);
  line-height: 22px !important;
  max-width: 140px;
  min-width: 0;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.znav-select option {
  color: #1f2937;
  background: #fff;
  font-weight: 600;
  letter-spacing: 0;
}
.znav-field-session .znav-select {
  max-width: 11.5ch;
}
.znav-logout {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  float: none !important;
  margin: 0 0 0 10px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0;
  line-height: 26px !important;
  text-decoration: none !important;
  color: #fff !important;
  background: linear-gradient(160deg, #f87171 0%, #dc2626 100%) !important;
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
  box-shadow: none;
  transition: filter 0.15s ease;
}
.znav-logout:hover {
  filter: brightness(1.1);
  transform: none;
  color: #fff !important;
}
.znav-logout > i {
  font-size: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
}
.znav-logout-text {
  display: none !important;
}
.znav-soft-hide {
  display: none !important;
}
.znav-tight .znav-select {
  max-width: 78px !important;
  padding-right: 12px !important;
}
.znav-tight .znav-field-session .znav-select {
  max-width: 11.5ch !important;
}

@media screen and (max-width: 900px) {
  .znav-field-session .znav-select {
    max-width: 11.5ch;
  }
  .znav-select {
    max-width: 84px;
  }
  .znav-timer,
  .znav-field {
    padding: 0 8px;
  }
}
@media screen and (max-width: 750px) {
  .navbar-right.znav-tools {
    padding-right: 6px;
    gap: 0;
  }
  .znav-timer,
  .znav-field {
    padding: 0 6px;
  }
  .znav-logout {
    margin-left: 6px !important;
  }
  .znav-select {
    max-width: 72px;
  }
  .znav-field-session .znav-select {
    max-width: 11.5ch !important;
  }
}
/* Replace hamburger with ROS type toggle (openNav/closeNav) */
a.nav-ros-toggle {
  float: left;
  display: block;
  text-decoration: none !important;
  padding: 8px 10px !important;
  line-height: 34px;
  box-sizing: border-box;
}
a.nav-ros-toggle .nav-ros-label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 18px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}
a.nav-ros-toggle.ros7 .nav-ros-label {
  background: rgba(34, 197, 94, 0.35);
  border-color: rgba(34, 197, 94, 0.55);
}
a.nav-ros-toggle.ros6 .nav-ros-label {
  background: rgba(59, 130, 246, 0.35);
  border-color: rgba(59, 130, 246, 0.55);
}

@media screen and (max-width: 750px) {
  a.nav-ros-toggle {
    padding: 8px 8px !important;
  }
  a.nav-ros-toggle .nav-ros-label {
    font-size: 11px;
    padding: 3px 9px;
  }
}

/* Section labels — compact, match default menu row density */
.nav-section {
  margin: 8px 8px 2px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  user-select: none;
}

/* Do not override sidenav a / dropdown-btn padding/margin —
   default mikhmon-ui already sets height via icon padding (7px) + margin (5px) */

/*
 * Fix left menu scroll: theme uses height:100% + margin-top:51px on fixed sidenav,
 * so the panel extends past the viewport and bottom items become unreachable when
 * many dropdowns are open. Keep navbar gap via top/height calc + enable overflow-y.
 */
#sidenav.sidenav,
.sidenav {
  top: 51px !important;
  margin-top: 0 !important;
  height: calc(100% - 51px) !important;
  height: calc(100dvh - 51px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Shape only — no forced backgrounds/borders/colors */
.card {
  border-radius: var(--shell-radius) !important;
  overflow: hidden;
}

/* Template editor: CodeMirror must not be clipped to one line */
.main-container .card:has(.CodeMirror),
.main-container .card:has(#editorMikhmon) {
  overflow: visible !important;
}

.main-container .card-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.box {
  border-radius: var(--shell-radius) !important;
}

.box-group-icon {
  border-radius: 10px !important;
}

/*
 * Colored stat/list cards — same visual language as login brand panel:
 * layered radial glow + diagonal gradient + soft geometric shapes.
 * Random bg-* classes stay; only the paint is modernized.
 */
.box.bg-blue,
.box.bg-indigo,
.box.bg-purple,
.box.bg-pink,
.box.bg-red,
.box.bg-yellow,
.box.bg-green,
.box.bg-teal,
.box.bg-cyan,
.box.bg-grey,
.box.bg-light-blue {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  border: 0 !important;
  color: #fff !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 28px rgba(16, 24, 40, 0.18) !important;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.box.bg-blue > .box-group,
.box.bg-indigo > .box-group,
.box.bg-purple > .box-group,
.box.bg-pink > .box-group,
.box.bg-red > .box-group,
.box.bg-yellow > .box-group,
.box.bg-green > .box-group,
.box.bg-teal > .box-group,
.box.bg-cyan > .box-group,
.box.bg-grey > .box-group,
.box.bg-light-blue > .box-group {
  position: relative;
  z-index: 1;
}

.box.bg-blue::before,
.box.bg-indigo::before,
.box.bg-purple::before,
.box.bg-pink::before,
.box.bg-red::before,
.box.bg-yellow::before,
.box.bg-green::before,
.box.bg-teal::before,
.box.bg-cyan::before,
.box.bg-grey::before,
.box.bg-light-blue::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -18%;
  width: 160px;
  height: 160px;
  border: 14px solid rgba(255, 255, 255, 0.1);
  border-radius: 44px;
  transform: rotate(18deg);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: zbox-orbit 18s linear infinite;
}

.box.bg-blue::after,
.box.bg-indigo::after,
.box.bg-purple::after,
.box.bg-pink::after,
.box.bg-red::after,
.box.bg-yellow::after,
.box.bg-green::after,
.box.bg-teal::after,
.box.bg-cyan::after,
.box.bg-grey::after,
.box.bg-light-blue::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
  animation: zbox-drift 12s ease-in-out infinite alternate;
}

/* Stagger feel without JS: alternate hue families get reverse timing */
.box.bg-indigo::before,
.box.bg-pink::before,
.box.bg-green::before,
.box.bg-cyan::before,
.box.bg-grey::before {
  animation-duration: 22s;
  animation-direction: reverse;
}
.box.bg-purple::after,
.box.bg-red::after,
.box.bg-teal::after,
.box.bg-light-blue::after,
.box.bg-yellow::after {
  animation-duration: 15s;
  animation-delay: -4s;
}

@keyframes zbox-orbit {
  from { transform: rotate(18deg) translate3d(0, 0, 0); }
  to { transform: rotate(378deg) translate3d(0, 0, 0); }
}

@keyframes zbox-drift {
  0% {
    transform: rotate(-12deg) translate3d(0, 0, 0) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: rotate(-4deg) translate3d(-10px, -8px, 0) scale(1.06);
    opacity: 1;
  }
  100% {
    transform: rotate(-18deg) translate3d(6px, -14px, 0) scale(0.96);
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .box.bg-blue::before,
  .box.bg-indigo::before,
  .box.bg-purple::before,
  .box.bg-pink::before,
  .box.bg-red::before,
  .box.bg-yellow::before,
  .box.bg-green::before,
  .box.bg-teal::before,
  .box.bg-cyan::before,
  .box.bg-grey::before,
  .box.bg-light-blue::before,
  .box.bg-blue::after,
  .box.bg-indigo::after,
  .box.bg-purple::after,
  .box.bg-pink::after,
  .box.bg-red::after,
  .box.bg-yellow::after,
  .box.bg-green::after,
  .box.bg-teal::after,
  .box.bg-cyan::after,
  .box.bg-grey::after,
  .box.bg-light-blue::after {
    animation: none !important;
  }
}

.box.bg-blue:hover,
.box.bg-indigo:hover,
.box.bg-purple:hover,
.box.bg-pink:hover,
.box.bg-red:hover,
.box.bg-yellow:hover,
.box.bg-green:hover,
.box.bg-teal:hover,
.box.bg-cyan:hover,
.box.bg-grey:hover,
.box.bg-light-blue:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 14px 32px rgba(16, 24, 40, 0.22) !important;
}

/* Per-color paint (login-style layered gradients) */
.box.bg-blue {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(125, 211, 252, 0.45), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(7, 89, 133, 0.55), transparent 50%),
    linear-gradient(155deg, #0a4f6e 0%, #008bc9 48%, #05384f 100%) !important;
}
.box.bg-indigo {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(165, 180, 252, 0.42), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(49, 46, 129, 0.55), transparent 50%),
    linear-gradient(155deg, #312e81 0%, #6366f1 48%, #1e1b4b 100%) !important;
}
.box.bg-purple {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(216, 180, 254, 0.4), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(76, 29, 149, 0.55), transparent 50%),
    linear-gradient(155deg, #4c1d95 0%, #a855f7 48%, #2e1065 100%) !important;
}
.box.bg-pink {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(251, 207, 232, 0.4), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(157, 23, 77, 0.5), transparent 50%),
    linear-gradient(155deg, #9d174d 0%, #ec4899 48%, #500724 100%) !important;
}
.box.bg-red {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(254, 202, 202, 0.38), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(127, 29, 29, 0.55), transparent 50%),
    linear-gradient(155deg, #7f1d1d 0%, #ef4444 48%, #450a0a 100%) !important;
}
.box.bg-yellow {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(254, 243, 199, 0.45), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(120, 53, 15, 0.5), transparent 50%),
    linear-gradient(155deg, #92400e 0%, #f59e0b 48%, #451a03 100%) !important;
}
.box.bg-green {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(167, 243, 208, 0.4), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(20, 83, 45, 0.55), transparent 50%),
    linear-gradient(155deg, #14532d 0%, #22c55e 48%, #052e16 100%) !important;
}
.box.bg-teal {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(153, 246, 228, 0.4), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(17, 94, 89, 0.55), transparent 50%),
    linear-gradient(155deg, #115e59 0%, #14b8a6 48%, #042f2e 100%) !important;
}
.box.bg-cyan {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(165, 243, 252, 0.42), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(21, 94, 117, 0.55), transparent 50%),
    linear-gradient(155deg, #155e75 0%, #06b6d4 48%, #083344 100%) !important;
}
.box.bg-grey {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(229, 231, 235, 0.28), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(31, 41, 55, 0.55), transparent 50%),
    linear-gradient(155deg, #374151 0%, #6b7280 48%, #111827 100%) !important;
}
.box.bg-light-blue {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(186, 230, 253, 0.45), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(3, 105, 161, 0.5), transparent 50%),
    linear-gradient(155deg, #0369a1 0%, #38bdf8 48%, #0c4a6e 100%) !important;
}

.box.bg-blue a,
.box.bg-indigo a,
.box.bg-purple a,
.box.bg-pink a,
.box.bg-red a,
.box.bg-yellow a,
.box.bg-green a,
.box.bg-teal a,
.box.bg-cyan a,
.box.bg-grey a,
.box.bg-light-blue a {
  color: inherit;
}


.btn,
.btn-login {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 8px !important;
  font-weight: 600;
  transition: filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

/* Shared surface + static geometric pattern (card language, no animation) */
.btn.bg-primary,
.btn.bg-secondary,
.btn.bg-blue,
.btn.bg-light-blue,
.btn.bg-indigo,
.btn.bg-purple,
.btn.bg-pink,
.btn.bg-red,
.btn.bg-danger,
.btn.bg-yellow,
.btn.bg-green,
.btn.bg-teal,
.btn.bg-cyan,
.btn.bg-grey,
.btn-login,
a.btn.bg-primary,
a.btn.bg-secondary,
a.btn.bg-blue,
a.btn.bg-light-blue,
a.btn.bg-indigo,
a.btn.bg-purple,
a.btn.bg-pink,
a.btn.bg-red,
a.btn.bg-danger,
a.btn.bg-yellow,
a.btn.bg-green,
a.btn.bg-teal,
a.btn.bg-cyan,
a.btn.bg-grey,
button.bg-primary,
button.bg-secondary,
button.bg-blue,
button.bg-light-blue,
button.bg-indigo,
button.bg-purple,
button.bg-pink,
button.bg-red,
button.bg-danger,
button.bg-yellow,
button.bg-green,
button.bg-teal,
button.bg-cyan,
button.bg-grey {
  border: 0 !important;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 6px 14px rgba(16, 24, 40, 0.16) !important;
}
.btn.bg-primary > *,
.btn.bg-secondary > *,
.btn.bg-blue > *,
.btn.bg-light-blue > *,
.btn.bg-indigo > *,
.btn.bg-purple > *,
.btn.bg-pink > *,
.btn.bg-red > *,
.btn.bg-danger > *,
.btn.bg-yellow > *,
.btn.bg-green > *,
.btn.bg-teal > *,
.btn.bg-cyan > *,
.btn.bg-grey > *,
.btn-login > *,
a.btn.bg-primary > *,
a.btn.bg-secondary > *,
a.btn.bg-blue > *,
a.btn.bg-light-blue > *,
a.btn.bg-indigo > *,
a.btn.bg-purple > *,
a.btn.bg-pink > *,
a.btn.bg-red > *,
a.btn.bg-danger > *,
a.btn.bg-yellow > *,
a.btn.bg-green > *,
a.btn.bg-teal > *,
a.btn.bg-cyan > *,
a.btn.bg-grey > *,
button.bg-primary > *,
button.bg-secondary > *,
button.bg-blue > *,
button.bg-light-blue > *,
button.bg-indigo > *,
button.bg-purple > *,
button.bg-pink > *,
button.bg-red > *,
button.bg-danger > *,
button.bg-yellow > *,
button.bg-green > *,
button.bg-teal > *,
button.bg-cyan > *,
button.bg-grey > * {
  position: relative;
  z-index: 1;
}

.btn.bg-primary::before,
.btn.bg-secondary::before,
.btn.bg-blue::before,
.btn.bg-light-blue::before,
.btn.bg-indigo::before,
.btn.bg-purple::before,
.btn.bg-pink::before,
.btn.bg-red::before,
.btn.bg-danger::before,
.btn.bg-yellow::before,
.btn.bg-green::before,
.btn.bg-teal::before,
.btn.bg-cyan::before,
.btn.bg-grey::before,
.btn-login::before,
a.btn.bg-primary::before,
a.btn.bg-secondary::before,
a.btn.bg-blue::before,
a.btn.bg-light-blue::before,
a.btn.bg-indigo::before,
a.btn.bg-purple::before,
a.btn.bg-pink::before,
a.btn.bg-red::before,
a.btn.bg-danger::before,
a.btn.bg-yellow::before,
a.btn.bg-green::before,
a.btn.bg-teal::before,
a.btn.bg-cyan::before,
a.btn.bg-grey::before,
button.bg-primary::before,
button.bg-secondary::before,
button.bg-blue::before,
button.bg-light-blue::before,
button.bg-indigo::before,
button.bg-purple::before,
button.bg-pink::before,
button.bg-red::before,
button.bg-danger::before,
button.bg-yellow::before,
button.bg-green::before,
button.bg-teal::before,
button.bg-cyan::before,
button.bg-grey::before {
  content: "";
  position: absolute;
  inset: -55% auto auto -28%;
  width: 58px;
  height: 58px;
  border: 8px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  transform: rotate(18deg);
  pointer-events: none;
  z-index: 0;
  animation: none !important;
}

.btn.bg-primary::after,
.btn.bg-secondary::after,
.btn.bg-blue::after,
.btn.bg-light-blue::after,
.btn.bg-indigo::after,
.btn.bg-purple::after,
.btn.bg-pink::after,
.btn.bg-red::after,
.btn.bg-danger::after,
.btn.bg-yellow::after,
.btn.bg-green::after,
.btn.bg-teal::after,
.btn.bg-cyan::after,
.btn.bg-grey::after,
.btn-login::after,
a.btn.bg-primary::after,
a.btn.bg-secondary::after,
a.btn.bg-blue::after,
a.btn.bg-light-blue::after,
a.btn.bg-indigo::after,
a.btn.bg-purple::after,
a.btn.bg-pink::after,
a.btn.bg-red::after,
a.btn.bg-danger::after,
a.btn.bg-yellow::after,
a.btn.bg-green::after,
a.btn.bg-teal::after,
a.btn.bg-cyan::after,
a.btn.bg-grey::after,
button.bg-primary::after,
button.bg-secondary::after,
button.bg-blue::after,
button.bg-light-blue::after,
button.bg-indigo::after,
button.bg-purple::after,
button.bg-pink::after,
button.bg-red::after,
button.bg-danger::after,
button.bg-yellow::after,
button.bg-green::after,
button.bg-teal::after,
button.bg-cyan::after,
button.bg-grey::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -20px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
  animation: none !important;
}

.btn.bg-primary:hover,
.btn.bg-secondary:hover,
.btn.bg-blue:hover,
.btn.bg-light-blue:hover,
.btn.bg-indigo:hover,
.btn.bg-purple:hover,
.btn.bg-pink:hover,
.btn.bg-red:hover,
.btn.bg-danger:hover,
.btn.bg-yellow:hover,
.btn.bg-green:hover,
.btn.bg-teal:hover,
.btn.bg-cyan:hover,
.btn.bg-grey:hover,
.btn-login:hover,
.btn.bg-primary:focus,
.btn.bg-secondary:focus,
.btn.bg-blue:focus,
.btn.bg-light-blue:focus,
.btn.bg-indigo:focus,
.btn.bg-purple:focus,
.btn.bg-pink:focus,
.btn.bg-red:focus,
.btn.bg-danger:focus,
.btn.bg-yellow:focus,
.btn.bg-green:focus,
.btn.bg-teal:focus,
.btn.bg-cyan:focus,
.btn.bg-grey:focus,
.btn-login:focus {
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 8px 18px rgba(16, 24, 40, 0.2) !important;
}
.btn.bg-primary:active,
.btn.bg-secondary:active,
.btn.bg-blue:active,
.btn.bg-light-blue:active,
.btn.bg-indigo:active,
.btn.bg-purple:active,
.btn.bg-pink:active,
.btn.bg-red:active,
.btn.bg-danger:active,
.btn.bg-yellow:active,
.btn.bg-green:active,
.btn.bg-teal:active,
.btn.bg-cyan:active,
.btn.bg-grey:active,
.btn-login:active {
  filter: brightness(0.96);
}

/* Solid base hues (no color gradients) */
.btn.bg-primary,
.btn.bg-blue,
.btn-login,
a.btn.bg-primary,
a.btn.bg-blue,
button.bg-primary,
button.bg-blue {
  background-color: #20a8d8 !important;
  background-image: none !important;
}
.btn.bg-light-blue,
a.btn.bg-light-blue,
button.bg-light-blue {
  background-color: #38bdf8 !important;
  background-image: none !important;
}
.btn.bg-indigo,
a.btn.bg-indigo,
button.bg-indigo {
  background-color: #6366f1 !important;
  background-image: none !important;
}
.btn.bg-purple,
a.btn.bg-purple,
button.bg-purple {
  background-color: #a855f7 !important;
  background-image: none !important;
}
.btn.bg-pink,
a.btn.bg-pink,
button.bg-pink {
  background-color: #ec4899 !important;
  background-image: none !important;
}
.btn.bg-red,
.btn.bg-danger,
a.btn.bg-red,
a.btn.bg-danger,
button.bg-red,
button.bg-danger {
  background-color: #f86c6b !important;
  background-image: none !important;
}
.btn.bg-yellow,
a.btn.bg-yellow,
button.bg-yellow {
  background-color: #ffc107 !important;
  background-image: none !important;
}
.btn.bg-green,
a.btn.bg-green,
button.bg-green {
  background-color: #4dbd74 !important;
  background-image: none !important;
}
.btn.bg-teal,
a.btn.bg-teal,
button.bg-teal {
  background-color: #14b8a6 !important;
  background-image: none !important;
}
.btn.bg-cyan,
a.btn.bg-cyan,
button.bg-cyan {
  background-color: #06b6d4 !important;
  background-image: none !important;
}
.btn.bg-secondary,
.btn.bg-grey,
a.btn.bg-secondary,
a.btn.bg-grey,
button.bg-secondary,
button.bg-grey {
  background-color: #73818f !important;
  background-image: none !important;
}

.form-control,
.group-item {
  border-radius: 8px !important;
}

.table th {
  font-weight: 600;
}

/* Quick actions — inherit card/box theme colors */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--shell-radius);
  min-height: 56px;
  text-decoration: none !important;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Reuse theme card surface */
.quick-action.box,
.card-body .quick-action {
  margin: 0;
}

.quick-action:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.quick-action i {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.quick-action span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.quick-action small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
  opacity: 0.7;
}

/* Login — layout only; card colors from theme */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-page .login-box {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding-top: 0 !important;
}

.login-page .card-header {
  text-align: center;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.login-page .card-header h3 {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.7;
}

.login-brand {
  text-align: center;
  margin: 4px 0 18px;
}

.login-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.login-brand .title {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.login-brand .subtitle {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.7;
}

.login-form .form-control {
  height: 44px;
  font-size: 15px;
  margin-bottom: 10px;
}

.login-form .btn-login {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  font-size: 15px;
}

.login-error {
  margin-top: 12px;
}

@media screen and (max-width: 900px) {
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 576px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }
  .login-page {
    padding: 16px;
  }
}

/* Router list actions — keep Open / Edit / Delete in one row */
.router-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.router-actions a,
.router-actions .connect {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Router list icon — match FA6 visual weight */
.box-group-icon .router-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  line-height: 0;
  vertical-align: middle;
  width: 1.55em;
  height: 1.55em;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-sizing: border-box;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.box-group-icon .router-icon:hover {
  transform: translateY(-1px) scale(1.06);
  opacity: 0.95;
}

.box-group-icon .router-svg {
  width: 1.45em;
  height: 1.45em;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.router-actions i.fa-solid {
  width: 1.1em;
  text-align: center;
  margin-right: 0.2em;
  font-size: 0.92em;
  opacity: 0.9;
}
.router-actions a[aria-label] i.fa-trash-can,
.router-actions a[title] i.fa-trash-can {
  margin-right: 0;
}

/* Settings label alignment (Jenis Router row) */
.table.table-sm td.z-label {
  width: 130px;
  white-space: nowrap;
  vertical-align: middle !important;
}
.table.table-sm td.z-hint {
  padding-top: 0 !important;
  opacity: 0.8;
  font-size: 12px;
}

/* Password eye toggle — keep compact, no layout change */
.pass-field {
  position: relative;
  display: block;
  width: 100%;
}

.pass-field-input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 40px !important;
}

.pass-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pass-toggle:hover,
.pass-toggle.is-visible {
  opacity: 1;
}

.pass-toggle i {
  font-size: 15px;
  pointer-events: none;
}

/* —— Connect/save dialog (patterned animated card, plain overlay) —— */
.zdlg-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.zdlg-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  padding: 18px 18px 14px;
  background:
    radial-gradient(420px 220px at 8% 0%, rgba(14, 165, 233, 0.12), transparent 55%),
    radial-gradient(360px 200px at 100% 100%, rgba(0, 139, 201, 0.1), transparent 52%),
    #fff;
  color: #1f2937;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.zdlg-card::before {
  content: "";
  position: absolute;
  inset: -28% auto auto -22%;
  width: 200px;
  height: 200px;
  border: 16px solid rgba(0, 139, 201, 0.14);
  border-radius: 64px;
  transform: rotate(18deg);
  pointer-events: none;
  will-change: transform;
  animation: zlogin-orbit 28s linear infinite;
  z-index: 0;
}
.zdlg-card::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -54px;
  width: 148px;
  height: 148px;
  border-radius: 44px;
  background: rgba(0, 139, 201, 0.08);
  transform: rotate(-12deg);
  pointer-events: none;
  will-change: transform, opacity;
  animation: zlogin-drift 16s ease-in-out infinite alternate;
  z-index: 0;
}
.zdlg-head,
.zdlg-lead,
.zdlg-table,
.zdlg-credit,
.zdlg-actions {
  position: relative;
  z-index: 1;
}
.zdlg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.zdlg-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: inherit;
}
.zdlg-head i {
  font-size: 22px;
  line-height: 1;
}
.zdlg-ok .zdlg-head i { color: #16a34a; }
.zdlg-warn .zdlg-head i { color: #d97706; }
.zdlg-err .zdlg-head i { color: #dc2626; }
.zdlg-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: inherit;
  opacity: 0.82;
}
.zdlg-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 13px;
  color: inherit;
}
.zdlg-table td {
  padding: 6px 0;
  border-bottom: 1px solid rgba(127, 127, 127, 0.18);
  vertical-align: top;
}
.zdlg-table tr:last-child td {
  border-bottom: 0;
}
.zdlg-table td:first-child {
  width: 42%;
  padding-right: 8px;
  opacity: 0.72;
  font-weight: 500;
}
.zdlg-table td b {
  font-weight: 600;
  color: inherit;
}
.zdlg-credit {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.62;
  color: inherit;
}
.zdlg-actions {
  text-align: right;
}
.zdlg-btn {
  min-width: 88px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .zdlg-card::before,
  .zdlg-card::after {
    animation: none !important;
  }
}

/* —— Voucher Agent directory —— */
/* Keep overflow:hidden (same as global .card) so top corners match bottom (shell-radius).
   Theme .card-header only has 2px top radius; without clipping it looks square vs 10px bottom. */
.zagen-card {
  overflow: hidden;
}
.zagen-card > .card-header {
  border-radius: var(--shell-radius) var(--shell-radius) 0 0 !important;
}
.zagen-card .card-body {
  padding-top: 14px;
}

.zagen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.zagen-header-main {
  flex: 1 1 180px;
  min-width: 0;
}
.zagen-header h3 {
  margin: 0 0 4px;
}
.zagen-sub {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
  max-width: 460px;
  line-height: 1.4;
}
.zagen-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.zagen-period {
  display: none;
}
.zagen-add-btn {
  white-space: nowrap;
  cursor: pointer;
}
.zagen-flash {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.zagen-flash-ok {
  background: rgba(20, 184, 166, 0.12);
}
.zagen-flash-err {
  background: rgba(239, 68, 68, 0.12);
}

/* Agent add/edit — same zdlg shell (pattern + orbit/drift animation) */
.zagen-dlg-card {
  max-width: 460px;
}
.zagen-dlg-card .zdlg-head i {
  color: #008BC9;
}
.zagen-dlg-form {
  position: relative;
  z-index: 1;
  margin: 0;
}
.zagen-dlg-form .zagen-form-grid {
  margin-top: 4px;
}
.zagen-dlg-form .zagen-form-grid label {
  color: #1f2937;
  opacity: 1;
}
.zagen-dlg-form .zagen-form-grid label span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #486581;
}
.zagen-dlg-form .form-control {
  background: #fff !important;
  color: #102a43 !important;
  border: 1px solid #c9d6e4 !important;
  border-radius: 10px !important;
  height: 40px;
  padding: 8px 12px;
  box-sizing: border-box;
}
.zagen-dlg-form .form-control:focus {
  border-color: #008BC9 !important;
  box-shadow: 0 0 0 3px rgba(0, 139, 201, 0.15);
  outline: none;
}
.zagen-dlg-form .zagen-hint {
  color: #627d98;
  opacity: 1;
  margin: 10px 0 0;
}
.zagen-dlg-error {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fde8e8;
  color: #9b1c1c;
  font-size: 13px;
  line-height: 1.4;
}
.zagen-dlg-hidden {
  display: none !important;
}
.zagen-dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.zagen-dlg-actions .zdlg-btn {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
}
.zagen-dlg-card .zdlg-credit {
  margin-top: 12px;
}

.zagen-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
.zagen-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}
.zagen-code-input {
  font-family: "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.02em;
}
.zagen-hint {
  margin: 10px 0 0;
  font-size: 12px;
  opacity: 0.65;
}

/* Summary strip — CSS grid, no float cols */
.zagen-summary {
  margin: 0 0 14px;
}
.zagen-summary > .box {
  margin: 0;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.zagen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.zagen-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 360px;
  min-width: 0;
}
.zagen-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
  font-size: 13px;
  pointer-events: none;
}
.zagen-search input {
  width: 100%;
  padding-left: 34px;
  box-sizing: border-box;
}
.zagen-period-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.55;
  white-space: nowrap;
}

/* Agent cards grid */
.zagen-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.zagen-box-wrap {
  min-width: 0;
}
.zagen-stat-box {
  min-height: 148px !important;
  height: auto !important;
  padding: 14px !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}
.zagen-box-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.zagen-box-id {
  min-width: 0;
  flex: 1 1 auto;
}
.zagen-box-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zagen-box-code {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zagen-box-tools {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}
.zagen-box-tools form {
  margin: 0;
  display: inline;
}
.zagen-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  opacity: 0.9;
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.zagen-tool:hover,
.zagen-tool:focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.24);
}
.zagen-box-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
  color: inherit;
  cursor: default;
}
.zagen-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.zagen-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.zagen-metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.72;
}
.zagen-metric-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.zagen-metric-value small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
}
.zagen-metric-money {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.zagen-metric-avg .zagen-metric-money {
  font-size: 13px;
}
.zagen-empty {
  text-align: center;
  padding: 42px 16px 28px;
}
.zagen-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #0284c7;
  background: rgba(14, 165, 233, 0.12);
}
.zagen-empty h4 {
  margin: 0 0 6px;
  font-size: 17px;
}
.zagen-empty p {
  margin: 0 auto 16px;
  max-width: 380px;
  font-size: 13px;
  opacity: 0.7;
}
.zagen-foot-note {
  margin: 14px 0 0;
  font-size: 11px;
  opacity: 0.55;
  line-height: 1.45;
}
.zagen-foot-note code {
  font-size: 11px;
}

/* Tablet */
@media (max-width: 992px) {
  .zagen-boxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 720px) {
  .zagen-sub {
    max-width: none;
  }
  .zagen-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .zagen-period {
    flex: 1 1 auto;
  }
  .zagen-period-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 8px 10px;
  }
  .zagen-form-grid {
    grid-template-columns: 1fr;
  }
  .zagen-dlg-actions {
    justify-content: stretch;
  }
  .zagen-dlg-actions .zdlg-btn {
    flex: 1 1 auto;
  }
  .zagen-summary > .box {
    max-width: none;
  }
  .zagen-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .zagen-search {
    max-width: none;
    flex: 1 1 auto;
  }
  .zagen-period-label {
    text-align: left;
  }
  .zagen-boxes {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .zagen-stat-box {
    min-height: 0 !important;
    padding: 14px 14px 12px !important;
  }
  .zagen-box-body {
    gap: 8px;
  }
  .zagen-metric-row {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .zagen-metric-label {
    font-size: 9px;
    letter-spacing: 0.04em;
  }
  .zagen-metric-value {
    font-size: 18px;
  }
  .zagen-metric-value small {
    font-size: 11px;
  }
  .zagen-metric-money,
  .zagen-metric-avg .zagen-metric-money {
    font-size: 12px;
  }
  .zagen-tool {
    width: 36px;
    height: 36px;
  }
  .zagen-foot-note {
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .zagen-add-btn span {
    display: none;
  }
  .zagen-metric-row {
    gap: 6px;
  }
  .zagen-metric-value {
    font-size: 16px;
  }
  .zagen-metric-money,
  .zagen-metric-avg .zagen-metric-money {
    font-size: 11px;
  }
}

/* fallback if login keyframes not loaded on some pages */
@keyframes zlogin-orbit {
  from { transform: rotate(18deg) translate3d(0, 0, 0); }
  to { transform: rotate(378deg) translate3d(0, 0, 0); }
}
@keyframes zlogin-drift {
  0% { transform: rotate(-12deg) translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50% { transform: rotate(-4deg) translate3d(-18px, -14px, 0) scale(1.08); opacity: 1; }
  100% { transform: rotate(-20deg) translate3d(12px, -22px, 0) scale(0.94); opacity: 0.65; }
}

/* —— Modern Font Awesome 6 icon sizing (does not affect .router-svg) —— */
i.fa,
i.fas,
i.far,
i.fab,
i.fa-solid,
i.fa-regular,
i.fa-brands {
  line-height: 1;
  vertical-align: -0.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sidenav a > i.fa,
.sidenav a > i.fas,
.sidenav a > i.fa-solid,
.sidenav .dropdown-btn > i.fa,
.sidenav .dropdown-btn > i.fas,
.sidenav .dropdown-btn > i.fa-solid,
.sidenav .menu > i.fa,
.sidenav .menu > i.fas,
.sidenav .menu > i.fa-solid {
  width: 1.35em;
  margin-right: 0.45em;
  font-size: 0.98em;
  text-align: center;
  opacity: 0.92;
}

.sidenav .dropdown-btn > i.fa-chevron-down,
.sidenav .dropdown-btn > i.fa-caret-down,
.sidenav .dropdown-btn > i.fa-solid.fa-chevron-down,
.sidenav .dropdown-btn > i.fa-solid.fa-caret-down {
  width: auto;
  margin-right: 0;
  margin-left: 0.35em;
  font-size: 0.75em;
  opacity: 0.65;
}

.navbar i.fa,
.navbar i.fas,
.navbar i.fa-solid {
  font-size: 1em;
}

.card-header h3 > i.fa,
.card-header h3 > i.fas,
.card-header h3 > i.fa-solid,
.card-header .card-title > i.fa,
.card-header .card-title > i.fas,
.card-header .card-title > i.fa-solid {
  margin-right: 0.4em;
  font-size: 0.92em;
  opacity: 0.9;
}

.box-group-icon > i.fa,
.box-group-icon > i.fas,
.box-group-icon > i.fa-solid {
  font-size: 1.45em;
  line-height: 1;
}

.btn > i.fa,
.btn > i.fas,
.btn > i.fa-solid,
button > i.fa,
button > i.fas,
button > i.fa-solid {
  font-size: 0.95em;
}

.zlogin-points i.fa,
.zlogin-points i.fas,
.zlogin-points i.fa-solid,
.zlogin-field > i.fa,
.zlogin-field > i.fas,
.zlogin-field > i.fa-solid {
  font-size: 1em;
}

/* —— Live traffic metrics (Tx / Rx) —— */
.ztraffic-live {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  margin: 0 0 12px;
  padding: 8px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.ztraffic-metric {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}

.ztraffic-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  outline: none;
  box-shadow: none;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
}

.ztraffic-metric-tx .ztraffic-metric-icon {
  color: #0284c7;
  background: rgba(14, 165, 233, 0.14);
}

.ztraffic-metric-rx .ztraffic-metric-icon {
  color: #e11d48;
  background: rgba(244, 63, 94, 0.12);
}

.ztraffic-metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ztraffic-metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.5;
  line-height: 1;
}

.ztraffic-metric-rate {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.ztraffic-metric-value {
  font-family: "IBM Plex Mono", "Consolas", "Segoe UI", monospace;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: inherit;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ztraffic-metric-unit {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  opacity: 0.48;
  flex: 0 0 auto;
  white-space: nowrap;
}

#trafficMonitor .highcharts-background {
  fill: transparent !important;
}
#trafficMonitor {
  position: relative;
  z-index: 1;
}
.ztraffic-chart-shell.zresume-chart-shell {
  min-height: 0;
  border-radius: 12px;
}
.ztraffic-chart-shell #trafficMonitor {
  margin: 0;
}

/* —— Resume / selling chart (aligned with traffic card) —— */
.zresume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}
.zresume-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.zresume-title {
  margin: 0;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .zresume-title {
    display: none;
  }
}
.zresume-period-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px !important;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}
.zresume-agent-pick {
  cursor: pointer;
}
.zresume-dlg-hidden {
  display: none !important;
}
.zresume-dlg-card {
  max-width: 420px;
}
.zresume-dlg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 8px;
}
.zresume-dlg-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.zresume-dlg-grid label span {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
}
.zresume-dlg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 520px) {
  .zresume-dlg-grid {
    grid-template-columns: 1fr;
  }
  .zresume-header {
    flex-wrap: wrap;
  }
}
.zresume-live {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  margin: 0 0 12px;
  padding: 8px 2px;
}
.zresume-metric {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}
.zresume-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  animation: zresume-icon-breathe 5.5s ease-in-out infinite;
}
.zresume-metric-vcr .zresume-metric-icon {
  color: #0284c7;
  background: rgba(14, 165, 233, 0.14);
}
.zresume-metric-sale .zresume-metric-icon {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.14);
  animation-delay: 0.6s;
}
.zresume-metric-avg .zresume-metric-icon {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.14);
  animation-delay: 1.2s;
}
.zresume-metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.zresume-metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  line-height: 1;
}
.zresume-metric-rate {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.zresume-metric-value {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zresume-metric-unit {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.48;
  flex: 0 0 auto;
  white-space: nowrap;
}
.zresume-sub {
  margin: 0 0 10px;
  font-size: 12px;
  opacity: 0.62;
  line-height: 1.4;
}

/* Ambient wave backdrop behind the chart (animation only — no static wash) */
.zresume-chart-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 14px;
  min-height: 320px;
  background: transparent;
}
.zresume-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.zresume-waves {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -6%;
  width: 112%;
  height: 72%;
  opacity: 0.9;
  overflow: visible;
  pointer-events: none;
}
.zresume-wave {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.zresume-wave-1 {
  stroke: #0ea5e9;
  stroke-width: 1.35;
  opacity: 0.42;
}
.zresume-wave-2 {
  stroke: #f43f5e;
  stroke-width: 1.15;
  opacity: 0.32;
}
.zresume-wave-3 {
  stroke: #38bdf8;
  stroke-width: 1.35;
  opacity: 0.22;
  stroke-dasharray: 5 10;
}
.zresume-wave-fill {
  stroke: none;
  opacity: 0.32;
}
.zresume-waves-static .zresume-waves {
  opacity: 0.28;
}
.zresume-waves-live .zresume-wave-1 {
  opacity: 0.48;
}
.zresume-waves-live .zresume-wave-2 {
  opacity: 0.36;
}
.zresume-waves-live .zresume-wave-3 {
  opacity: 0.24;
}
#resumeChart {
  position: relative;
  z-index: 1;
}
#resumeChart .highcharts-background {
  fill: transparent !important;
}

@keyframes zresume-icon-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .zresume-metric-icon {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .zresume-live {
    flex-wrap: wrap;
    gap: 12px;
    padding: 6px 0;
    margin-bottom: 10px;
  }
  .zresume-metric {
    flex: 1 1 calc(50% - 8px);
    gap: 8px;
  }
  .zresume-metric-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 11px;
  }
  .zresume-metric-value {
    font-size: 14px;
  }
  .zresume-chart-shell {
    border-radius: 12px;
  }
  .zresume-waves {
    height: 58%;
    opacity: 0.75;
  }
}

@media (max-width: 640px) {
  .ztraffic-live {
    gap: 12px;
    padding: 6px 0;
    margin-bottom: 10px;
  }
  .ztraffic-metric {
    gap: 8px;
  }
  .ztraffic-metric-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 11px;
  }
  .ztraffic-metric-value {
    font-size: 15px;
  }
  .ztraffic-metric-unit {
    font-size: 10px;
  }
}
