:root {
  color-scheme: dark;
  --red: #e30613;
  --red-soft: rgba(227, 6, 19, .14);
  --red-line: rgba(227, 6, 19, .38);
  --danger: #ff6b6b;
  --bg: #07090d;
  --bg-soft: #0a0d13;
  --panel: #10151d;
  --panel-2: #151c26;
  --panel-3: #1b2430;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .15);
  --text: #f7f8fb;
  --muted: #9ca6b5;
  --muted-2: #c2c8d1;
  --shadow: 0 24px 90px rgba(0, 0, 0, .42);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body.lk-shell {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% -8%, rgba(227, 6, 19, .2), transparent 30rem),
    radial-gradient(circle at 82% 4%, rgba(255, 255, 255, .06), transparent 24rem),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { overflow-wrap: normal; word-break: normal; }
h1 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(26px, 3.1vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}
h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.16;
  letter-spacing: 0;
}
h3 { margin: 0 0 8px; }
p { line-height: 1.55; }
code {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted-2);
}

.lk-top {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, .88);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
}
.lk-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.lk-brand img {
  display: block;
  width: 176px;
  max-width: 42vw;
  height: auto;
  object-fit: contain;
}
.lk-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
  transition: .18s ease;
}
.lk-back:hover {
  border-color: var(--red-line);
  color: #fff;
  transform: translateY(-1px);
}

.lk-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.lk-wrap-guest {
  display: block;
  min-height: calc(100vh - 70px);
}
.lk-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 13, 19, .98), rgba(7, 9, 13, .98));
}
.lk-nav-brand {
  display: flex !important;
  min-height: auto !important;
  margin: 0 0 14px;
  padding: 8px 10px 18px !important;
  border-bottom: 1px solid var(--line);
  border-radius: 0 !important;
}
.lk-nav-brand img {
  display: block;
  width: 178px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.lk-nav-site {
  margin-top: auto;
  border: 1px solid var(--line);
  justify-content: center;
}
.lk-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
  transition: .16s ease;
}
.lk-nav a:hover,
.lk-nav a.active {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
}
.lk-nav a.active {
  box-shadow: inset 3px 0 0 var(--red);
}
.lk-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.lk-main {
  width: 100%;
  max-width: 1320px;
  padding: 24px;
}
.lk-main-guest {
  max-width: 980px;
  margin: 0 auto;
  padding: 44px 20px 72px;
}
.lk-card,
.lk-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 28, 38, .92), rgba(16, 21, 29, .9));
  box-shadow: var(--shadow);
}
.lk-card { padding: 22px; }
.lk-panel { padding: 18px; }
.lk-card.narrow { max-width: 720px; margin: 40px auto; }
.lk-auth-card { max-width: 720px; margin: 20px auto; }
.lk-auth-card.wide { max-width: 900px; }
.lk-kicker {
  margin: 0 0 8px;
  color: #ff6570;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lk-muted,
.muted {
  color: var(--muted);
}
.success-panel {
  border-color: var(--red-line);
  background: rgba(227, 6, 19, .08);
}

.lk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lk-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lk-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lk-stat {
  display: block;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  transition: .16s ease;
}
.lk-stat b {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1;
}
.lk-stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
a.lk-stat:hover {
  border-color: var(--red-line);
  background: rgba(227, 6, 19, .08);
  transform: translateY(-2px);
}

.lk-notice {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--red-line);
  border-radius: 16px;
  background: rgba(227, 6, 19, .1);
}
.lk-notice strong { display: block; margin-bottom: 6px; color: #fff; }
.lk-notice p { margin: 0 0 12px; color: var(--muted-2); }

.lk-btn,
button.lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--red);
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: .16s ease;
}
.lk-btn:hover,
button.lk-btn:hover {
  background: #f01422;
  border-color: #f01422;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(227, 6, 19, .18);
}
.lk-btn.dark,
.lk-btn.light {
  background: rgba(255, 255, 255, .045);
  border-color: var(--line-strong);
  color: var(--text);
}
.lk-btn.danger {
  background: rgba(255, 107, 107, .14);
  border-color: rgba(255, 107, 107, .35);
  color: #ffd2d2;
}
.lk-btn.dark:hover,
.lk-btn.light:hover,
.lk-btn.danger:hover {
  border-color: var(--red-line);
  background: rgba(227, 6, 19, .11);
}
.lk-btn.disabled,
.lk-btn:disabled,
button.lk-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}
.lk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.lk-table .lk-actions {
  gap: 6px;
}
.lk-table .lk-actions form {
  margin: 0;
}
.lk-table .lk-actions .lk-btn {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}
.lk-inline-accrual {
  flex: 1 1 100%;
  width: min(360px, 82vw);
}
.lk-inline-accrual summary {
  list-style: none;
}
.lk-inline-accrual summary::-webkit-details-marker {
  display: none;
}
.lk-inline-accrual[open] summary {
  margin-bottom: 10px;
}
.lk-inline-accrual .lk-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 9, 13, .92);
}
.lk-actions + .lk-form,
.lk-actions + .lk-table-wrap {
  margin-top: 16px;
}

.lk-form {
  display: grid;
  gap: 12px;
}
.lk-form.grid,
.lk-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}
.lk-form label,
.lk-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
}
.lk-form input,
.lk-form select,
.lk-form textarea,
.lk-filters input,
.lk-filters select,
.lk-filters textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(7, 9, 13, .72);
  color: var(--text);
  font: inherit;
  outline: none;
  color-scheme: dark;
  appearance: none;
}
.lk-form select,
.lk-filters select {
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted-2) 50%),
    linear-gradient(135deg, var(--muted-2) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 22px,
    calc(100% - 16px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.lk-form input[type="date"]::-webkit-calendar-picker-indicator,
.lk-filters input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .75;
}
.lk-form input::placeholder,
.lk-form textarea::placeholder,
.lk-filters input::placeholder,
.lk-filters textarea::placeholder { color: #687382; }
.lk-form input:focus,
.lk-form select:focus,
.lk-form textarea:focus,
.lk-filters input:focus,
.lk-filters select:focus,
.lk-filters textarea:focus {
  border-color: var(--red-line);
  box-shadow: 0 0 0 4px rgba(227, 6, 19, .09);
}
.lk-form textarea,
.lk-filters textarea {
  min-height: 110px;
  resize: vertical;
}
body.lk-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.lk-shell select,
body.lk-shell textarea {
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background-color: rgba(7, 9, 13, .72);
  color: var(--text);
  font: inherit;
}
body.lk-shell input[type="file"] {
  padding: 12px 14px;
}
body.lk-shell select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted-2) 50%),
    linear-gradient(135deg, var(--muted-2) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 22px,
    calc(100% - 16px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
body.lk-shell input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .75;
}
body.lk-shell input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(7, 9, 13, .82);
  accent-color: var(--red);
  appearance: none;
  display: inline-grid;
  place-items: center;
}
body.lk-shell input[type="checkbox"]:checked {
  border-color: var(--red);
  background: var(--red);
}
body.lk-shell input[type="checkbox"]:checked::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.lk-form .wide,
.lk-filters .wide { grid-column: 1 / -1; }
.lk-check {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 11px !important;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
}
.lk-check input {
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  flex: 0 0 20px;
  margin-top: 2px;
  padding: 0;
  accent-color: var(--red);
  appearance: none;
}
.lk-check span { color: var(--text); font-weight: 650; line-height: 1.35; }

.lk-balance-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
}
.lk-balance-strip span {
  display: grid;
  gap: 3px;
}
.lk-balance-strip b {
  color: var(--text);
  font-size: 16px;
}

.lk-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 9, 13, .48);
}
table.lk-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}
.lk-table th,
.lk-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.35;
}
.lk-table th {
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
  white-space: nowrap;
}
.lk-table tr:last-child td { border-bottom: 0; }
.lk-table a { color: #ff6570; font-weight: 800; }
.lk-table .lk-btn { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: 12px; }

.lk-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}
.lk-badge.red {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: #ff8c94;
}
.lk-badge.ok {
  border-color: rgba(63, 185, 116, .35);
  background: rgba(63, 185, 116, .11);
  color: #8be6b2;
}

.lk-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 9, 13, .5);
}
.lk-copy strong { min-width: 0; word-break: break-word; }
.lk-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.lk-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff6b75);
}

.lk-flash,
.lk-flash-inline {
  padding: 12px 14px;
  border: 1px solid rgba(84, 220, 142, .25);
  border-radius: 12px;
  background: rgba(84, 220, 142, .09);
  color: #9af0bc;
  font-weight: 750;
}
.lk-flash { margin: 14px 24px 0; }
.lk-flash.error,
.lk-flash-inline.error {
  border-color: rgba(255, 107, 107, .35);
  background: rgba(255, 107, 107, .1);
  color: #ff9ca1;
}
.lk-empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-weight: 750;
  text-align: center;
}
.lk-small { font-size: 13px; }

.lk-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.lk-page-head .lk-actions { justify-content: flex-end; }
.lk-compact-card { padding: 18px; }
.lk-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lk-content-card,
.lk-contact-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
}
.lk-content-card p,
.lk-contact-card p { margin: 0; color: var(--muted); }
.lk-contact-card .lk-btn { width: fit-content; }
.lk-rating-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lk-rating-place {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(227, 6, 19, .14), rgba(255, 255, 255, .035));
}
.lk-rating-rank {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}
.lk-rating-place strong,
.lk-rating-place small {
  display: block;
  margin-top: 10px;
}
.lk-rating-place small { color: var(--muted); font-weight: 800; }
.lk-rating-table tr.is-current td {
  background: rgba(227, 6, 19, .1);
  color: #fff;
}
.lk-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}
.lk-password-wrap {
  position: relative;
  display: block;
}
.lk-password-wrap input {
  padding-right: 92px;
}
.lk-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  color: var(--muted-2);
  padding: 6px 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.lk-password-toggle:hover {
  border-color: var(--red-line);
  color: #fff;
}
pre.lk-panel {
  overflow-x: auto;
  white-space: pre;
}

@media (max-width: 1120px) {
  .lk-form.grid,
  .lk-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lk-grid,
  .lk-card-grid,
  .lk-balance-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  html,
  body.lk-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .lk-top { min-height: 64px; padding: 11px 14px; }
  .lk-brand img { width: 146px; }
  .lk-wrap {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .lk-nav {
    position: sticky;
    top: 0;
    z-index: 70;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    overflow: visible;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
  }
  .lk-nav-brand {
    margin: 0;
    padding: 4px 0 !important;
    border-bottom: 0;
  }
  .lk-nav-brand img { width: 126px; }
  .lk-menu-toggle { display: inline-flex; }
  .lk-nav-site { margin-top: 0; }
  .lk-nav a {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 38px;
    white-space: normal;
  }
  .lk-nav.is-open a { display: flex; }
  .lk-nav .lk-nav-brand { display: flex; grid-column: 1 / 2; }
  .lk-nav .lk-menu-toggle { grid-column: 2 / 3; grid-row: 1; }
  .lk-nav a.active { box-shadow: inset 0 -3px 0 var(--red); }
  .lk-main {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    padding: 16px 14px 72px;
  }
  .lk-main-guest { padding: 28px 14px 60px; }
  .lk-card,
  .lk-panel {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
    padding: 16px;
  }
  .lk-form.grid,
  .lk-filters,
  .lk-grid,
  .lk-grid.two,
  .lk-grid.four,
  .lk-rating-podium,
  .lk-card-grid,
  .lk-balance-strip { grid-template-columns: 1fr; }
  .lk-page-head { display: grid; }
  .lk-page-head .lk-actions { justify-content: flex-start; }
  .lk-copy { grid-template-columns: 1fr; }
  .lk-btn, button.lk-btn { width: 100%; }
  .lk-actions { width: 100%; }
  .lk-actions .lk-btn { flex: 1 1 180px; }
  .lk-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.lk-table { min-width: 720px; }
  .lk-inline-accrual {
    width: 100%;
    max-width: 100%;
  }
  .lk-inline-accrual .lk-form {
    width: 100%;
    min-width: 0;
  }
  body.lk-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.lk-shell select,
  body.lk-shell textarea {
    width: 100%;
  }
  h1 { font-size: clamp(25px, 8vw, 34px); }
}

@media (max-width: 480px) {
  .lk-main { padding-left: 10px; padding-right: 10px; }
  .lk-card,
  .lk-panel { padding: 14px; }
  .lk-table th,
  .lk-table td {
    padding: 9px 10px;
    font-size: 12px;
  }
  table.lk-table { min-width: 660px; }
  .lk-flash { margin-left: 10px; margin-right: 10px; }
}
