/* KölikHub LiDAR P06 Desktop Web — professional B2B workspace */
:root {
  color-scheme: light dark;
  --lidar-bg: #f4f6f8;
  --lidar-surface: #ffffff;
  --lidar-surface-alt: #eef2f5;
  --lidar-text: #17212b;
  --lidar-muted: #637081;
  --lidar-border: #d8e0e7;
  --lidar-accent: #125d8c;
  --lidar-accent-strong: #0b476d;
  --lidar-danger: #a33131;
  --lidar-warning-bg: #fff7df;
  --lidar-error-bg: #fff0f0;
  --lidar-success-bg: #eef8f2;
  --lidar-radius: 10px;
  --lidar-gap: 16px;
  --lidar-max: 1500px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 100%;
  min-height: 100%;
  background: var(--lidar-bg);
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: var(--lidar-bg);
  color: var(--lidar-text);
  font: 400 16px/1.5 var(--lidar-font, inherit);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--lidar-accent);
}

a:hover {
  color: var(--lidar-accent-strong);
}

:focus-visible {
  outline: 3px solid var(--lidar-accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--lidar-surface);
  color: var(--lidar-text);
  border: 1px solid var(--lidar-border);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-frame {
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 12px clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--lidar-border);
  background: color-mix(in srgb, var(--lidar-surface) 96%, transparent);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--lidar-text);
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.language-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-field select,
.field input,
.field select {
  min-height: 42px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--lidar-border);
  border-radius: 8px;
  background: var(--lidar-surface);
  color: var(--lidar-text);
}

.app-body {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  gap: 0;
  width: min(100%, var(--lidar-max));
  min-width: 0;
  margin: 0 auto;
}

.side-nav {
  position: sticky;
  top: 68px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  max-height: calc(100vh - 68px);
  padding: 20px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--lidar-border);
}

.side-nav a {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--lidar-text);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a[aria-current="page"] {
  background: var(--lidar-surface-alt);
  color: var(--lidar-accent-strong);
}

.main-content {
  min-width: 0;
  padding: clamp(20px, 3vw, 40px);
}

.page-section {
  min-width: 0;
  margin: 0 auto;
}

.page-heading {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.page-subtitle,
.muted {
  color: var(--lidar-muted);
}

.page-subtitle {
  max-width: 72ch;
  margin: 0 0 24px;
}

.metrics-grid,
.asset-grid,
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--lidar-gap);
  min-width: 0;
}

.metric-card,
.asset-card,
.org-card,
.source-card,
.radar-card,
.watch-card,
.record-card,
.detail-section,
.notice,
.login-panel,
.telegram-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--lidar-border);
  border-radius: var(--lidar-radius);
  background: var(--lidar-surface);
  overflow-wrap: anywhere;
}

.metric-label,
.card-row,
.metric-detail,
.state-meta {
  color: var(--lidar-muted);
  font-size: 0.92rem;
}

.metric-value {
  margin-top: 4px;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
}

.asset-card-top,
.card-actions,
.form-actions,
.freshness-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.asset-title {
  min-width: 0;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.asset-facts,
.detail-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--lidar-border);
  border-radius: 999px;
  background: var(--lidar-surface-alt);
  font-size: 0.82rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid var(--lidar-border);
  border-radius: 8px;
  background: var(--lidar-surface);
  color: var(--lidar-text);
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  border-color: var(--lidar-accent);
}

.button-primary {
  border-color: var(--lidar-accent);
  background: var(--lidar-accent);
  color: #ffffff;
}

.button-primary:hover {
  border-color: var(--lidar-accent-strong);
  background: var(--lidar-accent-strong);
  color: #ffffff;
}

.button-secondary {
  background: var(--lidar-surface-alt);
}

.button-danger {
  border-color: color-mix(in srgb, var(--lidar-danger) 55%, var(--lidar-border));
  color: var(--lidar-danger);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-weight: 650;
}

.radar-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.form-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.form-feedback {
  grid-column: 1 / -1;
  min-height: 1.5em;
  margin: 0;
}

.source-list,
.radar-list,
.watch-list,
.record-list,
.inbox-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.reason-list {
  margin: 10px 0 0;
  padding-left: 22px;
}

.inbox-asset {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--lidar-border);
}

.state-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--lidar-border);
  border-left-width: 5px;
  border-radius: var(--lidar-radius);
  background: var(--lidar-surface);
  overflow-wrap: anywhere;
}

.state-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.state-panel[data-state="ERROR"],
.state-panel[data-state="FORBIDDEN"] {
  border-left-color: var(--lidar-danger);
  background: var(--lidar-error-bg);
}

.state-panel[data-state="DEGRADED"],
.state-panel[data-state="NOT_READY"],
.state-panel[data-state="PAYWALLED"] {
  border-left-color: #9a6a00;
  background: var(--lidar-warning-bg);
}

.state-panel[data-state="EMPTY"],
.state-panel[data-state="SUCCESS"] {
  border-left-color: var(--lidar-accent);
}

.telegram-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.telegram-main {
  width: min(100%, 680px);
  padding: 0;
}

.login-panel,
.telegram-panel {
  max-width: 680px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lidar-bg: #11161c;
    --lidar-surface: #182029;
    --lidar-surface-alt: #202b35;
    --lidar-text: #edf3f8;
    --lidar-muted: #a8b5c2;
    --lidar-border: #34414d;
    --lidar-accent: #71b9e6;
    --lidar-accent-strong: #a7d8f5;
    --lidar-danger: #ff9d9d;
    --lidar-warning-bg: #292313;
    --lidar-error-bg: #2a1818;
    --lidar-success-bg: #14251b;
  }

  .button-primary {
    color: #07131b;
  }

  .button-primary:hover {
    color: #07131b;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .app-body {
    display: block;
  }

  .side-nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--lidar-border);
    overflow: visible;
  }

  .side-nav a {
    flex: 1 1 130px;
  }

  .main-content {
    padding: 20px 14px 32px;
  }
}

@media (max-width: 520px) {
  .language-field,
  .language-field select,
  .button,
  .form-actions .button {
    width: 100%;
  }

  .topbar-tools {
    align-items: stretch;
  }

  .asset-card-top,
  .card-actions,
  .form-actions,
  .freshness-row {
    align-items: stretch;
    flex-direction: column;
  }

  .side-nav a {
    flex-basis: 100%;
  }
}

@media (forced-colors: active) {
  .button,
  .status-chip,
  .state-panel,
  .metric-card,
  .asset-card,
  .org-card,
  .source-card,
  .radar-card,
  .watch-card,
  .record-card {
    border: 1px solid CanvasText;
  }
}

/* [KH-LIDAR-SITE-SHELL-01] Shared KolikHub public-site visual language. */
:root {
  color-scheme: dark;
  --lidar-bg: #050204;
  --lidar-surface: rgba(18, 8, 13, 0.78);
  --lidar-surface-alt: rgba(255, 255, 255, 0.045);
  --lidar-text: #fff4f5;
  --lidar-muted: #b99aa1;
  --lidar-border: rgba(255, 56, 76, 0.22);
  --lidar-accent: #ff1731;
  --lidar-accent-strong: #ff6677;
  --lidar-danger: #ff6677;
  --lidar-warning-bg: rgba(255, 209, 90, 0.075);
  --lidar-error-bg: rgba(255, 23, 49, 0.075);
  --lidar-success-bg: rgba(145, 255, 97, 0.065);
  --lidar-radius: 20px;
  --lidar-gap: 18px;
  --lidar-max: 1240px;
}

html,
body {
  background: var(--lidar-bg);
}
body {
  color: var(--lidar-text);
  background: #050204;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
  opacity: 0.42;
}

body::before {
  top: -12rem;
  left: -10rem;
  background: rgba(128, 0, 22, 0.62);
}

body::after {
  top: -15rem;
  right: -12rem;
  background: rgba(22, 185, 255, 0.22);
}

.app-frame {
  width: min(100%, calc(var(--lidar-max) + 32px));
  margin: 0 auto;
  padding: 14px 16px 28px;
}
.topbar {
  position: sticky;
  top: 14px;
  min-height: 76px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 56, 76, 0.18);
  border-radius: 24px;
  background: rgba(8, 3, 7, 0.76);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}

.brand {
  align-items: center;
  gap: 10px;
  color: var(--lidar-text);
  font-size: 1rem;
  letter-spacing: 0;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255,23,49,0.34));
}

.brand span {
  display: grid;
  line-height: 1.02;
}
.brand strong {
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.brand small {
  margin-top: 3px;
  color: #ff8a97;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar-tools {
  gap: 8px;
}

.language-field select {
  min-height: 42px;
  padding: 0 34px 0 13px;
  border: 1px solid rgba(255,56,76,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: var(--lidar-text);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}
.app-body {
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  margin-top: 18px;
}

.side-nav {
  top: 108px;
  gap: 7px;
  max-height: calc(100vh - 124px);
  padding: 14px;
  border: 1px solid rgba(255,56,76,0.18);
  border-radius: 22px;
  background: rgba(12, 5, 9, 0.72);
  box-shadow: 0 18px 60px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
}

.side-nav a {
  position: relative;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--lidar-muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.side-nav a:hover,
.side-nav a[aria-current="page"] {
  border-color: rgba(255,56,76,0.22);
  background: rgba(255,23,49,0.12);
  color: #fff4f5;
  transform: translateX(2px);
}

.side-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 99px;
  transform: translateY(-50%);
  background: var(--lidar-accent);
  box-shadow: 0 0 16px rgba(255,23,49,0.65);
}

.main-content {
  min-height: calc(100vh - 126px);
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(255,56,76,0.18);
  border-radius: 24px;
  background: rgba(12,5,9,0.86);
  box-shadow: 0 24px 80px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(18px);
}
.metric-card,
.asset-card,
.org-card,
.source-card,
.radar-card,
.watch-card,
.record-card,
.detail-section,
.notice,
.login-panel,
.telegram-panel {
  border-color: rgba(255,56,76,0.18);
  border-radius: 20px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 16px 44px rgba(0,0,0,0.18);
}

.page-heading {
  color: var(--lidar-text);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.page-subtitle,
.muted,
.metric-label,
.card-row,
.metric-detail,
.state-meta {
  color: var(--lidar-muted);
}
.button {
  min-height: 44px;
  padding: 0 16px;
  border-color: rgba(255,56,76,0.20);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: var(--lidar-text);
  font-weight: 800;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover {
  border-color: rgba(255,56,76,0.52);
  background: rgba(255,23,49,0.08);
  transform: translateY(-1px);
}

.button-primary {
  border-color: transparent;
  background: #b40c22;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(255,23,49,0.24), inset 0 1px 0 rgba(255,255,255,0.22);
}

.button-primary:hover {
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(255,23,49,0.34), inset 0 1px 0 rgba(255,255,255,0.24);
}
.state-panel {
  position: relative;
  max-width: 820px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255,56,76,0.22);
  border-left-width: 1px;
  border-radius: 22px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 22px 60px rgba(0,0,0,0.22);
}

.state-panel::before {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--lidar-accent);
  box-shadow: 0 0 18px rgba(255,23,49,0.52);
}

.state-title {
  max-width: 60ch;
  font-size: clamp(1.12rem, 2vw, 1.36rem);
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.state-meta {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.state-panel .button {
  margin-top: 18px;
}

.state-panel[data-state="ERROR"],
.state-panel[data-state="FORBIDDEN"] {
  border-color: rgba(255,69,86,0.34);
  background: rgba(255,23,49,0.085);
}

.state-panel[data-state="DEGRADED"],
.state-panel[data-state="NOT_READY"],
.state-panel[data-state="PAYWALLED"] {
  border-color: rgba(255,209,90,0.30);
  background: rgba(255,209,90,0.065);
}

.state-panel[data-state="DEGRADED"]::before,
.state-panel[data-state="NOT_READY"]::before,
.state-panel[data-state="PAYWALLED"]::before {
  background: #ffd15a;
  box-shadow: 0 0 18px rgba(255,209,90,0.38);
}
.state-panel[data-state="EMPTY"]::before,
.state-panel[data-state="SUCCESS"]::before {
  background: #91ff61;
  box-shadow: 0 0 18px rgba(145,255,97,0.34);
}

.status-chip {
  border-color: rgba(255,56,76,0.20);
  background: rgba(255,255,255,0.05);
  color: #ffd9dd;
}

.skip-link {
  border-color: rgba(255,56,76,0.28);
  background: #16070c;
  color: #fff4f5;
}

@media (max-width: 820px) {
  .app-frame { padding: 10px; }
  .topbar { position: relative; top: auto; flex-wrap: wrap; border-radius: 20px; }
  .brand { min-width: 0; }
  .topbar-tools { margin-left: auto; }
  .app-body { display: block; margin-top: 12px; }
  .side-nav { position: static; flex-direction: row; flex-wrap: nowrap; max-height: none; margin-bottom: 12px; overflow-x: auto; border-radius: 18px; }
  .side-nav a { flex: 0 0 auto; }
  .main-content { min-height: 58vh; border-radius: 20px; }
}
@media (max-width: 560px) {
  .topbar { align-items: stretch; }
  .brand img { width: 48px; height: 48px; }
  .topbar-tools { width: 100%; margin-left: 0; align-items: stretch; }
  .language-field { flex: 0 0 auto; width: auto; }
  .language-field select { width: auto; }
  .topbar-tools .button { flex: 1 1 auto; width: auto; }
  .main-content { padding: 18px; }
  .state-panel { padding: 20px; }
}

.module-about {
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid var(--lidar-border);
  border-radius: var(--lidar-radius);
  background: color-mix(in srgb, var(--lidar-surface) 88%, transparent);
}
.module-about summary { cursor: pointer; color: var(--lidar-text); font-weight: 700; }
.module-about p { max-width: 820px; margin: 10px 0 0; }
