/* LK custom styles layered on top of tks-corp.ru css */

:root {
  --lk-border: rgba(17, 17, 17, 0.10);
  --lk-muted: rgba(17, 17, 17, 0.70);
}

/*
  Layout fixes for LK pages:
  - подвал прижат к низу (не "уезжает" наверх)
  - main занимает свободную высоту
*/
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
}

.main {
  flex: 1 0 auto;
  width: 100%;
}

.footer.footer--lk {
  margin-top: auto;
}

/* Make header compact for LK pages (keep the same visual language) */
.header.header--lk {
  /* у основного стиля шапка очень высокая из‑за больших паддингов */
  padding: 18px 0 18px !important;
}
.header.header--lk .header__back { display: none; }
.header.header--lk .header__items { display: none; }
.header.header--lk .header__logo {
  margin: 0;
  max-width: min(380px, 82vw);
}
.header.header--lk .header__logo img {
  /* перебиваем .img-contain (width/height:100%) */
  width: auto !important;
  height: 64px !important;
  max-width: 100% !important;
  max-height: 64px !important;
}

@media (max-width: 520px) {
  .header.header--lk .header__logo img {
    height: 52px !important;
    max-height: 52px !important;
  }
}

/* LK sections */
.lk-section {
  padding: 48px 0 70px;
}

.lk-title {
  margin: 0 0 18px;
}

.lk-card {
  background: #fff;
  border: 1px solid var(--lk-border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(17,17,17,0.06);
}

.lk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 980px) {
  .lk-grid--2 { grid-template-columns: 1fr 1fr; }
}

.lk-muted { color: var(--lk-muted); }

/* Tabs */
.lk-tabs {
  display: inline-flex;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--lk-border);
  border-radius: 999px;
  background: rgba(17,17,17,0.02);
}
.lk-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(17,17,17,0.85);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.lk-tab.is-active {
  background: #111;
  color: #fff;
}

/* Forms */
.lk-form {
  display: grid;
  gap: 12px;
}
.lk-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 980px) {
  .lk-form__row { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.lk-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: rgba(17,17,17,0.60);
}

.lk-input, .lk-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--lk-border);
  background: #fff;
  font: inherit;
  outline: none;
}
.lk-input:focus, .lk-select:focus {
  border-color: rgba(17,17,17,0.35);
  box-shadow: 0 0 0 4px rgba(17,17,17,0.06);
}

.lk-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.lk-btn--ghost {
  background: transparent;
  color: #111;
}

/* Alerts */
.lk-alert {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid var(--lk-border);
  background: rgba(17,17,17,0.03);
}
.lk-alert--error {
  border-color: rgba(208, 55, 55, 0.35);
  background: rgba(208, 55, 55, 0.06);
}

/* Tables */
.lk-table {
  width: 100%;
  border-collapse: collapse;
}
.lk-table th, .lk-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--lk-border);
  text-align: left;
  vertical-align: top;
}
.lk-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(17,17,17,0.60);
}

.lk-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Chart wrapper */
.lk-chart {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Login layout */
.lk-login {
  max-width: 520px;
  margin: 0 auto;
}

.lk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
}

.lk-user {
  font-weight: 800;
  color: rgba(17,17,17,0.85);
}

/* ------------------------------
   LK: компактная шапка/подвал
   (чтобы не занимали 1/3 экрана)
-------------------------------- */

/* Header */
.header.header--lk {
  /* финальные размеры: шапка не должна занимать треть экрана */
  padding: 12px 0 12px !important;
}

.header.header--lk .lk-topbar {
  margin: 0;
}

/* Шапка: растягиваем topbar на всю ширину и выравниваем элементы */
.header.header--lk .header__content {
  /* важно: иначе flex-item (.lk-topbar) не растягивается и кнопки оказываются "посередине" */
  align-items: stretch !important;
}

.header.header--lk .lk-topbar {
  width: 100%;
}

.header.header--lk .lk-topbar .lk-actions {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
}

/* Логотип в шапке LK */
.header.header--lk .lk-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header.header--lk .lk-logo img {
  width: auto !important;
  height: 44px !important;
  max-height: 44px;
  display: block;
}

/* Плашки/кнопки в шапке (Реквизиты/Админка/Выход/роль) */
.header.header--lk .lk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header.header--lk .lk-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.36);
}

.header.header--lk .lk-pill:active {
  transform: translateY(1px);
}

.header.header--lk .lk-pill--muted {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.18);
}

.header.header--lk .lk-pill--danger {
  background: rgba(0, 0, 0, 0.28);
}

.header.header--lk .lk-pill--danger:hover {
  background: rgba(0, 0, 0, 0.36);
}

/* Footer */
.footer.footer--lk {
  /* подвал всегда внизу */
  margin: 0 !important;
  margin-top: auto !important;
  padding: 12px 0 16px !important;
}

.footer.footer--lk .footer__content {
  padding: 12px 16px !important;
  border-radius: 20px;
}

.footer.footer--lk .footer__logo {
  max-width: 150px;
}

.footer.footer--lk .footer__logo img {
  width: auto !important;
  height: 28px !important;
  display: block;
}

.footer.footer--lk .footer__link {
  font-size: 14px;
}

.footer.footer--lk .footer__right {
  gap: 16px;
}
