/* ЛК поверх токенов из landing styles.css */

.lk-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.lk-wrap {
  padding: 24px 0 80px;
}

.lk-header-bar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 24px;
}

.lk-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.lk-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.lk-nav-burger {
  display: none;
}

.lk-nav a {
  font-weight: 500;
  color: var(--text-muted);
}

.lk-nav a:hover,
.lk-nav a.is-active {
  color: var(--accent-strong);
}

.lk-flash {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(77, 141, 255, 0.12);
  color: var(--dark);
  margin-bottom: 20px;
  font-size: 15px;
}

.lk-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.lk-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 20px 22px;
}

.lk-card h2,
.lk-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--dark);
}

.lk-muted {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.lk-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lk-field label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--dark);
}

.lk-field input,
.lk-field textarea,
.lk-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.lk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.button-link.secondary {
  background: var(--surface);
  color: var(--dark);
  border: 1px solid var(--line);
}

.admin-login-hint {
  margin: 0;
  font-size: 13px;
}

.admin-login-hint code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
}

.table-lite {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-lite th,
.table-lite td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.table-lite th {
  color: var(--text-muted);
  font-weight: 600;
}

/* Чат — шрифт и поле ввода как у форм ЛК */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: min(72vh, 640px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  font-family: inherit;
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-muted);
  font-family: inherit;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  font-family: inherit;
}

.chat-bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.chat-bubble.them {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

.chat-meta {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 4px;
  font-family: inherit;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
}

.chat-input-row textarea:focus {
  outline: 2px solid rgba(77, 141, 255, 0.35);
  outline-offset: 1px;
}

.chat-input-row textarea::placeholder {
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-two-col {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

/* Центрирование гостевых экранов */
.lk-guest-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 88px);
  padding-bottom: 32px;
}

.lk-guest-inner {
  width: 100%;
  max-width: 440px;
}

.lk-home-inner {
  max-width: 480px;
}

.lk-auth-card {
  width: 100%;
}

/* Узкая колонка клиента */
.lk-client-inner {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.lk-page-title {
  margin: 0 0 18px;
  font-size: 24px;
  color: var(--dark);
  font-weight: 700;
}

/* Тариф-баннер со статус-пином */
.lk-tariff-banner {
  margin-bottom: 28px;
}

.lk-tariff-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.lk-tariff-banner-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--dark);
}

/* Пульсирующая зелёная точка статуса тарифа */
.lk-status-dot-banner {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1eb75f;
  box-shadow: 0 0 0 6px rgba(30, 183, 95, 0.12);
  animation: lk-pulse-dot 1.8s ease-in-out infinite;
}

@keyframes lk-pulse-dot {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(30, 183, 95, 0.12);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 10px rgba(30, 183, 95, 0.06);
  }
}

.lk-metric-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .lk-metric-strip {
    grid-template-columns: 1fr;
  }
}

.lk-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  min-height: 0;
}

.lk-metric-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent-strong);
}

.lk-metric-icon-block {
  display: block;
}

.lk-metric-value {
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
  line-height: 1.35;
}

.lk-metric-value-multiline {
  font-size: 14px;
}

/* Зоны на дашборде — список строк */
.lk-zone-list-after-banner {
  margin-top: 0;
}

.lk-zone-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lk-zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.lk-zone-row:hover {
  box-shadow: 0 12px 36px rgba(28, 56, 103, 0.12);
}

.lk-zone-row-main {
  flex: 1;
  min-width: 0;
}

.lk-zone-row-title {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--dark);
}

.lk-zone-teaser {
  margin: 0 0 8px;
  font-size: 14px;
}

.lk-zone-subtitle {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.lk-zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lk-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Запланированное ТО — дата в графике */
.lk-chip--scheduled {
  color: #0d6b3d;
  background: rgba(30, 183, 95, 0.14);
  border: 1px solid rgba(30, 183, 95, 0.35);
}

/* Нет даты ТО / заявка / прочий статус */
.lk-chip--idle {
  color: var(--accent-strong);
  background: rgba(77, 141, 255, 0.12);
  border: 1px solid rgba(77, 141, 255, 0.22);
}

.lk-zone-footnote {
  margin: 10px 0 0;
  font-size: 13px;
}

.lk-zone-meta {
  font-size: 13px;
}

.lk-zone-row-arrow-svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent-strong);
  opacity: 0.9;
}

.lk-zone-hero-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.lk-zone-hero-toolbar--compact {
  align-items: center;
  margin-bottom: 0;
}

.lk-zone-toolbar-btn {
  border-radius: 999px;
}

.button-link.lk-zone-toolbar-btn {
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  line-height: 1.2;
}

.lk-zone-hero--compact {
  padding-top: 18px;
}

.lk-zone-section-card {
  margin-top: 16px;
}

.lk-zone-card-heading {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.lk-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lk-table-zone {
  min-width: 520px;
}

.lk-link-inline {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.lk-link-inline:hover {
  text-decoration: underline;
}

.lk-table-file-hint {
  font-size: 13px;
  font-weight: 400;
}

.lk-manual-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.6;
}

.lk-manual-list li {
  margin-bottom: 6px;
}

.lk-admin-zone-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0;
}

.lk-admin-zone-block legend {
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
  padding: 0 6px;
}

.lk-manual-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lk-manual-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

@media (max-width: 640px) {
  .lk-manual-row {
    grid-template-columns: 1fr;
  }
}

.lk-btn-ghost-small {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--dark);
}

.lk-btn-ghost-small:hover {
  border-color: rgba(77, 141, 255, 0.35);
}

.lk-zone-back-btn {
  gap: 8px;
}

.lk-btn-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.lk-zone-hero-title {
  margin: 12px 0 12px;
  font-size: 22px;
  color: var(--dark);
}

.lk-zone-hero-title.lk-zone-hero-title--compact {
  margin: 8px 0 10px;
}

@media (max-width: 900px) {
  .lk-header-inner {
    flex-wrap: nowrap;
  }

  .lk-nav {
    display: none;
  }

  .lk-nav-burger {
    display: inline-flex;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .lk-zone-hero-toolbar--compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .button-link.lk-zone-toolbar-btn {
    min-width: 0;
    width: 100%;
    justify-content: center;
    padding: 0 10px;
    font-size: 13px;
  }

  .lk-table-zone {
    min-width: 0;
  }

  .lk-table-zone thead {
    display: none;
  }

  .lk-table-zone,
  .lk-table-zone tbody,
  .lk-table-zone tr,
  .lk-table-zone td {
    display: block;
    width: 100%;
  }

  .lk-table-zone tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-muted);
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  .lk-table-zone td {
    border: 0;
    padding: 6px 0;
  }

  .lk-table-zone td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--dark);
  }
}

.lk-zone-summary {
  font-size: 15px;
  line-height: 1.55;
}

.lk-section-title {
  margin: 28px 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.lk-history-shell {
  padding: 18px 20px;
  background: var(--surface-muted);
}

.lk-history-empty {
  margin: 0;
}

.lk-history-inner {
  gap: 16px;
}

.lk-history-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}

.lk-history-comment {
  margin: 0;
}

.lk-history-file-btn {
  padding: 8px 14px;
  font-size: 13px;
}

.lk-chat-heading {
  margin-bottom: 14px;
}

.chat-shell-client {
  min-height: min(420px, calc(100vh - 220px));
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

.chat-empty p {
  margin: 0;
  max-width: 280px;
}

.chat-msgs-empty {
  justify-content: center;
}

/* Select — как инпуты лендинга */
.lk-field select,
select.lk-select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background-color: var(--surface-muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f5a6c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  font-size: 15px;
  color: var(--text);
  appearance: none;
  cursor: pointer;
  min-height: 48px;
}

.lk-field select:focus,
select.lk-select:focus {
  outline: 2px solid rgba(77, 141, 255, 0.35);
  outline-offset: 1px;
}

.lk-field select:hover,
select.lk-select:hover {
  border-color: rgba(77, 141, 255, 0.35);
}

/* Админ-панель: акцентные текстовые ссылки (не трогаем .button-link и .brand) */
body.admin-panel .lk-nav a:not(.button-link) {
  color: var(--accent-strong);
}

body.admin-panel .lk-nav a:not(.button-link):hover,
body.admin-panel .lk-nav a:not(.button-link).is-active {
  color: var(--accent-strong);
  text-decoration: underline;
}

body.admin-panel .table-lite td a:not(.button-link),
body.admin-panel .table-lite th a:not(.button-link) {
  color: var(--accent-strong);
}

body.admin-panel .table-lite td a:not(.button-link):hover {
  text-decoration: underline;
}

body.admin-panel ul a:not(.button-link) {
  color: var(--accent-strong);
}

body.admin-panel ul a:not(.button-link):hover {
  text-decoration: underline;
}

.broadcast-segment {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-muted);
}

.broadcast-segment-opt {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-height: 44px;
  align-items: stretch;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.broadcast-segment-opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.broadcast-segment-opt span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  min-height: 100%;
  box-sizing: border-box;
}

.broadcast-segment-opt input:checked + span {
  background: var(--accent-strong);
  color: #fff;
}

.broadcast-recipients-wrap {
  margin-top: 4px;
}

.broadcast-recipients-table {
  margin: 0;
  min-width: 100%;
}

.broadcast-recipients-table th:first-child,
.broadcast-recipients-table td:first-child {
  width: 40px;
  text-align: center;
}

.admin-client-section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

