/* ============================================
   Letmeads Public - Main Stylesheet
   ============================================ */

/* ===== FONTS ===== */
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy/Gilroy-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy/Gilroy-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy/Gilroy-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy/Gilroy-Bold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ===== ROOT VARIABLES ===== */
:root {
  --font-main: "Gilroy", sans-serif;
  --lma-color--dark-1: #09090a;
  --lma-color--dark-1: #09090a;
  --lma-color--dark-2: #131315;
  --lma-color--dark-3: #232429;
  --lma-color--gray-1: #79787d;
  --lma-color--gray-2: #3c3d45;
  --lma-color--purple-1: #754dff;
  --lma-color--purple-2: #8852df;
  --lma-color--purple-3: #c998f2;
  --lma-color--yellow-1: #dcfa15;
  --lma-color--green-1: #00e085;
  --lma-color--red: #ff5162;
  --lma-gradient--purple-1: linear-gradient(
    90deg,
    #554b75 0%,
    #09090a 44%,
    #1b103f 100%
  );
  --lma-gradient--purple-2: linear-gradient(
    90deg,
    #beacff 0%,
    #754dff 44%,
    #1b103f 100%
  );
  --lma-gradient--gray-1: linear-gradient(90deg, #48464e 0%, #232429 66%);
  --lma-gradient--gray-2: linear-gradient(90deg, rgba(72, 70, 78, 0.3) 0%, rgba(35, 36, 41, 0.3) 66%);
  --color-white: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --container-max: 1600px;
  --container-md: 1340px;
  --container-pad: 24px;
  --container-max-wide: 1800px;
  --container-pad-wide: 16px;
  --bg-gradient-1:
    radial-gradient(
      900px 420px at 50% 8%,
      rgba(145, 92, 255, 0.14),
      transparent 55%
    ),
    radial-gradient(
      900px 420px at 10% 30%,
      rgba(80, 200, 120, 0.1),
      transparent 55%
    ),
    #060607;
  --transition: all 0.2s ease;
}
@media (max-width: 767px) {
  :root {
    --container-pad: 15px;
  }
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
}
*,
:after,
:before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
html {
  font-family: var(--font-main);
}

html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 300;
  /* NOTE:
     Avoid locking the document to 100% height.
     It can break `position: sticky` (header may "unstick" after ~1 viewport height). */
  height: auto;
  min-height: 100vh;
}

html,
body {
  overflow-x: clip;
}

body {
  position: relative;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: normal;
  color: var(--color-white);
  background: var(--lma-color--dark-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background glow effect */
body::before {
  display: none;
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(143, 176, 245, 0.15) 0%,
    rgba(132, 142, 225, 0.1) 50%,
    rgba(147, 212, 252, 0) 100%
  );
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
a {
  color: var(--brand);
  text-decoration: none;
  outline: none;
  cursor: pointer;
}
a,
button,
button svg,
button svg path {
  -webkit-transition: 0.2s linear;
  -o-transition: 0.2s linear;
  transition: 0.2s linear;
}
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}
button:focus {
  outline: none;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
input {
  border: 0;
  outline: none;
}
.no-scroll {
  overflow: hidden;
}
.hide {
  display: none!important;
}
.w-100 {
  width: 100% !important;
}
.mb-12 {
  margin-bottom: 12px !important;
}
/* Selection */
::-moz-selection {
  color: var(--lma-color--dark-1);
  text-shadow: none;
  background: var(--color-white);
}
::selection {
  color: var(--lma-color--dark-1);
  text-shadow: none;
  background: var(--color-white);
}
::-moz-selection {
  color: var(--lma-color--dark-1);
  text-shadow: none;
  background: var(--color-white);
}
::-webkit-selection {
  color: var(--lma-color--dark-1);
  text-shadow: none;
  background: var(--color-white);
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
img {
  border-style: none;
}
/* ===== HELPERS ===== */
/* Headings */
button,
input,
textarea,
select {
  font: inherit;
}
.justify-start {
  justify-content: start !important;
  -webkit-justify-content: start !important;
  -moz-justify-content: start !important;
  -ms-justify-content: start !important;
  -o-justify-content: start !important;
}
.justify-end {
  justify-content: end !important;
  -webkit-justify-content: end !important;
  -moz-justify-content: end !important;
  -ms-justify-content: end !important;
  -o-justify-content: end !important;
}
.justify-center {
  justify-content: center !important;
  -webkit-justify-content: center !important;
  -moz-justify-content: center !important;
  -ms-justify-content: center !important;
  -o-justify-content: center !important;
}
.justify-between {
  justify-content: space-between !important;
  -webkit-justify-content: space-between !important;
  -moz-justify-content: space-between !important;
  -ms-justify-content: space-between !important;
  -o-justify-content: space-between !important;
}
.border-none {border: none !important;}
/* ============================================
   Layout container (global)
   ============================================ */
.lma-container {
  width: 100%;
  max-width: min(var(--container-max), calc(100% - (var(--container-pad) * 2)));
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.lma-container--wide {
  --container-max: var(--container-max-wide);
  --container-pad: var(--container-pad-wide);
  padding-inline: 0;
}
.lma-container--md {
  --container-max: var(--container-md);
}
@media (max-width: 767px) {
  .lma-container {
    padding-inline: 0;
  }
}
/* Inner Wrapper on Content */
.lma-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-gradient-register);
  color: var(--color-white);
}
/* ============================================
   Common gradient border class for header buttons
   ============================================ */
.lma-gray--border-gradient {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: none;
  overflow: visible;
  transition: var(--transition);
}
/* Gradient border using pseudo-element with mask */
.lma-gray--border-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--gray-1);
  /* Modern browsers with mask support */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
  /* Ensure smooth rendering on mobile */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

a.lma-gray--border-gradient:hover,
button.lma-gray--border-gradient:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

/* Fallback for browsers that don't support mask-composite */
@supports not (mask-composite: exclude) {
  .lma-gray--border-gradient::before {
    border: 1px solid rgba(72, 70, 78, 0.6);
    background: transparent;
  }
  .lma-gray--border-gradient {
    border: 1px solid rgba(72, 70, 78, 0.6);
  }
}
/* Content above gradient border */
.lma-gray--border-gradient > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */
.lma-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lma-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgb(43 42 46 / 60%) 20%, rgb(43 42 46 / 60%) 80%, transparent 100%);
}

.lma-header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.lma-header__logo {
  flex-shrink: 0;
}

.lma-header__logo-img {
  height: 28px;
  width: auto;
}

.lma-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lma-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  text-decoration: none;
}

.lma-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lma-header__btn {
  white-space: nowrap;
}

/* Burger menu */
.lma-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(72, 70, 78, 0.6);
  border-radius: 8px;
  cursor: pointer;
}

.lma-header__burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.lma-header__burger[aria-expanded="true"] .lma-header__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.lma-header__burger[aria-expanded="true"] .lma-header__burger-line:nth-child(2) {
  opacity: 0;
}

.lma-header__burger[aria-expanded="true"] .lma-header__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile navigation */
.lma-header__mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 20px var(--container-pad);
  background: rgba(9, 9, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(72, 70, 78, 0.3);
}

.lma-header__mobile-nav.is-open {
  display: block;
}

.lma-header__mobile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lma-header__mobile-link {
  display: block;
  padding: 12px 16px;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 12px;
  transition: var(--transition);
}

.lma-header__mobile-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lma-header__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */
.lma-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 32px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.lma-btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.lma-btn--primary {
  background: var(--color-white);
  color: var(--lma-color--dark-1);
}

.lma-btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.lma-btn--outline {
  position: relative;
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(72, 70, 78, 0.6);
}

.lma-btn--outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(72, 70, 78, 0.8);
  transform: translateY(-1px);
}

.lma-btn--lg {
  padding: 16px 32px;
  font-size: 16px;
}

.lma-btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ============================================
   DROPDOWN
   ============================================ */
.lma-dropdown {
  position: relative;
}

.lma-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  background: transparent;
  border-radius: 32px;
  cursor: pointer;
}

.lma-dropdown__icon {
  width: 20px;
  height: 20px;
  color: var(--lma-color--gray-1);
}

.lma-dropdown__text {
  white-space: nowrap;
}

.lma-dropdown__arrow {
  width: 16px;
  height: 16px;
  color: var(--lma-color--gray-1);
  transition: transform 0.2s ease;
}

.lma-dropdown[data-open="true"] .lma-dropdown__arrow {
  transform: rotate(180deg);
}

.lma-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(72, 70, 78, 0.4);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 50;
}

.lma-dropdown[data-open="true"] .lma-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lma-dropdown__item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-white);
  text-decoration: none;
  border-radius: 10px;
  transition: var(--transition);
}

.lma-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lma-dropdown__item--active {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

/* ============================================
   PAGE TITLE
   ============================================ */
.lma-page-title {
  font-size: clamp(32px, 3.375vw, 54px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.6px;
  margin: 0;
  color: var(--color-white);
}

/* ============================================
   TABLE
   ============================================ */
.lma-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.lma-table__row--head {
  background: transparent!important;
}
.lma-table__row--head .lma-table__th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lma-color--gray-1);
  text-align: left;
  white-space: nowrap;
  background: transparent
}

.lma-table__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.lma-table__sort:hover {
  color: var(--color-white);
}

.lma-table__sort--active {
  color: var(--lma-color--purple-1);
}

.lma-table__sort-icon {
  font-size: 10px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.lma-table__sort--active .lma-table__sort-icon {
  opacity: 1;
  color: var(--lma-color--purple-1);
}

.lma-table__row {
  background: var(--lma-color--dark-2);
  transition: var(--transition);
}

.lma-table__row:hover {
  background: var(--lma-color--dark-3);
}

.lma-table__td {
  padding: 16px;
  font-size: clamp(14px, 1vw, 15px);
  color: var(--color-white);
  vertical-align: middle;
}

.lma-table__td:first-child {
  border-radius: 12px 0 0 12px;
}

.lma-table__td:last-child {
  border-radius: 0 12px 12px 0;
}

.lma-table__th--num,
.lma-table__td--num {
  width: 50px;
  color: var(--lma-color--gray-1);
  text-align: center;
}

.lma-table__th--offer,
.lma-table__td--offer {
  width: auto;
}

.lma-table__th--ecpc,
.lma-table__td--ecpc,
.lma-table__th--cr,
.lma-table__td--cr {
  width: 150px;
  white-space: nowrap;
}

.lma-table__th--dynamic,
.lma-table__td--dynamic {
  width: 170px;
  white-space: nowrap;
}

.lma-table__offer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lma-table__offer-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.lma-table__offer-name {
  font-weight: 500;
}
@media (max-width: 1400px) {
  .lma-table__th--ecpc,
  .lma-table__td--ecpc,
  .lma-table__th--cr,
  .lma-table__td--cr {
    width: 110px;
    white-space: nowrap;
  }

  .lma-table__th--dynamic,
  .lma-table__td--dynamic {
    width: 130px;
    white-space: nowrap;
  }
}
/* ============================================
   VALUES & BADGES
   ============================================ */
.lma-value {
  font-weight: 500;
}

.lma-value--positive {
  color: var(--lma-color--green-1);
}

.lma-value--negative {
  color: var(--lma-color--red);
}

.lma-currency {
  color: var(--lma-color--gray-1);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.lma-skeleton {
  display: inline-block;
  height: 16px;
  background: linear-gradient(
    90deg,
    var(--lma-color--dark-3) 25%,
    var(--lma-color--dark-2) 50%,
    var(--lma-color--dark-3) 75%
  );
  background-size: 200% 100%;
  animation: lma-skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.lma-skeleton--circle {
  border-radius: 50%;
}

@keyframes lma-skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.lma-skeleton-row {
  pointer-events: none;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.lma-empty {
  padding: 48px 24px;
  text-align: center;
}

.lma-empty__text {
  font-size: 16px;
  color: var(--lma-color--gray-1);
  margin: 0;
}

/* ============================================
   SPINNER / LOADER
   ============================================ */
.lma-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lma-loader__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(117, 77, 255, 0.2);
  border-top-color: var(--lma-color--purple-1);
  border-radius: 50%;
  animation: lma-spin 0.8s linear infinite;
}

.lma-loader__spinner--sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

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

.lma-loader--hidden {
  display: none;
}

/* ============================================
   TOOLTIP
   ============================================ */
.lma-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: var(--lma-color--gray-1);
  cursor: help;
  vertical-align: middle;
}

.lma-tooltip > svg {
  display: block;
  transition: color 0.2s ease;
}

.lma-tooltip:hover > svg {
  color: var(--color-white);
}

.lma-tooltip__content {
  position: absolute;
  bottom: calc(100% + 12px);
  right: -12px;
  transform: scale(0.95);
  padding: 12px 16px;
  width: max-content;
  max-width: 260px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-white);
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(72, 70, 78, 0.6);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  pointer-events: none;
}

.lma-tooltip__content::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 13px;
  border: 6px solid transparent;
  border-top-color: rgb(51 50 55);
}

.lma-tooltip:hover .lma-tooltip__content {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.lma-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  min-width: 64px;
  text-align: center;
  justify-content: center;
}

.lma-badge--success {
  background: rgba(0, 224, 133, 0.15);
  color: var(--lma-color--green-1);
}

.lma-badge--danger {
  background: rgba(255, 81, 98, 0.15);
  color: var(--lma-color--red);
}
.lma-badge--warning {
  background: rgba(255, 176, 91, 0.15);
  color: #ffb05b;
}
.lma-badge--default {
  background: rgba(255, 255, 255, 0.06);
  color: #a8aabb;
}

/* Icon-only badge: круглий, для signal-індикаторів у таблиці whoiswho */
.lma-badge--icon {
  min-width: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
}
.lma-badge--icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ============================================
   WIDGET
   ============================================ */
.lma-widget {
  position: relative;
  isolation: isolate;
  padding: 20px;
  background: var(--lma-color--dark-2);
  border-radius: clamp(26px, 2.25vw, 32px);
}

/* Gradient border for widgets */
.lma-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--gray-1);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.lma-widget > * {
  position: relative;
  z-index: 1;
}

.lma-widget__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

.lma-widget__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lma-widget__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lma-widget__item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lma-widget__item-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
}

.lma-widget__item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
}

.lma-widget__item-value {
  flex-shrink: 0;
}

.lma-widget__value-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.lma-widget__big-value {
  font-size: 32px;
  font-weight: 500;
  color: var(--color-white);
}

.lma-widget__trend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.lma-widget__trend--up {
  display: none;
  color: var(--lma-color--green-1);
}

.lma-widget__trend--down {
  color: var(--lma-color--red);
}

.lma-widget__chart {
  position: relative;
  height: 80px;
  margin: 0 -20px -20px;
  border-radius: 0 0 clamp(26px, 2vw, 46px) clamp(16px, 2vw, 46px);
  overflow: hidden;
  /* Ensure clipping works on all browsers */
  isolation: isolate;
}

.lma-widget__chart::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.lma-widget__chart-svg {
  width: 100%;
  height: 100%;
}

.lma-widget__chart-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Widget empty state */
.lma-widget__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.lma-widget__empty-icon {
  color: var(--lma-color--gray-2);
  margin-bottom: 12px;
}

.lma-widget__empty-text {
  font-size: 14px;
  color: var(--lma-color--gray-1);
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.lma-footer {
  position: relative;
  z-index: 1;
  padding: 24px 0;
}

.lma-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgb(43 42 46 / 60%) 20%, rgb(43 42 46 / 60%) 80%, transparent 100%);
}

.lma-footer__container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lma-footer__copyright {
  font-size: 14px;
  color: var(--lma-color--gray-1);
}

/* ============================================
   MAIN
   ============================================ */
.lma-main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding-top: 32px;
  padding-bottom: 48px;
}

/* ============================================
   RATING PAGE
   ============================================ */
.lma-rating {
  min-height: calc(100vh - 160px);
}

.lma-rating__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.lma-rating__content {
  display: grid;
  grid-template-columns: 1fr clamp(280px, 20vw, 320px);
  gap: clamp(12px, 1vw, 16px);
  align-items: start;
}
.lma-rating__content > .lma-rating__table-wrap { width: 100%; }

.lma-rating__table-wrap {
  overflow-x: auto;
}

.lma-rating__sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1vw, 16px);
  position: sticky;
  top: 100px;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.lma-landing {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lma-landing__hero {
  text-align: center;
  padding: 60px 20px;
}

.lma-landing__title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff 0%, #beacff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lma-landing__subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--lma-color--gray-1);
  margin: 0 0 40px;
}

.lma-landing__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   404 PAGE
   ============================================ */
.lma-404 {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lma-404__content {
  text-align: center;
  padding: 40px 20px;
}

.lma-404__image {
  max-width: 300px;
  margin: 0 auto 32px;
}

.lma-404__title {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 16px;
}

.lma-404__text {
  font-size: 16px;
  color: var(--lma-color--gray-1);
  margin: 0 0 32px;
  max-width: 400px;
  margin-inline: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .lma-rating__content {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
  }

  .lma-rating__sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .lma-rating__sidebar .lma-widget {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .lma-header__nav {
    display: none;
  }

  .lma-header__actions {
    display: none;
  }

  .lma-header__burger {
    display: flex;
  }

  .lma-rating__header {
    gap: 16px;
  }

  .lma-page-title {
    font-size: 24px;
  }

  .lma-table {
    min-width: 700px;
  }

  .lma-table__td,
  .lma-table__th {
    padding: 12px;
  }

  .lma-rating__sidebar {
    flex-direction: column;
  }

  .lma-rating__sidebar .lma-widget {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .lma-main {
    padding-top: 20px;
    padding-bottom: 32px;
  }

  .lma-dropdown__trigger {
    padding: 8px 12px;
    font-size: 13px;
  }

  .lma-dropdown__text {
    display: none;
  }

  .lma-widget {
    padding: 16px;
  }

  .lma-widget__big-value {
    font-size: 28px;
  }

  .lma-widget__chart {
    margin: 0 -16px -16px;
  }
}

/* ============================================
   HOURLY EPC CHART (CPA-style SVG)
   ============================================ */
.lma-hourly {
  position: relative;
  isolation: isolate;
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
  border: none;
  overflow: hidden;
  margin-top: clamp(16px, 2vw, 24px);
  min-height: 340px;
}

.lma-hourly::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--purple-2);
  pointer-events: none;
  z-index: 10;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.lma-hourly--gradient::after {
  content: "";
  position: absolute;
  top: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.25) 0%,
    rgba(99, 102, 241, 0.15) 35%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.lma-hourly__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(14px, 1.5vw, 20px);
  position: relative;
  z-index: 1;
}

/* Header */
.lma-hourly__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-shrink: 0;
  padding-bottom: clamp(10px, 1vw, 16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.lma-hourly__head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lma-hourly__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lma-color--purple-3);
  flex-shrink: 0;
}

.lma-hourly__title {
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 500;
  margin: 0;
  color: var(--color-white);
}

.lma-hourly__head-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Date buttons */
.lma-hourly__dates {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 3px;
}

.lma-hourly__date-btn {
  background: none;
  border: none;
  color: var(--lma-color--gray-1);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.lma-hourly__date-btn:hover {
  color: var(--color-white);
}

.lma-hourly__date-btn--active {
  background: var(--lma-color--purple-1);
  color: #fff;
}

.lma-hourly__date-btn--active:hover {
  color: #fff;
}

/* Offer Picker */
.lma-offer-picker {
  position: relative;
}

.lma-offer-picker__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--lma-color--gray-1);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.lma-offer-picker__toggle:hover {
  border-color: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-offer-picker__arrow {
  transition: transform 0.2s;
}

.lma-offer-picker__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.lma-offer-picker__dropdown--open {
  display: block;
}

.lma-offer-picker__dropdown--open + .lma-offer-picker__toggle .lma-offer-picker__arrow,
.lma-offer-picker__dropdown--open ~ .lma-offer-picker__toggle .lma-offer-picker__arrow {
  transform: rotate(180deg);
}

.lma-offer-picker__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
  font-size: 13px;
  color: var(--color-white);
}

.lma-offer-picker__item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lma-offer-picker__item input[type="checkbox"] {
  accent-color: var(--lma-color--purple-1);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.lma-offer-picker__name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lma-hourly__no-offers {
  display: block;
  text-align: center;
  padding: 16px;
  color: var(--lma-color--gray-1);
  font-size: 13px;
}

/* Skeleton */
.lma-hourly__skeleton {
  flex: 1;
  min-height: 140px;
  display: flex;
  padding-top: 8px;
}

@keyframes lma-hourly-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.lma-hourly .lma-skel-block {
  display: block;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: lma-hourly-shimmer 1.6s ease-in-out infinite;
}

.lma-hourly .lma-skel-ecpc {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.lma-hourly .lma-skel-ecpc__summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lma-hourly .lma-skel-ecpc__wave {
  flex: 1;
  min-height: 0;
}

/* Chart body */
.lma-hourly__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.lma-hourly__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-wrap: wrap;
  gap: 12px;
}

.lma-hourly__summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lma-hourly__value {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.lma-hourly__currency {
  color: var(--lma-color--gray-1);
  font-weight: 500;
}

.lma-hourly__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lma-color--gray-1);
}

/* Chart wrap (ylabels + main) */
.lma-hourly__chart-wrap {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
}

.lma-hourly__ylabels {
  width: 52px;
  flex-shrink: 0;
  position: relative;
  margin-right: 8px;
  margin-bottom: 34px;
  margin-top: 10px;
}

.lma-hourly__ylabel {
  position: absolute;
  left: 0;
  transform: translateY(50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  line-height: 1;
}

.lma-hourly__chart-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.lma-hourly__svg-wrap {
  min-height: 220px;
  height: clamp(220px, 30vw, 300px);
  position: relative;
  overflow: visible;
}

.lma-hourly__svg-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Vertical hover line */
.lma-hourly__vline {
  position: absolute;
  width: 2px;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgba(117, 77, 255, 0.6) 0%,
    rgba(117, 77, 255, 0.15) 50%,
    transparent 100%
  );
  border-radius: 1px;
}

/* Hover dot */
.lma-hourly__dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lma-color--dark-2);
  border: 2.5px solid #888;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 15;
  box-shadow: 0 0 14px rgba(117, 77, 255, 0.4);
}

/* Tooltip */
.lma-hourly__tip {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  background: rgba(30, 28, 42, 0.95);
  border: 1px solid rgba(117, 77, 255, 0.3);
  border-radius: 10px;
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.lma-hourly__tip-val {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
}

.lma-hourly__tip-val strong {
  font-weight: 600;
  color: var(--lma-color--purple-3);
}

/* Legend */
.lma-hourly__legend {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--lma-color--gray-1);
  flex-wrap: wrap;
}

.lma-hourly__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lma-hourly__legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 100px;
  transform: translateY(-1px);
}

/* Hourly chart responsive */
@media (max-width: 768px) {
  .lma-hourly__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .lma-hourly__head-right {
    width: 100%;
  }

  .lma-offer-picker__dropdown {
    right: auto;
    left: 0;
    min-width: 200px;
  }

  .lma-hourly__ylabels {
    width: 40px;
  }
}

@media (max-width: 480px) {
  .lma-hourly__head-right {
    flex-direction: column;
    align-items: flex-start;
  }

  .lma-hourly__svg-wrap {
    min-height: 180px;
    height: 200px;
  }

  .lma-hourly {
    border-radius: 16px;
  }
}

/* ============================================================
   SOURCES PAGE — /sources (Де трафик?)
   Стилі узгоджені з lma-widget / lma-table / CSS-vars
   ============================================================ */

/* -------- Layout -------- */
.lma-sources { padding: 24px 0 64px; }
.lma-sources__title {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  color: var(--color-white);
  margin: 0 0 20px;
}

/* -------- Dashboard (5 cards row) -------- */
.lma-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 1200px) { .lma-dashboard { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .lma-dashboard { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .lma-dashboard { grid-template-columns: 1fr; } }

.lma-stat-card {
  position: relative; isolation: isolate;
  padding: 16px;
  background: var(--lma-color--dark-2);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
}
.lma-stat-card::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: var(--lma-gradient--gray-1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.lma-stat-card > * { position: relative; z-index: 1; }

.lma-stat-card:hover { background: var(--lma-color--dark-3); }
.lma-stat-card.is-active::before { background: var(--lma-gradient--purple-2); }
.lma-stat-card.is-active { box-shadow: 0 8px 24px rgba(117, 77, 255, 0.18); }

.lma-stat-card__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.lma-stat-card__icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.lma-stat-card__label {
  color: var(--lma-color--gray-1);
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lma-stat-card__value {
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-white);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 6px;
}
.lma-stat-card__currency {
  color: var(--lma-color--gray-1); font-size: 0.6em; font-weight: 500; margin-left: 4px;
}
.lma-stat-card__sub {
  color: var(--lma-color--gray-1);
  font-size: 12px;
}
.lma-stat-card__footer {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--lma-color--gray-2);
  display: flex; align-items: baseline; gap: 6px;
}
.lma-stat-card__fact {
  color: var(--color-white);
  font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lma-stat-card__fact-label {
  color: var(--lma-color--gray-1); font-size: 12px;
}

/* -------- Filters bar -------- */
.lma-sources__filters { margin-bottom: 24px; }
.lma-sources__filters-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.lma-sources__period { min-width: 160px; }

/* -------- Segmented control (department tabs) -------- */
.lma-segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.lma-seg-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--lma-color--dark-2);
  border: 1px solid var(--lma-color--gray-2);
  color: var(--lma-color--gray-1);
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
  font-size: 13px; font-weight: 500;
}
.lma-seg-btn:hover { background: var(--lma-color--dark-3); color: var(--color-white); }
.lma-seg-btn.is-active {
  background: var(--lma-color--purple-1);
  border-color: var(--lma-color--purple-1);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(117, 77, 255, 0.35);
}
.lma-seg-btn__icon { display: inline-flex; align-items: center; }
@media (max-width: 768px) {
  .lma-seg-btn__label { display: none; }
  .lma-seg-btn { padding: 10px; }
}

/* -------- Main grid -------- */
.lma-sources__grid {
  display: block;
  width: 100%;
}
.lma-sources__grid > .lma-sources__left { width: 100%; }

/* -------- Left: offers table wrapper -------- */
.lma-sources__left {
  position: relative; isolation: isolate;
  background: var(--lma-color--dark-2);
  border-radius: clamp(20px, 2vw, 24px);
  overflow: hidden;
}
.lma-sources__left::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: var(--lma-gradient--gray-1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; z-index: 2;
}
.lma-sources__left > * { position: relative; z-index: 1; }

.lma-sources__list-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lma-color--gray-2);
}
.lma-sources__list-title {
  color: var(--lma-color--gray-1);
  font-size: 13px;
}
.lma-sources__current-source {
  color: var(--color-white);
  font-weight: 600;
}
.lma-sources__table-wrap { overflow-x: auto; padding: 4px 8px 8px; }
.lma-sources__table { width: 100%; }
.lma-sources__th-lost,
.lma-sources__td-lost { width: 130px; white-space: nowrap; text-align: right; }
@media (max-width: 1400px) {
  .lma-sources__th-lost,
  .lma-sources__td-lost { width: 110px; }
}
@media (max-width: 1024px) {
  .lma-sources__th-lost, .lma-sources__td-lost { display: none; }
}

/* -------- Rank cell -------- */
.lma-rank { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.lma-rank__main {
  color: var(--color-white); font-size: 16px; font-weight: 700;
}
.lma-rank__sub {
  color: var(--lma-color--gray-1); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px;
}
.lma-rank__sleep {
  color: var(--lma-color--purple-3); font-style: italic;
  font-size: 13px; font-weight: 500;
}
.lma-rank__dash { color: var(--lma-color--gray-2); font-size: 16px; }

/* -------- Sparkline -------- */
.lma-spark {
  width: 100%; max-width: 200px; height: 36px; display: block;
}
.lma-spark__line { fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lma-spark__area { opacity: 0.18; }
.lma-spark--up   .lma-spark__line, .lma-spark--up   .lma-spark__area { stroke: var(--lma-color--green-1); fill: var(--lma-color--green-1); }
.lma-spark--down .lma-spark__line, .lma-spark--down .lma-spark__area { stroke: var(--lma-color--red); fill: var(--lma-color--red); }
.lma-spark--flat .lma-spark__line, .lma-spark--flat .lma-spark__area { stroke: var(--lma-color--gray-1); fill: var(--lma-color--gray-1); }

/* -------- Lost column -------- */
.lma-lost__value {
  color: var(--lma-color--red); font-weight: 600; font-size: 14px;
  display: block; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.lma-lost__label {
  color: var(--lma-color--gray-1); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.lma-lost__empty { color: var(--lma-color--gray-2); font-size: 16px; }

/* -------- Status badges in table -------- */
.lma-status {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 10px; border-radius: 8px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  white-space: nowrap; line-height: 1.1;
}
.lma-status--off {
  background: rgba(60, 61, 69, 0.5);
  color: var(--lma-color--gray-1);
}
.lma-status--warn {
  background: rgba(220, 250, 21, 0.12);
  color: var(--lma-color--yellow-1);
}
.lma-status--alert {
  background: rgba(255, 81, 98, 0.15);
  color: var(--lma-color--red);
  box-shadow: 0 0 0 1px rgba(255, 81, 98, 0.3);
}
.lma-status__line { display: block; }
.lma-status__line--big { font-size: 11px; }
.lma-status__line--small { font-size: 9px; opacity: 0.85; }

.lma-table__td--ecpc { text-align: left; font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.lma-ecpc-zero { color: var(--lma-color--yellow-1); }
.lma-table__row--sim { box-shadow: inset 0 0 0 1px rgba(117, 77, 255, 0.4); }
.lma-table__row--disabled { opacity: 0.5; }

/* -------- Right side widgets -------- */
.lma-sources__right { display: flex; flex-direction: column; gap: 16px; }

/* Anomalies */
.lma-anomalies__empty { color: var(--lma-color--gray-1); font-size: 13px; padding: 8px 0; }
.lma-anomalies__list {
  list-style: none; padding: 0; margin: 0;
  max-height: 540px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--lma-color--gray-2) transparent;
}
.lma-anomalies__list::-webkit-scrollbar { width: 6px; }
.lma-anomalies__list::-webkit-scrollbar-track { background: transparent; }
.lma-anomalies__list::-webkit-scrollbar-thumb { background: var(--lma-color--gray-2); border-radius: 3px; }
.lma-anomalies__item {
  padding: 10px 4px; border-bottom: 1px solid var(--lma-color--gray-2);
  font-size: 12px;
}
.lma-anomalies__item:last-child { border: 0; }
.lma-anomalies__head {
  display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px;
}
.lma-anomalies__offer { color: var(--color-white); font-weight: 500; }
.lma-anomalies__src   { color: var(--lma-color--gray-1); font-size: 11px; }
.lma-anomalies__body  { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lma-anomalies__metric { color: var(--lma-color--gray-1); }
.lma-anomalies__delta {
  font-weight: 600; padding: 1px 6px; border-radius: 6px; font-size: 11px;
}
.lma-anomalies__item--success .lma-anomalies__delta { background: rgba(0, 224, 133, 0.15); color: var(--lma-color--green-1); }
.lma-anomalies__item--danger .lma-anomalies__delta  { background: rgba(255, 81, 98, 0.15); color: var(--lma-color--red); }
.lma-anomalies__item--info .lma-anomalies__delta    { background: rgba(117, 77, 255, 0.15); color: var(--lma-color--purple-3); }
.lma-anomalies__item--warn .lma-anomalies__delta    { background: rgba(220, 250, 21, 0.12); color: var(--lma-color--yellow-1); }
.lma-anomalies__values { color: var(--lma-color--gray-1); }
.lma-anomalies__total {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--lma-color--gray-2);
  color: var(--lma-color--gray-1); font-size: 11px; text-align: right;
}

/* Simulator */
.lma-simulator__field { margin-bottom: 12px; }
.lma-simulator__label {
  display: block; color: var(--lma-color--gray-1); font-size: 11px;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px;
}
.lma-simulator__select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border-radius: 12px;
  background-color: var(--lma-color--dark-1);
  border: 1px solid var(--lma-color--gray-2);
  color: var(--color-white);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10' fill='none'><path d='M1 1l6 6 6-6' stroke='%2379787d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: var(--transition, all 0.2s ease);
  outline: none;
}
.lma-simulator__select:hover { background-color: var(--lma-color--dark-3); }
.lma-simulator__select:focus {
  border-color: var(--lma-color--purple-1);
  box-shadow: 0 0 0 3px rgba(117, 77, 255, 0.15);
}
.lma-simulator__select option {
  background: var(--lma-color--dark-2); color: var(--color-white);
}
.lma-simulator__result {
  margin-top: 14px; padding: 14px; border-radius: 12px;
  background: rgba(117, 77, 255, 0.08);
  border: 1px solid rgba(117, 77, 255, 0.18);
}
.lma-simulator__empty { color: var(--lma-color--gray-1); font-size: 13px; text-align: center; }
.lma-simulator__line {
  display: flex; justify-content: space-between;
  padding: 6px 0; font-size: 13px;
}
.lma-simulator__line-label { color: var(--lma-color--gray-1); }
.lma-simulator__line-value { color: var(--color-white); font-weight: 500; }
.lma-simulator__call {
  text-align: center; padding: 12px; margin-top: 8px;
  border-radius: 10px;
  background: rgba(117, 77, 255, 0.18);
  color: var(--color-white);
  font-size: 15px; font-weight: 600;
}
.lma-simulator__call--noop {
  background: rgba(0, 224, 133, 0.15);
  color: var(--lma-color--green-1);
}
.lma-simulator__delta-big {
  font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* -------- Win-win rate column (replaces lost styles) -------- */
.lma-winwin__value {
  font-weight: 600; font-size: 14px;
  display: block; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.lma-winwin__value--win  { color: var(--lma-color--green-1); }
.lma-winwin__value--lose,
.lma-winwin__value--lost { color: var(--lma-color--red); }
.lma-winwin__label {
  color: var(--lma-color--gray-1); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.lma-winwin__empty { color: var(--lma-color--gray-2); font-size: 16px; }

/* -------- Two rank columns: real position + eCPC rank -------- */
.lma-sources__th-rank-real, .lma-sources__td-rank-real,
.lma-sources__th-rank-ecpc, .lma-sources__td-rank-ecpc {
  width: 90px;
  text-align: center;
  white-space: nowrap;
}
.lma-sources__th-rank-real, .lma-sources__th-rank-ecpc {
  color: var(--lma-color--gray-1);
  font-size: 12px;
  font-weight: 500;
}
@media (max-width: 1400px) {
  .lma-sources__th-rank-real, .lma-sources__td-rank-real,
  .lma-sources__th-rank-ecpc, .lma-sources__td-rank-ecpc { width: 70px; }
}

/* -------- Win-win thermometer column -------- */
.lma-sources__th-thermo, .lma-sources__td-thermo {
  width: 130px; white-space: nowrap; text-align: center;
}
@media (max-width: 1400px) {
  .lma-sources__th-thermo, .lma-sources__td-thermo { width: 110px; }
}
@media (max-width: 1100px) {
  .lma-sources__th-thermo, .lma-sources__td-thermo { display: none; }
}

.lma-thermo {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 90px;
}
.lma-thermo__bar {
  position: relative; width: 100%; height: 6px;
  border-radius: 3px;
  /* Зеленая середина, желтые края, красный наружу */
  background: linear-gradient(
    90deg,
    var(--lma-color--red)    0%,
    var(--lma-color--yellow-1) 25%,
    var(--lma-color--green-1)  50%,
    var(--lma-color--yellow-1) 75%,
    var(--lma-color--red)      100%
  );
  opacity: 0.85;
}
.lma-thermo__pointer {
  position: absolute; top: -3px;
  width: 3px; height: 12px;
  background: var(--color-white);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.lma-thermo__label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}
.lma-thermo--ok   .lma-thermo__label { color: var(--lma-color--green-1); }
.lma-thermo--warn .lma-thermo__label { color: var(--lma-color--yellow-1); }
.lma-thermo--bad  .lma-thermo__label { color: var(--lma-color--red); }

/* -------- Volume vs potential column -------- */
.lma-sources__th-volume, .lma-sources__td-volume {
  width: 130px; white-space: nowrap; text-align: right;
}
@media (max-width: 1400px) {
  .lma-sources__th-volume, .lma-sources__td-volume { width: 110px; }
}
@media (max-width: 1100px) {
  .lma-sources__th-volume, .lma-sources__td-volume { display: none; }
}
.lma-volume__value {
  font-weight: 600; font-size: 14px;
  display: block; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.lma-volume__value--over  { color: var(--lma-color--green-1); }
.lma-volume__value--under { color: var(--lma-color--red); }
.lma-volume__value--ok    { color: var(--lma-color--gray-1); }
.lma-volume__label {
  color: var(--lma-color--gray-1); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.lma-volume__empty { color: var(--lma-color--gray-2); font-size: 16px; }

/* Center all column headers on sources table */
.lma-sources__table .lma-table__row--head .lma-table__th {
  text-align: center;
}

/* Center eCPC values in sources table */
.lma-sources__table .lma-table__td--ecpc { text-align: center; }

/* Sleep icon (moon) inside rank cell */
.lma-rank__sleep {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--lma-color--purple-3);
}
.lma-rank__sleep svg {
  display: block;
}

/* Win-win neutral (within ±2% of avg) */
.lma-winwin__value--ok { color: var(--lma-color--gray-1); }

/* -------- Tomorrow forecast strip + column -------- */
.lma-forecast-strip {
  background: linear-gradient(135deg, rgba(117,77,255,0.10) 0%, rgba(125,255,170,0.06) 100%);
  border: 1px solid rgba(117,77,255,0.20);
  border-radius: 20px;
  padding: 16px 20px;
  margin: 0 0 24px;
}
.lma-forecast-strip__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.lma-forecast-strip__icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(117,77,255,0.18); color: #c9adfa;
  display: inline-flex; align-items: center; justify-content: center;
}
.lma-forecast-strip__title { color: #fff; font-weight: 600; font-size: 15px; }
.lma-forecast-strip__date  {
  color: #a8aabb; font-size: 12px;
  margin-left: auto;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
}
.lma-forecast-strip__metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 12px;
}
@media (max-width: 720px) {
  .lma-forecast-strip__metrics { grid-template-columns: 1fr; }
}
.lma-forecast-strip__cell {
  display: flex; flex-direction: column; gap: 4px;
}
.lma-forecast-strip__cell-label {
  color: #8a8ea3; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.lma-forecast-strip__cell-value {
  color: #fff; font-weight: 700; font-size: 24px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lma-forecast-strip__cur { color: #a8aabb; font-size: 16px; font-weight: 500; }
.lma-forecast-strip__cell-range {
  color: #6b6e8a; font-size: 11px;
}
.lma-forecast-strip__narrative {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #c9caf0; font-size: 13px; line-height: 1.5;
}
.lma-forecast-strip__model-tag {
  display: inline-block; margin-right: 8px;
  padding: 1px 6px; border-radius: 6px;
  background: rgba(117,77,255,0.22); color: #c9adfa;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  vertical-align: middle;
}

/* eCPC завтра колонка */
.lma-sources__th-tomorrow, .lma-sources__td-tomorrow {
  white-space: nowrap;
}
.lma-tomorrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.lma-tomorrow--up   { color: #4ade80; }
.lma-tomorrow--down { color: #f87171; }
.lma-tomorrow--flat { color: #a8aabb; }
.lma-tomorrow__arrow { font-size: 11px; opacity: 0.8; }

/* -------- AI Health Check button + modal -------- */
.lma-health-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border: 1px solid rgba(125,255,170,0.25);
  background: rgba(125,255,170,0.08);
  color: #7dffaa;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
  margin-left: 6px;
  flex-shrink: 0;
}
.lma-health-btn:hover {
  background: rgba(125,255,170,0.18);
  border-color: #7dffaa;
  transform: scale(1.08);
}

/* Modal */
.lma-modal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
}
.lma-modal.is-open { display: flex; }
.lma-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(8,10,18,0.78);
  backdrop-filter: blur(4px);
  animation: lma-fade .15s ease-out;
}
@keyframes lma-fade { from { opacity: 0; } to { opacity: 1; } }
.lma-modal__panel {
  position: relative;
  width: min(560px, 92vw);
  max-height: 88vh;
  background: var(--lma-color--dark-2, #1a1c2a);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: lma-pop .18s cubic-bezier(.22,.99,.32,1.02);
}
@keyframes lma-pop {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.lma-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 8px;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lma-modal__close:hover { background: rgba(255,255,255,0.10); }
.lma-modal__body {
  padding: 24px 24px 20px;
  overflow-y: auto;
  max-height: 88vh;
}

/* Health content */
.lma-health__loading {
  text-align: center; padding: 40px 20px;
  color: #a8aabb; font-size: 13px;
}
.lma-health__spinner {
  width: 36px; height: 36px; margin: 0 auto 16px;
  border: 3px solid rgba(125,255,170,0.15);
  border-top-color: #7dffaa;
  border-radius: 50%;
  animation: lma-spin .8s linear infinite;
}
@keyframes lma-spin { to { transform: rotate(360deg); } }
.lma-health__empty {
  padding: 30px 0; text-align: center; color: #a8aabb;
}
.lma-health__empty h3 { color: #fff; margin: 0 0 8px; font-size: 18px; }

.lma-health__head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lma-health__title { flex: 1; }
.lma-health__title h3 { margin: 0 0 2px; color: #fff; font-size: 20px; font-weight: 700; }
.lma-health__src { color: #a8aabb; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.lma-health__score-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 14px; border-radius: 12px;
  min-width: 70px;
}
.lma-health__score-num { font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.lma-health__score-label { font-size: 10px; opacity: 0.7; margin-top: 2px; text-transform: uppercase; }
.lma-health--green  { background: rgba(74,222,128,0.18); color: #4ade80; }
.lma-health--yellow { background: rgba(251,191,36,0.18); color: #fbbf24; }
.lma-health--red    { background: rgba(248,113,113,0.18); color: #f87171; }

.lma-health__summary {
  color: #d8dae6; font-size: 14px; line-height: 1.5;
  margin: 4px 0 16px;
}
.lma-health__sections {
  display: flex; flex-direction: column; gap: 14px;
}
.lma-health__section h4 {
  margin: 0 0 6px; font-size: 13px; color: #a8aabb;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.lma-health__list {
  list-style: none; padding: 0; margin: 0;
}
.lma-health__list li {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 4px 0; color: #e8eaf3; font-size: 13px; line-height: 1.45;
}
.lma-health__bullet {
  width: 16px; height: 16px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0; margin-top: 2px;
  background: rgba(255,255,255,0.06); color: #a8aabb;
}
.lma-health__none { color: #6b6e8a; font-size: 12px; padding: 4px 0; }
.lma-health__footer {
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #6b6e8a; font-size: 10px; text-align: right;
}

/* Health button — push right of the offer cell so all buttons align */
.lma-table__offer { width: 100%; }
.lma-table__offer .lma-table__offer-name { flex: 1; }
.lma-table__offer .lma-health-btn { margin-left: auto; }

/* AI health-check separate column — fixed narrow width = buttons align */
.lma-sources__th-ai, .lma-sources__td-ai {
  width: 44px; text-align: center; padding-left: 4px; padding-right: 4px;
}
.lma-sources__th-ai { color: var(--lma-color--gray-1); font-size: 11px; font-weight: 600; }
/* Скасовуємо попередній margin-left:auto, бо тепер кнопка в окремій колонці */
.lma-table__offer .lma-health-btn { margin-left: 0; }

/* -------- Forecast strip tabs + week panel -------- */
.lma-forecast-strip__tabs {
  display: flex; gap: 4px; padding: 3px;
  background: rgba(255,255,255,0.06); border-radius: 8px;
  margin-left: 10px;
}
.lma-forecast-tab {
  padding: 5px 12px; border-radius: 6px;
  background: transparent; border: 0;
  color: #a8aabb; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.lma-forecast-tab:hover { color: #fff; }
.lma-forecast-tab.is-active {
  background: rgba(117,77,255,0.30); color: #fff;
}
.lma-forecast-strip__panel { display: none; }
.lma-forecast-strip__panel.is-active { display: block; }

/* Weekly bar chart */
.lma-week-bars {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
  align-items: end;
}
.lma-week-bar {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: help;
}
.lma-week-bar__col {
  width: 100%; height: 90px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px 6px 0 0;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.lma-week-bar__fill {
  width: 100%;
  background: linear-gradient(180deg, #7dffaa 0%, #4ade80 100%);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: opacity .15s ease;
}
.lma-week-bar:hover .lma-week-bar__fill { opacity: 0.85; }
.lma-week-bar__label {
  color: #d8dae6; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.lma-week-bar__date {
  color: #8a8ea3; font-size: 10px;
}

/* -------- Region heatmap -------- */
.lma-heatmap {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 24px;
}
.lma-heatmap__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.lma-heatmap__title {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 600; font-size: 15px;
}
.lma-heatmap__title svg { color: #f87171; }
.lma-heatmap__period {
  margin-left: auto;
  color: #a8aabb; font-size: 12px;
  padding: 3px 8px; background: rgba(255,255,255,0.05); border-radius: 8px;
}

.lma-heatmap__highlights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 720px) { .lma-heatmap__highlights { grid-template-columns: 1fr; } }
.lma-heatmap__highlight {
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.lma-heatmap__highlight--good { border-color: rgba(74,222,128,0.3); }
.lma-heatmap__highlight--bad  { border-color: rgba(248,113,113,0.3); }
.lma-heatmap__highlight-label {
  font-size: 11px; color: #a8aabb; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600;
}
.lma-heatmap__highlight-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 3px 0; font-size: 13px;
}
.lma-heatmap__highlight-row span { color: #d8dae6; }
.lma-heatmap__highlight-row strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.lma-heatmap__highlight--good .lma-heatmap__highlight-row strong { color: #4ade80; }
.lma-heatmap__highlight--bad  .lma-heatmap__highlight-row strong { color: #f87171; }

.lma-heatmap__list { display: flex; flex-direction: column; gap: 4px; }
.lma-heatmap__row {
  display: grid;
  grid-template-columns: 150px 1fr 60px 80px;
  gap: 12px; align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
@media (max-width: 720px) {
  .lma-heatmap__row { grid-template-columns: 100px 1fr 50px 60px; gap: 8px; font-size: 12px; }
}
.lma-heatmap__region { color: #d8dae6; }
.lma-heatmap__bar-wrap {
  height: 14px; background: rgba(255,255,255,0.04); border-radius: 7px; overflow: hidden;
  position: relative;
}
.lma-heatmap__bar {
  height: 100%; border-radius: 7px;
  display: block;
  transition: width .3s ease;
}
.lma-heatmap__cr {
  color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right;
}
.lma-heatmap__clicks {
  color: #a8aabb; font-variant-numeric: tabular-nums; text-align: right; font-size: 12px;
}
.lma-heatmap__legend {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #6b6e8a; font-size: 11px; text-align: center;
}

/* -------- Simulator FAB -------- */
.lma-sim-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #7dffaa 0%, #5bd99b 100%);
  color: #0a0b13;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(125,255,170,0.28), 0 2px 6px rgba(0,0,0,0.4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.lma-sim-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(125,255,170,0.36), 0 4px 10px rgba(0,0,0,0.45);
}
.lma-sim-fab:active { transform: translateY(0); }
.lma-sim-fab svg { flex: none; }
.lma-sim-fab__label { white-space: nowrap; }
@media (max-width: 640px) {
  .lma-sim-fab { right: 16px; bottom: 16px; padding: 12px 16px; }
  .lma-sim-fab__label { display: none; }
}

/* -------- Simulator modal -------- */
.lma-modal__panel--sim {
  width: min(640px, 94vw);
}
.lma-sim-modal {
  padding: 26px 26px 22px;
}
.lma-sim-modal__title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 6px;
  font-size: 18px; font-weight: 600; color: #fff;
}
.lma-sim-modal__hint {
  margin: 0 0 18px;
  color: #9296b3;
  font-size: 13px;
  line-height: 1.45;
}
.lma-sim-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 520px) {
  .lma-sim-modal__grid { grid-template-columns: 1fr; }
}
/* Reset right-column padding inheritance — fields stand alone in modal */
.lma-sim-modal .lma-simulator__field { margin: 0; }
.lma-sim-modal .lma-simulator__result {
  margin-top: 8px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  min-height: 96px;
}

/* ===== LMA_POSTL_V1 — showcase position timeline (health modal) ===== */
.lma-postl{margin:14px 0 6px;padding:14px 16px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:12px}
.lma-postl__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.lma-postl__title{font-size:13px;font-weight:600;color:#e7e9f5}
.lma-postl__legend{display:flex;align-items:center;gap:9px;font-size:11px;color:#9598b4;flex-wrap:wrap}
.lma-postl__dot{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:3px;vertical-align:middle}
.lma-postl__dot--top{background:#3ddc97}
.lma-postl__dot--mid{background:#f2c54a}
.lma-postl__dot--low{background:#ef6b6b}
.lma-postl__dot--none{background:#3a3d57}
.lma-postl__dot--off{background:#6b3550}
.lma-postl__strip{display:flex;gap:4px;flex-wrap:wrap}
.lma-postl__cell{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:34px;height:42px;border-radius:7px;font-size:12px;font-weight:700;color:#0e1020}
.lma-postl__cell--top{background:linear-gradient(160deg,#43e0a0,#2bc283)}
.lma-postl__cell--mid{background:linear-gradient(160deg,#f3cd5e,#e0ad33);color:#2a2000}
.lma-postl__cell--low{background:linear-gradient(160deg,#f07d7d,#e05656);color:#2a0000}
.lma-postl__cell--none{background:#2d3048;color:#8a8db0}
.lma-postl__cell--off{background:repeating-linear-gradient(45deg,#3a2030,#3a2030 4px,#291826 4px,#291826 8px);color:#d8a0b0}
.lma-postl__pos{line-height:1}
.lma-postl__date{font-size:9px;font-weight:500;opacity:.7;margin-top:2px}
.lma-postl__empty{font-size:12px;color:#9598b4;line-height:1.5}
