/* ===========================================================
   Shivan — стили личного кабинета (app.shivan.top)
   Источник: design/other-pages/Shivan Designs.html
   =========================================================== */

/* Layout */
.lk { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: var(--bg); font-family: var(--font-text); color: var(--ink); }

/* Sidebar */
.lk-side { background: var(--bg-2); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 24px; }
.lk-side .brand { padding: 4px 8px; }
.lk-nav { display: flex; flex-direction: column; gap: 2px; }
.lk-nav-group-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.lk-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); transition: background .15s, color .15s; text-decoration: none; }
.lk-nav a:hover { background: oklch(0.94 0.008 75 / 0.7); color: var(--ink); }
.lk-nav a.active { background: var(--ink); color: var(--bg); font-weight: 500; }
.lk-nav a .ico { width: 16px; height: 16px; flex-shrink: 0; }
.lk-nav a .badge { margin-left: auto; font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.lk-nav a.active .badge { background: oklch(0.28 0.012 60); color: var(--bg-2); }
.lk-side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.lk-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, oklch(0.78 0.06 60), oklch(0.62 0.08 50)); display: grid; place-items: center; color: white; font-family: var(--font-display); font-weight: 600; font-size: 12px; flex-shrink: 0; }
.lk-side-foot .who { font-size: 13px; font-weight: 500; line-height: 1.2; }
.lk-side-foot .plan { font-size: 11px; font-family: var(--font-mono); color: var(--muted); margin-top: 2px; }

/* Top bar */
.lk-main { display: flex; flex-direction: column; min-width: 0; }
.lk-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; border-bottom: 1px solid var(--line); }
.lk-crumbs { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.lk-crumbs .sep { opacity: .5; }
.lk-crumbs strong { color: var(--ink); font-weight: 500; }
.lk-top-actions { display: flex; gap: 8px; align-items: center; }
.lk-search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: white; border: 1px solid var(--line); font-size: 13px; color: var(--muted); width: 240px; }
.lk-search input { border: 0; background: transparent; outline: none; font: inherit; width: 100%; color: var(--ink); }

/* Content */
.lk-content { padding: 32px; flex: 1; min-width: 0; }
.lk-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.lk-page-head h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 40px; line-height: 1.05; margin: 0; }
.lk-page-head .lk-page-sub { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 56ch; }
.lk-page-head .lk-page-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Stat cards */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.stat-card .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat-card .val { font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -0.025em; margin-top: 8px; line-height: 1; }
.stat-card .delta { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; margin-top: 6px; padding: 2px 7px; border-radius: 999px; }
.stat-card .delta.up { background: oklch(0.92 0.05 145); color: oklch(0.4 0.1 145); }
.stat-card .delta.down { background: oklch(0.94 0.04 25); color: oklch(0.45 0.14 25); }

/* Empty state */
.empty { background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius-l); padding: 64px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.empty .hex { width: 56px; height: 56px; border-radius: 16px; background: white; border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.empty h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 0; }
.empty p { color: var(--muted); margin: 0; max-width: 50ch; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.tbl td { padding: 16px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tr:hover td { background: var(--bg-2); }
.tbl .site-name { font-weight: 600; font-family: var(--font-display); letter-spacing: -0.01em; }
.tbl .site-domain { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 2px; }
.tbl-wrap { background: white; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }

/* Channel chips */
.channel-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: white; border: 1px solid var(--line); font-size: 12px; }
.channel-chip .dot { width: 6px; height: 6px; border-radius: 2px; }

/* Sparkline-style chart */
.chart-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 14px; flex-wrap: wrap; }
.chart-svg { width: 100%; height: 220px; display: block; }
.chart-tabs { display: flex; gap: 4px; padding: 3px; background: var(--bg-2); border-radius: 999px; }
.chart-tabs button { padding: 6px 12px; border-radius: 999px; border: 0; background: transparent; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.chart-tabs button.active { background: var(--ink); color: var(--bg); }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 160px 1fr 100px 60px; gap: 16px; align-items: center; padding: 12px 0; }
.funnel-bar { height: 28px; border-radius: 8px; background: linear-gradient(90deg, var(--accent), oklch(0.7 0.12 50)); position: relative; }
.funnel-bar span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: white; font-family: var(--font-mono); font-size: 11px; font-weight: 500; }

/* Live preview widget */
.preview-stage { background: linear-gradient(135deg, oklch(0.94 0.008 75), oklch(0.88 0.01 70)); border: 1px solid var(--line); border-radius: 20px; padding: 24px; min-height: 480px; position: relative; overflow: hidden; }
.preview-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, oklch(0.85 0.01 70 / 0.5) 1px, transparent 1px), linear-gradient(to bottom, oklch(0.85 0.01 70 / 0.5) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 70%); pointer-events: none; }
.preview-page-shell { position: relative; background: white; border-radius: 12px; height: 100%; box-shadow: 0 10px 40px -16px oklch(0.2 0.01 60 / 0.3); padding: 16px; }
.widget-launcher { position: absolute; bottom: 16px; right: 16px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: white; box-shadow: 0 12px 28px -8px oklch(0.74 0.17 60 / 0.5); cursor: pointer; border: 0; }
.widget-launcher.dock-left { right: auto; left: 16px; }
.widget-panel { position: absolute; bottom: 84px; right: 16px; width: 320px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -20px oklch(0.2 0.01 60 / 0.4); overflow: hidden; }
.widget-head { padding: 14px 16px; background: var(--ink); color: var(--bg); display: flex; align-items: center; gap: 10px; }
.widget-head .ava { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); }
.widget-head .lbl { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.widget-head .sub { font-size: 11px; opacity: .7; margin-top: 1px; }
.widget-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; background: var(--bg-2); }
.bubble { padding: 10px 12px; border-radius: 14px; font-size: 13px; max-width: 75%; }
.bubble.in { background: white; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.out { background: var(--ink); color: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; }
.widget-channels { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: white; }
.widget-channels .ch { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); }

/* Auth (для логина/регистрации) */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--bg); }
.auth-side { background: var(--ink); color: var(--bg); padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; bottom: -180px; right: -180px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, oklch(0.74 0.17 60 / 0.35), transparent 70%); }
.auth-form-wrap { padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; }
.auth-form { max-width: 380px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.auth-foot { font-size: 13px; color: var(--muted); margin-top: 8px; }
.auth-foot a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.oauth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border-radius: 12px; background: white; border: 1px solid var(--line); font-size: 13px; font-weight: 500; font-family: var(--font-display); cursor: pointer; transition: border-color .2s; }
.oauth-btn:hover { border-color: var(--ink); }
.divider-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Toggle switch */
.sw { display: inline-block; width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; border: 0; padding: 0; }
.sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: left .2s; }
.sw.on { background: var(--ink); }
.sw.on::after { left: 18px; }

/* Step indicator */
.steps { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.steps .s { display: inline-flex; align-items: center; gap: 6px; }
.steps .s-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: white; }
.steps .s.active .s-num { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.steps .s.done .s-num { background: var(--accent); color: white; border-color: var(--accent); }
.steps .sep { width: 24px; height: 1px; background: var(--line-2); }

/* Code block */
.code { background: oklch(0.16 0.012 60); color: oklch(0.92 0.01 60); border-radius: 14px; padding: 16px 18px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; overflow: auto; position: relative; }
.code .tk-tag { color: oklch(0.78 0.14 250); }
.code .tk-attr { color: oklch(0.78 0.18 60); }
.code .tk-str { color: oklch(0.78 0.12 145); }
.code .tk-cmt { color: oklch(0.55 0.01 60); font-style: italic; }
.code-copy { position: absolute; top: 10px; right: 10px; padding: 5px 9px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; background: oklch(0.28 0.012 60); color: var(--bg); border-radius: 6px; border: 0; cursor: pointer; }

/* Domain pill */
.domain-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-family: var(--font-mono); font-size: 12px; background: white; border: 1px solid var(--line); }
.dot-status { width: 7px; height: 7px; border-radius: 50%; }
.dot-status.ok { background: oklch(0.7 0.14 145); box-shadow: 0 0 0 3px oklch(0.7 0.14 145 / 0.2); }
.dot-status.warn { background: var(--accent); box-shadow: 0 0 0 3px oklch(0.74 0.17 60 / 0.2); }
.dot-status.err { background: oklch(0.62 0.18 25); }

/* Paid lock overlay */
.lock-overlay { position: relative; }
.lock-overlay .lock-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, oklch(0.992 0.004 80) 60%); display: grid; place-items: end center; padding-bottom: 32px; pointer-events: none; }
.lock-card { background: var(--ink); color: var(--bg); border-radius: 18px; padding: 18px 22px; display: flex; align-items: center; gap: 16px; pointer-events: auto; max-width: 480px; box-shadow: 0 20px 60px -16px oklch(0.2 0.01 60 / 0.4); }
.lock-card .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.lock-card .txt { font-size: 13px; line-height: 1.4; }
.lock-card .txt strong { display: block; font-family: var(--font-display); font-size: 14px; margin-bottom: 2px; }

/* Messages */
.message-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.message { padding: 12px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.message.success { background: oklch(0.95 0.04 145); border-color: oklch(0.85 0.06 145); color: oklch(0.35 0.1 145); }
.message.error { background: oklch(0.96 0.03 25); border-color: oklch(0.88 0.06 25); color: oklch(0.4 0.14 25); }
.message.warning { background: var(--accent-soft); border-color: oklch(0.86 0.06 75); color: var(--accent-ink); }

/* Responsive */
@media (max-width: 960px) {
  .lk { grid-template-columns: 1fr; }
  .lk-side {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50;
    transform: translateX(-100%); transition: transform .2s var(--ease);
  }
  .lk-side.open { transform: translateX(0); }
  .lk-content { padding: 24px 18px; }
  .lk-top { padding: 14px 18px; }
  .lk-page-head h1 { font-size: 30px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .funnel-row { grid-template-columns: 120px 1fr 60px 40px; gap: 10px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form-wrap { padding: 32px 20px; }
}

@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .lk-page-head { flex-direction: column; align-items: stretch; }
  .lk-page-head .lk-page-actions { width: 100%; }
  .lk-search { width: 100%; }
  .tbl th:not(:first-child):not(:last-child),
  .tbl td:not(:first-child):not(:last-child) { display: none; }
}
