/* ==========================================================================
   arushan.bio — Cabinet v5: компактная современная типографика
   Только визуал. Скоуп: body.nl-app. Подключается ПОСЛЕ nl-cabinet-v4.css.
   Меньше кегли и веса, табличные цифры, тихие иконки-кнопки.
   ========================================================================== */

html body.nl-app {
  --v5-mute: #6B7280;
  --v5-soft: rgba(0,0,0,.04);
  --v5-soft-2: rgba(0,0,0,.07);
  font-size: 14px !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- заголовок страницы ---------- */
html body.nl-app .main { padding-top: 32px !important; }
html body.nl-app .main > .top h2,
html body.nl-app .main > .top h1 {
  font-size: clamp(24px, 2.2vw, 30px) !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
  line-height: 1.15 !important;
}
html body.nl-app .main > .top h2::after { content: none !important; }
html body.nl-app .main > .top p {
  font-size: 14px !important;
  letter-spacing: -.1px !important;
  color: var(--v5-mute) !important;
  margin-top: 4px !important;
}

/* ---------- основная кнопка ---------- */
html body.nl-app #newLink,
html body.nl-app .btn.primary,
html body.nl-app .spl-btn.primary {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: -.1px !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px -4px rgba(var(--v4-acc-rgb),.45) !important;
}
html body.nl-app #newLink::after,
html body.nl-app .btn.primary::after { display: none !important; }
html body.nl-app .btn:not(.primary):not(.danger),
html body.nl-app .spl-btn:not(.primary) {
  height: 36px !important; min-height: 36px !important;
  font-size: 13.5px !important; font-weight: 500 !important;
  border-radius: 10px !important;
}

/* ---------- переключатель языка ---------- */
html body.nl-app .top .lang { padding: 2px !important; border-radius: 9px !important; }
html body.nl-app .top .lang button { font-size: 11.5px !important; padding: 4px 8px !important; border-radius: 7px !important; }

/* ---------- KPI-карточки ---------- */
html body.nl-app #root .app .main .cards { gap: 12px !important; }
html body.nl-app #root .app .main .cards .stat {
  padding: 14px 16px 14px 60px !important;
  border-radius: 14px !important;
  min-height: 0 !important;
}
html body.nl-app #root .app .main .cards .stat::before {
  width: 32px !important; height: 32px !important;
  left: 16px !important; border-radius: 9px !important;
  background-size: 16px 16px !important;
}
html body.nl-app #root .app .main .cards .stat small {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--v5-mute) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
html body.nl-app #root .app .main .cards .stat strong {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  letter-spacing: -.02em !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums;
  margin-top: 2px !important;
}

/* ---------- таблица ссылок ---------- */
html body.nl-app #root .app .main .table { border-radius: 14px !important; }
html body.nl-app #root .app .main .table .thead span {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  color: var(--v5-mute) !important;
}
html body.nl-app #root .app .main .table .row { min-height: 56px !important; }
html body.nl-app #root .app .main .table .row .row-name,
html body.nl-app #root .app .main .table .row .row-name b {
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -.1px !important;
  color: #111 !important;
}
html body.nl-app #root .app .main .table .row .num {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  font-variant-numeric: tabular-nums;
  color: #374151 !important;
}
html body.nl-app #root .app .main .table .row .slug {
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
}
html body.nl-app #root .app .main .table .row .status {
  font-size: 11.5px !important;
  font-weight: 500 !important;
  padding: 3px 9px 3px 7px !important;
}

/* иконки действий: тихие, без рамок, проявляются при наведении на строку */
html body.nl-app #root .app .main .row > .rowact { gap: 2px !important; }
html body.nl-app #root .app .main .row > .rowact .iconbtn,
html body.nl-app #root .app .main .iconbtn {
  width: 30px !important; height: 30px !important;
  min-width: 30px !important; min-height: 30px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #6B7280 !important;
  opacity: .75;
  transition: background .15s, color .15s, opacity .15s !important;
}
html body.nl-app #root .app .main .iconbtn svg { width: 16px !important; height: 16px !important; }
html body.nl-app #root .app .main .row:hover > .rowact .iconbtn { opacity: 1; }
html body.nl-app #root .app .main .iconbtn:hover {
  background: var(--v5-soft-2) !important;
  color: #111 !important;
  transform: none !important;
}
html body.nl-app #root .app .main .iconbtn:focus-visible { outline: 2px solid var(--v4-acc) !important; outline-offset: 1px; }

/* ---------- сайдбар ---------- */
html body.nl-app .side .snav button,
html body.nl-app .side .snav a {
  height: 36px !important; min-height: 36px !important;
  font-size: 13.5px !important;
  border-radius: 9px !important;
}
html body.nl-app .side .snav button.active { font-weight: 600 !important; }
html body.nl-app .side .sideuser {
  padding: 12px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
}
html body.nl-app .side .sideuser b { font-size: 14px !important; font-weight: 600 !important; }
html body.nl-app .side .sideuser #logout,
html body.nl-app #logout.btn.danger {
  height: 32px !important; min-height: 32px !important;
  font-size: 13px !important; font-weight: 500 !important;
  background: transparent !important;
  border: 1px solid var(--v5-soft-2) !important;
  color: #6B7280 !important;
  border-radius: 8px !important;
  margin-top: 8px !important;
}
html body.nl-app #logout.btn.danger:hover {
  background: rgba(239,68,68,.08) !important;
  border-color: rgba(239,68,68,.25) !important;
  color: #dc2626 !important;
}

/* ---------- плавающая кнопка «Аналитика трафика» ---------- */
html body.nl-app .spl-fab {
  height: 40px !important; min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 13px !important; font-weight: 600 !important;
  border-radius: 12px !important;
}

/* ---------- мобильная версия ---------- */
@media (max-width: 760px) {
  html body.nl-app .main > .top h2 { font-size: 24px !important; }
  html body.nl-app #root .app .main .cards .stat { padding: 12px 12px 12px 54px !important; }
  html body.nl-app #root .app .main .cards .stat::before { left: 12px !important; width: 30px !important; height: 30px !important; }
  html body.nl-app #root .app .main .cards .stat strong { font-size: 20px !important; }
}

/* mobile: усиленная специфичность */
@media (max-width: 760px) {
  html body.nl-app #root .app .main > .top h2 { font-size: 24px !important; font-weight: 700 !important; }
  html body.nl-app #root .app .main > .top p { font-size: 13px !important; }
  html body.nl-app #root .app .main #newLink {
    height: 44px !important; min-height: 44px !important;
    font-size: 14px !important; font-weight: 600 !important; border-radius: 12px !important;
  }
  html body.nl-app #root .app .main .top .lang button { font-size: 12px !important; }
  html body.nl-app #root .app .main .cards { gap: 8px !important; }
  html body.nl-app #root .app .main .cards .stat { padding: 12px !important; text-align: left !important; }
  html body.nl-app #root .app .main .cards .stat::before {
    position: static !important; display: block !important; transform: none !important;
    width: 26px !important; height: 26px !important; margin-bottom: 8px !important;
    border-radius: 8px !important; background-size: 14px 14px !important;
  }
  html body.nl-app #root .app .main .cards .stat small { font-size: 11.5px !important; white-space: nowrap !important; overflow: visible !important; text-overflow: clip !important; }
  html body.nl-app #root .app .main .cards .stat strong { font-size: 19px !important; }
  html body.nl-app #root .app .main .table .row .row-name,
  html body.nl-app #root .app .main .table .row .row-name b { font-size: 15px !important; }
  html body.nl-app #root .app .main .table .row .num { font-size: 13px !important; }
  html body.nl-app #root .app .main .row > .rowact .iconbtn { width: 44px !important; height: 40px !important; min-height: 40px !important; }
}
@media (max-width: 760px) {
  html body.nl-app #root .app .main > .top > div > h2 { font-size: 24px !important; font-weight: 700 !important; letter-spacing: -.02em !important; }
  html body.nl-app #root .app .main .topact #newLink { font-size: 14px !important; font-weight: 600 !important; height: 44px !important; }
  html body.nl-app #root .app .main .cards:not(.analytics-kpi-cards) > .stat::after {
    display: block !important; top: 12px !important; left: 12px !important; right: auto !important;
    width: 26px !important; height: 26px !important; background-color: transparent !important;
    background-size: 14px 14px !important; background-position: center !important;
  }
}

/* KPI-иконки: плашка (::before) и глиф (::after) — один и тот же бокс, строго по центру */
@media (min-width: 761px) {
  html body.nl-app #root .app .main .cards .stat { padding: 16px 16px 16px 68px !important; }
  html body.nl-app #root .app .main .cards .stat::before,
  html body.nl-app #root .app .main .cards:not(.analytics-kpi-cards) > .stat::after {
    position: absolute !important;
    left: 16px !important; right: auto !important;
    top: 50% !important; transform: translateY(-50%) !important;
    width: 36px !important; height: 36px !important;
    margin: 0 !important; border-radius: 10px !important;
  }
  html body.nl-app #root .app .main .cards .stat::before {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.08) !important;
  }
  html body.nl-app #root .app .main .cards:not(.analytics-kpi-cards) > .stat::after {
    background-color: transparent !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
  }
}
@media (max-width: 760px) {
  html body.nl-app #root .app .main .cards .stat::before {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.08) !important;
  }
  html body.nl-app #root .app .main .cards:not(.analytics-kpi-cards) > .stat::after {
    transform: none !important; margin: 0 !important; background-repeat: no-repeat !important;
  }
}
/* градиент плашки — одним куском, без плиточного повтора */
html body.nl-app #root .app .main .cards .stat::before {
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}
