@font-face {
  font-family: "Manrope";
  src: url("../shop/assets/fonts/manrope-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../shop/assets/fonts/manrope-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../shop/assets/fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #05050e;
  --surface: rgba(9, 12, 28, 0.9);
  --surface-soft: rgba(13, 17, 36, 0.78);
  --ink: #eaf3ff;
  --muted: #8a9ab8;
  --line: #2a3a5e;
  --line-strong: #3f5585;
  --green: #1effcc;
  --green-strong: #6ff3c5;
  --terra: #e040fb;
  --danger: #ff8a7a;
  --shadow-sm: 0 16px 36px rgba(2, 4, 12, 0.5);
  --shadow-md: 0 28px 72px rgba(2, 4, 14, 0.68);
  --radius: 14px;
  --radius-lg: 22px;
  --duration-fast: 160ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 54% at 82% 8%, rgba(63, 85, 133, 0.22), transparent 62%),
    radial-gradient(ellipse 58% 48% at 18% 92%, rgba(224, 64, 251, 0.12), transparent 64%),
    linear-gradient(145deg, var(--page), #08091a 48%, var(--page));
  background-size: auto;
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

button:disabled,
select:disabled,
textarea:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  width: 100%;
  min-width: 0;
}

.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 22px;
  backdrop-filter: blur(22px) saturate(1.25);
  min-width: 0;
}

.auth-card--wide {
  width: min(100%, 680px);
}

.auth-card--dashboard {
  width: min(100%, 1240px);
}

.auth-card--simple {
  width: min(100%, 700px);
}

.auth-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: 2rem;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.15rem;
}

.auth-copy,
.auth-back,
.profile-feedback {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.auth-alert,
.auth-state {
  margin: 0;
  border: 1px solid rgba(224, 120, 88, 0.42);
  border-radius: var(--radius);
  background: rgba(224, 120, 88, 0.14);
  color: #ffc4b7;
  padding: 11px 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-state {
  display: grid;
  gap: 4px;
  border-color: rgba(30, 255, 204, 0.34);
  background: rgba(30, 255, 204, 0.12);
  color: var(--ink);
}

.auth-alert--compact {
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-state span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-state--warning {
  border-color: rgba(224, 120, 88, 0.5);
  background: rgba(224, 120, 88, 0.14);
}

.telegram-login-shell {
  display: grid;
  gap: 10px;
}

.telegram-widget {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.telegram-widget iframe {
  max-width: 100%;
}

.telegram-oidc-button {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 22px;
  background: #119af5;
  color: #fff;
  cursor: pointer;
  font-family: -apple-system, system-ui, Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 0 28px;
}

.telegram-oidc-button:hover {
  background: #1090e5;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.auth-link,
.auth-back,
.profile-tool {
  text-decoration: none;
  max-width: 100%;
}

.auth-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 900;
  transition: transform var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease, color var(--duration-fast) ease;
}

.auth-link--primary {
  border-color: var(--green);
  background: linear-gradient(130deg, var(--green), var(--green-strong), var(--terra));
  color: #030b10;
}

.auth-link--primary:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.auth-link--danger {
  border-color: rgba(224, 120, 88, 0.42);
  color: var(--danger);
  background: rgba(224, 120, 88, 0.14);
}

.auth-link:focus-visible,
.profile-tool:focus-visible {
  outline: 2px solid var(--green-strong);
  outline-offset: 3px;
}

.auth-back {
  color: var(--muted);
  font-weight: 800;
}

.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.profile-head--dashboard {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(30, 255, 204, 0.34);
  border-radius: 50%;
  background: rgba(30, 255, 204, 0.12);
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 900;
}

.profile-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 255, 204, 0.34);
  border-radius: var(--radius);
  background: rgba(30, 255, 204, 0.12);
  color: var(--green);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-status[data-mode="error"],
.profile-status[data-mode="warning"] {
  border-color: rgba(255, 138, 122, 0.52);
  background: rgba(255, 138, 122, 0.14);
  color: var(--danger);
}

.profile-status[data-mode="loading"] {
  border-color: rgba(138, 154, 184, 0.42);
  background: rgba(138, 154, 184, 0.12);
  color: var(--muted);
}

.profile-summary,
.profile-grid,
.profile-tools,
.profile-panel,
.profile-list,
.profile-form,
.profile-checks,
.profile-region-picks,
.profile-setting-block {
  display: grid;
  gap: 10px;
}

.profile-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.profile-metric,
.profile-section,
.profile-tool {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.profile-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.profile-section--plain {
  background: var(--surface);
}

.profile-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-metric,
.profile-tool {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.profile-tools--simple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-tools--quick {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-home {
  gap: 14px;
}

.profile-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-action-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px;
  text-decoration: none;
}

.profile-action-card:hover,
.profile-action-card:focus-visible {
  border-color: var(--green);
  background: rgba(30, 255, 204, 0.12);
}

.profile-action-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-action-card strong,
.profile-action-card small {
  overflow-wrap: anywhere;
}

.profile-action-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-accordion-stack {
  display: grid;
  gap: 10px;
}

.profile-accordion {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: clip;
}

.profile-accordion[open] {
  border-color: rgba(111, 243, 197, 0.34);
  background: rgba(9, 12, 28, 0.96);
}

.profile-accordion__summary {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.profile-accordion__summary::-webkit-details-marker {
  display: none;
}

.profile-accordion__summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  transition: transform var(--duration-fast) ease;
}

.profile-accordion[open] > .profile-accordion__summary::after {
  transform: rotate(225deg);
}

.profile-accordion__summary:hover {
  background: rgba(30, 255, 204, 0.08);
}

.profile-accordion__summary:focus-visible {
  outline: 2px solid var(--green-strong);
  outline-offset: -2px;
}

.profile-accordion__title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-accordion__title strong {
  overflow-wrap: anywhere;
}

.profile-accordion__meta {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.profile-accordion__body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.profile-section__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.profile-section__actions:empty {
  display: none;
}

.profile-section__actions:not(:has(.auth-link)) {
  display: none;
}

.profile-tool {
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.profile-tool:hover {
  border-color: var(--green);
  background: rgba(30, 255, 204, 0.12);
  transform: translateY(-1px);
}

.profile-metric span,
.profile-tool span,
.profile-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-metric strong,
.profile-tool strong {
  overflow-wrap: anywhere;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.profile-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.profile-form {
  gap: 12px;
}

.profile-setting-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.profile-setting-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-setting-block__head strong {
  font-size: 0.98rem;
}

.profile-setting-block__head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.profile-field {
  display: grid;
  gap: 6px;
}

.profile-field span,
.profile-check span,
.profile-mini-panel__head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-field input,
.profile-field select,
.profile-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 10px;
  outline: 0;
}

.profile-field textarea {
  min-height: 92px;
  resize: vertical;
}

.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
  border-color: var(--green);
}

.profile-permission-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 17, 36, 0.52);
  padding: 12px;
}

.profile-permission-card .profile-region-picks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-checks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-region-picks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 9px 10px;
}

.profile-check:has(input:checked) {
  border-color: rgba(30, 255, 204, 0.58);
  background: rgba(30, 255, 204, 0.13);
}

.profile-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.profile-check--compact {
  min-height: 36px;
}

.profile-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-mini-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.profile-mini-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 10px;
  text-decoration: none;
}

.profile-item:hover {
  border-color: var(--green);
  background: rgba(30, 255, 204, 0.12);
}

.profile-item--stacked {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.profile-item--stacked:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.profile-item__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-item__actions .auth-link {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.profile-share-output {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profile-note-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.profile-note-form .profile-field textarea {
  min-height: 72px;
}

.profile-recommendation-card {
  min-height: 112px;
}

.profile-list--compact .profile-item {
  min-height: 38px;
  padding: 8px;
}

.profile-item__main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-item__main strong,
.profile-item__main small,
.profile-item > span:last-child {
  overflow-wrap: anywhere;
}

.profile-item__main small,
.profile-item > span:last-child,
.profile-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.live-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.live-command-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 17, 36, 0.56);
  padding: 10px;
}

.live-command-bar .profile-check {
  width: auto;
}

.live-updated {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-left: auto;
}

.live-field {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 6px 9px;
}

.live-field span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-field select {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: 0;
}

.live-search {
  width: min(280px, 100%);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 9px 11px;
  outline: 0;
}

.live-search:focus {
  border-color: var(--green);
}

.live-filter {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 3px;
}

.live-filter__btn {
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-weight: 900;
}

.live-filter__btn.is-active {
  background: rgba(30, 255, 204, 0.14);
  color: var(--green);
}

.live-alert {
  border: 1px solid rgba(255, 138, 122, 0.48);
  border-radius: var(--radius);
  background: rgba(255, 138, 122, 0.14);
  color: #ffc4b7;
  padding: 11px 12px;
  line-height: 1.45;
}

.live-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 12px;
  align-items: start;
}

.live-map-panel,
.live-detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 17, 36, 0.52);
}

.live-map-panel {
  padding: 12px;
}

.live-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.live-panel-head strong {
  font-size: 0.94rem;
}

.live-panel-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.live-map {
  min-height: 360px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  align-content: start;
}

.live-user-node {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent),
    var(--surface-soft);
  color: var(--ink);
  padding: 11px;
  text-align: left;
}

.live-user-node::before {
  content: "";
  position: absolute;
  inset: 10px 10px auto auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 5px rgba(138, 154, 184, 0.10);
}

.live-user-node.is-active::before {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(30, 255, 204, 0.14);
}

.live-user-node.is-online::before {
  background: var(--green-strong);
}

.live-user-node:hover,
.live-user-node:focus-visible,
.live-user-node.is-selected,
.live-row:hover,
.live-row:focus-visible,
.live-row.is-selected {
  border-color: rgba(30, 255, 204, 0.58);
  background: rgba(30, 255, 204, 0.12);
}

.live-user-node:focus-visible,
.live-row:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.live-user-node__avatar,
.live-detail-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
}

.live-user-node__avatar {
  width: 44px;
  height: 44px;
}

.live-user-node__main,
.live-user-node__meta,
.live-user,
.live-status-cell,
.live-event__main,
.live-detail-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.live-user-node__main strong,
.live-user strong,
.live-detail-title h3 {
  overflow-wrap: anywhere;
}

.live-user-node__main small,
.live-user-node__meta small,
.live-user small,
.live-status-cell small,
.live-event small,
.live-event__main span,
.live-detail-title span {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.live-user-node__meta {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.live-badge {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-badge.is-active {
  border-color: rgba(30, 255, 204, 0.58);
  background: rgba(30, 255, 204, 0.14);
  color: var(--green);
}

.live-badge.is-online {
  border-color: rgba(111, 243, 197, 0.42);
  color: var(--green-strong);
}

.live-detail-panel {
  position: sticky;
  top: 14px;
  padding: 12px;
}

.live-detail {
  display: grid;
  gap: 12px;
}

.live-detail-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.live-detail-avatar {
  width: 52px;
  height: 52px;
  border-color: rgba(138, 154, 184, 0.44);
}

.live-detail-avatar.is-active {
  border-color: rgba(30, 255, 204, 0.68);
  color: var(--green);
}

.live-detail-avatar.is-online {
  color: var(--green-strong);
}

.live-detail-title h3,
.live-detail-timeline h4 {
  margin: 0;
}

.live-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-action-button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.live-detail-metric {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.live-detail-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-detail-metric strong,
.live-detail-row strong,
.live-detail-row a {
  overflow-wrap: anywhere;
}

.live-detail-row a {
  color: var(--green);
  font-weight: 900;
  text-align: right;
  text-decoration: none;
}

.live-detail-rows {
  gap: 8px;
}

.live-detail-timeline {
  display: grid;
  gap: 8px;
}

.live-table-wrap {
  overflow-x: auto;
}

.live-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.live-table--compact {
  min-width: 680px;
}

.live-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0 10px;
  text-align: left;
  text-transform: uppercase;
}

.live-table td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 10px;
  vertical-align: top;
}

.live-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
}

.live-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.live-row {
  cursor: pointer;
}

.live-feed {
  display: grid;
  gap: 8px;
}

.live-event {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.live-event.is-selected,
.live-event--compact {
  border-color: rgba(30, 255, 204, 0.34);
}

.live-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.live-insight-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 17, 36, 0.52);
  padding: 12px;
}

.live-mini-list {
  display: grid;
  gap: 8px;
}

.live-mini-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 9px 10px;
}

.live-mini-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.live-mini-item strong,
.live-mini-item small,
.live-mini-item b {
  overflow-wrap: anywhere;
}

.live-mini-item small {
  color: var(--muted);
  font-size: 0.76rem;
}

.live-mini-item b {
  color: var(--green);
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .auth-page {
    align-items: start;
    min-height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .auth-card {
    width: 100%;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
  }

  h1 {
    font-size: clamp(1.45rem, 8vw, 1.65rem);
  }

  h2 {
    font-size: 1.05rem;
  }

  .auth-copy,
  .auth-back,
  .profile-feedback {
    line-height: 1.45;
  }

  .telegram-login-shell,
  .telegram-widget {
    width: 100%;
    min-width: 0;
  }

  .telegram-widget iframe {
    width: 100% !important;
  }

  .telegram-oidc-button {
    width: 100%;
    min-height: 46px;
  }

  .profile-head--dashboard,
  .profile-summary,
  .profile-home-grid,
  .live-summary-grid,
  .live-insights,
  .profile-tools--simple,
  .profile-grid--two,
  .profile-checks,
  .profile-region-picks,
  .live-workspace,
  .live-detail-metrics {
    grid-template-columns: 1fr;
  }

  .profile-status {
    justify-self: start;
    width: 100%;
  }

  .live-actions {
    width: 100%;
    justify-content: stretch;
  }

  .live-search,
  .live-filter,
  .live-field,
  .live-command-bar .auth-link,
  .live-command-bar .profile-check {
    width: 100%;
  }

  .live-command-bar {
    align-items: stretch;
  }

  .live-updated {
    margin-left: 0;
  }

  .live-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-map {
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .live-detail-panel {
    position: static;
  }

  .auth-actions,
  .profile-section__head,
  .profile-section__actions,
  .profile-row,
  .profile-item,
  .profile-item--stacked,
  .profile-setting-block__head,
  .live-detail-row {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }

  .profile-setting-block__head span {
    text-align: left;
  }

  .live-panel-head,
  .live-event {
    align-items: stretch;
    flex-direction: column;
  }

  .live-panel-head span {
    text-align: left;
  }

  .auth-link,
  .profile-tool {
    width: 100%;
  }

  .auth-link,
  .auth-back,
  .profile-tool {
    min-height: 44px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }

  .profile-accordion__summary {
    grid-template-columns: minmax(0, 1fr) 16px;
  }

  .profile-accordion__meta {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .profile-row strong,
  .live-detail-row a {
    text-align: left;
    overflow-wrap: anywhere;
  }

  .profile-item--stacked {
    grid-template-columns: 1fr;
  }

  .profile-section,
  .profile-tool,
  .profile-metric,
  .profile-setting-block,
  .profile-mini-panel,
  .profile-item,
  .profile-permission-card,
  .live-map-panel,
  .live-detail-panel,
  .live-insight-panel {
    min-width: 0;
  }

  .profile-field input,
  .profile-field select,
  .profile-field textarea,
  .live-field select,
  .live-search {
    width: 100%;
  }

  .live-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .live-table {
    min-width: 620px;
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 12px;
    border-radius: 14px;
  }

  .profile-section,
  .profile-tool,
  .profile-metric,
  .profile-setting-block,
  .profile-mini-panel {
    padding: 12px;
  }

  .live-filter {
    grid-template-columns: 1fr;
  }

  .profile-avatar,
  .live-user-node__avatar,
  .live-detail-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }
}

@media (max-width: 360px) {
  .auth-page {
    padding-inline: 6px;
  }

  .auth-card {
    padding: 10px;
  }

  h1 {
    font-size: 1.36rem;
  }

  .auth-kicker {
    font-size: 0.68rem;
  }

  .auth-copy,
  .auth-alert,
  .auth-state,
  .auth-back,
  .profile-feedback {
    font-size: 0.9rem;
  }
}
