/* ============================================
   Letmeads CPA Network - 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: 700;
  font-style: normal;
  font-display: swap;
}

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

/* ===== ROOT VARIABLES ===== */
:root {
  --font-main: "Gilroy", sans-serif;
  --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%
  );
  --lma-gradient--violet-dark: linear-gradient(
    90deg,
    #332072 0%,
    #09090A 44%,
    #1B103F 100%
  );
  --color-primary: #007bff;
  --color-primary-dark: #0056b3;
  --color-success: #28a745;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-text: #212529;
  --color-text-muted: #6c757d;
  --color-white: #ffffff;
  --color-border: #dee2e6;
  --color-bg-light: #f8f9fa;
  --color-bg-dark: #343a40;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --transition: all 0.2s ease;
  --container-max: 1600px;
  --container-md: 1340px;
  --container-pad: 24px;
  --container-max-wide: 1800px;
  --container-pad-wide: 16px;
  --lm-header-bg1: #0e1a2a;
  --lm-header-bg2: #1d2f4a;
  --lm-header-pill: #ffffff;
  --lm-header-pill-text: #1b2430;
  --lm-header-pill-muted: rgba(27, 36, 48, 0.65);
  --lm-header-accent: #b8ff3b;
  --lm-header-icon-bg: rgba(255, 255, 255, 0.08);
  --lm-header-icon-border: rgba(255, 255, 255, 0.14);
  --lm-header-text: rgba(255, 255, 255, 0.92);
  --lm-header-text-muted: rgba(255, 255, 255, 0.65);
  --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;
}

@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%;
  /* 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 {
  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;
}
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);
}

/* ===== AUTH LAYOUT ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.auth-header__subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.auth-footer__link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer__link:hover {
  text-decoration: underline;
}

/* ===== FORM COMPONENTS ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.auth-form__label--required::after {
  content: " *";
  color: var(--color-danger);
}

.auth-form__input-wrapper {
  position: relative;
  width: 100%;
}

.auth-form__input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  font-size: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  transition: var(--transition);
}

.auth-form__toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.auth-form__toggle-password:hover {
  opacity: 1;
}

.auth-form__toggle-password-icon {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

.auth-form__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-form__input:invalid:not(:placeholder-shown) {
  border-color: var(--color-danger);
}

.auth-form__input::placeholder {
  color: var(--color-text-muted);
}

.auth-form__error {
  font-size: 13px;
  color: var(--color-danger);
  display: none;
}

.auth-form__error--visible {
  display: block;
}

.auth-form__help {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: -4px;
}

.auth-form__button {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.auth-form__button:hover:not(:disabled) {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.auth-form__button:active:not(:disabled) {
  transform: translateY(0);
}

.auth-form__button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-form__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

.auth-form__divider::before,
.auth-form__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ===== OAUTH BUTTONS ===== */
.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-oauth__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.auth-oauth__button:hover {
  background: var(--color-bg-light);
  border-color: var(--color-primary);
}

.auth-oauth__icon {
  width: 20px;
  height: 20px;
}

/* ===== CLOUDFLARE TURNSTILE ===== */
.auth-captcha {
  display: none;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
}

.auth-captcha.turnstile-visible {
  display: flex;
}

.auth-captcha > div {
  max-width: 100%;
  width: 100%;
  text-align: center;
}
.auth-captcha iframe {
  width: 100% !important;
}

/* ===== ROLE SELECTION ===== */
.role-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.role-card {
  display: block;
  padding: 32px 24px;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition);
  cursor: pointer;
}

.role-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.role-card__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.role-card__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.role-card__description {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== ALERT MESSAGES ===== */
.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-alert--visible {
  display: block;
}

.auth-alert--success {
  background: rgb(30, 203, 79, 0.18);
  color: rgb(30, 203, 79, 1);
}

.auth-alert--error {
  background: rgb(253, 52, 52, 0.2);
  color: rgb(253 52 52);
}

/* ===== SUCCESS PAGE ===== */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.success-container {
  width: 100%;
  max-width: 520px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  text-align: center;
}

.success-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.success-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.success-message {
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== BACK LINK ===== */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.auth-back:hover {
  color: var(--color-primary);
}

.auth-back__icon {
  font-size: 16px;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
  height: 4px;
  background: var(--color-bg-light);
  border-radius: 2px;
  overflow: hidden;
}

.password-strength__bar {
  height: 100%;
  width: 0%;
  transition: var(--transition);
  border-radius: 2px;
}

.password-strength__bar--weak {
  width: 33%;
  background: var(--color-danger);
}

.password-strength__bar--medium {
  width: 66%;
  background: var(--color-warning);
}

.password-strength__bar--strong {
  width: 100%;
  background: var(--color-success);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .auth-container {
    padding: 32px 24px;
  }

  .auth-header__title {
    font-size: 24px;
  }

  .role-selection {
    grid-template-columns: 1fr;
  }

  .role-card {
    padding: 24px 20px;
  }
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}
.mt-0 {
  margin-top: 0!important;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mb-0 {
  margin-bottom: 0!important;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.pb-0 {
  padding-bottom: 0!important;
}
.pb-1 {
  padding-bottom: 8px;
}
.pb-2 {
  padding-bottom: 16px;
}
.pb-3 {
  padding-bottom: 24px;
}
.pt-0 {
  padding-top: 0!important;
}
.pt-1 {
  padding-top: 8px;
}
.pt-2 {
  padding-top: 16px;
}
.pt-3 {
  padding-top: 24px;
}
/* =========================================================
   REGISTER SPLIT — FIX (scoped overrides for auth styles)
   Работает даже если app.css тянет старые .auth-* стили
   ========================================================= */
/* зона контента — растягиваем */
.lma-auth {
  min-height: calc(100svh - 120px);
  padding: clamp(14px, 2.2vh, 22px) 0;
}

/* Контейнер с автоматической высотой */
.lma-auth .lma-container {
  height: auto;
}
/* Grid: высоту задаёт карточка формы, баннер подстраивается под неё */
.lma-auth-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: start; /* НЕ растягиваем карточку формы по высоте */
}

/* LEFT banner: тянется по высоте строки (которую задаёт форма), но сам высоту не навязывает */
.lma-auth-banner {
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  min-height: 0; /* важно: баннер не должен увеличивать высоту строки */
  align-self: stretch; /* тянется до высоты карточки (строки) */
}
.lma-auth-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center; /* картинка примыкает к нижнему краю */
  display: block;
}

/* RIGHT card — убираем “старую auth-карточку” из app.css */
.lma-register-page .auth-container.lma-auth-card {
  width: 100%;
  max-width: none;
  padding: 44px clamp(28px, 6.2vw, 100px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 34px;
  align-self: start; /* фикс: не растягиваем карточку формы по высоте */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Заголовок формы по центру как в макете */
.lma-register-page .auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.lma-register-page .auth-header__title {
  color: rgba(255, 255, 255, 0.92);
}
.lma-register-page .auth-header__subtitle {
  color: rgba(255, 255, 255, 0.62);
}

/* Поля/лейблы — делаем “тёмными” (app.css делает светлые) */
.lma-register-page .auth-form__label {
  color: rgba(255, 255, 255, 0.82);
}
.lma-register-page .auth-form__input {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.lma-register-page .auth-form__input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.lma-register-page .auth-form__input:focus {
  border-color: rgba(145, 92, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(145, 92, 255, 0.16);
}

/* Главная кнопка — фиолетовая как в макете */
.lma-register-page .auth-form__button {
  background: #7f7af0;
  color: var(--color-white);
}
.lma-register-page .auth-form__button:hover:not(:disabled) {
  background: #8b86ff;
}

/* Divider и Google btn */
.lma-register-page .auth-form__divider {
  color: rgba(255, 255, 255, 0.5);
}
.lma-register-page .auth-form__divider::before,
.lma-register-page .auth-form__divider::after {
  background: rgba(255, 255, 255, 0.14);
}
.lma-register-page .auth-oauth__button {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.85);
}

/* Back link */
.lma-register-page .auth-back {
  color: rgba(255, 255, 255, 0.55);
}
.lma-register-page .auth-back:hover {
  color: rgba(255, 255, 255, 0.82);
}

/* FIX: ничего не центруем по вертикали на странице регистрации */
.lma-register-page .lma-auth {
  display: block !important;
  min-height: auto; /* убираем попытку подгонять высоту */
  padding: clamp(30px, 2.2vh, 40px) 0;
}

.lma-register-page .lma-auth .lma-container {
  height: auto !important;
}

.lma-register-page .lma-auth-split {
  height: auto !important;
  align-items: start; /* карточка формы по своей высоте */
}

/* Форма определяет высоту, баннер растягивается по ней */
.lma-register-page .lma-auth-card {
  height: auto; /* форма определяет высоту */
}

/* Centered form (для логина без баннера) */
.lma-auth-split--centered {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}
.lma-register-page .lma-auth-split--centered .auth-container.lma-auth-card {
  padding: 44px clamp(28px, 4vw, 100px);
}

.lma-auth-card--centered {
  width: 100%;
  max-width: 100%;
}

/* Footer для страниц авторизации */
.lma-register-page .auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.lma-register-page .auth-footer__link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.lma-register-page .auth-footer__link:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 980px) {
  .lma-auth-split {
    grid-template-columns: 1fr;
  }
  .lma-auth-banner {
    min-height: clamp(220px, 32vh, 360px);
  }
  .lma-register-page .auth-container.lma-auth-card {
    padding: 28px clamp(18px, 4vw, 28px);
    border-radius: 24px;
  }
  .lma-auth-split--centered {
    max-width: 100%;
  }
}

/* ============================================
   Dashboard Start
   Letmeads CPA - Header (component scoped)
   Prefix: lm-header
   ============================================ */

.lma-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--lma-color--dark-1);
  border-bottom: var(--lma-color--dark-3);
  z-index: 999;
}
.lma-header-bg-1 {
  background: var(--bg-gradient-1);
}
.lma-header--afiliate {
  padding: 12px 0;
}

.lma-header__inner {
  /* width: 100%;
  max-width: min(1800px, calc(100% - 32px));
  margin: 0 auto;
  padding: 15px 0; */
  display: grid;
  grid-template-columns: auto 1fr auto; /* brand | center | right */
  align-items: center;
  gap: 16px;
}

/* Brand */
.lma-header__brand {
  flex: 0 0 auto;
  min-width: 170px;
}

.lma-header__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.lma-header__brand-word {
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--lm-header-text);
  font-size: 18px;
  line-height: 1;
}

.lma-header__brand-logo {
  width: auto;
  height: 30px;
  display: block;
  opacity: 0.95;
}

.lma-header__center {
  display: flex;
  align-items: center;
  justify-content: center; /* центрируем внутри средней колонки */
  gap: 12px;
  min-width: 0;
}

/* Nav */
.lma-header__nav {
  /* flex: 1 1 auto; */
  min-width: 0;
}

.lma-header__nav-pill {
  background: var(--lma-color--dark-2);
  border-radius: 999px;
  padding: 8px;
  max-width: 820px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  /* overflow-x: auto; */
  /* -webkit-overflow-scrolling: touch; */
  /* scrollbar-width: none; */
}

.lma-header__nav-pill::-webkit-scrollbar {
  display: none;
}

.lma-header__nav-pill.is-tools-open {
  border-radius: 30px 30px 0 0;
}

.lma-header__nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: transparent;
  border-radius: 999px;
  text-decoration: none;
  color: var(--lma-color--gray-1);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  transition: var(--transition);
}

.lma-header__nav-item:hover {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-header__nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}

.lma-header__nav-item.is-icon {
  align-items: center;
}
.lma-header__nav-item.is-active {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-header__nav-item.is-active .lma-header__nav-dot {
  background: var(--lm-header-accent);
  box-shadow: 0 0 0 4px rgba(184, 255, 59, 0.22);
}

/* ===== Nav Dropdown (for Tools menu etc.) ===== */
.lma-header__nav-dropdown {
  position: relative;
}

.lma-header__nav-dropdown .lma-header__nav-item {
  border: none;
  cursor: pointer;
}

.lma-header__nav-dropdown .lma-header__nav-item:hover {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-header__nav-chevron {
  opacity: 0.6;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.lma-header__nav-dropdown.is-open .lma-header__nav-chevron {
  transform: rotate(180deg);
}

.lma-header__nav-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 200px;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lma-header__nav-menu--tools {
  position: fixed;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  width: min(1140px, calc(100vw - 48px));
  min-width: 860px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 14px;
  border: 0;
  border-radius: 0 0 30px 30px;
  background: var(--lma-color--dark-2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  clip-path: inset(0 -60px -60px -60px);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lma-header__nav-menu-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lma-header__nav-dropdown.is-open .lma-header__nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lma-header__nav-dropdown.is-open .lma-header__nav-menu--tools {
  transform: translateX(-50%);
  opacity: 1;
  visibility: visible;
}

.lma-header__nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 14, 0.56);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 980;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lma-header__nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lma-header__nav-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 100px;
  color: var(--color-white);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lma-header__nav-menu--tools .lma-header__nav-menu-item {
  height: 50px;
  gap: 10px;
  justify-content: flex-start;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.02);
}

.lma-header__nav-menu-item:hover {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-header__nav-menu-icon {
  width: 18px;
  height: 18px;
  opacity: 0.84;
  flex-shrink: 0;
  object-fit: contain;
}

.lma-header__nav-menu-item:hover .lma-header__nav-menu-icon,
.lma-header__nav-menu-item.is-active .lma-header__nav-menu-icon {
  opacity: 1;
}

.lma-header__nav-menu-item.is-active {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-header__nav-menu-item--disabled {
  position: relative;
  cursor: not-allowed;
  background: transparent;
}

.lma-header__nav-menu-item--disabled > img,
.lma-header__nav-menu-item--disabled > span {
  opacity: 0.35;
}

.lma-header__nav-menu-item--disabled:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lma-header__nav-menu-item--disabled:hover > img,
.lma-header__nav-menu-item--disabled:hover > span {
  opacity: 0.5;
}

.lma-header__nav-menu-item--disabled::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 11.5px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--lma-color--purple-1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 100;
}

.lma-header__nav-menu-item--disabled:hover::after {
  opacity: 1;
  visibility: visible;
}

.lma-header__nav-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 8px;
}

@media (max-width: 1200px) {
  .lma-header__nav-menu--tools {
    width: min(820px, calc(100vw - 32px));
    min-width: 640px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Right side */
.lma-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Iconbar near pill */
.lma-header__iconbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
}

/* ============================================
   Common gradient border class for header buttons
   Applies to: .lma-header__iconbtn, .lma-header__actionbtn, .lma-header__avatar-group
   ============================================ */
.lma-gray--border-gradient {
  position: relative;
  isolation: isolate;
  /* background: var(--lma-color--dark-2); */
  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;
}

/* Ensure badge and other absolute positioned elements are above border */
.lma-gray--border-gradient .lma-header__badge {
  z-index: 2;
}

.lma-header__iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Actions at the very end */
.lma-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lma-header__account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Avatar group (avatar + ID as single clickable block) */
.lma-header__avatar-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 0;
  cursor: pointer;
  border-radius: 100px;
  transition: var(--transition);
}

.lma-header__avatar-group:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lma-header__avatar-group:hover .lma-header__avatar {
  border-color: rgba(255, 255, 255, 0.25);
}

.lma-header__account-id {
  display: inline-flex;
  align-items: center;
  color: white;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1;
}

/* Arrow icon in avatar group */
.lma-header__avatar-arrow {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

.lma-header__avatar-group:hover .lma-header__avatar-arrow {
  opacity: 0.9;
}

.lma-avatar-menu.is-open .lma-header__avatar-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.lma-header__actionbtn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.lma-header__actionbtn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.lma-header__icon {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 1;
}

/* Tooltip for icon buttons */
.lma-header__iconbtn::after,
.lma-header__actionbtn::after {
  content: attr(aria-label);
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  background: var(--lma-color--dark-2);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid #2b2c30;
}

.lma-header__iconbtn:hover::after,
.lma-header__actionbtn:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Notification badge */
.lma-header__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lma-color--purple-1);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Avatar (inside avatar-group) */
.lma-header__avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  padding: 2px;
  /* border: 1px solid rgba(255, 255, 255, 0.18); */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* background: rgba(255, 255, 255, 0.06); */
  text-decoration: none;
  flex-shrink: 0;
}

.lma-header__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   Letmeads CPA - Avatar menu (component scoped)
   Prefix: lma-menu
   ============================================ */

.lma-avatar-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lma-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 244px;
  padding: 12px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform-origin: top right;
  transform: translateY(-4px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 200;
}

/* Subtle top-left glow (smaller than .lma-affdash-card--ai; purple-3 based; behind menu content) */
.lma-menu::after {
  content: "";
  position: absolute;
  top: -112px;
  left: -112px;
  width: 270px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--lma-color--purple-3) 30%, transparent) 0%,
    color-mix(in srgb, var(--lma-color--purple-3) 12%, transparent) 42%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

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

.lma-avatar-menu.is-open .lma-menu {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.lma-menu__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgb(255 255 255 / 3%);
  border-radius: 20px;
  box-shadow: inset 0 0 40px rgb(255 255 255 / 5%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.lma-menu__header-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.lma-menu__header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lma-menu__header-info {
  flex: 1;
  min-width: 0;
}

.lma-menu__title {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lma-menu__subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lma-menu__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 8px;
}

.lma-menu__divider--dashed {
  height: 0;
  border: none;
  border-top: 1px dashed var(--lma-color--gray-2);
  background: transparent;
}

.lma-menu__level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 8px;
  margin: 0 4px;
}

.lma-menu__level-title {
  color: var(--lma-color--gray-1);
  font-size: 12px;
  font-weight: 400;
  flex-shrink: 0;
}

.lma-menu__level-row .lma-menu__level-badge.lma-ai-widget__level {
  padding: 4px 12px;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}

.lma-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 4px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.lma-menu__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lma-menu__item--danger {
  color: var(--lma-color--red);
}

.lma-menu__item--danger:hover {
  background: rgba(255, 86, 86, 0.16);
}

.lma-menu__item-icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex-shrink: 0;
  display: block;
  color: var(--lma-color--gray-2);
}

.lma-menu__logout-icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex-shrink: 0;
  display: block;
}

/* Burger (mobile) */
.lma-header__burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.lma-header__burger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lma-header__burger-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.lma-header__burger .line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 5;
  stroke-linecap: round;
  transition:
    stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lma-header__burger .line1,
.lma-header__burger .line3 {
  stroke-dasharray: 60 207;
}

.lma-header__burger .line2 {
  stroke-dasharray: 60 60;
}

.lma-header__burger.is-open .line1,
.lma-header__burger.is-open .line3 {
  stroke-dasharray: 90 207;
  stroke-dashoffset: -134;
}

.lma-header__burger.is-open .line2 {
  stroke-dasharray: 1 60;
  stroke-dashoffset: -30;
}

/* ============================================
     Responsive
     ============================================ */
@media (max-width: 1300px) {
  .lma-header__inner,
  .lma-header__center,
  .lma-header__nav-pill,
  .lma-header__iconbar,
  .lma-header__actions {
    gap: 6px;
  }
  .lma-header__iconbtn {
    width: 36px;
    height: 36px;
  }
  .lma-header__avatar {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 1200px) {
  .lma-header__brand {
    min-width: auto;
  }
  .lma-header__actionbtn--settings,
  .lma-header__actionbtn--media {
    display: none;
  }
}
@media (max-width: 992px) {
  .lma-header__center {
    display: none;
  }
  .lma-header__iconbar {
    display: none;
  }
  .lma-header__actions .lma-header__actionbtn {
    display: none;
  }
  .lma-header__avatar-group {
    height: 44px;
    padding: 0 8px 0 0;
    gap: 6px;
  }
  .lma-header__avatar {
    width: 44px;
    height: 44px;
  }
  .lma-header__account-id {
    line-height: 1;
    transform: translateY(1px);
  }
  .lma-header__right {
    gap: 8px;
  }
  .lma-header__burger {
    display: inline-flex;
  }
}

/* ============================================
   Mobile sidebar menu
   ============================================ */
.lma-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.lma-mobile-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 10, 14, 0.65);
  opacity: 0;
  transition: opacity 240ms ease;
}

.lma-mobile-menu__panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: linear-gradient(160deg, #171524 0%, #0f0e17 65%, #11101c 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 320ms ease;
  display: flex;
  flex-direction: column;
}

.lma-mobile-menu.is-open {
  pointer-events: auto;
}

.lma-mobile-menu.is-open .lma-mobile-menu__overlay {
  opacity: 1;
}

.lma-mobile-menu.is-open .lma-mobile-menu__panel {
  transform: translateX(0);
}

.lma-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lma-mobile-menu__user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lma-mobile-menu__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.lma-mobile-menu__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lma-mobile-menu__user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lma-mobile-menu__user-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.lma-mobile-menu__user-email {
  color: var(--color-white);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  opacity: .8;
  font-weight: 400;
}

.lma-mobile-menu__user-id {
  color: var(--color-white);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.lma-mobile-menu__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
  border: none;
  position: relative;
  cursor: pointer;
}

.lma-mobile-menu__close-line {
  position: absolute;
  width: 16px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
}

.lma-mobile-menu__close-line:first-child {
  transform: rotate(45deg);
}

.lma-mobile-menu__close-line:last-child {
  transform: rotate(-45deg);
}

.lma-mobile-menu__content {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lma-mobile-menu__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lma-mobile-menu__section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.45);
}

.lma-mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.lma-mobile-menu__link:hover {
  background: rgba(117, 77, 255, 0.16);
  color: #fff;
}

.lma-mobile-menu__link.is-active {
  background: rgba(117, 77, 255, 0.25);
  border: 1px solid rgba(117, 77, 255, 0.6);
}

.lma-mobile-menu__card {
  padding: 14px;
  border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(140deg, rgba(117, 77, 255, 0.22), rgba(28, 24, 40, 0.3));
  border: 1px solid rgba(117, 77, 255, 0.35);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lma-mobile-menu__card-title {
  font-weight: 600;
  font-size: 14px;
}

.lma-mobile-menu__card-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.lma-mobile-menu__footer {
  padding: 14px 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}

.lma-mobile-menu__footer-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
}

.lma-mobile-menu__footer-link.is-danger {
  color: var(--lma-color--red);
}

body.lma-mobile-menu-open {
  overflow: hidden;
}
@media (max-width: 980px) {
  .lma-header__brand {
    min-width: auto;
  }
  .lma-header__brand-word {
    display: none;
  }
}

@media (max-width: 820px) {
  .lma-header__iconbar {
    display: none;
  } /* прячем вторую группу иконок */
}

@media (max-width: 640px) {
  .lma-header__actions {
    gap: 8px;
  }

  .lma-header__nav-item {
    padding: 9px 10px;
    font-size: 13px;
  }

  .lma-header__nav-label {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* На очень узких — оставляем только ключевые действия, меню скроллится */
@media (max-width: 420px) {
  .lma-header__actionbtn {
    width: 36px;
    height: 36px;
  }
  .lma-header__iconbtn {
    width: 36px;
    height: 36px;
  }
  .lma-header__avatar {
    width: 36px;
    height: 36px;
  }
  /* Ensure gradient border scales properly on mobile */
  .lma-btn-gradient::before {
    padding: 0.75px;
  }
}

/* =======================
   Legal Pages (Policy, Terms)
   ======================= */
.legal-page {
  padding: 120px 0 100px;
}
.legal-page-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

/* Sidebar Navigation */
.legal-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}
.legal-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legal-nav-item {
  margin: 0;
}
.legal-nav-link {
  display: block;
  padding: 6px 24px;
  color: var(--additional-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}
.legal-nav-link:hover {
  color: var(--brand);
  background: var(--gray-bg);
}
.legal-nav-link.is-active {
  color: var(--brand);
  font-weight: 500;
  border-left-color: var(--brand);
}

/* Main Content */
.legal-content {
  max-width: 900px;
}
.legal-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 600;
  margin: 0 0 40px;
  color: var(--color-white);
  line-height: 1.2;
}
.legal-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-white);
}
.legal-section {
  margin-bottom: 48px;
  scroll-margin-top: 120px;
}
.legal-section:last-child {
  margin-bottom: 0;
}
.legal-section h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--color-white);
  line-height: 1.3;
}
.legal-section h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 24px 0 12px;
  color: var(--color-white);
}
.legal-section p {
  margin: 0 0 16px;
  font-weight: 300;
  line-height: 1.7;
}
.legal-section p:last-child {
  margin-bottom: 0;
}
.legal-section ul,
.legal-section ol {
  margin: 16px 0;
  padding-left: 24px;
}
.legal-section li {
  margin-bottom: 12px;
  line-height: 1.6;
  font-weight: 300;
}
.legal-section li:last-child {
  margin-bottom: 0;
}
.legal-section a {
  color: #887ee9;
  text-decoration: none;
  text-underline-offset: 4px;
  font-weight: 400;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}
.legal-section a:hover {
  color: var(--brand);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 992px) {
  .legal-page-grid {
    grid-template-columns: 240px 1fr;
    gap: 40px;
  }
  .legal-sidebar {
    top: 80px;
  }
  .legal-nav-link {
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .legal-page {
    padding: 100px 0 60px;
  }
  .legal-page-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .legal-sidebar {
    position: static;
    order: 2;
  }
  .legal-content {
    order: 1;
  }
  .legal-nav {
    border-radius: 8px;
    padding: 16px 0;
  }
  .legal-nav-link {
    padding: 10px 16px;
  }
  .legal-title {
    margin-bottom: 32px;
  }
  .legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 80px;
  }
  .legal-text {
    font-size: 15px;
  }
}

/* =========================================================
   AFFILIATE DASHBOARD — GRID FIX (scoped, safe)
   убираем "span rows" влияние AI на правую колонку
   ========================================================= */
/* page title reusable: максимум 54px */
.lma-page-title {
  font-size: clamp(36px, 3.375vw, 54px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.6px;
  margin: 0;
  color: var(--color-white);
}
.lma-page-subtitle {
  color: var(--lma-color--gray-1);
  font-size: 14px;
  margin-top: 8px;
}

.lma-aff-dashboard {
  background: var(--lma-color--dark-1);
  color: var(--color-white);
}

/* Page header (вынесен наверх, вне виджетов) */
.lma-affdash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

/* OUTER GRID: AI | RIGHT */
.lma-affdash__grid {
  display: grid;
  /* narrower AI column, wider right column */
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 2.25fr);
  gap: clamp(12px, 1vw, 2px);
  align-items: stretch;
}

/* ADVERTISER GRID: Left (offer+balance) | Right (chart+payments) */
.lma-affdash__grid--adv {
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 2.25fr);
}

.lma-affdash-left--adv {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1vw, 16px);
}

.lma-affdash-card--offer,
.lma-affdash-card--offer[data-spotlight],
.lma-affdash-card--offer .lma-card {
  overflow: visible;
}

.lma-affdash-card--offer {
  z-index: 2;
}

.lma-affdash-card--offer .lma-card {
  z-index: 11;
}

.lma-adv-offer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 0 16px;
}

.lma-adv-offer-logo img {
  height: 80px;
  width: auto;
  border-radius: 16px;
  object-fit: contain;
}

.lma-adv-offer-logo__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-white);
  text-align: center;
}

/* Offer switcher dropdown */
.lma-adv-offer-switch {
  position: relative;
}

.lma-adv-offer-switch__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  background:var(--lma-color--dark-2);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.lma-adv-offer-switch__menu.is-open {
  display: block;
}

.lma-adv-offer-switch__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--lma-color--gray-1, #8a8b9e);
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.lma-adv-offer-switch__item:hover {
  background: var(--lma-color--purple-1, rgba(139,92,246,0.15));
  color: var(--color-white);
}

.lma-adv-offer-switch__item.is-active {
  background: var(--lma-color--purple-1, rgba(139,92,246,0.15));
  color: var(--color-white);
}

.lma-affdash__grid--adv .lma-affdash-right__grid {
  grid-template-rows: 1fr;
}

/* AI */
.lma-affdash-card--ai {
  min-height: clamp(520px, 75vh, 700px);
  position: relative;
  overflow: hidden;
}

/* Subtle glow in top-left corner */
.lma-affdash-card--ai::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);
}

/* =========================================================
   AI WIDGET (Арбітражник)
   ========================================================= */
.lma-ai-widget {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(16px, 1.5vw, 24px);
  position: relative;
}

/* Top: Help button */
.lma-ai-widget__top {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

/* =========================================================
   TOOLTIP (reusable)
   ========================================================= */
.lma-tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.lma-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  max-width: 280px;
  padding: 14px 16px;
  background: rgba(20, 20, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.lma-tooltip--left {
  right: 0;
  left: auto;
}

.lma-tooltip--center {
  right: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
}

.lma-tooltip--top {
  top: auto;
  bottom: calc(100% + 10px);
  transform: translateY(6px);
}

.lma-tooltip-wrap:hover .lma-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.lma-tooltip-wrap:hover .lma-tooltip--center {
  transform: translateX(-50%) translateY(0);
}

.lma-tooltip-wrap:hover .lma-tooltip--top {
  transform: translateY(0);
}

/* Ensure tooltips can overlap sibling cards that use `isolation: isolate` (e.g. .lma-gray--border-gradient).
   We lift the whole card while the tooltip is active. */
.lma-gray--border-gradient:has(.lma-tooltip-wrap:hover),
.lma-gray--border-gradient:has(.lma-tooltip-wrap:focus-within) {
  z-index: 50;
}

/* Tooltip arrow */
.lma-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: rgba(20, 20, 26, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.lma-tooltip--center::before {
  right: auto;
  left: 50%;
  margin-left: -6px;
}

.lma-tooltip--top::before {
  top: auto;
  bottom: -6px;
  border-top: none;
  border-left: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.lma-ai-widget__help {
  width: clamp(38px, 2.75vw, 44px);
  height: clamp(38px, 2.75vw, 44px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.lma-ai-widget__help img {
  width: clamp(16px, 1.75vw, 20px);
  height: clamp(16px, 1.75vw, 20px);
  opacity: 0.9;
}

/* Center: Mascot */
.lma-ai-widget__mascot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin: -20px 0 clamp(-50px, 4.375vw, -70px);
  max-height: 549px;
  overflow: hidden;
}

.lma-ai-widget__mascot-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

/* Bottom: Rating + Message */
.lma-ai-widget__bottom {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1vw, 14px);
  position: relative;
  z-index: 10;
}

/* Rating badge row */
.lma-ai-widget__rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(12px, 1vw, 16px);
  border-radius: clamp(20px, 1.5vw, 28px);
  background: linear-gradient(
    90deg,
    rgba(50, 44, 73, 0.3) 0%,
    rgba(47, 40, 70, 0.3) 44%,
    rgba(40, 33, 62, 0.3) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Level pill */
.lma-ai-widget__level {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: var(--color-white);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.lma-ai-widget__level-emoji {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1;
}

.lma-ai-widget__level-label {
  white-space: nowrap;
}

/* Badges wrapper (level + state pills on the left) */
.lma-ai-widget__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

/* State pill */
.lma-ai-widget__state {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: var(--color-white);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.lma-ai-widget__state-label {
  white-space: nowrap;
}

.lma-tooltip--level {
  right: auto;
  left: 0;
  max-width: calc(100vw - 24px);
  white-space: normal;
}

.lma-tooltip--level::before {
  right: auto;
  left: 20px;
}

.lma-tooltip-wrap:hover .lma-tooltip--level.lma-tooltip--top {
  transform: translateY(0);
}

.lma-tooltip--state {
  right: auto;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  max-width: calc(100vw - 24px);
  white-space: normal;
}

.lma-tooltip--state::before {
  right: auto;
  left: 50%;
  margin-left: -6px;
}

.lma-tooltip-wrap:hover .lma-tooltip--state.lma-tooltip--top {
  transform: translateX(-50%) translateY(0);
  max-width: clamp(220px, 17.5vw, 260px);
}


.lma-ai-widget__level,
.lma-ai-widget__state {
  font-size: clamp(12px, 0.85vw, 13px);
}

.lma-ai-widget__bottom .lma-btn--arrow {
  width: clamp(34px, 2.75vw, 38px);
  height: clamp(34px, 2.75vw, 38px);
}
.lma-ai-widget__bottom .lma-btn--arrow img {
  width: clamp(18px, 1.25vw, 20px);
  height: clamp(18px, 1.25vw, 20px);
}

/* Purple gradient border for arrow button */
.lma-purple--border-gradient {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: none;
  overflow: visible;
  transition: var(--transition);
}

.lma-purple--border-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--purple-2);
  -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;
  opacity: 0.7;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.lma-purple--border-gradient::after {
  display: none;
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1px dashed var(--lma-color--purple-3);
  opacity: 0.5;
  pointer-events: none;
}

a.lma-purple--border-gradient:hover,
button.lma-purple--border-gradient:hover {
  transform: translateY(-1px);
  background: rgba(139, 92, 246, 0.15);
}

/* Message block */
.lma-ai-widget__message {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(16px, 1.2vw, 20px);
  padding: clamp(14px, 1.2vw, 20px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lma-ai-widget__message p {
  margin: 0;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

/* Responsive */
@media (max-width: 720px) {
  .lma-ai-widget {
    padding: 16px;
  }

  .lma-ai-widget__level {
    padding: 10px 16px;
  }
}

/* RIGHT wrapper */
.lma-affdash-right {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr;
  gap: clamp(8px, 0.75vw, 12px);
}

.lma-affdash-head__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* RIGHT GRID: 2x2
   (3.2) Balance чуть меньше, Top чуть больше
   (3.3) Chart чуть шире, Payouts чуть уже
*/
.lma-affdash-right__grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: clamp(8px, 0.75vw, 12px);
  align-items: stretch;
}

/* rows inside right grid */
.lma-affdash-row {
  display: grid;
  gap: clamp(8px, 0.75vw, 12px);
  align-items: stretch;
  min-width: 0;
}

.lma-affdash-row--top {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); /* ~40/60 */
}

.lma-affdash-row--bottom {
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); /* ~70/30 */
  height: 100%;
}

.lma-affdash-row--bottom > .lma-affdash-card {
  height: 100%;
}

/* cards base */
.lma-affdash-card {
  position: relative;
  isolation: isolate;
  border-radius: clamp(30px, 2.5vw, 40px);
  background: var(--lma-color--dark-2);
  border: none;
  overflow: hidden;
}

/* Базовая градиентная обводка для всех карточек (серый градиент) */
.lma-affdash-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--gray-2);
  pointer-events: none;
  z-index: 10;

  /* вырезаем середину, оставляем рамку */
  -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;

  opacity: 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Контент карточки выше градиентной обводки */
.lma-affdash-card > * {
  position: relative;
  z-index: 1;
}

/* Fallback для браузеров без поддержки mask-composite */
@supports not (mask-composite: exclude) {
  .lma-affdash-card::before {
    border: 1px solid rgba(72, 70, 78, 0.3);
    background: transparent;
  }
  .lma-card--purple-gradient::before {
    border-color: rgba(190, 172, 255, 0.6);
  }
}

.lma-affdash-card__stub {
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--color-white);
  font-weight: 400;
  user-select: none;
  overflow: hidden;
  border-radius: inherit;
}

/* top row sizes */
.lma-affdash-card--balance,
.lma-affdash-card--top {
  min-height: 220px;
  max-height: 220px;
}

/* bottom row sizes */
/* (min-height previously here; removed intentionally) */

/* =========================================================
   PAYOUTS WIDGET (Історія платежів)
   ========================================================= */
.lma-payouts {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(16px, 1.5vw, 24px);
}

.lma-payouts .lma-card-head {
  flex-shrink: 0;
}

/* Scrollable wrapper */
.lma-payouts__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 8px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--lma-color--gray-2) transparent;
}

.lma-payouts__scroll::-webkit-scrollbar {
  width: 4px;
}

.lma-payouts__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.lma-payouts__scroll::-webkit-scrollbar-thumb {
  background: var(--lma-color--gray-2);
  border-radius: 2px;
}

/* Payments table */
.lma-payouts__table {
  width: 100%;
  border-collapse: collapse;
}

.lma-payouts__table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lma-payouts__table tr:last-child {
  border-bottom: none;
}

.lma-payouts__table td {
  padding: 14px 0;
  vertical-align: middle;
}

/* Date */
.lma-payouts__date {
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 400;
  color: var(--lma-color--gray-1);
  font-variant-numeric: tabular-nums;
}

/* Amount */
.lma-payouts__amount {
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 400;
  color: var(--lma-color--gray-1);
  font-variant-numeric: tabular-nums;
}

.lma-payouts__amount strong {
  font-weight: 500;
  color: var(--color-white);
}

/* Status */
.lma-payouts__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  color: var(--color-white);
  white-space: nowrap;
}

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

.lma-payouts__status--success {
  color: var(--lma-color--green-1);
}

.lma-payouts__status--rejected {
  color: var(--lma-color--red);
}

.lma-payouts__status--pending {
  color: var(--lma-color--yellow-1);
}

/* Empty state */
.lma-payouts__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px;
  text-align: center;
  color: var(--lma-color--gray-1);
  font-size: 13px;
}

/* ==================== Income Chart Widget ==================== */
.lma-income-widget {
  height: 100%;
  padding: clamp(20px, 2vw, 28px);
  background: linear-gradient(
    135deg,
    rgba(26, 26, 38, 0.6) 0%,
    rgba(20, 20, 28, 0.8) 100%
  );
  border-radius: 26px;
  display: flex;
  flex-direction: column;
}

.lma-income-widget .lma-card-head {
  flex-shrink: 0; /* header keeps its size */
  margin-bottom: clamp(24px, 2vw, 32px);
}

.lma-income-chart {
  width: 100%;
  flex: 1; /* auto-fill available vertical space */
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow flex shrinking */
}

.lma-income-chart__plot {
  flex: 1; /* fill parent height */
  display: flex;
  align-items: stretch;
  gap: clamp(12px, 1.5vw, 18px);
  min-height: 0; /* allow flex shrinking */
}

.lma-income-chart__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow flex shrinking */
}

.lma-income-chart__y {
  width: 56px;
  margin-bottom: 32px;
  position: relative; /* for absolute positioning of labels */
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
}

.lma-income-chart__y-label {
  position: absolute;
  left: 0;
  line-height: 1;
  transform: translateY(-50%); /* center label on gridline */
}

.lma-income-chart__bars {
  --col-h: 170px; /* JS will override for actual height */
  --outer-pad: 10px; /* padding between track and container edges */
  --inner-pad: 10px; /* padding between candle and track */
  position: relative;
  flex: 1; /* auto-fill parent height */
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(12px, 1.5vw, 20px);
  padding: 0; /* ровный блок без внутренних отступов */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 180px; /* minimum for usability */
}

/* Horizontal gridlines - rendered dynamically in JS to match Y labels */
.lma-income-chart__gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  opacity: 0.5;
}

.lma-income-chart__x {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.5vw, 20px);
  padding-top: 10px;
  color: rgba(255, 255, 255, 0.42);
  font-size: clamp(12px, 1vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lma-income-chart__x-item {
  flex: 1;
  text-align: center;
}

/* Chart Bar */
.lma-chart-bar {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lma-chart-bar__column {
  position: relative;
  width: 100%;
  max-width: 34px;
  min-height: 24px;
  height: var(--col-h, 170px);
  /* column is just a positioning context now */
  overflow: visible; /* allow .lma-offer__tip to render outside */
}

/* Track behind candle: height is set per-day in JS so pattern matches candle height */
.lma-chart-bar__track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--outer-pad, 10px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: 999px;
  overflow: visible; /* allow tip to appear above track */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
image.png .lma-chart-bar__track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 5px,
    rgba(255, 255, 255, 0.07) 5px,
    rgba(255, 255, 255, 0.07) 7px
  );
  border-radius: 999px; /* match parent */
  pointer-events: none;
  opacity: 0.35;
  overflow: hidden; /* pattern stays inside track */
}

.lma-chart-bar__fill {
  position: absolute;
  bottom: var(--inner-pad, 10px); /* now positioned inside track, not column */
  left: 50%;
  transform: translateX(-50%);
  width: 14px; /* thin candle */
  background: linear-gradient(
    180deg,
    rgba(186, 148, 255, 0.95) 0%,
    rgba(138, 112, 255, 0.85) 100%
  );
  border-radius: 999px; /* fully rounded pill */
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lma-chart-bar__day {
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

/* Hover State */
.lma-chart-bar:hover .lma-chart-bar__track {
  background: linear-gradient(
    180deg,
    rgba(252, 156, 243, 0.1) 0%,
    rgba(252, 156, 243, 0.06) 100%
  );
}

.lma-chart-bar:hover .lma-chart-bar__fill {
  background: linear-gradient(
    180deg,
    rgba(252, 156, 243, 1) 0%,
    rgba(252, 156, 243, 0.85) 100%
  );
  transform: translateX(-50%) scaleY(1.02);
}

.lma-chart-bar:hover .lma-chart-bar__day {
  color: rgba(255, 255, 255, 0.8);
}

/* Reuse offer tooltip style for chart bars */
.lma-chart-bar__column .lma-offer__tip {
  /* Positioned via JS to be above track (not column) */
  position: absolute;
  left: 50%;
  /* bottom set via JS to match track position */
  transform: translateX(-50%);
  z-index: 20;
}

.lma-chart-bar:hover .lma-chart-bar__column .lma-offer__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .lma-income-chart__bars {
    gap: clamp(8px, 2vw, 12px);
  }
  .lma-income-widget .lma-card-head {
    margin-bottom: 32px;
  }
  .lma-chart-bar__column {
    max-width: 24px;
  }
  .lma-chart-bar__fill {
    width: 8px;
  }
}

/* Responsive */
@media (max-width: 480px) {
  .lma-payouts__table td {
    padding: 10px 0;
  }

  .lma-payouts__date {
    font-size: 12px;
  }

  .lma-payouts__amount {
    font-size: 13px;
  }

  .lma-payouts__status span {
    display: none;
  }
}

/* Chart card glows (left & right, vertically centered) */
/* =========================================================
   REUSABLE: Side glow effect (.lma-glow-sides)
   Add soft purple glow on left and right sides of a card
   Usage: Add class to any card element with position: relative
   ========================================================= */
.lma-glow-sides {
  position: relative;
  overflow: hidden;
}

.lma-glow-sides::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 0% 50%,
      rgba(201, 152, 242, 0.12) 0%,
      rgba(201, 152, 242, 0.05) 12%,
      transparent 22%
    ),
    radial-gradient(
      circle at 100% 50%,
      rgba(201, 152, 242, 0.12) 0%,
      rgba(201, 152, 242, 0.05) 12%,
      transparent 22%
    );
  pointer-events: none;
  z-index: 2;
  filter: blur(20px);
}

/* Chart card uses the reusable glow */
.lma-affdash-card--chart {
  position: relative;
  overflow: hidden;
}

.lma-affdash-card--chart::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 0% 50%,
      rgba(201, 152, 242, 0.12) 0%,
      rgba(201, 152, 242, 0.05) 10%,
      transparent 18%
    ),
    radial-gradient(
      circle at 100% 50%,
      rgba(201, 152, 242, 0.12) 0%,
      rgba(201, 152, 242, 0.05) 10%,
      transparent 18%
    );
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

/* =========================================================
   Controls (reuse)
   ========================================================= */
.lma-iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
  padding: 0;
}

.lma-iconbtn:active {
  transform: translateY(0);
}

.lma-iconbtn__icon {
  font-size: 16px;
  line-height: 1;
  opacity: 1;
}

.lma-filterbtn {
  height: 44px;
  padding: 0 14px 0 16px;
  border-radius: 14px;
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.lma-filterbtn:hover {
  transform: translateY(-1px);
}

.lma-filterbtn:active {
  transform: translateY(0);
}

.lma-filterbtn__text {
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
}

.lma-filterbtn__chev {
  font-size: 14px;
}
.lma-filterbtn__chev img {
  width: 14px;
  height: 14px;
}

/* Dash Date filter dropdown */
.lma-date-filter-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: none;
}

.lma-date-filter-dropdown .lma-date-preset:hover {
  background: var(--lma-color--purple-1) !important;
  color: var(--color-white) !important;
}

/* =========================================================
   Mobile: все блоки в одну колонку
   Заголовок уже наверху вне grid, поэтому просто адаптируем его и grid
   ========================================================= */
@media (max-width: 720px) {
  .lma-affdash-head {
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: clamp(16px, 2vw, 24px);
  }

  .lma-affdash-head__actions {
    width: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .lma-affdash__grid {
    grid-template-columns: 1fr;
  }

  .lma-affdash__grid--adv {
    grid-template-columns: 1fr;
  }

  /* Mobile: right wrapper становится обычным блоком */
  .lma-affdash-right {
    display: block;
  }

  .lma-affdash-right__grid {
    grid-template-columns: 1fr;
  }

  .lma-affdash-row--top,
  .lma-affdash-row--bottom {
    grid-template-columns: 1fr;
  }

  .lma-affdash-card--ai {
    min-height: clamp(420px, 55vh, 620px);
  }
}

/* =========================================================
   DASH WIDGET: TOTAL BALANCE (scoped)
   Uses shared header: .lma-card-head
   Модификатор для фиолетовой градиентной обводки
   ========================================================= */

/* Модификатор: фиолетовая градиентная обводка (переопределяет базовую серую) */
.lma-card--purple-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--gray-2);
  pointer-events: none;
  z-index: 10;
  -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;
  opacity: 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.lma-card--purple-gradient::before {
  background: var(--lma-gradient--purple-2);
  opacity: 1;
  z-index: 10;
}

/* Градієнтна обводка (як .lma-card--purple-gradient, з --lma-gradient--violet-dark) */
.lma-border-gradient--violet-dark {
  position: relative;
  isolation: isolate;
  border: none;
  border-radius: clamp(20px, 2.5vw, 32px);
}

.lma-border-gradient--violet-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--violet-dark);
  pointer-events: none;
  z-index: 0;
  -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;
  opacity: 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.lma-border-gradient--violet-dark > * {
  position: relative;
  z-index: 1;
}

@supports not (mask-composite: exclude) {
  .lma-border-gradient--violet-dark::before {
    display: none;
  }
  .lma-border-gradient--violet-dark {
    border: 1px solid rgba(51, 32, 114, 0.45);
  }
}

/* inner surface (чтобы рамка не "съедала" контент) */
.lma-card {
  position: relative;
  z-index: 1;
  border-radius: inherit;
  background: var(--lma-color--dark-2);
  padding: 24px;
  min-height: 190px;
  overflow: hidden;
}

.lma-affdash-card--balance .lma-card,
.lma-affdash-card--top .lma-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

/* 2) Shared card header (будет и в других блоках) */
.lma-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--lma-color--gray-2);
  border-bottom-style: dashed;
}

.lma-card-head__left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

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

/* icon (left) */
.lma-card-icon {
  width: clamp(38px, 2.75vw, 44px);
  height: clamp(38px, 2.75vw, 44px);
  border-radius: 12px;
  background: var(--lma-color--dark-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.lma-card-icon img {
  width: clamp(16px, 1.75vw, 20px);
  height: clamp(16px, 1.75vw, 20px);
  display: block;
}

/* 3) Arrow button (per requirement: .lma-btn-gradient) */
.lma-btn--arrow {
  width: clamp(38px, 2.75vw, 44px);
  height: clamp(38px, 2.75vw, 44px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.lma-btn-gradient img {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.92;
}

/* dotted separator */
.lma-card-sep {
  margin: 18px 0 20px;
  height: 1px;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.22) 1px,
    transparent 1px
  );
  background-size: 8px 1px;
  background-repeat: repeat-x;
  opacity: 0.55;
}

/* 4) Balance row */
.lma-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.lma-balance__value {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

/* =========================================================
   WIDGET VALUE STYLES (unified for all dashboard widgets)
   ========================================================= */
.lma-widget-value {
  font-size: clamp(34px, 3.125vw, 50px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: var(--color-white);
}

.lma-widget-currency {
  font-size: clamp(34px, 3.125vw, 50px);
  line-height: 1;
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

/* Legacy classes - now use .lma-widget-value and .lma-widget-currency */
.lma-balance__currency {
  font-size: clamp(34px, 3.125vw, 50px);
  line-height: 1;
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

.lma-balance__amount {
  font-size: clamp(34px, 3.125vw, 50px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -1px;
  color: rgba(255, 255, 255, 0.96);
}




/* green pill */
.lma-pill--label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 999px;
  background: var(--lma-color--dark-3);
  color: var(--lma-color--dark-1);
  font-weight: 400;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1;
  white-space: nowrap;
}
.lma-pill--green {
  background: var(--lma-color--green-1);
}

/* responsive */
@media (max-width: 980px) {
}

@media (max-width: 720px) {
  .lma-card {
    padding: 16px;
  }
}

/* =========================================================
   METRICS SECTION ("Мої показники")
   ========================================================= */
.lma-metrics {
  margin-top: clamp(20px, 2vw, 32px);
}

.lma-metrics__title {
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 400;
  color: var(--color-white);
  margin: 0 0 clamp(16px, 1.5vw, 24px);
}

.lma-metrics__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 0.75vw, 12px);
}

/* Metric Card */
.lma-metric-card {
  position: relative;
  isolation: isolate;
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
  padding: clamp(20px, 1.5vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 180px;
}

/* Card header inside metric */
.lma-metric-card .lma-card-head {
  padding-bottom: 16px;
}

/* Value row */
.lma-metric-card__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.lma-metric-card__value .lma-widget-value {
  font-size: clamp(30px, 2.5vw, 40px);
}

.lma-metric-card__value .lma-widget-currency,
.lma-metric-card__value .lma-widget-unit {
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

.lma-adv-balance .lma-widget-currency,
.lma-adv-balance .lma-widget-value {
  font-size: clamp(34px, 3.125vw, 42px);
}

/* Fallback for browsers without mask-composite */
@supports not (mask-composite: exclude) {
  .lma-metric-card::before {
    border: 1px solid rgba(72, 70, 78, 0.3);
    background: transparent;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .lma-metrics__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .lma-metrics__grid {
    grid-template-columns: 1fr;
  }

  .lma-metric-card {
    min-height: 160px;
  }
}

/* =========================================================
   CURSOR SPOTLIGHT EFFECT
   - Solid circle + heavy blur (no visible gradient edges)
   - Positioned via transform: translate (GPU-accelerated)
   ========================================================= */
[data-spotlight] {
  overflow: hidden;
}

[data-spotlight] > .lma-cursor-spotlight {
  position: absolute;
  width: 250px;
  height: 250px;
  left: -125px;
  top: -125px;
  border-radius: 50%;
  background: rgba(190, 172, 255, 0.08);
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  filter: blur(80px);
  transition: opacity 0.5s ease;
  transform: translate(var(--spot-x, 0px), var(--spot-y, 0px));
  will-change: transform;
}

[data-spotlight]:hover .lma-cursor-spotlight {
  opacity: 1;
}

@media (hover: none), (max-width: 992px) {
  .lma-cursor-spotlight { display: none; }
}

/* =========================================================
   DASH WIDGET: TOP INCOME OFFERS (scoped)
   - same card system: .lma-card / .lma-card-head
   - offers: size from 36px to 60px
   - hover: dashed ring (purple-3) + tooltip with amount
   ========================================================= */

.lma-topoffers {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.lma-topoffers__body {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

/* left summary (как на скрине) */
.lma-topoffers__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "value label";
  align-items: end;
  gap: 8px;
  padding-right: 10px;
}

/* Legacy class - now uses .lma-widget-value */
.lma-topoffers__sum {
  font-size: clamp(34px, 3.125vw, 50px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.6px;
  color: rgba(255, 255, 255, 0.96);
}

.lma-topoffers__label {
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1;
  font-weight: 400;
  color: var(--lma-color--gray-1);
  transform: translateY(-6px);
}

/* offers row */
.lma-topoffers__offers {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 0.75vw, 16px);
  padding: 6px;
}

/* offer bubble */
.lma-offer {
  --sz: 44px;
  width: var(--sz);
  height: var(--sz);
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--lma-color--dark-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition:
    transform 0.16s ease,
    background 0.16s ease;
  flex: 0 0 auto;
}

.lma-offer img {
  width: calc(var(--sz) * 0.62);
  height: calc(var(--sz) * 0.62);
  object-fit: contain;
  display: block;
}

.lma-offer:hover {
  transform: translateY(-1px);
  background: #2b2c33; /* чуть светлее dark-3 */
}

/* dashed purple ring on hover */
.lma-offer::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 1px dashed transparent;
  opacity: 0;
  transition:
    opacity 0.16s ease,
    border-color 0.16s ease;
  pointer-events: none;
}

.lma-offer:hover::after {
  opacity: 1;
  border-color: var(--lma-color--purple-3);
}

/* tooltip amount (appears on hover) */
.lma-offer__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%);
  background: rgba(9, 9, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  padding: 8px 12px 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lma-offer:hover .lma-offer__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* slightly emphasize top offer */
.lma-offer--top {
  background: #2c2d34;
}

/* responsive */
@media (max-width: 980px) {
}

@media (max-width: 720px) {
  .lma-topoffers__offers {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .lma-topoffers__offers::-webkit-scrollbar {
    display: none;
  }

  /* чтобы подсказка не улетала за верх экрана на мобиле */
  .lma-offer__tip {
    bottom: calc(100% + 10px);
  }
}

/* =========================================================
   Postback Page (/affiliate/tools/postback)
   ========================================================= */
.lma-postback {
  min-height: 100vh;
  background: var(--lma-color--dark-1);
}

.lma-postback .lma-gray--border-gradient {
  z-index: 2;
}

/* Page Header */
.lma-postback__header {
  margin-bottom: clamp(20px, 2vw, 32px);
}

.lma-postback__subtitle {
  color: var(--lma-color--gray-1);
  font-size: 14px;
  margin-top: 8px;
}

/* Alerts container */
.lma-postback__alerts {
  margin-bottom: 20px;
}

/* Main 2-column Grid */
.lma-postback__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(6px, 1vw, 10px);
  margin-bottom: clamp(6px, 1vw, 10px);
}

@media (max-width: 1024px) {
  .lma-postback__grid {
    grid-template-columns: 1fr;
  }
}

/* Section Cards (list + form) */
.lma-postback__list-section,
.lma-postback__form-section,
.lma-postback__macros-section {
  border-radius: clamp(30px, 2.5vw, 40px);
  overflow: hidden;
}

.lma-postback__list-section::before,
.lma-postback__form-section::before,
.lma-postback__macros-section::before {
  z-index: 2;
}

.lma-postback__list-inner,
.lma-postback__form-inner,
.lma-postback__macros-inner {
  background: var(--lma-color--dark-2);
  padding: clamp(16px, 2vw, 24px);
  border-radius: 16px;
  height: 100%;
}

/* Card Header (uses shared .lma-card-head) */
.lma-postback__list-section .lma-card-head,
.lma-postback__form-section .lma-card-head,
.lma-postback__macros-section .lma-card-head {
  margin-bottom: 16px;
}

/* Hint text */
.lma-postback__hint {
  font-size: 13px;
  color: var(--lma-color--gray-1);
  margin-bottom: 16px;
}

/* ========== POSTBACK ITEMS LIST ========== */
.lma-postback__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lma-postback__item {
  background: transparent;
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 12px;
  overflow: hidden;
}

.lma-postback__item--editing {
  border: 1px solid var(--lma-color--purple-1);
}

.lma-postback__item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 1.5vw, 24px);
}

.lma-postback__item-info {
  flex: 1;
  min-width: 0;
}

.lma-postback__item-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.lma-postback__item-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-white);
}

.lma-postback__item-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

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

.lma-postback__item-badge--paused {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.lma-postback__item-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lma-postback__item-url {
  font-size: 12px;
  color: var(--lma-color--gray-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.lma-postback__item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lma-postback__item-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--lma-color--gray-2);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lma-postback__item-btn img {
  width: 16px;
  height: 16px;
}

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

.lma-postback__item-btn:hover img {
  opacity: 1;
}

.lma-postback__item-btn--delete:hover {
  border-color: var(--lma-color--red);
  background: rgba(255, 81, 98, 0.1);
}

/* ========== INLINE EDITOR ========== */
.lma-postback__editor {
  display: none;
  border-top: 1px solid var(--lma-color--gray-2);
}

.lma-postback__editor--open {
  display: block;
}

.lma-postback__editor-content {
  padding: clamp(16px, 1.5vw, 24px);
}

.lma-postback__editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.lma-postback__editor .lma-postback__form-group {
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .lma-postback__editor-row {
    grid-template-columns: 1fr;
  }
}

.lma-postback__editor-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* ========== FORM STYLES ========== */
.lma-postback__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.lma-postback__form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.lma-postback__form-sublabel {
  font-size: 12px;
  color: var(--lma-color--gray-1);
  margin-bottom: 4px;
}

.lma-postback__form-hint {
  font-size: 12px;
  color: var(--lma-color--gray-1);
}

/* Shared form input (used across postback, integrations, profile, etc.) */
.lma-input,
.lma-postback__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-main);
  background: transparent;
  color: var(--color-white);
  transition: var(--transition);
  box-sizing: border-box;
}

.lma-input::placeholder,
.lma-postback__input::placeholder {
  color: var(--lma-color--gray-1);
}

.lma-input:focus,
.lma-postback__input:focus {
  outline: none;
  border-color: var(--lma-color--purple-1);
}

/* Shared form textarea */
.lma-textarea,
.lma-postback__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  background: transparent;
  color: var(--color-white);
  transition: var(--transition);
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}

.lma-textarea::placeholder,
.lma-postback__textarea::placeholder {
  color: var(--lma-color--gray-1);
}

.lma-textarea:focus,
.lma-postback__textarea:focus {
  outline: none;
  border-color: var(--lma-color--purple-1);
}

/* ========== CHECKBOXES (shared) ========== */
.lma-checkboxes,
.lma-postback__checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.lma-checkbox,
.lma-postback__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.lma-checkbox input,
.lma-postback__checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.lma-checkbox-box,
.lma-postback__checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--lma-color--gray-2);
  background: var(--lma-color--dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lma-checkbox-box::after,
.lma-postback__checkbox-box::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--lma-color--green-1);
  opacity: 0;
  transition: var(--transition);
}

.lma-checkbox input:checked + .lma-checkbox-box,
.lma-postback__checkbox input:checked + .lma-postback__checkbox-box {
  border-color: var(--lma-color--green-1);
}

.lma-checkbox input:checked + .lma-checkbox-box::after,
.lma-postback__checkbox input:checked + .lma-postback__checkbox-box::after {
  opacity: 1;
}

.lma-checkbox-label,
.lma-postback__checkbox-label {
  font-size: 14px;
  color: var(--color-white);
}

/* ========== BUTTONS ========== */
.lma-postback__form-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.lma-postback__btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lma-postback__btn-icon {
  width: 16px;
  height: 16px;
}

.lma-postback__btn--primary {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-postback__btn--primary:hover {
  background: #6642e6;
}

.lma-postback__btn--secondary {
  background: transparent;
  border: 1px solid var(--lma-color--gray-2);
  color: var(--color-white);
}

.lma-postback__btn--test {
  background: transparent;
  border: 1px solid var(--lma-color--gray-2);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lma-postback__btn--secondary:hover,
.lma-postback__btn--test:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lma-postback__btn--test:disabled {
  opacity: 0.5;
  cursor: wait;
}

.lma-postback__test-result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.lma-postback__test-result--ok {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.lma-postback__test-result--fail {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.lma-postback__test-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lma-postback__test-result-row span {
  color: var(--lma-color--gray-1);
}

.lma-postback__test-result-url {
  margin-top: 6px;
  word-break: break-all;
}

.lma-postback__test-result-url span {
  color: var(--lma-color--gray-1);
  margin-right: 6px;
}

.lma-postback__test-result-url code {
  font-size: 12px;
  color: inherit;
  opacity: 0.85;
}

/* ========== EMPTY STATE ========== */
.lma-postback__empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
}

/* ========== MACROS TABLE ========== */
.lma-postback__macros-section {
  margin-bottom: clamp(16px, 2vw, 24px);
}

.lma-postback__macros-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.lma-postback__macros-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(14px, 1vw, 15px);
}

.lma-postback__macros-th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 400;
  color: var(--lma-color--gray-1);
  border-bottom: 1px solid var(--lma-color--gray-2);
  white-space: nowrap;
}

.lma-postback__macros-th--copy {
  width: 48px;
}

.lma-postback__macros-th-text {
  display: inline;
}

.lma-postback__macros-sort {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  margin-left: 4px;
  vertical-align: middle;
}

.lma-postback__macros-row {
  transition: var(--transition);
}

.lma-postback__macros-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lma-postback__macros-td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(60, 61, 69, 0.5);
  color: var(--color-white);
  vertical-align: middle;
}

.lma-postback__macros-td--copy {
  width: 48px;
}

.lma-postback__macros-td--macro {
  font-family: "Courier New", monospace;
  color: var(--lma-color--purple-3);
}

.lma-postback__macros-td--type {
  color: var(--lma-color--gray-1);
}

.lma-postback__macros-td--desc {
  color: var(--lma-color--gray-1);
}

.lma-postback__macros-td--example {
  color: var(--lma-color--purple-3);
}

.lma-postback__macros-copy {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lma-postback__macros-copy img {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

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

.lma-postback__macros-copy:hover img {
  opacity: 1;
}

/* ========== SWITCH DARK THEME OVERRIDE ========== */
.lma-postback .lma-switch__slider {
  background-color: var(--lma-color--gray-2);
}

.lma-postback .lma-switch input:checked + .lma-switch__slider {
  background-color: var(--lma-color--purple-1);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .lma-postback__item-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .lma-postback__item-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 12px;
  }

  .lma-postback__form-actions {
    flex-direction: column;
  }

  .lma-postback__btn {
    width: 100%;
  }

  .lma-postback__macros-table {
    font-size: 12px;
  }

  .lma-postback__macros-th,
  .lma-postback__macros-td {
    padding: 10px 12px;
  }
}

/* Form Elements */
.lma-form-group {
  margin-bottom: 20px;
}

.lma-form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
  font-size: 14px;
}

.lma-form-input,
.lma-form-textarea,
.lma-form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-main);
  transition: var(--transition);
  background: var(--color-white);
  color: var(--color-text);
}

.lma-form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.lma-form-input:focus,
.lma-form-textarea:focus,
.lma-form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.lma-form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* Switch */
.lma-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.lma-switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.lma-switch__slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.lma-switch input:checked + .lma-switch__slider {
  background-color: var(--color-success);
}

.lma-switch input:checked + .lma-switch__slider::before {
  transform: translateX(22px);
}

/* Buttons */
.lma-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

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

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

.lma-btn--secondary {
  background: var(--color-border);
  color: var(--color-text);
}

.lma-btn--secondary:hover {
  background: #c1c7cd;
}

.lma-btn--danger {
  background: var(--color-danger);
  color: var(--color-white);
}

.lma-btn--danger:hover {
  background: #c82333;
}

.lma-btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Badges */
.lma-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.lma-badge--success {
  background: #d4edda;
  color: #155724;
}

.lma-badge--danger {
  background: #f8d7da;
  color: #721c24;
}

.lma-badge--warning {
  background: #fff3cd;
  color: #856404;
}

.lma-badge--info {
  background: #d1ecf1;
  color: #0c5460;
}

/* Alerts */
.lma-alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 14px;
}

.lma-alert--info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.lma-alert--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.lma-alert--danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.lma-alert--warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Table */
.lma-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lma-table th {
  text-align: left;
  padding: 12px;
  background: var(--color-bg-light);
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
}

.lma-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.lma-table tr:hover {
  background: var(--color-bg-light);
}

.lma-table__mono {
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.lma-table__url {
  font-size: 11px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   STATISTICS PAGE (/affiliate/statistics)
   ========================================================= */

.lma-affpage--padding {
  padding: clamp(18px, 2.2vw, 28px) 0;
}

.lma-stats-page {
  background: var(--lma-color--dark-1);
  color: rgba(255, 255, 255, 0.92);
}

.lma-stats {
  min-height: calc(100vh - 80px);
}

/* ========== Header ========== */
.lma-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 24px);
  flex-wrap: wrap;
}

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

/* Notice / Disclaimer Banner */
.lma-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 16px;
}

.lma-notice svg {
  flex-shrink: 0;
}

.lma-notice--warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fbbf24;
}

.lma-notice--info {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.lma-notice--success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(22, 163, 74, 0.08) 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

@media (max-width: 480px) {
  .lma-notice {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* Agg Type Toggle */
.lma-agg-toggle {
  display: flex;
  align-items: center;
  height: 44px;
  gap: 4px;
  background: transparent;
  border-radius: 14px;
  padding: 4px;
}

.lma-agg-toggle__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  border-radius: 10px;
  height: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lma-agg-toggle__btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.lma-agg-toggle__btn.is-active {
  color: #fff;
  background: var(--lma-color--purple-1);
}

.lma-agg-toggle__btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.lma-agg-toggle__btn.is-active svg {
  opacity: 1;
}

/* Date Picker */
.lma-date-picker {
  position: relative;
  margin-left: auto;
}

.lma-date-picker__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Date Picker Dropdown with Shortcuts */
.lma-date-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: hidden;
}

.lma-date-picker.is-open .lma-date-dropdown {
  display: flex;
}

.lma-date-dropdown__shortcuts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 160px;
}

.lma-date-shortcut {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lma-date-shortcut:hover {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

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

.lma-date-dropdown__calendar {
  padding: 8px;
}

/* Make flatpickr inline inside dropdown */
.lma-date-dropdown .flatpickr-calendar {
  position: static !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

/* ========== Charts Placeholder (legacy) ========== */
.lma-stats-charts {
  margin-bottom: clamp(16px, 1.5vw, 20px);
  min-height: 180px;
}

.lma-stats-charts__stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 180px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
  padding: 40px;
}

.lma-stats-charts__stub svg {
  opacity: 0.5;
}

/* ========== Stats Charts Row (Income + ECPC) ========== */
.lma-scharts-row {
  display: flex;
  gap: clamp(8px, 0.75vw, 12px);
  margin-bottom: clamp(16px, 1.5vw, 20px);
  max-height: 420px;
}

.lma-scharts-col {
  border-radius: clamp(30px, 2.5vw, 40px);
  overflow: hidden;
}

.lma-scharts-col--income {
  flex: 1;
  min-width: 0;
  min-height: 420px;
}

.lma-schart-glow--purple::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-scharts-col--ecpc {
  flex: 0 0 clamp(380px, 30vw, 400px);
  width: clamp(380px, 30vw, 400px);
  max-width: 400px;
  min-height: 420px;
}

/* Inner chart wrapper */
.lma-schart {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(14px, 1.5vw, 20px);
}

.lma-schart .lma-card-head {
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-shrink: 0;
  padding-bottom: clamp(10px, 1vw, 16px);
}

/* Summary (value + badge) */
.lma-schart__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-shrink: 0;
}

.lma-schart__value {
  font-size: clamp(32px, 3.125vw, 40px);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.lma-schart__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 500;
}

.lma-schart__badge--pos {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.lma-schart__badge--neg {
  background: rgba(239, 68, 68, 0.15);
  color: var(--lma-color--red);
}

/* Today label (income chart) */
.lma-schart__today {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-shrink: 0;
}

.lma-schart__today-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.lma-schart__today-val {
  font-size: clamp(32px, 3.125vw, 40px);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

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

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

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

.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-skel-shimmer 1.6s ease-in-out infinite;
}

/* Income skeleton */
.lma-skel-income {
  display: flex;
  flex: 1;
  gap: 12px;
}

.lma-skel-income__ylabels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0 24px;
}

.lma-skel-income__bars {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 3px;
  padding-bottom: 24px;
}

.lma-skel-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: lma-skel-shimmer 1.6s ease-in-out infinite;
}

/* ECPC skeleton */
.lma-skel-ecpc {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

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

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

.lma-skel-ecpc__wave svg path {
  animation: lma-skel-shimmer 1.6s ease-in-out infinite;
}

.lma-skel-ecpc__footer {
  display: flex;
  justify-content: space-between;
}

/* ========== Income Chart (Canvas) ========== */
.lma-schart__wrap {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  gap: 0;
  position: relative;
}

.lma-schart__ylabels {
  width: 52px;
  flex-shrink: 0;
  position: relative;
  margin-right: 8px;
  /* Bottom margin = xlabels height (24px) + xlabels margin-top (6px)
     so that bottom:0% aligns with the bottom of the canvas, not the xlabels */
  margin-bottom: 34px;
  margin-top: 16px;
  /* Y labels are positioned relative to the canvas area height */
}

.lma-schart__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-schart__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lma-schart__canvas-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.lma-schart__canvas-area canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.lma-schart__xlabels {
  position: relative;
  height: 24px;
  margin-top: 6px;
  flex-shrink: 0;
}

.lma-schart__xlabel {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Tooltip */
.lma-schart__tip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(30, 28, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.lma-schart__tip-val {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.lma-schart__tip-pct {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

.lma-schart__tip-pct--pos {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.lma-schart__tip-pct--neg {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ========== ECPC Chart (SVG) ========== */

.lma-ecpc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.lma-ecpc-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-shrink: 0;
}

.lma-ecpc-svg-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: visible;
}

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

.lma-ecpc-line {
  position: absolute;
  width: 2px;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgba(52, 211, 153, 0.6) 0%,
    rgba(52, 211, 153, 0.15) 50%,
    transparent 100%
  );
  border-radius: 1px;
}

.lma-ecpc-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lma-color--dark-2);
  border: 2.5px solid #34d399;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 15;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.5);
}

.lma-schart__tip--ecpc {
  border-color: rgba(52, 211, 153, 0.3);
}

.lma-ecpc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(8px, 1vw, 12px);
  margin-top: 4px;
  flex-shrink: 0;
}

.lma-ecpc-mm {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lma-ecpc-mm__val {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.lma-ecpc-mm__val strong {
  font-weight: 500;
}

.lma-ecpc-mm__label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lma-ecpc-mm:last-child {
  text-align: right;
}

/* ========== Stats Charts Responsive ========== */
@media (max-width: 1200px) {
  .lma-scharts-col--ecpc {
    flex: 0 0 380px;
    width: 380px;
    max-width: 380px;
  }
}

@media (max-width: 960px) {
  .lma-scharts-row {
    flex-direction: column;
  }
  .lma-scharts-col--ecpc {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .lma-scharts-row {
    flex-direction: column;
  }
  .lma-scharts-col--income {
    display: none;
  }
  .lma-scharts-col--ecpc {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-height: 320px;
  }
}

/* ========== Legacy Income Chart Styles ========== */
.lma-chart-container {
  padding: clamp(16px, 2vw, 24px);
}

.lma-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(16px, 2vw, 24px);
  flex-wrap: wrap;
  gap: 12px;
}

.lma-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lma-color--text-primary);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 500;
}

.lma-chart-title svg {
  color: var(--lma-color--primary);
  opacity: 0.8;
}

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

.lma-chart-total {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  color: var(--lma-color--text-primary);
}

.lma-chart-change {
  display: inline-flex;
  align-items: center;
}

.lma-chart-change__percent {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: clamp(12px, 1.2vw, 13px);
  font-weight: 500;
}

.lma-chart-change__percent.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.lma-chart-change__percent.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ApexCharts Override для темної теми */
.apexcharts-tooltip {
  background: #2a2936 !important;
  border: 1px solid #3f3e4e !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.apexcharts-tooltip-title {
  background: #1f1e28 !important;
  border-bottom: 1px solid #3f3e4e !important;
  color: var(--lma-color--text-primary) !important;
}

.apexcharts-tooltip-text-y-label,
.apexcharts-tooltip-text-y-value {
  color: var(--lma-color--text-primary) !important;
}

@media (max-width: 768px) {
  .lma-chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .lma-chart-stats {
    width: 100%;
    justify-content: space-between;
  }
}

/* ========== Data Section ========== */
.lma-stats-data {
  overflow: visible;
}

.lma-stats-data__inner {
  padding: clamp(0px, 1.75vw, 28px);
}

.lma-stats-data__inner--filters {
  /* Same horizontal rhythm as card content, but without card background */
  padding: 0 clamp(0px, 1.75vw, 28px) 0;
}

.lma-stats-data__card {
  margin-top: 8px;
}

/* ========== Filters ========== */
.lma-stats-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(16px, 1.5vw, 20px);
  margin-top: clamp(16px, 1.5vw, 20px);
}

/* Active filter tags row (below filters) */
.lma-stats-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.lma-stats-active-filters:empty {
  display: none;
}

.lma-stats-filters__group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lma-stats-filters__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--lma-color--gray-1);
  white-space: nowrap;
}

/* Tabs (Group By) */
.lma-stats-tabs {
  display: inline-flex;
  background: var(--lma-color--dark-3);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.lma-stats-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--lma-color--gray-1);
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lma-stats-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

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

/* Filter Buttons Row */
.lma-stats-filters__buttons {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  flex-wrap: wrap;
}

.lma-stats-filters__spacer {
  flex: 1;
  min-width: clamp(6px, 1.25vw, 20px);
}

.lma-stats-filter-btn,
.lma-round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 100px;
  height: 44px;
  min-width: clamp(100px, 10vw, 160px);
  font-size: clamp(13px, 0.875vw, 14px);
  font-weight: 500;
  color: var(--color-white);
  cursor: pointer;
  transition: all 0.2s ease;
}


.lma-stats-filter-btn:hover:not(:disabled),
.lma-round-btn:hover:not(:disabled) {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.lma-stats-filter-btn:disabled,
.lma-round-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lma-stats-filter-btn.is-active,
.lma-round-btn.is-active {
  color: var(--color-white);
  /* background: rgba(255, 255, 255, 0.1); */
}

.lma-stats-filter-btn span small,
.lma-round-btn span small {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* ========== Dropdown ========== */
.lma-stats-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lma-stats-dropdown.is-open .lma-stats-filter-btn {
  color: var(--color-white);
}

.lma-stats-dropdown__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--lma-color--gray-1);
}

.lma-stats-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: var(--lma-color--dark-2);
  /* Gradient border like .lma-gray--border-gradient (without affecting dropdown positioning) */
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 8px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  isolation: isolate;
}

/* Gradient border using pseudo-element with mask (copied approach from .lma-gray--border-gradient) */
.lma-stats-dropdown__menu::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;
}

/* Ensure menu content sits above border pseudo-element */
.lma-stats-dropdown__menu > * {
  position: relative;
  z-index: 1;
}

.lma-stats-dropdown.is-open .lma-stats-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* GroupBy dropdown: keep border static, scroll only content (stats page "Огляд по") */
.lma-stats-dropdown__menu.lma-stats-dropdown__groupby {
  padding: 0; /* padding moved to inner scroll to prevent border "scrolling" */
}

.lma-stats-dropdown__menu.lma-stats-dropdown__groupby .lma-stats-dropdown__scroll {
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
}

/* Custom scrollbar (only for "Огляд по" dropdown) */
.lma-stats-dropdown__menu.lma-stats-dropdown__groupby .lma-stats-dropdown__scroll {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(117, 77, 255, 0.65) transparent;
}

.lma-stats-dropdown__menu.lma-stats-dropdown__groupby .lma-stats-dropdown__scroll::-webkit-scrollbar {
  width: 8px;
}

.lma-stats-dropdown__menu.lma-stats-dropdown__groupby .lma-stats-dropdown__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.lma-stats-dropdown__menu.lma-stats-dropdown__groupby .lma-stats-dropdown__scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(117, 77, 255, 0.85) 0%,
    rgba(136, 82, 223, 0.8) 100%
  );
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0); /* keeps it slim without a visible track */
  background-clip: padding-box;
}

.lma-stats-dropdown__menu.lma-stats-dropdown__groupby .lma-stats-dropdown__scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(117, 77, 255, 1) 0%,
    rgba(136, 82, 223, 0.95) 100%
  );
}

.lma-stats-dropdown__menu.lma-stats-dropdown__groupby {
  right: 0;
}

/* legacy inline svg chevron support */
.lma-stats-dropdown.is-open .lma-stats-filter-btn svg {
  transform: rotate(180deg);
}

.lma-stats-filter-btn__chev {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lma-stats-dropdown.is-open .lma-stats-filter-btn__chev {
  transform: rotate(180deg);
  opacity: 1;
}

.lma-stats-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.lma-stats-dropdown__item:last-child {
  margin-bottom: 0;
}

.lma-stats-dropdown__sep {
  height: 1px;
  margin: 8px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

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

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

.lma-stats-dropdown__item.is-active svg {
  color: var(--color-white);
}

.lma-stats-dropdown__item svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.lma-stats-dropdown__item:hover svg {
  opacity: 1;
}

.lma-stats-offer-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.lma-stats-filter-btn svg {
  opacity: 0.6;
}

/* ========== Sub Filter ========== */
.lma-sub-filter__menu {
  min-width: 320px;
  padding: 16px;
}

.lma-sub-filter__header {
  margin-bottom: 12px;
}

.lma-sub-filter__field {
  border-radius: 12px;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  min-height: 44px;
  overflow: hidden; /* keep rounded corners for inner controls */
}

/* Select chevron (white) */
.lma-sub-filter__field--select {
  position: relative;
  cursor: pointer;
}

.lma-sub-filter__field--select::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("/assets/images/icons/arrow-down.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  opacity: 0.9;
  filter: brightness(0) invert(1); /* make it white */
  pointer-events: none;
}

.lma-sub-filter__label {
  display: block;
  font-size: clamp(12px, 1vw, 14px);
  color: var(--color-white);
  margin-bottom: 10px;
  font-weight: 500;
}

.lma-sub-filter__select {
  width: 100%;
  height: 100%;
  padding: 10px 38px 10px 12px; /* space for chevron */
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--color-white);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
}

.lma-sub-filter__select:focus {
  outline: none;
}

.lma-sub-filter__search {
  position: relative;
  margin-bottom: 12px;
  z-index: 3; /* ensure suggestions can overlay over actions */
}

.lma-sub-filter__input {
  width: 100%;
  height: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--color-white);
  font-size: 14px;
  outline: none;
}

.lma-sub-filter__input:focus {
  outline: none;
}

.lma-sub-filter__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.lma-sub-filter__suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 200px;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow-y: auto;
  z-index: 1000; /* above actions below */
  display: none;
}

.lma-sub-filter__suggestions.is-visible {
  display: flex;
  flex-direction: column;
}

/* Suggestions: button items (current implementation uses .lma-sub-filter__suggestion) */
.lma-sub-filter__suggestion {
  width: 100%;
  display: block;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--color-white);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed rgb(60 61 69 / 85%);
  cursor: pointer;
  min-height: 40px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

/* Prevent long values (e.g., gclid) from breaking suggestions dropdown */
.lma-sub-filter__suggestion {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lma-sub-filter__suggestion:last-child {
  border-bottom: none;
}

.lma-sub-filter__suggestion:hover,
.lma-sub-filter__suggestion:focus-visible {
  background: var(--lma-color--dark-3);
  color: var(--color-white);
  outline: none;
}

.lma-sub-filter__suggestion.is-empty {
  color: rgba(255, 255, 255, 0.45);
  cursor: default;
  font-style: italic;
  pointer-events: none;
}

.lma-sub-filter__suggestion.is-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  cursor: default;
  pointer-events: none;
  font-style: normal;
}

.lma-sub-filter__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--lma-color--purple-1);
  border-radius: 50%;
  animation: lma-spin 0.8s linear infinite;
  flex: 0 0 14px;
}

/* Backward-compatible styles (older markup used .lma-sub-filter__suggestion-item) */
.lma-sub-filter__suggestion-item {
  padding: 10px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lma-sub-filter__suggestion-item:last-child {
  border-bottom: none;
}

.lma-sub-filter__suggestion-item:hover,
.lma-sub-filter__suggestion-item.is-highlighted {
  background: rgba(91, 95, 199, 0.15);
  color: var(--color-white);
}

.lma-sub-filter__suggestion-item.is-empty {
  color: rgba(255, 255, 255, 0.4);
  cursor: default;
  font-style: italic;
}

.lma-sub-filter__suggestion-item.is-empty:hover {
  background: transparent;
}

.lma-sub-filter__actions {
  display: flex;
  gap: 8px;
  /* margin-bottom: 16px; */
  /* padding-bottom: 16px; */
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.06); */
  position: relative;
  z-index: 1;
}

/* (sub apply button removed) */

.lma-sub-filter__action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--color-white);
  font-size: clamp(13px, 0.875vw, 14px);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lma-sub-filter__action-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.lma-sub-filter__action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lma-sub-filter__action-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.05);
}

.lma-sub-filter__action-btn--include:not(:disabled):hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-white);
}

.lma-sub-filter__action-btn--exclude:not(:disabled):hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-white);
}

.lma-sub-filter__action-btn svg {
  flex-shrink: 0;
}

.lma-sub-filter__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.lma-sub-filter__tags:empty {
  display: none;
}

.lma-sub-filter__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 100px;
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 500;
  cursor: default;
  position: relative;
  border: 1px solid var(--lma-color--gray-2);
  background: transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}

.lma-sub-filter__tag--include {
  color: rgba(255, 255, 255, 0.92);
}

.lma-sub-filter__tag--exclude {
  color: rgba(255, 255, 255, 0.92);
}

/* Left status icon */
.lma-sub-filter__tag::before {
  content: "";
  width: clamp(18px, 1.25vw, 20px);
  height: clamp(18px, 1.25vw, 20px);
  flex: 0 0 clamp(18px, 1.25vw, 20px);;
  background-repeat: no-repeat;
  background-position: center;
  background-size: clamp(18px, 1.25vw, 20px) clamp(18px, 1.25vw, 20px);
  opacity: 1;
}

.lma-sub-filter__tag--include::before {
  background-image: url("/assets/images/icons/check-green.svg");
}

.lma-sub-filter__tag--exclude::before {
  background-image: url("/assets/images/icons/check-red.svg");
}

/* Hide old type text (+ / −) produced by JS */
.lma-sub-filter__tag-type {
  display: none;
}

.lma-sub-filter__tag-text {
  transform: translateY(1px);
}

/* Prevent long values (e.g., gclid) from breaking filter tags */
.lma-sub-filter__tag-text {
  max-width: clamp(160px, 24vw, 420px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lma-sub-filter__tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(16px, 1vw, 18px);
  height: clamp(16px, 1vw, 18px);
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  transition:
    opacity 0.15s ease,
    background 0.15s ease;
  background-image: url(/assets/images/icons/tag-close.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: clamp(16px, 1vw, 18px) clamp(16px, 1vw, 18px);
  font-size: 0;
  line-height: 0;
}

.lma-sub-filter__tag-remove:hover {
  opacity: 1;
}

/* In case any SVG is used inside (legacy), hide it */
.lma-sub-filter__tag-remove svg {
  display: none;
}

/* Custom scrollbar for suggestions */
.lma-sub-filter__suggestions::-webkit-scrollbar {
  width: 6px;
}

.lma-sub-filter__suggestions::-webkit-scrollbar-track {
  background: transparent;
}

.lma-sub-filter__suggestions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.lma-sub-filter__suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Custom scrollbar for tags */
.lma-sub-filter__tags::-webkit-scrollbar {
  height: 6px;
}

.lma-sub-filter__tags::-webkit-scrollbar-track {
  background: transparent;
}

.lma-sub-filter__tags::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.lma-sub-filter__tags::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lma-export-group {
  display: flex;
  gap: 8px;
}

.lma-stats-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lma-stats-export-btn:hover:not(:disabled) {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.lma-stats-export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Reset Button */
.lma-stats-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 12px 14px;
  border-radius: 100px;
  font-size: clamp(13px, 0.875vw, 14px);
  font-weight: 500;
  color: var(--color-white);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

/* Tooltips for stats action buttons (reset & refresh) */
.lma-stats-reset-btn::after,
.lma-stats-filters__buttons > .lma-iconbtn::after {
  content: attr(aria-label);
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 10px;
  background: var(--lma-color--dark-2);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid #2b2c30;
}

.lma-stats-reset-btn:hover::after,
.lma-stats-filters__buttons > .lma-iconbtn:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lma-stats-filters__buttons > .lma-iconbtn {
  position: relative;
}

.lma-stats-reset-btn:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.lma-stats-reset-btn svg {
  opacity: 1;
  transition: transform 0.3s ease;
}

.lma-stats-reset-btn:hover svg {
  opacity: 1;
  /* transform: rotate(-180deg); */
}

@media (max-width: 1250px) {
  .lma-stats-reset-btn {
    width: 44px!important;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  .lma-stats-reset-btn span {
    display: none;
  }
  .lma-stats-reset-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Table Footer */
.lma-stats-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lma-stats-table-footer__info {
  color: var(--lma-color--gray-1);
  font-size: 13px;
}

/* ========== Table ========== */
.lma-stats-table-wrap {
  overflow-x: auto;
  margin: 0 -8px;
  padding: 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--lma-color--gray-2) transparent;
}

.lma-stats-table-wrap::-webkit-scrollbar {
  height: 6px;
}

.lma-stats-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.lma-stats-table-wrap::-webkit-scrollbar-thumb {
  background: var(--lma-color--gray-2);
  border-radius: 3px;
}

.lma-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(13px, 0.875vw, 14px);
  min-width: 900px;
}

/* Table Header */
.lma-stats-th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 500;
  color: var(--lma-color--gray-1);
  border-bottom: 1px solid var(--lma-color--gray-2);
  white-space: nowrap;
  position: relative;
}

.lma-stats-th__text {
  display: inline;
}

.lma-stats-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
  vertical-align: middle;
}

.lma-stats-sort:hover,
.lma-stats-th.is-sorted .lma-stats-sort {
  opacity: 1;
}

.lma-stats-th.is-sorted .lma-stats-sort svg path {
  fill: var(--color-white);
}

.lma-stats-th.is-sorted-asc .lma-stats-sort img,
.lma-stats-th.is-sorted-asc .lma-stats-sort svg {
  transform: scaleY(-1);
}

/* Table Body */
.lma-stats-table tbody tr {
  transition: background 0.15s ease;
}

.lma-stats-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lma-stats-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

.lma-stats-table td:first-child {
  font-weight: 500;
  color: var(--color-white);
}

/* Prevent long sub/utm values (e.g., gclid) from breaking table layout */
.lma-stats-dimension {
  display: block;
  max-width: clamp(160px, 13.5vw, 220px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Clickable dimension cells for drill-down (date → offer, offer → source) */
.lma-stats-dimension--drillable {
  cursor: pointer;
  color: var(--color-white);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.lma-stats-dimension--drillable:hover {
  color: var(--color-white);
  text-decoration-color: var(--color-white);
}

/* Numeric columns alignment */
.lma-stats-table td:not(:first-child) {
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.lma-stats-th:not(:first-child) {
  text-align: left;
}

/* Status colors */
.lma-stats-pending {
  color: var(--lma-color--yellow-1);
}

.lma-stats-reject {
  color: var(--lma-color--red);
}

.lma-stats-approved {
  color: var(--lma-color--green-1);
}

/* Table Footer (Totals) */
.lma-stats-table tfoot tr {
  background: rgba(255, 255, 255, 0.04);
}

.lma-stats-table tfoot td {
  padding: 16px 12px;
  font-weight: 600;
  color: var(--color-white);
  border-bottom: none;
  border-top: 2px solid var(--lma-color--gray-2);
}

/* ========== Loading State ========== */
.lma-stats-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
}

.lma-stats-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--lma-color--gray-2);
  border-top-color: var(--lma-color--purple-1);
  border-radius: 50%;
  animation: lma-spin 0.8s linear infinite;
}

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

/* ========== Empty State ========== */
.lma-stats-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
}

.lma-stats-empty svg {
  opacity: 0.4;
}

/* ========== Flatpickr Dark Theme Overrides ========== */
.flatpickr-calendar {
  background: var(--lma-color--dark-2) !important;
  border: 1px solid var(--lma-color--gray-2) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
  font-family: var(--font-main) !important;
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after {
  display: none !important;
}

.flatpickr-months {
  padding: 12px 8px 8px;
}

.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--color-white) !important;
}

.flatpickr-current-month {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.flatpickr-current-month .cur-month,
.flatpickr-current-month .numInputWrapper {
  color: var(--color-white) !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  fill: var(--color-white) !important;
  padding: 8px !important;
  top: 10px !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px;
}

.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month {
  left: 166px !important;
}
.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
  right: 6px !important;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: var(--lma-color--dark-3) !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--color-white) !important;
}

.flatpickr-weekdays {
  background: transparent !important;
}

.flatpickr-weekday {
  color: var(--lma-color--gray-1) !important;
  background: var(--lma-color--dark-3) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 3px 0 !important;
}

.flatpickr-day {
  color: rgba(255, 255, 255, 0.85) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  height: 36px !important;
  line-height: 36px !important;
}

/* Fix weekday/date column misalignment (DESKTOP only):
   On mobile we want months stacked vertically and grid stretched to full width.
   This fixed 7x36px grid is only for desktop layout. */
@media (min-width: 993px) {
  .lma-date-dropdown .flatpickr-calendar {
    --lma-fp-cell: 36px;
  }
  .lma-date-dropdown .flatpickr-calendar .flatpickr-weekdaycontainer {
    display: grid !important;
    grid-template-columns: repeat(7, var(--lma-fp-cell)) !important;
    justify-content: center !important;
  }
  .lma-date-dropdown .flatpickr-calendar .dayContainer {
    display: grid !important;
    grid-template-columns: repeat(7, var(--lma-fp-cell)) !important;
    justify-content: center !important;
    width: calc(var(--lma-fp-cell) * 7) !important;
    min-width: calc(var(--lma-fp-cell) * 7) !important;
    max-width: calc(var(--lma-fp-cell) * 7) !important;
  }
  .lma-date-dropdown .flatpickr-calendar .flatpickr-day,
  .lma-date-dropdown .flatpickr-calendar .flatpickr-weekday {
    width: var(--lma-fp-cell) !important;
    max-width: none !important;
  }
}

.flatpickr-day:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: transparent !important;
}

.flatpickr-day.today {
  border-color: var(--lma-color--purple-1) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--lma-color--purple-1) !important;
  border-color: var(--lma-color--purple-1) !important;
  color: var(--color-white) !important;
}

.flatpickr-day.inRange {
  background: rgba(117, 77, 255, 0.25) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--lma-color--gray-1) !important;
}

.flatpickr-day.flatpickr-disabled {
  color: var(--lma-color--gray-2) !important;
}
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
  -webkit-box-shadow: none!important;
  -moz-box-shadow: none!important;
  box-shadow: none!important;
}

/* ========== Responsive ========== */
@media (max-width: 1250px) {
  .lma-stats-data__inner--filters {
    padding: 0;
  }
}
@media (max-width: 992px) {
  .lma-date-dropdown {
    left: auto;
    right: 0;
    width: min(92vw, 360px);
    flex-direction: column;
  }

  .lma-date-dropdown__shortcuts {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
  }

  .lma-date-dropdown__calendar {
    padding: 8px 12px 12px;
  }

  .lma-date-dropdown .flatpickr-calendar {
    width: 100% !important;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-months {
    flex-direction: column;
    gap: 4px;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-month {
    width: 100%;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-innerContainer,
  .lma-date-dropdown .flatpickr-calendar .flatpickr-rContainer {
    flex-direction: column;
    gap: 12px;
  }

  .lma-date-dropdown .flatpickr-calendar .dayContainer {
    /* Override desktop fixed 7x36 grid: on mobile stretch to available width */
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-weekdaycontainer {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-day,
  .lma-date-dropdown .flatpickr-calendar .flatpickr-weekday {
    width: auto !important;
  }

  /* Fix month arrows overlaying shortcut area: anchor arrows inside month header */
  .lma-date-dropdown .flatpickr-calendar .flatpickr-months {
    position: relative !important;
  }
  .lma-date-dropdown .flatpickr-calendar .flatpickr-prev-month,
  .lma-date-dropdown .flatpickr-calendar .flatpickr-next-month {
    top: 6px !important;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-prev-month {
    left: 8px !important;
  }

  .lma-date-dropdown .flatpickr-calendar .flatpickr-next-month {
    right: 8px !important;
  }
}

@media (max-width: 980px) {
  .lma-stats-filters__buttons {
    width: 100%;
  }

  .lma-stats-filters__spacer {
    display: none;
  }

  .lma-stats-export-btn {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .lma-stats-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .lma-stats-header__actions {
    width: 100%;
    justify-content: space-between;
  }

  .lma-stats-tabs {
    flex-wrap: wrap;
  }

  .lma-stats-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .lma-stats-filter-btn {
    padding: 8px 14px;
  }

  /* Stats filters: dropdowns full width, but reset/refresh/datepicker in one row */
  .lma-stats-filters__buttons {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
  }

  .lma-stats-filters__buttons .lma-stats-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .lma-stats-filters__buttons .lma-stats-dropdown__label {
    width: 100%;
  }

  .lma-stats-filters__buttons .lma-stats-filter-btn {
    width: 100%;
  }

  /* Reset + Refresh + DatePicker on same row */
  .lma-stats-filters__buttons .lma-stats-reset-btn {
    width: auto;
    flex-shrink: 0;
  }

  .lma-stats-filters__buttons #statsRefresh {
    flex-shrink: 0;
  }

  .lma-stats-filters__buttons .lma-date-picker {
    flex: 1;
    min-width: 0;
  }

  .lma-stats-data__inner {
    padding: 16px;
  }
  .lma-stats-data__inner--filters {
    padding: 0;
  }

  .lma-stats .lma-affdash-card {
    border-radius: 16px;
  }
  .lma-stats-charts {
    display: none;
  }

  #statsRefresh img,
  .lma-stats-reset-btn svg {
    width: 18px;
    height: 18px;
  }

  .lma-date-picker .lma-filterbtn {
    width: 100%;
    justify-content: space-between;
  }

  .lma-date-picker .lma-filterbtn__text {
    margin-right: auto;
  }

  /* On stats page: reset + refresh + datepicker row */
  .lma-stats-filters__buttons .lma-date-picker .lma-filterbtn {
    width: 100%;
  }
  .lma-sub-filter__menu {
    width: 100%;
  }
  .flatpickr-months {
    margin-bottom: 12px;
  }
  .lma-date-dropdown .flatpickr-calendar .flatpickr-prev-month,
  .lma-date-dropdown .flatpickr-calendar .flatpickr-next-month {
    top: 0!important;
  }
  .lma-date-dropdown .flatpickr-calendar .flatpickr-prev-month {
    left: 0!important;
  }
  .lma-date-dropdown .flatpickr-calendar .flatpickr-next-month {
    right: 0!important;
  }
}

@media (max-width: 480px) {
  .lma-stats-filters__group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .lma-stats-tabs {
    width: 100%;
  }

  .lma-stats-tab {
    flex: 1;
    text-align: center;
  }

  /* Agg toggle mobile */
  .lma-agg-toggle {
    width: 100%;
    order: 10;
  }

  .lma-agg-toggle__btn {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    font-size: 13px;
  }

  /* .lma-agg-toggle__btn span {
    display: none;
  } */

  .lma-agg-toggle__btn::after {
    font-size: 11px;
  }

  /* .lma-agg-toggle__btn[data-agg="click"]::after {
    content: "Клік";
  }

  .lma-agg-toggle__btn[data-agg="conv"]::after {
    content: "Конв";
  } */
}

/* =========================================================
   OFFERS PAGE (/affiliate/offers)
   - left filters sidebar (<= 250px)
   - toolbar with collapse, title, search, sort, view toggles
   - two views: row (default) and grid (4 columns, responsive)
   ========================================================= */

.lma-offers-page {
  background: var(--lma-color--dark-1);
  color: rgba(255, 255, 255, 0.92);
}

.lma-offers {
  min-height: calc(100vh - 80px);
}

.lma-offers-page {
  --lma-offers-sticky-gap: 14px;
  /* Stick right under the main header (so the global main padding doesn't show as a "hole" while scrolling) */
  --lma-offers-sticky-top: var(--lma-header-h, 80px);
  --lma-offers-sidebar-w: clamp(200px, 15vw, 250px);
}

.lma-offers-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--lma-offers-sidebar-w)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lma-offers-layout.is-filters-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0;
}

.lma-offers-sidebar {
  width: 100%;
  max-width: var(--lma-offers-sidebar-w);
  min-width: 0;
  transition: all 0.2s ease;
  position: sticky;
  top: var(--lma-offers-sticky-top);
  align-self: start;
  padding-top: 16px;
}

.lma-offers-layout.is-filters-collapsed .lma-offers-sidebar {
  max-width: 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.lma-offers-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: static; /* sticky handled by sidebar */
  max-height: calc(100vh - var(--lma-offers-sticky-top) - 18px);
  /* overflow: auto; */
  padding-right: 2px;
}

.lma-offers-filters__group .lma-stats-filter-btn {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  text-align: left;
  gap: 6px;
}

.lma-offers-filters__group [data-offers-filter-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 0;
}

/* Sidebar filter dropdown overrides */
.lma-offers-filters__group.lma-stats-dropdown {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.lma-offers-filters__group .lma-stats-dropdown__menu {
  position: relative;
  top: 0;
  left: 0;
  min-width: 0;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  border-radius: 16px;
  transform: none;
  display: none;
}

.lma-offers-filters__group.is-open .lma-stats-dropdown__menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* Suggestions list inside sidebar filter — static flow, not absolute */
.lma-offers-filters__group .lma-sub-filter__suggestions {
  position: static;
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-top: 6px;
}

.lma-offers-filters__group .lma-sub-filter__suggestion.is-active {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-offers-filters__group .lma-sub-filter__no-results {
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

/* "Всі офери" / "Всі категорії" reset option */
.lma-sub-filter__suggestion--reset {
  color: rgba(255, 255, 255, 0.55);
}

.lma-sub-filter__suggestion--reset.is-active {
  color: var(--color-white);
  background: rgba(91, 95, 199, 0.12);
}

/* Clear (X) button inside filter trigger */
.lma-offers-filter-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.lma-offers-filter-clear:hover {
  background: rgba(255, 82, 82, 0.35);
}

.lma-offers-filter-clear[hidden] {
  display: none !important;
}

/* Search field inside sidebar filter */
.lma-offers-filters__group .lma-sub-filter__search {
  position: relative;
}

.lma-offers-filters__group .lma-sub-filter__field {
  border-radius: 12px;
}

.lma-offers-filters__group .lma-sub-filter__input {
  width: 100%;
  font-size: 13px;
  padding: 8px 12px;
}

.lma-offers-geo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lma-offers-geo__flag {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(#005bbb 0 50%, #ffd500 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  flex: 0 0 18px;
}

.lma-offers-content {
  min-width: 0;
}

/* ===== Toolbar ===== */
.lma-offers-toolbar {
  position: sticky;
  top: var(--lma-offers-sticky-top);
  z-index: 120; /* under header(999), above list */
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 10px 0;
  background: rgba(9, 9, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lma-offers-toolbar__title {
  margin: 0;
}

.lma-offers-toolbar__spacer {
  flex: 1;
  min-width: 12px;
}

.lma-offers-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.lma-offers-toolbar__collapse-icon {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.lma-offers-toolbar__collapse.is-collapsed .lma-offers-toolbar__collapse-icon {
  transform: rotate(-90deg);
}

.lma-offers-search {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 999px;
  max-width: 400px;
  width: clamp(220px, 25vw, 400px);
  flex: 1 1 260px;
  /* background: rgba(255, 255, 255, 0.04); */
  background: transparent;
  cursor: text;
  position: relative;
  padding-right: 44px; /* space for clear button */
}

.lma-offers-search__icon {
  opacity: 0.7;
  flex: 0 0 auto;
  pointer-events: none; /* allow click anywhere to focus input (label) */
}

.lma-offers-search__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  outline: none;
  border: none;
  padding: 0;
}

.lma-offers-search__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Hide native WebKit search cancel button (blue cross) */
.lma-offers-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.lma-offers-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.lma-offers-search__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.lma-offers-search__clear img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* Visible only when input has value (but no weird native icon) */
.lma-offers-search__input:not(:placeholder-shown) ~ .lma-offers-search__clear {
  opacity: 1;
  pointer-events: auto;
}

.lma-offers-search__clear:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Infinite scroll loader (only visible while loading next page) */
.lma-offers-loader {
  display: flex;
  justify-content: center;
  padding: 22px 0 6px;
}

.lma-offers-loader[hidden] {
  display: none !important;
}

.lma-offers-empty-msg {
  text-align: center;
  padding: 40px 20px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

.lma-offers-empty-msg[hidden] {
  display: none !important;
}

.lma-offers-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(60, 61, 69, 0.8);
  border-top-color: var(--lma-color--purple-1);
  border-radius: 50%;
  animation: lma-spin 0.8s linear infinite;
}

.lma-offers-viewtoggles {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.lma-offers-viewbtn img {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.lma-offers-viewbtn.is-active:before {
  display: none;
}

.lma-offers-viewbtn.is-active {
  border: 1px solid var(--lma-color--purple-1);
}
.lma-offers-viewbtn:hover img,
.lma-offers-viewbtn.is-active img {
  opacity: 1;
}


/* Sort dropdown alignment */
.lma-offers-sort .lma-filterbtn {
  border-radius: 100px;
}
.lma-offers-sort .lma-filterbtn .lma-filterbtn__text {
  font-weight: 500;
  color: var(--lma-color--gray-1);
  transition: color 0.2s ease;
}
.lma-offers-sort .lma-filterbtn:hover .lma-filterbtn__text {
  color: var(--color-white);
}
.lma-offers-sort .lma-stats-dropdown__menu {
  left: auto;
  right: 0;
  min-width: 220px;
}


/* ===== Row view ===== */
.lma-offers-view--row {
  overflow-x: auto;
  /* keep card edges visible inside scroll container */
  margin: 0 -8px;
  padding: 0 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--lma-color--gray-2) transparent;
}

.lma-offers-view--row {
  /* Minimum width needed for current column template (prevents internal clipping) */
  /* --lma-offers-row-minw: 1175px; */
  --lma-offers-row-minw: auto;
  --lma-offers-row-cols:
    110px
    minmax(180px, .5fr)
    minmax(270px, 1fr)
    140px
    minmax(140px, .3fr)
    90px
    70px
    44px
}

.lma-offers-view--row::-webkit-scrollbar {
  height: 6px;
}

.lma-offers-view--row::-webkit-scrollbar-track {
  background: transparent;
}

.lma-offers-view--row::-webkit-scrollbar-thumb {
  background: var(--lma-color--gray-2);
  border-radius: 3px;
}

.lma-offers-tablehead {
  display: grid;
  grid-template-columns: var(--lma-offers-row-cols);
  gap: 16px;
  align-items: center;
  padding: 0 18px 10px 18px;
  min-width: var(--lma-offers-row-minw);
  width: 100%;
  color: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  font-weight: 500;
}

.lma-offers-th {
  white-space: nowrap;
  user-select: none;
}

.lma-offers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: var(--lma-offers-row-minw);
  width: 100%;
}

.lma-offers-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--lma-offers-row-cols);
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 26px;
  background: var(--lma-color--dark-2);
  overflow: hidden;
  min-width: var(--lma-offers-row-minw);
  width: 100%;
}

.lma-offers-list .lma-offers-row {
  font-size: 14px;
}

/* Common "cell" for row columns: consistent min-height + vertical alignment */
.lma-offers-row__cell {
  min-height: 58px;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Don't stretch the arrow button; keep it round */
.lma-offers-row__go-cell {
  justify-content: center;
}

/* Gradient border */
.lma-offers-row::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--gray-2);
  pointer-events: none;
  z-index: 0;
  -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;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.lma-offers-row > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.lma-offers-logo {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 56px;
}

.lma-offers-logo--card {
  width: 100%;
  justify-content: center;
}

.lma-offers-logo img {
  display: block;
  max-width: 165px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    opacity 0.18s ease;
  transform: translateZ(0);
}

.lma-offers-row__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.lma-offers-row__logo-link,
.lma-offer-card__logo-link {
  border-radius: 14px;
  outline: none;
}

/* Hover/focus logo effect (no layout shift) */
.lma-offers-row__logo-link:hover .lma-offers-logo img,
.lma-offers-row__logo-link:focus-visible .lma-offers-logo img,
.lma-offer-card__logo-link:hover .lma-offers-logo img,
.lma-offer-card__logo-link:focus-visible .lma-offers-logo img {
  transform: scale(1.045);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.35));
}

.lma-offers-row__logo-link:focus-visible,
.lma-offer-card__logo-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(117, 77, 255, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .lma-offers-logo img {
    transition: none;
  }
}

.lma-offers-row__campaign,
.lma-offers-row__category {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
}

.lma-offers-row__action {
  overflow: visible;
}

.lma-offers-row__payout {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
  height: 100%;
}

.lma-offers-row__pill {
  background: #1b1b1e;
  border-radius: 12px;
  padding: 16px;
  /* min-height: 70px; */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;;
}
.lma-offers-row__pill.lma-offers-payouts {
  width: 100%;
}

.lma-offers-targets__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  padding-right: 30px; /* reserve space for toggle without affecting text alignment */
  min-height: 26px; /* keep same height even when toggle absent */
}

.lma-offers-targets__toggle {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  transition: transform 0.18s ease, opacity 0.18s ease;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.lma-offers-targets__toggle:hover {
  opacity: 1;
}

.lma-offers-targets__toggle img {
  transition: transform 0.18s ease, filter 0.18s ease;
}

.lma-offers-row.is-targets-open .lma-offers-targets__toggle img {
  transform: rotate(180deg);
}

.lma-offers-targets__list,
.lma-offers-payouts__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lma-offers-row.is-targets-open .lma-offers-targets__list,
.lma-offers-row.is-targets-open .lma-offers-payouts__list {
  margin-top: 8px;
}

.lma-offers-payouts__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 26px; /* align with targets head height */
}

.lma-offers-targets__line,
.lma-offers-payouts__line {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.lma-offers-targets__line.is-extra,
.lma-offers-payouts__line.is-extra {
  display: none;
  color: rgba(255, 255, 255, 0.78);
}

/* Extra target lines should wrap instead of ellipsis */
.lma-offers-targets__line.is-extra {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lma-offers-row.is-targets-open .lma-offers-targets__line.is-extra,
.lma-offers-row.is-targets-open .lma-offers-payouts__line.is-extra {
  display: block;
}
.lma-offers-th--campaign,
.lma-offers-row__campaign {
  padding-left: 16px;
}
.lma-offers-row__campaign {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}
.lma-offers-row__campaign::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}


.lma-offers-row__metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
}

.lma-offers-row__metric-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lma-offers-row__metric-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.lma-offers-row__payout {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lma-offers-row__go {
  justify-self: end;
}

@media (max-width: 1450px) {
  .lma-offers-view--row {
    --lma-offers-row-cols:
      130px
      minmax(260px, 1fr)
      140px
      minmax(120px, .3fr)
      80px
      60px
      44px
  }

  .lma-offers-list .lma-offers-row,
  .lma-offers-row__cell {
    font-size: 13px;
  }

  /* Header: hide empty logo column so "Офер" becomes first */
  .lma-offers-th--logo {
    display: none;
  }

  .lma-offers-logo {
    justify-content: center;
  }

  /* Campaign is moved into the logo link via JS at this breakpoint */
  .lma-offers-row > .lma-offers-row__campaign {
    display: none;
  }

  .lma-offers-row__logo-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
    gap: 6px;
  }
  

  .lma-offers-row__logo-link .lma-offers-row__campaign {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    padding-left: 0;
    margin: 0 auto;
    font-size: 12px;
    min-height: auto;
  }

  .lma-offers-row__logo-link .lma-offers-row__campaign::before {
    display: none;
  }

  .lma-offers-row__pill,
  .lma-offers-row__payout {
    height: auto;
  }
}
@media (max-width: 1200px) {
  .lma-offers-page {
    --lma-offers-sidebar-w: 180px;
  }
}
@media (max-width: 768px) {
  /* Toolbar: title left, collapse button right (same row) */
  .lma-offers-toolbar__title {
    order: 1;
  }

  .lma-offers-toolbar__collapse {
    order: 2;
    margin-left: auto;
  }

  .lma-offers-search {
    order: 3;
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }
  .lma-offers-toolbar__actions {
    order: 4;
    width: 100%;
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .lma-offers-toolbar__actions .lma-stats-dropdown,
  .lma-offers-sort .lma-filterbtn {
    width: 100%;
  }
  .lma-offers-sort .lma-filterbtn {
    justify-content: space-between;
  }
  .lma-offers-toolbar__collapse {
    width: 38px;
    height: 38px;
  }
  .lma-offers-toolbar__collapse-icon {
    transform: rotate(180deg);
    width: 16px;
    height: 16px;
  }
  .lma-offers-toolbar__collapse.is-collapsed .lma-offers-toolbar__collapse-icon {
    transform: rotate(0deg);
  }
}

/* ===== Grid view ===== */
.lma-offers-view--grid {
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--lma-color--gray-2) transparent;
}

.lma-offers-view--grid::-webkit-scrollbar {
  height: 6px;
}

.lma-offers-view--grid::-webkit-scrollbar-track {
  background: transparent;
}

.lma-offers-view--grid::-webkit-scrollbar-thumb {
  background: var(--lma-color--gray-2);
  border-radius: 3px;
}

.lma-offers-grid {
  display: grid;
  /* Let grid overflow horizontally on smaller widths instead of clipping cards */
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: clamp(10px, 1vw, 14px);
}

.lma-offer-card {
  position: relative;
  isolation: isolate;
  border-radius: 30px;
  background: var(--lma-color--dark-2);
  padding: 16px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lma-offer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--lma-gradient--gray-2);
  pointer-events: none;
  z-index: 0;
  -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;
}

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

.lma-offer-card__top {
  position: relative;
  min-height: 64px; /* enough room for logo + arrow */
}

.lma-offer-card__logo-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 0;
  width: 100%;
}

.lma-offer-card__go {
  position: absolute;
  top: 0;
  right: 0;
}

.lma-offer-card__campaign {
  text-align: center;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 400;
  color: var(--color-white);
  margin-top: 6px;
}

.lma-offer-card__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

.lma-offer-card__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.lma-offer-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.lma-offer-card__meta-label {
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(12px, 0.875vw, 14px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.lma-offer-card__meta-label img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: 0.8;
}

.lma-offer-card__meta-value {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(12px, 0.875vw, 14px);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64%;
}

.lma-offer-card__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

/* Targets + payout (card) */
.lma-offer-card__tp {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.lma-offer-card__tp-left {
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lma-offer-card__tp-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.lma-offer-card__tp-price {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.lma-offer-card__tp-toggle {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.lma-offer-card__tp-toggle img {
  transition: transform 0.18s ease, filter 0.18s ease;
}

.lma-offer-card.is-targets-open .lma-offer-card__tp-toggle img {
  transform: rotate(180deg);
}

.lma-offer-card__tp-list {
  display: none;
  margin-top: 10px;
  gap: 8px;
}

.lma-offer-card.is-targets-open .lma-offer-card__tp-list {
  display: flex;
  flex-direction: column;
}

.lma-offer-card__tp-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.lma-offer-card__tp-line .lma-offer-card__tp-left {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.lma-offer-card__tp-line .lma-offer-card__tp-right {
  color: rgba(255, 255, 255, 0.9);
}

.lma-offer-kpi {
  border-radius: 16px;
  border: none;
  background: transparent;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.lma-offer-kpi__label {
  color: rgba(255, 255, 255, 0.4);
  font-size: clamp(12px, 0.875vw, 14px);
  font-weight: 500;
}

.lma-offer-kpi__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lma-offer-kpi__value img {
  width: 20px;
  height: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .lma-offers-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  /* Force grid view only (hide row view) */
  .lma-offers-viewtoggles {
    display: none;
  }
  .lma-offers-view--row {
    display: none !important;
  }
  .lma-offers-view--grid[hidden] {
    display: block !important;
  }
}
@media (max-width: 1100px) {
  .lma-offers-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 980px) {
  .lma-offers-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .lma-offers-sidebar {
    max-width: none;
  }
  .lma-offers-filters,
  .lma-offers-sidebar,
  .lma-offers-toolbar {
    position: static;
  }
}
@media (max-width: 768px) {
  .lma-offers-toolbar {
    gap: 10px;
  }
  .lma-offers-grid {
    grid-template-columns: 1fr;
  }
  .lma-offer-card__tp-head {
    gap: 16px;
  }
  .lma-offer-card__tp-line .lma-offer-card__tp-left {
    max-width: 180px;
  }
  .lma-offer-card__tp-right,
  .lma-offer-kpi__label,
  .lma-offer-card__meta-label,
  .lma-offer-card__meta-value {
    font-size: 14px;
  }
  .lma-offer-kpi__value {
    font-size: 16px;
  }
}

/* ========================================
   OFFER PAGE (/affiliate/offers/{public_id})
   ======================================== */
.lma-offer-page {
  background: var(--lma-color--dark-1);
}

.lma-offer-inner {
  --lma-offer-sidebar-w: clamp(360px, 24.5vw, 390px);
}

.lma-offer-inner__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.lma-offer-inner__backbtn {
  flex: 0 0 44px;
}

.lma-offer-inner__backbtn-icon {
  transform: rotate(90deg);
}

.lma-offer-inner__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--lma-offer-sidebar-w, 390px));
  gap: 14px;
  align-items: start;
}

.lma-offer-inner__sidebar {
  max-width: var(--lma-offer-sidebar-w, 390px);
  width: 100%;
  position: sticky;
  top: calc(var(--lma-header-h, 80px) + 14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lma-offer-widget {
  border-radius: 26px;
  background: var(--lma-color--dark-2);
}

.lma-offer-widget__inner {
  padding: 16px;
}

/* ===== Offer Description + NBU Row ===== */
.lma-offer-desc-row {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: clamp(10px, 1vw, 14px);
  margin-bottom: clamp(12px, 1vw, 16px);
  align-items: start;
}

.lma-offer-desc-row--full {
  grid-template-columns: 1fr;
}

.lma-offer-desc-row--full .lma-offer-desc__body:not(.is-expanded) {
  flex: none;
  max-height: 280px;
}

.lma-offer-desc {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lma-offer-desc-row:not(.lma-offer-desc-row--full) > .lma-offer-desc {
  max-height: 0;
  min-height: 100%;
}

.lma-offer-desc-row:not(.lma-offer-desc-row--full) > .lma-offer-desc:has(.is-expanded) {
  max-height: none;
  min-height: 0;
  overflow: visible;
}

.lma-offer-desc__inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.lma-offer-desc .lma-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lma-offer-desc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.lma-offer-desc__toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.lma-offer-desc__toggle-chev {
  display: flex;
  transition: transform 0.3s;
}

.lma-offer-desc__toggle.is-open .lma-offer-desc__toggle-chev {
  transform: rotate(180deg);
}

.lma-offer-desc__body {
  flex: 1;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
  margin-top: 12px;
  min-height: 0;
}

.lma-offer-desc__body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--lma-color--dark-2));
  pointer-events: none;
  transition: opacity 0.3s;
}

.lma-offer-desc__body.is-expanded {
  flex: none;
  max-height: none;
  overflow: visible;
}

.lma-offer-desc__body.is-expanded::after {
  opacity: 0;
}

.lma-offer-desc__text {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  word-break: break-word;
}

/* ===== Offer NBU Terms ===== */
.lma-offer-nbu {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-offer-nbu__inner {
  padding: 16px;
}

.lma-offer-nbu__notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,170,0,0.08);
  border: 1px solid rgba(255,170,0,0.15);
  color: rgba(255,200,60,0.9);
  font-size: 12.5px;
  line-height: 1.4;
}

.lma-offer-nbu__notice > svg {
  flex-shrink: 0;
  color: rgba(255,170,0,0.7);
}

.lma-offer-nbu__notice > span {
  flex: 1;
}

.lma-offer-nbu__tip {
  flex-shrink: 0;
  margin-left: auto;
}

.lma-offer-nbu__info {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.lma-offer-nbu__info:hover {
  background: rgba(255,255,255,0.12);
}

.lma-offer-nbu__info img {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.lma-offer-nbu__info svg {
  width: 16px;
  height: 16px;
  color: rgba(255,200,60,0.9);
}

.lma-offer-nbu__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.lma-offer-nbu__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  /* background: rgba(255,255,255,0.03); */
  /* border: 1px solid rgba(255,255,255,0.05); */
}

.lma-offer-nbu__label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lma-offer-nbu__value {
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  color: var(--color-white);
}

.lma-offer-nbu__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.lma-offer-nbu__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  /* background: rgba(255,255,255,0.03); */
  /* border: 1px solid rgba(255,255,255,0.05); */
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.lma-offer-nbu__link:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.lma-offer-nbu__link-icon {
  opacity: 0.5;
  flex-shrink: 0;
}

.lma-offer-nbu__link > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2.5px;
}

.lma-offer-nbu__copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s;
}

.lma-offer-nbu__copy-btn:hover {
  background: rgba(255,255,255,0.14);
}

.lma-offer-nbu__copy-btn img {
  opacity: 0.6;
}

/* ===== URL builder ===== */
.lma-offer-url,
.lma-offer-link {
  border-radius: 30px;
  background: var(--lma-color--dark-2);
}

.lma-offer-url__inner,
.lma-offer-link__inner {
  padding: 16px;
}

.lma-offer-url__hint {
  margin: 10px 0 14px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.4;
}

.lma-offer-url__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0;
}

.lma-offer-url__fields-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

/* Collapsed state: show about half (JS sets --lma-offer-fields-collapsed-h) */
.lma-offer-url__fields-wrap.is-collapsed {
  max-height: var(--lma-offer-fields-collapsed-h, 360px);
}

.lma-offer-url__fields-wrap.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.12) 35%,
    var(--lma-color--dark-2) 100%
  );
}

.lma-offer-url__toggle {
  margin-top: 12px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 14px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.lma-offer-url__toggle[hidden] {
  display: none !important;
}

.lma-offer-url__field {
  min-width: 0;
}

.lma-offer-url__label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 500;
}

.lma-offer-url__input.lma-postback__input,
.lma-offer-url__input.lma-input {
  width: 100%;
  padding-right: 14px;
}

.lma-offer-url__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lma-offer-url__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: clamp(13px, 1vw, 14px);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  user-select: none;
}

.lma-offer-url__btn-icon {
  width: 16px;
  height: 16px;
}

/* ===== Link block ===== */
.lma-offer-link__box {
  margin-top: 12px;
  border-radius: 20px;
  background: rgba(117, 77, 255, 0.1);
  border: 1px solid var(--lma-color--purple-1);
  padding: 16px 16px 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lma-offer-link__disclaimer {
  margin-top: 12px;
  border-radius: 20px;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.4;
}

.lma-offer-url__link {
  margin-top: 16px;
}

.lma-offer-url__link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lma-offer-url__link-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  font-size: 13px;
  font-weight: 500;
}

.lma-offer-url__link-title img {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.lma-offer-link__text {
  flex: 1;
  min-width: 0;
  font-size: clamp(13px, 0.875vw, 14px);
  color: var(--color-white);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lma-offer-link__copy {
  width: clamp(18px, 1.15vw, 20px);
  height: clamp(18px, 1.15vw, 20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s ease;
}

.lma-offer-link__copy img {
  width: clamp(18px, 1.15vw, 20px);
  height: clamp(18px, 1.15vw, 20px);
  opacity: 0.95;
  display: block;
}

.lma-offer-link__copy:hover {
  transform: translateY(-1px);
}

.lma-offer-link__copy:active {
  transform: translateY(0);
}

.lma-offer-link__status {
  margin-top: 10px;
  min-height: 18px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

/* ===== Sidebar: summary ===== */
.lma-offer-side__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 10px;
}

.lma-offer-side__logo img {
  display: block;
  max-width: 165px;
  width: 100%;
  height: auto;
  max-height: 64px;
  object-fit: contain;
}

.lma-offer-side__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.lma-offer-side__name {
  color: var(--color-white);
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.lma-offer-side__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(12px, 0.9vw, 13px);
  white-space: nowrap;
  flex: 0 0 auto;
}

.lma-offer-side__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lma-offer-side__meta-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
}

.lma-offer-side__meta-text {
  white-space: nowrap;
}

.lma-offer-side__divider {
  margin: 14px 0;
  border-bottom: 1px dashed var(--lma-color--gray-2);
}

.lma-offer-side__head {
  padding-bottom: 14px; /* slightly tighter inside small widget */
}

.lma-offer-tariffs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lma-offer-tariffs__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.lma-offer-tariffs__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(12px, 0.9vw, 13px);
  white-space: normal;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lma-offer-tariffs__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: 0.85;
}

.lma-offer-tariffs__value {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  text-align: right;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.lma-offer-tariffs__value a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.lma-offer-tariffs__value a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

.lma-offer-tariffs__value--withtip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible;
  text-overflow: clip;
}

.lma-offer-tariffs__info {
  width: 20px;
  height: 20px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lma-offer-tariffs__info img {
  width: 20px;
  height: 20px;
  display: block;
}

.lma-offer-tariffs__tip .lma-tooltip {
  max-width: min(260px, 70vw);
  white-space: normal;
}

.lma-offer-tariffs__row--sub {
  margin-top: -6px;
  padding-left: 30px;
  opacity: 0.7;
}

.lma-offer-tariffs__row--sub .lma-offer-tariffs__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.lma-offer-tariffs__row--sub .lma-offer-tariffs__label {
  font-size: clamp(11px, 0.8vw, 12px);
}

.lma-offer-tariffs__value--sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 0.85vw, 12.5px);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.lma-offer-tariffs__coin {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

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

.lma-offer-side__kpis .lma-offer-kpi__value span {
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 500;
}

/* ===== GEO + bans ===== */
.lma-offer-geo {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lma-offer-geo__row {
  display: grid;
  grid-template-columns: clamp(16px, 1.75vw, 20px) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.lma-offer-geo__sign {
  position: relative;
  width: clamp(16px, 1.75vw, 20px);
  height: clamp(16px, 1.75vw, 20px);
  flex: 0 0 auto;
}

/* icon (default: red) */
.lma-offer-geo__sign::before {
  content: "";
  position: absolute;
  inset: 0;
  background: center / contain no-repeat url("/assets/images/icons/check-red.svg");
  opacity: 1;
}

/* allowed: green icon */
.lma-offer-geo__row--ok .lma-offer-geo__sign::before {
  background-image: url("/assets/images/icons/check-green.svg");
}

.lma-offer-geo__text {
  display: inline-flex;
  align-items: center;
  color: var(--color-white);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 300;
  line-height: 1.12;
}

.lma-offer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
}

.lma-offer-pill img {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.lma-offer-pill--ok {
  box-shadow: inset 0 0 0 1px rgba(95, 255, 184, 0.18);
}

.lma-offer-pill--bad {
  box-shadow: inset 0 0 0 1px rgba(255, 105, 105, 0.18);
}

.lma-offer-bans {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lma-offer-ban {
  display: grid;
  grid-template-columns: clamp(16px, 1.75vw, 20px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.lma-offer-ban__icon {
  width: clamp(16px, 1.75vw, 20px);
  height: clamp(16px, 1.75vw, 20px);
  position: relative;
}
.lma-offer-ban__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: center / contain no-repeat url("/assets/images/icons/check-red.svg");
}

.lma-offer-ban__text {
  color: var(--color-white);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 300;
  line-height: 1.12;
}

.lma-offer-ban__tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lma-offer-ban__info {
  width: 20px;
  height: 20px;
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 1;
}

.lma-offer-ban__info img {
  width: 20px;
  height: 20px;
  display: block;
}

.lma-offer-ban__tip .lma-tooltip {
  white-space: normal;
  max-width: min(320px, 70vw);
}

.lma-offer-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
}

.lma-offer-chip--bad {
  box-shadow: inset 0 0 0 1px rgba(255, 105, 105, 0.18);
}

/* ===== Sidebar actions ===== */
.lma-offer-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
}

.lma-offer-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.lma-offer-actions__btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== Offer ECPC Chart ========== */

.lma-offer-ecpc {
  border-radius: clamp(24px, 2vw, 32px);
  overflow: hidden;
  margin-bottom: clamp(12px, 1vw, 16px);
  min-height: 340px;
}

.lma-offer-ecpc__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(14px, 1.5vw, 20px);
}

.lma-offer-ecpc .lma-card-head {
  margin-bottom: clamp(8px, 1vw, 12px);
  flex-shrink: 0;
  padding-bottom: clamp(10px, 1vw, 16px);
}

.lma-offer-ecpc .lma-ecpc-body {
  flex: 1;
}

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

.lma-offer-ecpc__chart-wrap {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
}

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

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

.lma-offer-ecpc .lma-ecpc-svg-wrap {
  min-height: 220px;
  height: 220px;
  position: relative;
  overflow: visible;
}

.lma-offer-ecpc__legend {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--lma-color--gray-1);
}

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

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

.lma-offer-ecpc__legend-color--network {
  background: var(--lma-color--green-1);
}

.lma-offer-ecpc__legend-color--wm {
  background: var(--lma-color--purple-3);
}

.lma-ecpc-dot--network {
  background: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.lma-ecpc-dot--wm {
  background: #C998F2;
  border-color: rgba(201, 152, 242, 0.3);
}

.lma-offer-ecpc .lma-date-preset {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
}

.lma-offer-actions__btn img {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

@media (max-width: 1200px) {
  .lma-offer-desc-row {
    grid-template-columns: 1fr;
  }
  .lma-offer-desc-row:not(.lma-offer-desc-row--full) > .lma-offer-desc {
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }
  .lma-offer-desc__body:not(.is-expanded) {
    flex: none;
    max-height: 280px;
  }
}

@media (max-width: 980px) {
  .lma-offer-inner__layout {
    grid-template-columns: 1fr;
  }
  .lma-offer-inner__sidebar {
    position: static;
    max-width: none;
  }
  .lma-offer-inner__sidebar {
    order: -1;
  }
  .lma-offer-url__fields-wrap.is-collapsed {
    max-height: 250px !important;
  }
}

@media (max-width: 640px) {
  .lma-offer-link__box {
    border-radius: 14px;
  }
  .lma-offer-inner__header {
    flex-wrap: wrap;
  }
  .lma-offer-url__fields {
    grid-template-columns: 1fr;
  }
  .lma-offer-link__text {
    white-space: normal;
    word-break: break-word;
  }
}

/* ========================================
   Widget Card (reusable)
   ======================================== */
.lma-widget {
  background: var(--lma-color--dark-2);
  padding: clamp(20px, 2vw, 28px);
  border-radius: clamp(20px, 2vw, 30px);
}

/* ========================================
   Smartlink Page
   ======================================== */
.lma-sl__link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.lma-sl__link-input {
  flex: 1;
}

.lma-sl__copy-btn {
  flex-shrink: 0;
}

.lma-sl__link-section {
  margin-top: 20px;
}

.lma-sl__builder {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--lma-color--gray-2);
}

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

.lma-sl__info-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.lma-sl__info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 12px;
  padding: 20px;
}

.lma-sl__info-card h3 {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
}

.lma-sl__info-card p {
  color: var(--lma-color--gray-1);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

/* ========================================
   Trafficback Page
   ======================================== */
.lma-tb__radios {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.lma-tb__radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.lma-tb__radio-option:hover {
  border-color: var(--lma-color--purple-1);
  background: rgba(255, 255, 255, 0.02);
}

.lma-tb__radio-option.is-active {
  border-color: var(--lma-color--purple-1);
  background: rgba(118, 92, 230, 0.06);
}

.lma-tb__radio-option input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--lma-color--purple-1);
  flex-shrink: 0;
}

.lma-tb__radio-text strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 4px;
}

.lma-tb__radio-text span {
  font-size: 13px;
  color: var(--lma-color--gray-1);
}

.lma-tb__url-section {
  margin-top: 20px;
}

.lma-tb__status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.lma-tb__status-badge--default {
  background: rgba(255, 255, 255, 0.04);
  color: var(--lma-color--gray-1);
}

.lma-tb__status-badge--custom {
  background: rgba(76, 175, 80, 0.1);
  color: #66bb6a;
}

.lma-tb__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.lma-tb__status-badge--default .lma-tb__status-dot {
  background: var(--lma-color--gray-1);
}

.lma-tb__status-badge--custom .lma-tb__status-dot {
  background: #66bb6a;
}

.lma-tb__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

/* ========================================
   Toast Notifications
   ======================================== */
.lma-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  overflow: hidden;
}

.lma-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  max-width: 450px;
  padding: 16px 20px;
  background: #1e1e24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease;
}

.lma-toast.is-leaving,
.lma-toast.lma-toast--hiding {
  animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.lma-toast__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.lma-toast--error .lma-toast__icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.lma-toast--warning .lma-toast__icon {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.lma-toast--success .lma-toast__icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.lma-toast--info .lma-toast__icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.lma-toast__content {
  flex: 1;
  min-width: 0;
}

.lma-toast__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 4px;
}

.lma-toast__message {
  font-size: 13px;
  color: var(--lma-color--gray);
  line-height: 1.4;
}

.lma-toast__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--lma-color--gray);
  cursor: pointer;
  transition: all 0.15s ease;
  margin: -4px -8px -4px 0;
}

.lma-toast__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

.lma-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.lma-toast__progress-bar {
  height: 100%;
  background: currentColor;
  animation: toastProgress 5s linear forwards;
}

.lma-toast--error .lma-toast__progress-bar {
  background: #ef4444;
}
.lma-toast--warning .lma-toast__progress-bar {
  background: #f59e0b;
}
.lma-toast--success .lma-toast__progress-bar {
  background: #22c55e;
}
.lma-toast--info .lma-toast__progress-bar {
  background: #3b82f6;
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

@media (max-width: 480px) {
  .lma-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  .lma-toast {
    min-width: auto;
    max-width: none;
  }
}

/* =========================================================
   POSTBACK LOGS PAGE
   ========================================================= */

/* Pagination */
.lma-logs-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lma-logs-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lma-logs-page-btn:hover:not(:disabled):not(.is-active) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.lma-logs-page-btn.is-active {
  background: var(--lma-color--purple-1);
  color: var(--color-white);
}

.lma-logs-page-btn.is-disabled,
.lma-logs-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lma-logs-page-dots {
  color: var(--lma-color--gray-1);
  padding: 0 4px;
  font-size: 13px;
}

/* URL column in logs */
.lma-logs-url {
  font-size: 12px;
  font-family: "Courier New", monospace;
  color: rgba(255, 255, 255, 0.7);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Mono text in stats table */
.lma-stats-mono {
  font-family: "Courier New", monospace;
  font-size: 12px;
}

/* Badge adjustments for dark theme */
.lma-stats-table .lma-badge {
  font-size: 10px;
  padding: 3px 6px;
}

.lma-stats-table .lma-badge--success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.lma-stats-table .lma-badge--danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Table footer flex layout */
.lma-stats-table-footer {
  flex-wrap: wrap;
  gap: 16px;
}

.lma-stats-dropdown.is-open .lma-pblogs-dropdown__menu {
  left: unset;
  right: 0;
}

@media (max-width: 640px) {
  /* .lma-stats-table-footer {
    flex-direction: column;
    align-items: flex-start;
  } */
  .lma-stats-table-footer__info {
    font-size: 12px;
  }

  .lma-logs-pagination {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .lma-logs-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }
}

/* =========================================================
   LMA POSTBACK LOGS (/affiliate/tools/postback-logs)
   ========================================================= */
.lma-postback-logs {
  margin-bottom: clamp(12px, 1.5vw, 20px);
}
.lma-postback-logs .lma-stats-filters {
  margin-bottom: 0;
}

/* =========================================================
   FOOTER (centered, with separators + mobile)
   Prefix: lma-footer
   ========================================================= */

.lma-footer {
  background: transparent;
  color: var(--lma-color--gray-1);
  padding: 22px 0;
}

.lma-footer__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: center;
}

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

.lma-footer__item {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--lma-color--gray-1);
  white-space: nowrap;
}

.lma-footer__link {
  color: var(--lma-color--gray-1);
  text-decoration: none;
  transition:
    opacity 0.18s ease,
    color 0.18s ease;
}

.lma-footer__link:hover {
  opacity: 1;
  color: var(--color-white);
}

.lma-footer__sep {
  width: 2px;
  height: 20px;
  border-radius: 2px;
  background: var(--lma-color--dark-3);
}

/* socials */
.lma-footer__socials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lma-footer__icon {
  width: 26px;
  height: 26px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.lma-footer__icon svg path {
  transition: fill 0.18s ease;
}

.lma-footer__icon:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}
.lma-footer__icon:hover svg path {
  fill: var(--lma-color--purple-1);
}

.lma-footer__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .lma-footer {
    padding: 18px 0 22px;
  }

  .lma-footer__item {
    white-space: normal;
  }

  .lma-footer__sep {
    height: 22px;
  }

  .lma-footer__icon {
    width: 40px;
    height: 40px;
  }

  .lma-footer__icon svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 420px) {
  .lma-footer__links {
    gap: 12px;
  }

  .lma-footer__sep {
    display: none;
  }
}

/* =========================================================
   PROFILE PAGE
   ========================================================= */

.lma-profile-page {
  background: var(--lma-color--dark-1);
}

.lma-profile__title {
  margin-bottom: clamp(20px, 2.5vw, 32px);
}

/* Wrapper with sidebar */
.lma-profile__wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: clamp(20px, 2vw, 32px);
  align-items: start;
}

.lma-profile__main {
  min-width: 0;
}

/* ===== Sidebar ===== */
.lma-profile-sidebar {
  position: sticky;
  top: 100px;
  max-width: 250px;
}

.lma-profile-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lma-profile-sidebar__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--lma-color--gray-1);
  font-size: 15px;
  font-weight: 400;
  transition: var(--transition);
  border: 1px solid transparent;
}

.lma-profile-sidebar__item:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.04);
}

.lma-profile-sidebar__item.is-active {
  color: var(--color-white);
  background: var(--lma-color--dark-2);
  border-color: rgba(72, 70, 78, 0.5);
}

.lma-profile-sidebar__item.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lma-profile-sidebar__item.is-disabled:hover {
  background: transparent;
  color: var(--lma-color--gray);
}

.lma-profile-sidebar__icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lma-profile-sidebar__icon img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.lma-profile-sidebar__item.is-active .lma-profile-sidebar__icon img,
.lma-profile-sidebar__item:hover .lma-profile-sidebar__icon img {
  opacity: 1;
}

.lma-profile-sidebar__label {
  white-space: nowrap;
}

/* Layout */
.lma-profile__layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.85vw, 10px);
  align-items: start;
}

.lma-profile__left,
.lma-profile__middle,
.lma-profile__right {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.85vw, 10px);
}

.lma-profile__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 0.85vw, 10px);
}

/* ===== Avatar Card ===== */
.lma-profile-avatar {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
  /* background: 
    radial-gradient(
      ellipse 60% 80% at 10% 20%,
      rgba(0, 224, 133, 0.25) 0%,
      rgba(0, 224, 133, 0.08) 50%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 80% at 90% 20%,
      rgba(201, 152, 242, 0.25) 0%,
      rgba(201, 152, 242, 0.08) 50%,
      transparent 70%
    ),
    var(--lma-color--dark-2); */
}

.lma-profile-avatar__inner {
  padding: clamp(20px, 1.5vw, 28px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1vw, 16px);
  height: 100%;
  position: relative;
  z-index: 1;
}

.lma-profile-avatar__photo-wrap {
  position: relative;
  flex: 0 0 auto;
}

.lma-profile-avatar__photo {
  width: clamp(80px, 7.5vw, 110px);
  height: clamp(80px, 7.5vw, 110px);
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

.lma-profile-avatar__edit-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lma-profile-avatar__edit-photo:hover {
  background: rgba(0, 0, 0, 0.7);
}

.lma-profile-avatar__edit-photo img {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.lma-profile-avatar__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lma-profile-avatar__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lma-profile-avatar__id {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--lma-color--gray-2);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.lma-profile-avatar__level {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lma-profile-avatar__level-label {
  color: var(--lma-color--gray-1);
  font-size: 13px;
}

.lma-profile-avatar__level-badge {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
}

.lma-profile-avatar__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lma-profile-avatar__name {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 400;
  color: var(--color-white);
}

.lma-profile-avatar__edit-name {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
  order: 10; /* Always at the end */
}

.lma-profile-avatar__edit-name[hidden] {
  display: none;
}

.lma-profile-avatar__edit-name:hover {
  opacity: 1;
}

.lma-profile-avatar__edit-name img {
  width: 16px;
  height: 16px;
}

/* Name inline editing */
.lma-profile-avatar__name-input {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 5px 10px;
  width: 140px;
  max-width: 180px;
  outline: none;
  transition: var(--transition);
}

.lma-profile-avatar__name-input:focus {
  border-color: var(--lma-color--primary);
  background: rgba(255, 255, 255, 0.12);
}

.lma-profile-avatar__name-input.is-error {
  border-color: var(--lma-color--red);
  background: rgba(255, 76, 76, 0.1);
}

/* Actions hidden by default via [hidden] attribute, shown only in edit mode */
.lma-profile-avatar__name-actions {
  display: none;
  gap: 4px;
}

.lma-profile-avatar__name-actions:not([hidden]) {
  display: flex;
}

.lma-profile-avatar__name-action {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 4px;
}

.lma-profile-avatar__name-action img {
  width: 18px;
  height: 18px;
}

.lma-profile-avatar__name-action--save:hover {
  background: rgba(76, 175, 80, 0.2);
}

.lma-profile-avatar__name-action--cancel:hover {
  background: rgba(255, 76, 76, 0.2);
}

/* ===== Edit Profile Card ===== */
.lma-profile-edit {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-profile-edit__inner {
  padding: clamp(20px, 1.5vw, 28px);
}

.lma-profile-edit .lma-card-head {
  margin-bottom: clamp(16px, 1.5vw, 24px);
}

.lma-profile-edit__fields {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.25vw, 20px);
}

/* Profile Field */
.lma-profile-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lma-profile-field__label {
  font-size: 13px;
  color: var(--lma-color--gray-1);
}

.lma-profile-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lma-profile-field__input {
  flex: 1;
  padding-right: 80px;
}

.lma-profile-field__input:read-only {
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.lma-profile-field__input:not(:read-only) {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--lma-color--purple-1);
  pointer-events: auto;
}

.lma-profile-field__input.is-error {
  border-color: var(--lma-color--red) !important;
  background: rgba(255, 76, 76, 0.08) !important;
  animation: shake 0.4s ease;
}

.lma-profile-field__input.is-saving {
  opacity: 0.6;
  pointer-events: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.lma-profile-field__icon-btn {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
}

.lma-profile-field__icon-btn:hover {
  opacity: 1;
}

.lma-profile-field__icon-btn img {
  width: 18px;
  height: 18px;
}

.lma-profile-field__icon-btn--calendar {
  right: 48px;
}

.lma-profile-field__icon-btn--edit {
  right: 12px;
}

/* Actions (save/cancel) */
.lma-profile-field__actions {
  position: absolute;
  right: 12px;
  display: none;
  align-items: center;
  gap: 6px;
}

.lma-profile-field__actions[hidden] {
  display: none !important;
}

.lma-profile-field.is-editing .lma-profile-field__actions {
  display: flex;
}

.lma-profile-field.is-editing .lma-profile-field__icon-btn--edit,
.lma-profile-field.is-editing .lma-profile-field__icon-btn--calendar {
  display: none;
}

.lma-profile-field__action {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.lma-profile-field__action img {
  width: 20px;
  height: 20px;
}

.lma-profile-field__action--save:hover {
  background: rgba(46, 204, 113, 0.2);
}

.lma-profile-field__action--cancel:hover {
  background: rgba(231, 76, 60, 0.2);
}

/* Select wrapper */
.lma-profile-field__input-wrap--select .lma-profile-field__select-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.lma-profile-field__flag {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
}

.lma-profile-field__select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2365647b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}

.lma-profile-field__select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.lma-profile-field__flag + .lma-profile-field__select {
  padding-left: 44px;
}

.lma-profile-field__select-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

/* ===== Metric Cards ===== */
.lma-profile-metric {
  min-height: 160px;
}

.lma-profile-metric .lma-card-head {
  padding-bottom: 12px;
}

/* Equal-height top cards (avatar, clicks, balance) */
.lma-profile-card--fixed {
  height: 200px;
  min-height: 200px;
}

/* ===== Password Card ===== */
.lma-profile-password {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-profile-password__inner {
  padding: clamp(20px, 1.5vw, 28px);
}

.lma-profile-password .lma-card-head {
  margin-bottom: clamp(16px, 1.5vw, 24px);
}

.lma-profile-password__form {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.25vw, 20px);
}

.lma-profile-password__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lma-profile-password__label {
  font-size: 13px;
  color: var(--lma-color--gray-1);
}

.lma-profile-password__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lma-profile-password__input {
  flex: 1;
  padding-right: 48px;
}

.lma-profile-password__input.is-error {
  border-color: var(--lma-color--red) !important;
  background: rgba(255, 76, 76, 0.08) !important;
  animation: shake 0.4s ease;
}

.lma-profile-password__toggle {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
}

.lma-profile-password__toggle:hover {
  opacity: 1;
}

.lma-profile-password__toggle img {
  width: 20px;
  height: 20px;
}

.lma-profile-password__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.lma-profile-password__submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 24px;
  background: var(--lma-color--purple-1);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.lma-profile-password__submit:hover {
  background: var(--lma-color--purple-2);
  transform: translateY(-1px);
}

.lma-profile-password__submit img {
  width: 18px;
  height: 18px;
}

.lma-profile-password__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== My Manager Widget ===== */
.lma-profile-manager {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-profile-manager__inner {
  padding: clamp(20px, 1.5vw, 28px);
}

.lma-profile-manager .lma-card-head {
  margin-bottom: clamp(16px, 1.5vw, 20px);
  padding-bottom: clamp(12px, 1vw, 16px);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.lma-profile-manager__body {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.2vw, 20px);
}

.lma-profile-manager__avatar {
  width: clamp(52px, 4vw, 64px);
  height: clamp(52px, 4vw, 64px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.lma-profile-manager__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lma-profile-manager__avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
}

.lma-profile-manager__info {
  min-width: 0;
}

.lma-profile-manager__name {
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 10px;
}

.lma-profile-manager__tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: #1787c2;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lma-profile-manager__tg:hover {
  background: #229ED9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
}

.lma-profile-manager__tg img {
  filter: brightness(10);
}

/* ===== Achievements ===== */
.lma-profile-achievements {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-profile-achievements__inner {
  padding: clamp(20px, 1.5vw, 28px);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lma-profile-achievements .lma-card-head {
  margin-bottom: 10px;
  padding-bottom: 10px;
  flex-shrink: 0;
}

.lma-profile-achievements__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.75vw, 8px);
  align-content: start;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lma-profile-achievement {
  position: relative;
  width: 100%;
  max-width: 56px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.lma-profile-achievement__icon {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--lma-color--dark-3);
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.lma-profile-achievement__icon img {
  width: 20px;
  height: 20px;
  opacity: 0.95;
}

.lma-profile-achievement__icon--gold {
  background: radial-gradient(circle at 30% 30%, rgba(255, 214, 140, 0.35), rgba(22, 20, 26, 0.9));
  border-color: rgba(255, 214, 140, 0.35);
}

.lma-profile-achievement__icon--green {
  background: radial-gradient(circle at 30% 30%, rgba(155, 255, 196, 0.3), rgba(22, 20, 26, 0.9));
  border-color: rgba(155, 255, 196, 0.35);
}

.lma-profile-achievement__icon--purple {
  background: radial-gradient(circle at 30% 30%, rgba(196, 173, 255, 0.35), rgba(22, 20, 26, 0.9));
  border-color: rgba(196, 173, 255, 0.35);
}

.lma-profile-achievement__icon--violet {
  background: radial-gradient(circle at 30% 30%, rgba(190, 147, 255, 0.35), rgba(22, 20, 26, 0.9));
  border-color: rgba(190, 147, 255, 0.35);
}

.lma-profile-achievement__icon--pink {
  background: radial-gradient(circle at 30% 30%, rgba(255, 170, 214, 0.35), rgba(22, 20, 26, 0.9));
  border-color: rgba(255, 170, 214, 0.35);
}

.lma-profile-achievement__icon--blue {
  background: radial-gradient(circle at 30% 30%, rgba(143, 200, 255, 0.35), rgba(22, 20, 26, 0.9));
  border-color: rgba(143, 200, 255, 0.35);
}

.lma-profile-achievement__count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.2;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .lma-profile__wrapper {
    grid-template-columns: 220px 1fr;
  }

  .lma-profile-sidebar {
    max-width: 220px;
  }
}

@media (max-width: 1100px) {
  .lma-profile__wrapper {
    grid-template-columns: 1fr;
  }

  .lma-profile-sidebar {
    position: static;
    max-width: none;
  }

  .lma-profile-sidebar__nav {
    flex-direction: column;
    gap: 4px;
  }

  .lma-profile__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .lma-profile-card--fixed {
    height: auto;
    min-height: 0;
  }

  .lma-profile__metrics {
    grid-template-columns: 1fr;
  }

  .lma-profile-avatar__inner {
    flex-direction: column;
    text-align: center;
  }

  .lma-profile-avatar__meta {
    justify-content: center;
  }

  .lma-profile-avatar__name-row {
    justify-content: center;
  }

  .lma-profile-sidebar__nav {
    flex-direction: column;
  }

  .lma-profile-sidebar__item {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .lma-profile-avatar__photo {
    width: 100px;
    height: 100px;
  }

  .lma-profile-avatar__level {
    flex-direction: column;
    gap: 4px;
  }

  .lma-profile-sidebar__label {
    display: inline;
  }
}

/* =========================================================
   PAYMENTS PAGE (Баланс і виплата)
   ========================================================= */

.lma-payments-page {
  background: var(--lma-color--dark-1);
}

/* Page header with action button */
.lma-payments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lma-payments-head__payout-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.lma-payments-head__payout-all img {
  width: 16px;
  height: 16px;
}

/* Balance Cards Row */
.lma-payments__balances {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 0.85vw, 10px);
  margin-bottom: clamp(6px, 0.85vw, 10px);
}

/* Balance Card */
.lma-payments-balance {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
  overflow: hidden;
}

.lma-payments-balance__inner {
  padding: clamp(20px, 1.5vw, 28px);
}

.lma-payments-balance__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: clamp(20px, 2vw, 32px);
  border-bottom: 1px dashed var(--lma-color--gray-2);
}

.lma-payments-balance__currency {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lma-payments-balance__currency-icon {
  width: clamp(38px, 2.75vw, 44px);
  height: clamp(38px, 2.75vw, 44px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--lma-color--dark-3);
  flex: 0 0 auto;
}

.lma-payments-balance__currency-icon img {
  width: clamp(16px, 1.75vw, 20px);
  height: clamp(16px, 1.75vw, 20px);
  display: block;
}

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

/* Green payout button */
.lma-btn--green {
  background: var(--lma-color--green-1);
  color: var(--lma-color--dark-1);
  border: none;
}

.lma-btn--green:hover {
  background: #00c775;
  transform: translateY(-1px);
}

/* =============================================
   Pill Buttons (Rounded, Modern Style)
   ============================================= */

/* Purple pill button - primary action */
.lma-btn--pill-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  height: 44px;
  background: var(--lma-color--purple-1);
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lma-btn--pill-purple:hover {
  background: #8b7fd9;
  transform: translateY(-1px);
}

.lma-btn--pill-purple:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lma-btn--pill-purple img,
.lma-btn--pill-purple svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Red pill button - danger action */
.lma-btn--pill-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--lma-color--red);
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lma-btn--pill-red:hover {
  background: #e0455a;
  transform: translateY(-1px);
}

.lma-btn--pill-red:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lma-btn--pill-red img,
.lma-btn--pill-red svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

/* Outline pill button - secondary action (uses lma-gray--border-gradient) */
.lma-btn--pill-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  height: 44px;
  background: transparent;
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lma-btn--pill-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Smaller pill buttons */
.lma-btn--pill-sm {
  padding: 12px 24px;
  font-size: 14px;
  gap: 8px;
}

.lma-btn--pill-sm img,
.lma-btn--pill-sm svg {
  width: 18px;
  height: 18px;
}

.lma-btn--sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
}

.lma-payments-balance__payout-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
}

.lma-payments-balance__payout-btn:hover {
  opacity: 0.85;
}

.lma-payments-balance__payout-text {
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 400;
  color: var(--lma-color--green-1);
}

.lma-payments-balance__payout-arrow {
  width: clamp(36px, 2.75vw, 40px);
  height: clamp(36px, 2.75vw, 40px);
  border-radius: 999px;
  border: 1px solid var(--lma-color--green-1);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: var(--transition);
}

.lma-payments-balance__payout-btn:hover .lma-payments-balance__payout-arrow {
  background: rgba(0, 224, 133, 0.1);
}

.lma-payments-balance__payout-arrow img,
.lma-payments-balance__payout-arrow svg {
  width: clamp(16px, 1.5vw, 18px);
  height: clamp(16px, 1.5vw, 18px);
  display: block;
}
.lma-payments-balance__payout-arrow svg path { 
  stroke: var(--lma-color--green-1);
}

/* Balance value */
.lma-payments-balance__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.lma-payments-balance__amount {
  font-size: clamp(24px, 2.6vw, 42px);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1;
}

.lma-payments-balance__unit {
  font-size: clamp(24px, 2vw, 36px);
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

/* Bottom Section Layout */
.lma-payments__bottom {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: clamp(6px, 0.85vw, 10px);
  align-items: start;
}

/* ===== Payment Methods Widget ===== */
.lma-payments-methods {
  height: 100%;
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-payments-methods__inner {
  padding: clamp(20px, 1.5vw, 28px);
}

.lma-payments-methods .lma-card-head {
  margin-bottom: clamp(16px, 1.5vw, 24px);
}

.lma-payments-methods__subtitle {
  font-size: 13px;
  color: var(--lma-color--gray-1);
  margin-bottom: 16px;
}

.lma-payments-methods__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* Individual Payment Method Item */
.lma-payment-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: transparent;
  border: 1px dashed var(--lma-color--gray-2);
  border-radius: 16px;
  transition: var(--transition);
}

.lma-payment-method:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lma-payment-method.is-selected {
  border-color: rgba(0, 224, 133, 0.3);
  background: rgba(0, 224, 133, 0.05);
}

/* Custom Checkbox */
.lma-payment-method__checkbox {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.lma-payment-method__checkbox input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.lma-payment-method__checkmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--lma-color--gray-2);
  background: transparent;
  transition: var(--transition);
}

.lma-payment-method__checkbox input:checked + .lma-payment-method__checkmark {
  background: var(--lma-color--green-1);
  border-color: var(--lma-color--green-1);
}

.lma-payment-method__checkmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 16px;
  height: 16px;
  background: url('/assets/images/icons/check.svg') center / contain no-repeat;
  filter: brightness(0);
  transition: transform 0.15s ease;
}

.lma-payment-method__checkbox input:checked + .lma-payment-method__checkmark::after {
  transform: translate(-50%, -50%) scale(1);
}

/* Payment Method Icon */
.lma-payment-method__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lma-payment-method__icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

/* Payment Method Name */
.lma-payment-method__name {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Payment Method Actions */
.lma-payment-method__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lma-payment-method__action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.lma-payment-method__action:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.lma-payment-method__action--delete:hover {
  background: rgba(255, 81, 98, 0.2);
}

.lma-payment-method__action img {
  width: 18px;
  height: 18px;
}

/* Note text */
.lma-payments-methods__note {
  font-size: 12px;
  color: var(--lma-color--gray-1);
  line-height: 1.5;
  margin-bottom: 20px;
}

.lma-payments-methods__note strong {
  color: var(--color-white);
  font-weight: 500;
}

/* Footer with add button */
.lma-payments-methods__footer {
  display: flex;
  justify-content: flex-end;
}

.lma-payments-methods__add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  background: transparent;
  border: 1px solid var(--lma-color--green-1);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.lma-payments-methods__add-btn:hover {
  background: rgba(0, 224, 133, 0.1);
}

.lma-payments-methods__add-btn img {
  width: 16px;
  height: 16px;
}

/* ===== Right Column ===== */
.lma-payments__right-col {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.85vw, 10px);
}

/* ===== Currency Widget ===== */
.lma-payments-currency {
  border-radius: clamp(20px, 1.75vw, 28px);
  background: var(--lma-color--dark-2);
}

.lma-payments-currency__inner {
  padding: clamp(20px, 1.75vw, 28px);
}

.lma-payments-currency .lma-card-head {
  margin-bottom: 16px;
}

.lma-payments-currency__select-wrap {
  position: relative;
}

.lma-payments-currency__select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  background: var(--lma-color--dark-3);
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 12px;
  appearance: none;
  cursor: pointer;
  background-image: url('/assets/images/icons/arrow-down.svg');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.lma-payments-currency__select:focus {
  outline: none;
  border-color: var(--lma-color--purple-1);
}

.lma-payments-currency__select-wrap.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.lma-payments-currency__select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Payment History Widget ===== */
.lma-payments-history {
  border-radius: clamp(20px, 1.75vw, 28px);
  background: var(--lma-color--dark-2);
  max-height: 450px;
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

.lma-payments-history__inner {
  padding: clamp(20px, 1.75vw, 28px);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.lma-payments-history .lma-card-head {
  flex-shrink: 0;
  margin-bottom: 16px;
}

/* Table Header */
.lma-payments-history__table-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.lma-payments-history__th {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--lma-color--gray-1);
  cursor: pointer;
  transition: var(--transition);
}

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

.lma-payments-history__sort-icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

/* Scrollable table body */
.lma-payments-history__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--lma-color--gray-2) transparent;
}

.lma-payments-history__scroll::-webkit-scrollbar {
  width: 4px;
}

.lma-payments-history__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.lma-payments-history__scroll::-webkit-scrollbar-thumb {
  background: var(--lma-color--gray-2);
  border-radius: 2px;
}

.lma-payments-history__table {
  display: flex;
  flex-direction: column;
}

.lma-payments-history__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lma-payments-history__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lma-payments-history__cell {
  font-size: 13px;
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

.lma-payments-history__cell--amount {
  font-variant-numeric: tabular-nums;
}

.lma-payments-history__cell--amount strong {
  font-weight: 500;
  color: var(--color-white);
}

/* Status badges */
.lma-payments-history__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
}

.lma-payments-history__status img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.lma-payments-history__status--success {
  color: var(--lma-color--green-1);
}

.lma-payments-history__status--rejected {
  color: var(--lma-color--red);
}

.lma-payments-history__status--deducted {
  color: var(--lma-color--red);
}

.lma-payments-history__status--pending {
  color: var(--lma-color--yellow-1);
}

/* History Empty State */
.lma-payments-history__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.lma-payments-history__empty-icon {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.lma-payments-history__empty-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-white);
  margin: 0 0 8px 0;
}

.lma-payments-history__empty-hint {
  font-size: 13px;
  color: var(--lma-color--gray-1);
  margin: 0;
}

/* ===== Payment History Full Page ===== */
.lma-payments-history--full {
  width: 100%;
  max-height: 100%;
  margin-top: 24px;
}

.lma-payments-history__table-head--full,
.lma-payments-history__row--full {
  display: grid;
  grid-template-columns: 140px 120px 1fr 1fr 120px;
  gap: 16px;
  align-items: center;
}

.lma-payments-history--full .lma-payments-history__th,
.lma-payments-history__th--method,
.lma-payments-history__th--comment {
  font-size: 12px;
  font-weight: 500;
  color: var(--lma-color--gray-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lma-payments-history__cell--method {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lma-payments-history__method-name {
  font-size: 12px;
  color: var(--lma-color--gray-1);
}

.lma-payments-history__cell--comment {
  font-size: 13px;
  color: var(--lma-color--gray-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lma-payments-history--full .lma-payments-history__cell {
  color: var(--color-white);
}

/* Breadcrumb */
.lma-breadcrumb {
  margin-bottom: 24px;
}

.lma-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--lma-color--gray-1);
  text-decoration: none;
  transition: color 0.2s;
}

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

.lma-breadcrumb__icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

/* Pagination */
.lma-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lma-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.lma-pagination__btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.lma-pagination__btn img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.lma-pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lma-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.lma-pagination__page:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
}

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

.lma-pagination__dots {
  color: var(--lma-color--gray-1);
  padding: 0 4px;
}

/* Page head */
.lma-page-head {
  margin-bottom: 8px;
}

.lma-page-subtitle {
  font-size: 14px;
  color: var(--lma-color--gray-1);
  margin: 8px 0 0 0;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .lma-payments__bottom {
    grid-template-columns: 1fr;
  }

  .lma-payments__right-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 1vw, 16px);
  }
}

@media (max-width: 992px) {
  .lma-payments__balances {
    grid-template-columns: 1fr;
  }

  .lma-payments__right-col {
    grid-template-columns: 1fr;
  }
  
  .lma-payments-history__table-head--full,
  .lma-payments-history__row--full {
    grid-template-columns: 120px 100px 1fr 120px;
  }
  
  .lma-payments-history__th--comment,
  .lma-payments-history__cell--comment {
    display: none;
  }
}

@media (max-width: 767px) {
  .lma-payments-history__table-head--full,
  .lma-payments-history__row--full {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .lma-payments-history__th--method,
  .lma-payments-history__cell--method,
  .lma-payments-history__th--comment,
  .lma-payments-history__cell--comment {
    display: none;
  }
  
  .lma-pagination {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .lma-pagination__btn span {
    display: none;
  }
}

@media (max-width: 767px) {
  .lma-payments-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .lma-payments-head__payout-all {
    width: 100%;
    justify-content: center;
  }

  .lma-payment-method {
    padding: 12px 14px;
    gap: 10px;
  }

  .lma-payment-method__name {
    font-size: 13px;
  }

  .lma-payment-method__action {
    width: 32px;
    height: 32px;
  }

  .lma-payment-method__action img {
    width: 16px;
    height: 16px;
  }

  .lma-payments-history__status span {
    display: none;
  }
}

/* =========================================================
   Payment Methods - Empty State
   ========================================================= */
.lma-payments-methods__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(40px, 4vw, 60px) 20px;
  min-height: 280px;
}

.lma-payments-methods__empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lma-color--dark-3);
  border-radius: 16px;
  margin-bottom: 20px;
}

.lma-payments-methods__empty-icon img {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.lma-payments-methods__empty-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 8px;
}

.lma-payments-methods__empty-hint {
  font-size: 14px;
  color: var(--lma-color--gray-1);
  margin-bottom: 24px;
}

/* Empty state uses same button as footer: .lma-payments-methods__add-btn */

/* =========================================================
   Modal Component
   ========================================================= */
.lma-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lma-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.lma-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.lma-modal__container {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--lma-color--dark-2);
  border-radius: clamp(20px, 2vw, 28px);
  border: 1px solid var(--lma-color--gray-2);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.lma-modal.is-open .lma-modal__container {
  transform: translateY(0);
}

.lma-modal--small .lma-modal__container {
  max-width: 420px;
}

.lma-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  z-index: 10;
}

.lma-modal__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.lma-modal__close img {
  width: 20px;
  height: 20px;
}

.lma-modal__content {
  padding: clamp(24px, 2vw, 32px);
}

.lma-modal__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.lma-modal__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lma-color--dark-3);
  border-radius: 12px;
  flex-shrink: 0;
}

.lma-modal__icon img {
  width: 24px;
  height: 24px;
}

.lma-modal__icon--danger {
  background: rgba(255, 81, 98, 0.15);
}

.lma-modal__icon--danger img {
  filter: brightness(0) saturate(100%) invert(47%) sepia(77%) saturate(1746%) hue-rotate(326deg) brightness(101%) contrast(101%);
}

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

.lma-modal__divider {
  height: 1px;
  background: linear-gradient(90deg, var(--lma-color--gray-2) 0%, transparent 100%);
  margin-bottom: 24px;
}

.lma-modal__type-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

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

.lma-modal__commission {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lma-color--dark-1);
  background: var(--lma-color--yellow-1);
  border-radius: 999px;
}

.lma-modal__hint {
  font-size: 14px;
  color: var(--lma-color--gray-1);
  margin-bottom: 24px;
}

.lma-modal__confirm-text {
  font-size: 14px;
  color: var(--lma-color--gray-1);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Modal Form */
.lma-modal__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lma-modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lma-modal__label {
  font-size: 13px;
  font-weight: 400;
  color: var(--lma-color--gray-1);
}

/* Modal Input - needs wrapper for gradient border */
.lma-modal__input {
  position: relative;
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  background: transparent;
  border: none;
  border-radius: 999px;
  outline: none;
  transition: all 0.2s ease;
}

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

/* Input wrapper for gradient border */
.lma-modal__input-gradient {
  position: relative;
  isolation: isolate;
}

.lma-modal__input-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  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;
  transition: background 0.2s ease;
}

.lma-modal__input-gradient:focus-within::before {
  background: var(--lma-color--purple-1);
}

.lma-modal__input-gradient.has-error::before {
  background: var(--lma-color--red);
}

/* Fallback for inputs without wrapper - simple border */
.lma-modal__field > .lma-modal__input {
  border: 1px solid rgba(72, 70, 78, 0.6);
}

.lma-modal__field > .lma-modal__input:focus {
  border-color: var(--lma-color--purple-1);
}

.lma-modal__field > .lma-modal__input.has-error {
  border-color: var(--lma-color--red);
}

.lma-modal__error {
  font-size: 12px;
  color: var(--lma-color--red);
  margin-top: 4px;
}

/* Input wrapper for card icon */
.lma-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lma-modal__input-wrap .lma-modal__input {
  flex: 1;
  padding-right: 56px;
  transition: padding-right 0.15s ease;
}

.lma-modal__input-wrap .lma-modal__input.has-card-icon {
  padding-right: 56px;
}

.lma-modal__card-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.lma-modal__card-icon.is-visible {
  opacity: 1;
}

.lma-modal__card-icon img {
  width: 36px;
  height: 24px;
  object-fit: contain;
}

/* Select with icon */
/* Custom Select Dropdown */
.lma-modal__custom-select {
  position: relative;
}

.lma-modal__custom-select-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
  position: relative;
  z-index: 1;
}

.lma-modal__custom-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.lma-modal__custom-select.is-open .lma-modal__custom-select-trigger {
  border-color: var(--lma-color--purple-1);
}

.lma-modal__custom-select-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: none;
}

.lma-modal__custom-select-icon.has-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lma-modal__custom-select-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.lma-modal__custom-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lma-modal__custom-select-value.is-placeholder {
  color: var(--lma-color--gray-1);
}

.lma-modal__custom-select-arrow {
  flex-shrink: 0;
  color: var(--lma-color--gray-1);
  transition: transform 0.2s;
}

.lma-modal__custom-select.is-open .lma-modal__custom-select-arrow {
  transform: rotate(180deg);
}

.lma-modal__custom-select-dropdown {
  display: none;
  position: fixed;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 6px;
  z-index: 100000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  max-height: 240px;
  overflow-y: auto;
}

.lma-modal__custom-select-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.lma-modal__custom-select-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lma-modal__custom-select-option.is-selected {
  background: rgba(var(--lma-color--purple-1-rgb, 124, 58, 237), 0.15);
}

.lma-modal__custom-select-option-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.lma-modal__custom-select-option-text {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
}

.lma-modal__custom-select-option-commission {
  font-size: 12px;
  color: var(--lma-color--gray-1);
  flex-shrink: 0;
}

.lma-modal__select-wrap {
  position: relative;
}

/* Modal Select with gradient border */
.lma-modal__select {
  position: relative;
  width: 100%;
  padding: 14px 20px;
  padding-right: 44px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  background: transparent;
  border: none;
  border-radius: 999px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease, padding-left 0.15s ease;
}

/* Gradient border for select - applied to wrapper */
.lma-modal__select-wrap {
  position: relative;
  isolation: isolate;
}

.lma-modal__select-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  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;
  transition: background 0.2s ease;
}

.lma-modal__select-wrap:focus-within::before {
  background: var(--lma-color--purple-1);
}

.lma-modal__select.has-icon {
  padding-left: 52px;
}

.lma-modal__select:focus {
  outline: none;
}

.lma-modal__select option {
  background: var(--lma-color--dark-2);
  color: var(--color-white);
  padding: 12px;
}

.lma-modal__select-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  pointer-events: none;
}

.lma-modal__select-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.lma-modal__select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--lma-color--gray-1);
}

/* Modal Actions */
.lma-modal__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.lma-modal__actions.align-end {
  justify-content: flex-end;
}
/* Modal buttons now use pill button classes */
.lma-modal__submit {
  min-width: 160px;
}

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

/* Make icon white in purple button */
.lma-btn--pill-purple .lma-modal__submit-icon {
  filter: brightness(0) invert(1);
}

.lma-modal__cancel {
  min-width: 140px;
}

/* Danger button */
.lma-btn--danger {
  background: var(--lma-color--red);
  color: var(--color-white);
  border: none;
}

.lma-btn--danger:hover {
  background: #e0455a;
}

.lma-btn--danger .lma-modal__submit-icon {
  filter: brightness(0) invert(1);
}

/* Dynamic fields animation */
.lma-modal__dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lma-modal__dynamic-fields .lma-modal__field {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal responsive */
@media (max-width: 600px) {
  .lma-modal {
    padding: 16px;
    align-items: flex-end;
  }
  
  .lma-modal__container {
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
  }
  
  .lma-modal__actions {
    flex-direction: column;
  }
  
  .lma-modal__submit,
  .lma-modal__cancel {
    width: 100%;
  }
}

/* =============================================
   Payout Modal Styles
   ============================================= */

.lma-modal--payout .lma-modal__container {
  max-width: 560px;
}

/* Balance Display */
.lma-payout-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 24px;
  border: 1px dashed var(--lma-color--gray-2);
}

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

.lma-payout-balance__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px dashed var(--lma-color--gray-2);
}

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

.lma-payout-balance__amount {
  font-size: 24px;
  font-weight: 600;
  color: var(--lma-color--green-1);
}

/* Payout Methods List */
.lma-payout-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.lma-payout-methods::-webkit-scrollbar {
  width: 4px;
}

.lma-payout-methods::-webkit-scrollbar-track {
  background: var(--lma-color--dark-3);
  border-radius: 4px;
}

.lma-payout-methods::-webkit-scrollbar-thumb {
  background: var(--lma-color--gray-2);
  border-radius: 4px;
}

.lma-payout-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 24px;
  border: 1px dashed var(--lma-color--gray-2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lma-payout-method:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lma-payout-method input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lma-payout-method__check {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--lma-color--gray-2);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
  color: transparent;
}

.lma-payout-method.is-selected .lma-payout-method__check,
.lma-payout-method input[type="radio"]:checked + .lma-payout-method__check {
  background: var(--lma-color--green-1);
  border-color: var(--lma-color--green-1);
  color: var(--lma-color--dark-1);
}

.lma-payout-method__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lma-color--dark-3);
  border-radius: 10px;
  flex-shrink: 0;
}

.lma-payout-method__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.lma-payout-method__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lma-payout-methods__empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--lma-color--gray-1);
}

.lma-payout-methods__empty p {
  margin-bottom: 12px;
  font-size: 14px;
}

.lma-payout-methods__empty .lma-link {
  color: var(--lma-color--purple-1);
  font-weight: 500;
}

.lma-payout-methods__empty .lma-link:hover {
  text-decoration: underline;
}

/* =============================================
   REFERRAL PAGE STYLES
   ============================================= */

/* --- Referral Banner --- */
.lma-ref-banner {
  position: relative;
  isolation: isolate;
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
  overflow: hidden;
  margin-bottom: clamp(6px, 0.85vw, 10px);
  max-height: 320px;
}

.lma-ref-banner::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(
    circle,
    rgba(201, 152, 242, 0.2) 0%,
    rgba(201, 152, 242, 0.1) 35%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.lma-ref-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: clamp(28px, 2.5vw, 44px);
  height: 260px;
}

.lma-ref-banner__left {
  flex: 1 1 0;
  min-width: 0;
  max-width: 380px;
}

.lma-ref-banner__title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-white);
}

.lma-ref-banner__subtitle {
  margin: 0;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 400;
  color: var(--lma-color--gray-1);
  line-height: 1.4;
}

.lma-ref-banner__center {
  position: absolute;
  top: 50%;
  right: 45%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.lma-ref-banner__feature-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lma-ref-banner__feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lma-ref-banner__feature-text {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 500;
  color: var(--color-white);
  white-space: nowrap;
}

.lma-ref-banner__right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 620px;
  max-width: 45%;
  overflow: hidden;
}

.lma-ref-banner__image {
  display: block;
  height: 100%;
  width: auto;
  min-width: 100%;
  object-fit: cover;
  object-position: left center;
}

.lma-referrals-section {
  border-radius: clamp(24px, 2vw, 32px);
  background: var(--lma-color--dark-2);
}

.lma-referrals-section__inner {
  padding: clamp(20px, 1.5vw, 28px);
}

.lma-referrals-subtitle {
  margin-top: 4px;
  color: var(--lma-color--gray-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.lma-referrals-subtitle strong {
  color: var(--color-white);
  font-weight: 500;
  
}

/* --- Referral Link Section --- */
.lma-referrals-link {
  margin-top: 24px;
}

.lma-referrals-link__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.lma-referrals-link__label {
  font-size: 14px;
  font-weight: 500;
}

.lma-referrals-link__select-wrap {
  position: relative;
}

/* --- Custom dropdown for referral link destination --- */
.lma-ref-dropdown {
  position: relative;
}

.lma-ref-dropdown__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--color-white);
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font-main);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.lma-ref-dropdown__btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

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

.lma-ref-dropdown__chev {
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.lma-ref-dropdown.is-open .lma-ref-dropdown__chev {
  transform: rotate(180deg);
}

.lma-ref-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  background: var(--lma-color--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 6px;
  z-index: 50;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lma-ref-dropdown.is-open .lma-ref-dropdown__menu {
  display: block;
}

.lma-ref-dropdown__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font-main);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.lma-ref-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lma-ref-dropdown__item:not(:last-child) {
  margin-bottom: 4px;
}

.lma-ref-dropdown__item.is-active {
  background: rgba(117, 77, 255, 0.15);
  color: var(--lma-color--purple-1);
  font-weight: 500;
}

/* --- Stats Summary --- */
/* --- Referral Balance Cards Row --- */
.lma-referrals-balances {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 0.85vw, 10px);
  margin-bottom: clamp(6px, 0.85vw, 10px);
}

/* --- Referrals Table --- */
.lma-referrals-table-wrap {
  margin-top: 24px;
}

.lma-referrals-table__head {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 12px;
  padding: 0 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lma-referrals-table__th {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lma-referrals-table__th--earned {
  text-align: right;
}

.lma-referrals-table__body {
  max-height: 400px;
  overflow-y: auto;
}

.lma-referrals-table__row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.lma-referrals-table__row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lma-referrals-table__row:last-child {
  border-bottom: none;
}

.lma-referrals-table__cell {
  font-size: 14px;
  color: var(--color-white);
  display: flex;
  align-items: center;
}

.lma-referrals-table__cell--id {
  color: var(--lma-color--purple-1);
  font-weight: 500;
}

.lma-referrals-table__cell--date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.lma-referrals-table__cell--earned {
  justify-content: flex-end;
  font-weight: 500;
}

.lma-referrals-table__no-earnings {
  color: rgba(255, 255, 255, 0.3);
}

/* --- Empty State --- */
.lma-referrals-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.lma-referrals-empty__icon {
  width: 48px;
  height: 48px;
  opacity: 0.25;
  margin-bottom: 16px;
}

.lma-referrals-empty__text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.lma-referrals-empty__hint {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* --- Responsive --- */
@media (max-width: 1600px) {
  .lma-ref-banner__center {
    right: 40%;
  }
}

@media (max-width: 1400px) {
  .lma-ref-banner__center {
    right: 36%;
  }
}

@media (max-width: 1200px) {
  .lma-ref-banner__left {
    max-width: 300px;
  }
}

@media (max-width: 1100px) {
  .lma-ref-banner__center {
    right: 36%;
  }

  .lma-ref-banner__right {
    max-width: 35%;
  }
}

@media (max-width: 900px) {
  .lma-ref-banner__center {
    display: none;
  }
  .lma-ref-banner__right {
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  .lma-referrals-section__inner {
    padding: 16px;
  }

  .lma-referrals-link__head {
    /* flex-direction: column;
    align-items: flex-start; */
    gap: 8px;
  }

  .lma-referrals-balances {
    grid-template-columns: repeat(2, 1fr);
  }

  .lma-ref-banner {
    max-height: none;
  }

  .lma-ref-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: clamp(20px, 2vw, 28px);
    gap: 20px;
  }

  .lma-ref-banner__center {
    position: static;
    transform: none;
    display: flex;
    gap: 14px;
  }

  .lma-ref-banner__right {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    max-width: none;
    width: calc(100% + clamp(20px, 2vw, 28px) * 2);
    margin-left: calc(-1 * clamp(20px, 2vw, 28px));
    margin-bottom: calc(-1 * clamp(20px, 2vw, 28px));
    height: auto;
    aspect-ratio: 16 / 6;
    border-radius: 0 0 clamp(24px, 2vw, 32px) clamp(24px, 2vw, 32px);
    overflow: hidden;
  }

  .lma-referrals-table__head,
  .lma-referrals-table__row {
    grid-template-columns: 70px 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  .lma-referrals-table__cell {
    font-size: 13px;
  }
}

/* =============================================
   Language Switcher
   ============================================= */

.lma-lang-switcher {
  position: relative;
  display: inline-flex;
}

.lma-lang-switcher__trigger {
  cursor: pointer;
  min-width: 36px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

.lma-lang-switcher__current {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
}

.lma-lang-switcher__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--lma-color--dark-1);
  border: 1px solid var(--lma-color--gray-2);
  border-radius: 10px;
  padding: 4px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lma-lang-switcher__dropdown.is-open {
  display: block;
}

.lma-lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.lma-lang-switcher__option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lma-lang-switcher__option:not(:last-child) {
  margin-bottom: 3px;
}

.lma-lang-switcher__option.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.lma-lang-switcher__option.is-active::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4ade80;
  margin-left: auto;
}

.lma-lang-switcher__flag {
  font-size: 16px;
  line-height: 1;
}

.lma-lang-switcher__mobile-option {
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.lma-lang-switcher__mobile-option.is-active {
  opacity: 0.6;
  pointer-events: none;
}
