/*
 * FINXO LK — Личный кабинет
 * Стили для всех страниц ЛК: layout, сайдбар, виджеты, карточки
 */

/* ============================================================
   LK LAYOUT — основная сетка (сайдбар + контент)
============================================================ */
.lk-wrap {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg);
}

.lk-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--bd);
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 16px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,142,247,0.3) transparent;
}

.lk-sidebar::-webkit-scrollbar { width: 4px; }
.lk-sidebar::-webkit-scrollbar-thumb { background: rgba(79,142,247,0.3); border-radius: 2px; }

.lk-content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 64px;
  overflow-x: hidden;
}

/* ============================================================
   LK SIDEBAR — навигация
============================================================ */
.lk-nav-section {
  padding: 0 12px;
  margin-bottom: 4px;
}

.lk-nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-m);
  padding: 0 8px;
  margin: 16px 0 6px;
}

.lk-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-b);
  text-decoration: none;
  transition: all var(--t);
  position: relative;
  margin-bottom: 2px;
}

.lk-nav-link:hover {
  color: var(--text-h);
  background: rgba(255,255,255,0.05);
}

.lk-nav-link.active {
  color: var(--blue);
  background: var(--blue-dim);
}

.lk-nav-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
}

.lk-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.lk-nav-link.active .lk-nav-icon { opacity: 1; }

.lk-nav-badge {
  margin-left: auto;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Пользователь в сайдбаре */
.lk-user-block {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--bd);
}

.lk-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--bd);
}

.lk-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #7B5EA7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.lk-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-h);
  line-height: 1.2;
}

.lk-user-phone {
  font-size: 11px;
  color: var(--text-m);
}

.lk-logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-m);
  transition: all var(--t);
  margin-top: 6px;
  width: 100%;
  text-align: left;
}

.lk-logout-btn:hover {
  color: var(--red);
  background: var(--red-dim);
}

/* ============================================================
   LK PAGE HEADER
============================================================ */
.lk-page-header {
  margin-bottom: 24px;
}

.lk-page-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-h);
  margin-bottom: 4px;
}

.lk-page-subtitle {
  font-size: 13.5px;
  color: var(--text-m);
}

/* ============================================================
   LK STAT CARDS (виджеты на дашборде)
============================================================ */
.lk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.lk-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: border-color var(--t), box-shadow var(--t);
  text-decoration: none;
  display: block;
}

.lk-stat-card:hover {
  border-color: var(--bd-hover);
  box-shadow: var(--shadow-card);
}

.lk-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-m);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lk-stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-h);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.lk-stat-change {
  font-size: 11.5px;
  font-weight: 600;
}

.lk-stat-change.up { color: var(--green); }
.lk-stat-change.down { color: var(--red); }
.lk-stat-change.neutral { color: var(--text-m); }

/* ============================================================
   LK CARDS — общие
============================================================ */
.lk-card {
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.lk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.lk-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-h);
}

.lk-card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: opacity var(--t);
}

.lk-card-link:hover { opacity: 0.75; }

/* ============================================================
   LK GRID — двухколоночная сетка
============================================================ */
.lk-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lk-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ============================================================
   TRANSACTIONS LIST
============================================================ */
.tx-list { display: flex; flex-direction: column; gap: 1px; }

.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tx-icon.income { background: var(--green-dim); }
.tx-icon.expense { background: var(--red-dim); }

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

.tx-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-h);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  font-size: 11.5px;
  color: var(--text-m);
  margin-top: 1px;
}

.tx-amount {
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.tx-amount.income { color: var(--green); }
.tx-amount.expense { color: var(--text-h); }

/* ============================================================
   CREDIT / DEPOSIT CARDS
============================================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color var(--t), box-shadow var(--t);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--bd-hover);
  box-shadow: var(--shadow-card);
}

.product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-bank-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.product-status.active {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-bd);
}

.product-status.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
}

.product-status.closed {
  background: rgba(255,255,255,0.04);
  color: var(--text-m);
  border: 1px solid var(--bd);
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 2px;
}

.product-bank {
  font-size: 12px;
  color: var(--text-m);
}

.product-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.product-metric-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-m);
  margin-bottom: 3px;
}

.product-metric-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-h);
  font-family: 'JetBrains Mono', monospace;
}

.product-metric-value.accent { color: var(--cyan); }
.product-metric-value.green { color: var(--neon-green); }

/* Progress bar */
.progress-wrap {
  margin-bottom: 10px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-m);
  margin-bottom: 5px;
}

.progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease-out);
}

.progress-fill.cyan { background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.progress-fill.green { background: linear-gradient(90deg, var(--neon-green), var(--green)); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), var(--neon-purple)); }
.progress-fill.amber { background: linear-gradient(90deg, var(--amber), #f97316); }

.product-next-payment {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: var(--bg-inner);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-b);
  border: 1px solid var(--bd);
}

/* ============================================================
   SCORING GAUGE
============================================================ */
.scoring-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 16px;
}

.scoring-gauge-svg {
  width: 200px;
  height: 120px;
}

.scoring-value {
  font-size: 42px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-h);
  letter-spacing: -2px;
  text-align: center;
  margin-top: -8px;
}

.scoring-max {
  font-size: 13px;
  color: var(--text-m);
  text-align: center;
  margin-bottom: 8px;
}

.scoring-grade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.scoring-grade.good {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-bd);
}

/* Scoring factors */
.scoring-factor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.scoring-factor:last-child { border-bottom: none; }

.scoring-factor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.scoring-factor-info { flex: 1; }

.scoring-factor-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-h);
  margin-bottom: 2px;
}

.scoring-factor-desc {
  font-size: 11.5px;
  color: var(--text-m);
}

.scoring-factor-score {
  font-size: 15px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-h);
}

/* ============================================================
   GOALS
============================================================ */
.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color var(--t);
}

.goal-card:hover { border-color: var(--bd-hover); }

.goal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.goal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.goal-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
}

.goal-deadline {
  font-size: 11.5px;
  color: var(--text-m);
}

.goal-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.goal-current {
  font-size: 20px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-h);
}

.goal-target {
  font-size: 13px;
  color: var(--text-m);
}

.goal-percent {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ============================================================
   AI ASSISTANT CHAT
============================================================ */
.lk-chat-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-h) - 80px);
  max-height: 780px;
}

.lk-chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-bottom: none;
}

.lk-chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7B5EA7, var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.lk-chat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
}

.lk-chat-status {
  font-size: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
}

.lk-chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
}

.lk-chat-demo-badge {
  margin-left: auto;
  padding: 3px 10px;
  background: var(--amber-dim);
  border: 1px solid var(--amber-bd);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
}

.lk-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-inner);
  border: 1px solid var(--bd-card);
  border-top: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,142,247,0.3) transparent;
}

.lk-chat-messages::-webkit-scrollbar { width: 4px; }
.lk-chat-messages::-webkit-scrollbar-thumb { background: rgba(79,142,247,0.3); border-radius: 2px; }

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
}

.chat-msg.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-msg.ai .chat-msg-avatar {
  background: linear-gradient(135deg, #7B5EA7, var(--cyan));
  color: #fff;
}

.chat-msg.user .chat-msg-avatar {
  background: var(--blue-dim);
  border: 1px solid var(--blue-bd);
  color: var(--blue);
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.65;
}

.chat-msg.ai .chat-bubble {
  background: rgba(123,94,167,0.1);
  border: 1px solid rgba(123,94,167,0.2);
  color: var(--text-b);
  border-radius: 4px 16px 16px 16px;
}

.chat-msg.user .chat-bubble {
  background: var(--blue-dim);
  border: 1px solid var(--blue-bd);
  color: var(--text-h);
  border-radius: 16px 4px 16px 16px;
}

.chat-bubble strong { color: var(--text-h); }
.chat-bubble .highlight { color: var(--cyan); font-weight: 700; }
.chat-bubble .positive { color: var(--green); font-weight: 700; }

.chat-time {
  font-size: 10.5px;
  color: var(--text-m);
  margin-top: 4px;
  text-align: right;
}

.chat-msg.ai .chat-time { text-align: left; }

/* Quick prompts */
.lk-chat-prompts {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-top: none;
  border-bottom: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.lk-chat-prompts::-webkit-scrollbar { display: none; }

.chat-prompt-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-inner);
  border: 1px solid var(--bd);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-b);
  white-space: nowrap;
  transition: all var(--t);
  cursor: pointer;
}

.chat-prompt-btn:hover {
  border-color: var(--blue-bd);
  color: var(--blue);
  background: var(--blue-dim);
}

/* Chat input */
.lk-chat-input-wrap {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  border-top: 1px solid var(--bd);
}

.lk-chat-input {
  flex: 1;
  background: var(--bg-inner);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-h);
  outline: none;
  resize: none;
  height: 44px;
  max-height: 120px;
  transition: border-color var(--t), box-shadow var(--t);
  font-family: inherit;
}

.lk-chat-input:focus {
  border-color: var(--blue-bd);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

.lk-chat-input::placeholder { color: var(--text-m); }

.lk-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t), transform 0.1s;
  cursor: pointer;
}

.lk-chat-send:hover { background: var(--blue-h); }
.lk-chat-send:active { transform: scale(0.95); }

/* ============================================================
   PROFILE
============================================================ */
.profile-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-inner) 100%);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(79,142,247,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.profile-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #7B5EA7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  border: 3px solid rgba(79,142,247,0.3);
}

.profile-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-h);
  letter-spacing: -0.3px;
}

.profile-meta {
  font-size: 13px;
  color: var(--text-m);
  margin-top: 2px;
}

.profile-since {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--blue-dim);
  border: 1px solid var(--blue-bd);
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--blue);
  font-weight: 600;
}

/* Profile form */
.profile-field {
  margin-bottom: 16px;
}

.profile-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-m);
  margin-bottom: 6px;
}

.profile-field input {
  width: 100%;
  height: 44px;
  background: var(--bg-inner);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  color: var(--text-h);
  font-size: 14px;
  font-weight: 500;
  padding: 0 14px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.profile-field input:focus {
  border-color: var(--blue-bd);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

/* ============================================================
   LOGIN PAGE
============================================================ */
.lk-login-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.lk-login-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(79,142,247,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(123,94,167,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.lk-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.lk-login-logo {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-h);
  margin-bottom: 4px;
}

.lk-login-logo em { color: var(--blue); font-style: normal; }
.lk-login-logo span { font-size: 13px; font-weight: 500; color: var(--text-m); margin-left: 6px; }

.lk-login-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-h);
  margin: 20px 0 4px;
  letter-spacing: -0.3px;
}

.lk-login-subtitle {
  font-size: 13.5px;
  color: var(--text-m);
  margin-bottom: 24px;
  line-height: 1.5;
}

.lk-login-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.lk-login-step {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--bd);
  transition: background 0.3s;
}

.lk-login-step.done { background: var(--blue); }
.lk-login-step.active { background: var(--blue); opacity: 0.5; }

.lk-login-field {
  margin-bottom: 14px;
}

.lk-login-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-m);
  margin-bottom: 6px;
}

.lk-login-input {
  width: 100%;
  height: 48px;
  background: var(--bg-inner);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  color: var(--text-h);
  font-size: 16px;
  font-weight: 600;
  padding: 0 16px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.lk-login-input:focus {
  border-color: var(--blue-bd);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

.lk-login-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--blue), #3b6fd4);
  color: #fff;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
  transition: opacity var(--t), transform 0.1s;
  box-shadow: 0 4px 16px rgba(79,142,247,0.35);
  cursor: pointer;
}

.lk-login-btn:hover { opacity: 0.9; }
.lk-login-btn:active { transform: scale(0.98); }

.lk-login-demo {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--amber-dim);
  border: 1px solid var(--amber-bd);
  border-radius: 10px;
  font-size: 12px;
  color: var(--amber);
  line-height: 1.5;
}

/* SMS code input */
.sms-code-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.sms-digit {
  flex: 1;
  height: 56px;
  background: var(--bg-inner);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  color: var(--text-h);
  font-size: 22px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.sms-digit:focus {
  border-color: var(--blue-bd);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

.lk-resend-btn {
  font-size: 12.5px;
  color: var(--text-m);
  cursor: default;
  transition: color var(--t);
}

.lk-resend-btn.active {
  color: var(--blue);
  cursor: pointer;
}

.lk-resend-btn.active:hover { opacity: 0.8; }

/* ============================================================
   RECOMMENDATIONS
============================================================ */
.rec-list { display: flex; flex-direction: column; gap: 10px; }

.rec-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-inner);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  transition: border-color var(--t);
}

.rec-item:hover { border-color: var(--bd-card); }

.rec-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.rec-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 2px;
}

.rec-desc {
  font-size: 12px;
  color: var(--text-m);
}

.rec-saving {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   CHART PLACEHOLDER (для SVG-графиков)
============================================================ */
.lk-chart-wrap {
  width: 100%;
  height: 180px;
  position: relative;
}

.lk-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .lk-stats { grid-template-columns: repeat(2, 1fr); }
  .lk-grid-2 { grid-template-columns: 1fr; }
  .lk-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .lk-sidebar { display: none; }
  .lk-content { padding: 20px 16px 80px; }
  .lk-mobile-nav { display: flex; }
}

@media (max-width: 600px) {
  .lk-stats { grid-template-columns: 1fr 1fr; }
  .lk-grid-3 { grid-template-columns: 1fr; }
  .product-metrics { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   MOBILE BOTTOM NAV
============================================================ */
.lk-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-panel);
  border-top: 1px solid var(--bd);
  z-index: 200;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.lk-mob-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: all var(--t);
  color: var(--text-m);
  font-size: 10px;
  font-weight: 500;
}

.lk-mob-link.active { color: var(--blue); }
.lk-mob-link svg { width: 20px; height: 20px; }

/* ============================================================
   MISC UTILITIES
============================================================ */
.lk-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.lk-badge.green { background: var(--green-dim); color: var(--green); border: 1px solid var(--green-bd); }
.lk-badge.red { background: var(--red-dim); color: var(--red); border: 1px solid var(--red-bd); }
.lk-badge.blue { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue-bd); }
.lk-badge.amber { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-bd); }
.lk-badge.purple { background: var(--purple-dim); color: var(--neon-purple); border: 1px solid var(--purple-bd); }

.lk-divider {
  height: 1px;
  background: var(--bd);
  margin: 16px 0;
}

.lk-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-m);
}

.lk-empty-icon { font-size: 40px; margin-bottom: 12px; }
.lk-empty-text { font-size: 14px; }

/* ============================================================
   NAV USER MENU & DROPDOWN
   Единый хедер — авторизованное состояние
============================================================ */
.nav-user-menu { position: relative; }

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--bd);
  cursor: pointer;
  transition: all var(--t);
  color: var(--text-h);
}

.nav-user-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--bd-hover);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #7B5EA7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-h);
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-panel);
  border: 1px solid var(--bd-card);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  z-index: 500;
  overflow: hidden;
  animation: fadeInDown 0.15s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd);
}

.nav-dd-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 2px;
}

.nav-dd-phone {
  font-size: 12px;
  color: var(--text-m);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--bd);
  margin: 4px 0;
}

.nav-dd-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-b);
  text-decoration: none;
  transition: all var(--t);
  width: 100%;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.nav-dd-link:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-h);
}

.nav-dd-logout {
  color: var(--red) !important;
}

.nav-dd-logout:hover {
  background: var(--red-dim) !important;
}
