:root {
  --bg: #f5f5f7;
  --bg-elevated: #fafafa;
  --surface: #ffffff;
  --surface-2: #f8f7fc;
  --surface-3: #efeef5;
  --ink: #111118;
  --muted: #6b6b7b;
  --line: #e6e6ee;
  --line-strong: #d2d0de;
  --accent: #7c3aed;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(124, 58, 237, 0.12);
  --accent-strong: #6d28d9;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.1);
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, 0.1);
  --info: #6d28d9;
  --info-soft: rgba(124, 58, 237, 0.1);
  --sidebar-bg: #0a0a0c;
  --sidebar-line: #22222c;
  --sidebar-muted: #a1a1b2;
  --radius: 12px;
  --sidebar: 248px;
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
button, input, select, textarea { font: inherit; color: inherit; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar);
  min-width: var(--sidebar);
  max-width: var(--sidebar);
  padding: 20px 14px 16px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(124, 58, 237, 0.18), transparent 55%),
    #0b0b0f;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-logo {
  width: 18px;
  height: 18px;
  filter: invert(1);
  opacity: 0.95;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand strong {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.1;
  font-weight: 700;
}
.brand span {
  color: rgba(196, 181, 253, 0.78);
  font-size: 11px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-group-label {
  margin: 0 0 6px 10px;
  color: rgba(161, 161, 178, 0.72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 10px;
  margin: 0;
  border-radius: 12px;
  color: rgba(232, 232, 240, 0.78);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  color: rgba(196, 181, 253, 0.72);
  transition: color 0.15s ease;
}
.nav-ico svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.nav-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}
.nav a:hover .nav-ico {
  color: #ddd6fe;
}
.nav a.active {
  background: rgba(124, 58, 237, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.22);
}
.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #a78bfa;
}
.nav a.active .nav-ico {
  color: #ddd6fe;
}

.sidebar-foot {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-user-ava {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.sidebar-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-user-meta strong {
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-meta span {
  color: rgba(161, 161, 178, 0.85);
  font-size: 11px;
}
.sidebar-foot form { margin: 0; width: 100%; }
.logout-btn {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(232, 232, 240, 0.78);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.logout-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.main {
  padding: 24px 28px 48px;
  max-width: 1360px;
  background: var(--bg);
}
.main.is-page-enter > * {
  animation: page-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.main.is-page-enter > *:nth-child(1) { animation-delay: 0.02s; }
.main.is-page-enter > *:nth-child(2) { animation-delay: 0.06s; }
.main.is-page-enter > *:nth-child(3) { animation-delay: 0.1s; }
.main.is-page-enter > *:nth-child(4) { animation-delay: 0.14s; }
.main.is-page-enter > *:nth-child(5) { animation-delay: 0.18s; }
.main.is-page-enter > *:nth-child(n+6) { animation-delay: 0.2s; }

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0a0a0c;
}
.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.topbar .actions {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 14px;
}
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: 1.35fr 1fr; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-h {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-h h2, .card-h h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #3f3f50;
}
.card-b { padding: 14px; }

.stat {
  padding: 16px;
  position: relative;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}
.stat .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stat .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0a0a0c;
  font-family: var(--mono);
}
.stat .hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
}
tr:hover td { background: rgba(124, 58, 237, 0.04); }
td.mono, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--surface-3);
  color: #3f3f50;
  border: 1px solid var(--line);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(4, 120, 87, 0.2); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(180, 83, 9, 0.2); }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(220, 38, 38, 0.2); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: rgba(124, 58, 237, 0.22); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}
.btn.danger {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.25);
  color: var(--danger);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn.sm { padding: 6px 10px; font-size: 12px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters input, .field input, .field textarea {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  min-width: 160px;
  color: var(--ink);
}
.users-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
}
.users-filters .filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.users-filters .filter-more-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.users-filters .filter-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.users-filters .filter-more.is-open {
  grid-template-rows: 1fr;
}
.users-filters .filter-more-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  padding-top: 0;
  border-top: 1px solid transparent;
  transition:
    opacity 0.28s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    padding-top 0.35s ease,
    border-color 0.25s ease;
}
.users-filters .filter-more.is-open .filter-more-inner {
  opacity: 1;
  transform: translateY(0);
  padding-top: 12px;
  border-top-color: var(--line);
}
.users-filters .filter-row > input,
.users-filters .filter-more-inner > input {
  min-width: 0;
}
.users-filters .filter-row > input {
  padding: 8px 10px;
  min-width: 0;
}
.users-filters .filter-search {
  flex: 1 1 160px;
  min-width: 120px;
  width: auto;
}
.users-filters .filter-city {
  flex: 0 1 110px;
  min-width: 0;
  width: 110px;
}
.users-filters .filter-narrow {
  min-width: 0;
  width: 72px;
  flex: 0 0 72px;
}
.users-filters .filter-row > .c-select,
.users-filters .filter-row > select {
  width: 104px;
  min-width: 0 !important;
  max-width: 110px;
  flex: 0 0 104px;
}
.users-filters .filter-row > .c-select .c-select-trigger {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
}
.users-filters .age-range {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.users-filters .age-range:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.users-filters .age-range-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 2px;
}
.users-filters .age-range-sep {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
.users-filters .age-range input {
  width: 42px;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
  -moz-appearance: textfield;
}
.users-filters .age-range input:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}
.users-filters .age-range input::-webkit-outer-spin-button,
.users-filters .age-range input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.users-filters .filter-more-inner > .c-select,
.users-filters .filter-more-inner > select,
.users-filters .filter-more-inner > input {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 220px;
  width: auto;
}
.users-filters .filter-row > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.users-filters {
  margin-bottom: 16px;
}
.users-count-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  align-items: center;
}
.users-count-value {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-strong);
  line-height: 1;
}
.users-count-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.users-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.users-more-chevron {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.users-more-btn.is-open .users-more-chevron {
  transform: rotate(180deg);
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.user-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff 42%),
    var(--surface);
  border: 1px solid rgba(230, 230, 238, 0.95);
  border-radius: 22px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 28px rgba(17, 17, 24, 0.045);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.user-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.22s ease;
}
.user-card:hover {
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px rgba(76, 29, 149, 0.12);
  transform: translateY(-3px);
}
.user-card:hover::before { opacity: 1; }
.user-card.is-blocked {
  border-color: rgba(220, 38, 38, 0.22);
  background: linear-gradient(180deg, #fff7f7, #fff);
}
.user-card.is-blocked::before {
  opacity: 1;
  background: linear-gradient(90deg, #f87171, #ef4444);
}
.user-card-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 18px 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.user-card-main:hover { color: inherit; }
.user-card-ava {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  flex: 0 0 72px;
  background: linear-gradient(160deg, #ddd6fe, #c4b5fd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-strong);
  font-size: 24px;
  box-shadow: 0 10px 22px rgba(109, 40, 217, 0.16);
  isolation: isolate;
}
.user-card-ava img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-card-online {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.user-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}
.user-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.user-card-top h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-plan {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #3f3f50;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.user-card-plan.is-paid {
  background: var(--accent-soft);
  border-color: rgba(124, 58, 237, 0.18);
  color: var(--accent-strong);
}
.user-card-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.3;
}
.user-card-meta .is-muted { color: #9a9aab; font-weight: 500; }
.user-card-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #c9c9d6;
}
.user-card-blocked {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.16);
  font-size: 11px;
  font-weight: 700;
}
.user-card-bar {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(230, 230, 238, 0.9);
  background: linear-gradient(180deg, #fbfafd, #f7f6fb);
}
.user-card-ig {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 70%;
  color: #3f3f50;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.user-card-ig svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--accent);
}
.user-card-ig span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-card-ig:hover { color: var(--accent-strong); }
.user-card-ig.is-empty {
  color: #a0a0b0;
  font-weight: 500;
  font-size: 12px;
}
.user-card-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.user-card-tool {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4b4b5c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.user-card-tool svg {
  width: 16px;
  height: 16px;
}
.user-card-tool:hover {
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--accent-strong);
  background: #faf8ff;
  transform: translateY(-1px);
}
.user-card-tool.is-danger:hover {
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--danger);
  background: #fff7f7;
}
.user-card-form {
  display: inline-flex;
  margin: 0;
}
.users-grid img {
  max-width: 100%;
}
.users-pager {
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .user-card,
  .users-filters .filter-more,
  .users-filters .filter-more-inner,
  .users-more-chevron,
  .user-card:hover,
  .nav a,
  .nav-progress,
  .nav-progress-bar,
  .nav-boot-spinner,
  .skeleton,
  .spinner,
  .map-loading-ring,
  .btn.is-loading::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .main.is-page-enter > * {
    animation: none !important;
  }
  .users-filters .filter-more { grid-template-rows: 0fr; }
  .users-filters .filter-more.is-open { grid-template-rows: 1fr; }
}
.filters input:focus,
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Custom selects */
.c-select {
  position: relative;
  display: block;
  width: 200px;
  min-width: 180px;
  max-width: 240px;
  flex: 0 0 auto;
}
.c-select-native {
  display: none !important;
}
.c-select-trigger {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.c-select-trigger:hover {
  border-color: var(--accent);
}
.c-select.is-open .c-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.c-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c-select-chevron {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.c-select-chevron svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.c-select.is-open .c-select-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}
.c-select-menu {
  display: none;
  position: fixed;
  z-index: 1000;
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 17, 24, 0.12);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.4) rgba(124, 58, 237, 0.08);
}
.c-select-menu.is-open {
  display: block;
}
.c-select-menu::-webkit-scrollbar {
  width: 8px;
}
.c-select-menu::-webkit-scrollbar-track {
  background: rgba(124, 58, 237, 0.06);
  border-radius: 999px;
  margin: 4px 0;
}
.c-select-menu::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 999px;
}
.c-select-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.55);
}
.c-select-option + .c-select-option {
  margin-top: 2px;
}
.c-select-option {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.c-select-option:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.c-select-option.is-selected {
  background: var(--accent);
  color: #fff;
}
.c-select-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.c-select.is-disabled .c-select-trigger {
  opacity: 0.55;
  cursor: not-allowed;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field textarea { min-height: 80px; resize: vertical; }

.flash {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid transparent;
}
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(4, 120, 87, 0.2); }
.flash.err { background: var(--danger-soft); color: var(--danger); border-color: rgba(220, 38, 38, 0.2); }

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
}

.photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.photos img, .avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.photos a { display: block; }
.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}
.meta-list dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.meta-list dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0c;
}

/* ── User profile card ── */
.profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 48%, #a78bfa 100%);
  box-shadow: 0 18px 40px rgba(109, 40, 217, 0.14);
  overflow: hidden;
}
.profile-hero-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  flex: 1;
}
.profile-back {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.profile-back svg { width: 18px; height: 18px; }
.profile-back:hover {
  background: #fff;
  color: var(--accent-strong);
  transform: translateX(-2px);
}
.profile-ava {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(76, 29, 149, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-strong);
  padding: 0;
  margin: 0;
}
.profile-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-ava.is-clickable {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-ava.is-clickable:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(76, 29, 149, 0.28);
}
.profile-ava.is-clickable:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}
.profile-ava-count {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 18, 31, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.profile-ava.is-online::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #10b981;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  z-index: 2;
}
.profile-identity {
  min-width: 0;
  padding-top: 2px;
}
.profile-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-identity h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #1e1238;
}
.profile-id {
  font-size: 13px;
  color: rgba(30, 18, 56, 0.55);
}
.profile-sub {
  margin: 6px 0 0;
  color: rgba(30, 18, 56, 0.72);
  font-size: 14px;
}
.profile-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.profile-pill,
.profile-ico {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #1e1238;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.profile-pill svg,
.profile-ico svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.profile-pill:hover,
.profile-ico:hover {
  background: #fff;
  color: var(--accent-strong);
  transform: translateY(-1px);
}
.profile-ico {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.profile-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex: 0 1 auto;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.profile-actions form { margin: 0; }
.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.profile-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.profile-btn:hover { transform: translateY(-1px); }
.profile-btn-dark {
  background: #14121f;
  color: #fff;
  box-shadow: 0 10px 20px rgba(20, 18, 31, 0.18);
}
.profile-btn-dark:hover {
  background: #0a0a0c;
  color: #fff;
}
.profile-btn-danger {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 10px 20px rgba(185, 28, 28, 0.2);
}
.profile-btn-danger:hover {
  background: #991b1b;
  color: #fff;
}
.profile-btn-soft {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.85);
  color: #1e1238;
}
.profile-btn-soft:hover {
  background: #fff;
  color: var(--accent-strong);
}
.profile-btn-ghost {
  width: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.55);
  color: rgba(30, 18, 56, 0.7);
}
.profile-btn-ghost:hover {
  background: #fff;
  color: var(--danger);
}
.profile-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(20, 18, 31, 0.88);
  color: #f5f3ff;
  font-size: 12px;
  font-weight: 650;
}
.profile-status svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.profile-status.is-ok { background: #065f46; }
.profile-status.is-danger { background: #991b1b; }
.profile-status.is-warn { background: #92400e; }
.profile-status.is-online { background: #065f46; }
.profile-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.28);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.profile-main,
.profile-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.profile-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(17, 17, 24, 0.03);
}
.profile-panel-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.profile-panel-h h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.profile-panel-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  flex: 0 0 32px;
}
.profile-panel-ico svg {
  width: 16px;
  height: 16px;
}
.profile-count {
  margin-left: auto;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-fact {
  padding: 14px 14px 13px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.profile-fact span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.profile-fact strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.profile-fact a { color: inherit; }
.profile-fact a:hover { color: var(--accent-strong); }

/* Photo viewer lightbox */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.photo-viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.photo-viewer[hidden] { display: none !important; }
.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(124, 58, 237, 0.22), transparent 70%),
    rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.photo-viewer-stage {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s ease;
}
.photo-viewer.is-open .photo-viewer-stage {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.photo-viewer-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #14121f;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  aspect-ratio: 1;
  max-height: min(78vh, 820px);
  margin: 0 auto;
  width: min(100%, 78vh, 820px);
}
.photo-viewer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  transition: opacity 0.22s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo-viewer-img.is-swap {
  opacity: 0;
  transform: scale(1.03);
}
.photo-viewer-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 40px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 12, 0.72));
  color: #fff;
  pointer-events: none;
}
.photo-viewer-counter {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}
.photo-viewer-name {
  font-size: 14px;
  font-weight: 650;
  opacity: 0.92;
}
.photo-viewer-nav {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
.photo-viewer-nav svg {
  width: 20px;
  height: 20px;
}
.photo-viewer-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}
.photo-viewer-nav:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}
.photo-viewer-nav.is-prev { justify-self: end; }
.photo-viewer-nav.is-next { justify-self: start; }
.photo-viewer.is-single .photo-viewer-nav { display: none; }

.profile-bio {
  margin: 0;
  white-space: pre-wrap;
  color: #2a2a38;
  font-size: 14px;
  line-height: 1.55;
}
.profile-empty-inline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.profile-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  border: 1px solid rgba(220, 38, 38, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-alert strong {
  color: var(--danger);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-alert span {
  color: #7f1d1d;
  font-size: 13px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(124, 58, 237, 0.16);
  font-size: 13px;
  font-weight: 600;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(17, 17, 24, 0.03);
}
.profile-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.profile-stat strong {
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.profile-stat.is-warn strong { color: var(--warn); }

.profile-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 12px 18px;
  gap: 8px;
}
.profile-history-illu {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 4px;
}
.profile-history-illu svg { width: 28px; height: 28px; }
.profile-history-empty strong {
  font-size: 15px;
  color: var(--ink);
}
.profile-history-empty p {
  margin: 0;
  max-width: 240px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-timeline-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}
.profile-timeline-item:last-child { padding-bottom: 0; }
.profile-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 42px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.profile-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin: 12px auto 0;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  position: relative;
  z-index: 1;
}
.profile-timeline-ava {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #ddd6fe, #c4b5fd);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(124, 58, 237, 0.14);
  box-shadow: 0 6px 14px rgba(109, 40, 217, 0.1);
  position: relative;
  z-index: 1;
  text-decoration: none;
}
.profile-timeline-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-timeline-ava.is-empty { color: var(--accent-strong); }
.profile-timeline-item.is-report {
  grid-template-columns: 40px minmax(0, 1fr);
}
.profile-timeline-item.is-report .profile-timeline-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-soft);
}
.profile-timeline-item.is-date .profile-timeline-dot { background: var(--accent-2); }
.profile-timeline-item.is-like-in .profile-timeline-ava {
  box-shadow: 0 6px 14px rgba(4, 120, 87, 0.12);
  border-color: rgba(4, 120, 87, 0.18);
}
.profile-timeline-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.profile-timeline-top strong {
  font-size: 13px;
  color: var(--ink);
}
.profile-timeline-top time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.profile-timeline-body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #3f3f50;
  line-height: 1.4;
}
.profile-timeline-body p a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.profile-timeline-body p a:hover { color: var(--accent-strong); }
.profile-timeline-sub {
  display: inline;
  margin-left: 6px;
  color: var(--muted);
  font-weight: 500;
}
.profile-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.profile-crm-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}
.profile-crm-form:last-child { margin-bottom: 0; }
.profile-crm-form label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-crm-form select,
.profile-crm-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}
.profile-crm-form textarea { resize: vertical; min-height: 84px; }
.profile-crm-row {
  display: flex;
  gap: 8px;
}
.profile-crm-row select { flex: 1; }
.profile-crm-form .btn { width: 100%; }
.profile-crm-row .btn { width: auto; flex: 0 0 auto; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chat-card .card-b { padding: 0; }
.chat-thread {
  max-height: 72vh;
  overflow: auto;
}
.thread-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: #faf9fc; }
.thread-row.is-system { background: #faf8ff; }

.thread-ava {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.thread-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thread-ava.is-empty { background: var(--accent-soft); }

.thread-content { min-width: 0; }
.thread-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin-bottom: 2px;
}
.thread-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.thread-sub,
.thread-kind,
.thread-time {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  font-family: var(--font);
}
.thread-kind {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: #5b5670;
}
.thread-time { margin-left: auto; }

.thread-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.thread-row.is-system .thread-text {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}

.thread-photo img {
  display: block;
  margin-top: 4px;
  max-width: 180px;
  max-height: 140px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.vplay {
  --progress: 0%;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3efff;
  border: 1px solid rgba(124, 58, 237, 0.15);
}
.vplay-btn,
.voice-play {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 26px;
  padding: 0;
}
.vplay-btn:hover,
.voice-play:hover { background: var(--accent-strong); }
.vplay-btn svg,
.voice-play svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}
.vplay-btn .icon-pause,
.voice-play .icon-pause { display: none; }
.vplay.is-playing .icon-play,
.voice-player.is-playing .icon-play { display: none; }
.vplay.is-playing .icon-pause,
.voice-player.is-playing .icon-pause { display: block; }

.vplay-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 48px;
  height: 20px;
  display: flex;
  align-items: center;
}
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  width: 100%;
  height: 18px;
  mask-image: linear-gradient(90deg, #000 var(--progress), rgba(0,0,0,.22) var(--progress));
  pointer-events: none;
}
.voice-wave i {
  display: block;
  height: var(--h, 40%);
  min-width: 2px;
  border-radius: 999px;
  background: var(--accent);
  flex: 1 1 0;
}
.voice-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.vplay-time {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.vplay-time .voice-time {
  color: var(--ink);
  font-weight: 650;
}
.vplay-dl {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.vplay-dl:hover {
  color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-brand img {
  width: 28px;
  height: 28px;
}
.login-card h1 {
  margin: 0;
  font-size: 26px;
  color: #0a0a0c;
  letter-spacing: 0.04em;
}
.login-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}
.login-card .field { margin-bottom: 12px; }
.login-card .btn { width: 100%; margin-top: 8px; padding: 12px; }
.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.inline-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}
.inline-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}

.map-count {
  font-size: 13px;
}
.muted { color: var(--muted); }

.page-head-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  flex-wrap: wrap;
}
.page-head-filters .page-head-search {
  width: 200px;
  min-width: 150px;
  max-width: 240px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
}
.page-head-filters > .c-select,
.page-head-filters > select {
  width: 150px;
  min-width: 130px;
  max-width: 170px;
  flex: 0 0 auto;
}
.page-head-filters .c-select-trigger,
.page-head-filters select {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
}
.places-head .page-head-right {
  flex: 1 1 auto;
  justify-content: flex-end;
}
@media (max-width: 1100px) {
  .places-head {
    flex-wrap: wrap;
  }
  .places-head .page-head-right {
    width: 100%;
  }
  .page-head-filters {
    width: 100%;
  }
  .page-head-filters .page-head-search {
    flex: 1 1 180px;
    max-width: none;
  }
}

.places-map-shell {
  position: relative;
  height: calc(100vh - 180px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #eceaf3;
}
.places-map {
  width: 100%;
  height: 100%;
}

.map-pin {
  position: relative;
  width: 56px;
  height: 66px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 14px rgba(17, 17, 24, 0.22));
}
.map-pin-glow {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.18);
  pointer-events: none;
}
.map-pin-body {
  position: absolute;
  left: 4px;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  background: linear-gradient(160deg, #8b5cf6, #6d28d9);
  display: grid;
  place-items: center;
}
.map-pin-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map-pin-fallback {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.map-pin-rating {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 28px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #111118;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  border: 2px solid #fff;
}
.map-pin-point {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}

.place-sheet {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(360px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(214, 212, 228, 0.9);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(17, 17, 24, 0.16);
  overflow: auto;
  z-index: 5;
}
.place-sheet[hidden] { display: none !important; }
.place-sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 24, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.place-sheet-cover {
  height: 150px;
  background: linear-gradient(160deg, #ddd6fe, #c4b5fd) center/cover no-repeat;
}
.place-sheet-cover.empty {
  padding: 0;
  height: 150px;
}
.place-sheet-body {
  padding: 16px 16px 20px;
}
.place-sheet-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.place-sheet-body h2 {
  margin: 6px 0 4px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.place-sheet-address {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.place-sheet-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
}
.place-sheet-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}
.place-sheet-creator {
  margin-bottom: 16px;
}
.place-sheet-body h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.place-sheet-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.place-sheet-user strong {
  display: block;
  font-size: 13px;
}
.place-sheet-user small {
  color: var(--muted);
  font-size: 12px;
}
.place-sheet-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--accent-strong);
}
.place-sheet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-sheet-reviews {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.place-sheet-review {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.place-sheet-review p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.place-sheet-review-photos {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.place-sheet-review-photo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-3);
}
.place-sheet-body .btn {
  width: 100%;
  justify-content: center;
}

/* Analytics dashboards */
.page-head,
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff),
    var(--surface);
  box-shadow: 0 8px 20px rgba(17, 17, 24, 0.03);
}
.page-head-left,
.overview-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.page-head h1,
.overview-head h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}
.page-head-sep,
.overview-head-sep {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #c9c9d6;
  flex: 0 0 auto;
}
.page-head p,
.overview-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-tabs,
.overview-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.page-tab,
.overview-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.page-tab svg,
.overview-tab svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.page-tab:hover,
.overview-tab:hover {
  color: var(--accent-strong);
  background: rgba(124, 58, 237, 0.08);
}
.page-tab.is-active,
.overview-tab.is-active {
  background: var(--accent);
  color: #fff;
}
.page-tab.is-active:hover,
.overview-tab.is-active:hover {
  color: #fff;
  background: var(--accent-strong);
}
.page-head-actions,
.page-head-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-head-actions .btn {
  min-height: 30px;
  border-radius: 999px;
  font-size: 12.5px;
}
.page-head p a {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
}
.page-head p a:hover { color: var(--accent-strong); }
.page-head-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}
.page-head-period .period-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
}
.page-head-period > .c-select,
.page-head-period > #period-select {
  width: 148px;
  min-width: 132px;
  max-width: 170px;
  flex: 0 0 auto;
}
.page-head-period .c-select-trigger {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
}
.page-head-period #period-select {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
}
.overview-period-caption {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 820px) {
  .page-head,
  .overview-head {
    flex-wrap: wrap;
    padding: 10px;
  }
  .page-head-sep,
  .overview-head-sep { display: none; }
  .page-head p,
  .overview-head p {
    width: 100%;
    white-space: normal;
  }
  .page-head-right {
    width: 100%;
    justify-content: stretch;
  }
  .page-head-period {
    flex: 1 1 auto;
  }
  .page-tabs,
  .overview-tabs {
    width: 100%;
  }
  .page-tab,
  .overview-tab { flex: 1; }
  .page-head-period .period-custom {
    width: 100%;
  }
}

.period-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.period-custom[hidden] { display: none !important; }
.period-custom input[type="date"] {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  font-size: 12px;
  min-height: 30px;
}
.page-head-period .period-custom .btn {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
}
.analytics-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.analytics-status.err { color: var(--danger); }
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.analytics-kpi.live .value { color: var(--ok); }
.delta { font-weight: 700; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--muted); }
.analytics-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.analytics-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.analytics-card .card-b {
  max-height: 420px;
  overflow: auto;
}
.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.leader-row:hover { color: inherit; background: var(--surface-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.leader-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--accent-strong);
}
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-avatar .dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.leader-avatar .dot.online { background: #10b981; }
.leader-meta { flex: 1; min-width: 0; }
.leader-meta strong { display: block; font-size: 13px; }
.leader-meta small { color: var(--muted); font-size: 12px; }
.leader-value { font-size: 13px; text-align: right; white-space: nowrap; }
.leader-value small { color: var(--muted); font-weight: 500; }
.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
.bar-track {
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.mini-stats > div {
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.mini-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.mini-stats strong { font-size: 18px; }
.subhead {
  margin: 14px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-hero-right { align-items: stretch; }
  .profile-actions,
  .profile-status-row { justify-content: flex-start; }
  .profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-viewer-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .photo-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }
  .photo-viewer-nav.is-prev { left: 8px; }
  .photo-viewer-nav.is-next { right: 8px; }
  .photo-viewer-nav:hover { transform: translateY(-50%) scale(1.05); }
  .analytics-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-grid, .analytics-grid.three { grid-template-columns: 1fr; }
  .users-filters .filter-row {
    flex-wrap: wrap;
  }
  .users-filters .filter-search {
    flex: 1 1 180px;
  }
  .users-filters .age-range {
    order: 2;
  }
  .users-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .nav {
    flex-direction: column;
    width: 100%;
    overflow: visible;
  }
  .nav a {
    width: 100%;
    flex: 0 0 auto;
  }
  .main { padding: 16px 14px 40px; }
  .users-grid {
    grid-template-columns: 1fr;
  }
  .profile-hero { padding: 16px; border-radius: 20px; }
  .profile-hero-left { flex-wrap: wrap; }
  .profile-identity h1 { font-size: 22px; }
  .profile-ava { width: 72px; height: 72px; flex-basis: 72px; border-radius: 18px; }
  .profile-facts,
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-btn span,
  .profile-btn { font-size: 12px; }
  .photo-viewer { padding: 12px; }
  .photo-viewer-frame {
    border-radius: 22px;
    width: min(100%, 72vh);
  }
}

/* ── Page / async loading ─────────────────────────────── */
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2147483646;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.nav-progress.is-active,
html.is-nav-loading .nav-progress {
  opacity: 1;
}
.nav-progress.is-done .nav-progress-bar {
  width: 100% !important;
  transition: width 0.18s ease;
}
.nav-progress-bar {
  position: relative;
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #c4b5fd);
  background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.55);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: nav-progress-shine 1.1s linear infinite;
}
@keyframes nav-progress-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.nav-boot-veil {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: none;
  place-items: center;
  pointer-events: none;
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: blur(2px);
  transition: opacity 0.28s ease;
}
html.is-nav-loading .nav-boot-veil,
body.is-navigating .nav-boot-veil {
  display: grid;
}
.nav-boot-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(124, 58, 237, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.75s linear infinite;
  box-shadow: 0 0 0 10px rgba(124, 58, 237, 0.05);
}

body.is-navigating .main {
  pointer-events: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}
.spinner.lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: 10px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 90%
  );
  transform: translateX(-120%);
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  100% { transform: translateX(120%); }
}
.skeleton-line {
  height: 12px;
  margin-bottom: 10px;
}
.skeleton-line.short { width: 42%; }
.skeleton-line.mid { width: 68%; }
.skeleton-line.long { width: 92%; }
.skeleton-block {
  height: 180px;
  border-radius: 12px;
}
.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.skeleton-kpi {
  min-height: 92px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.skeleton-kpi .skeleton-line:last-child { margin-bottom: 0; }
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.skeleton-row .skeleton-meta {
  flex: 1;
  min-width: 0;
}

.analytics-status.is-loading {
  color: var(--accent-strong);
}
.analytics-panel.is-loading .analytics-card .card-b {
  min-height: 160px;
}
.analytics-fade-in {
  animation: analytics-fade 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes analytics-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(255, 255, 255, 0.72), rgba(236, 234, 243, 0.88));
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.map-loading[hidden] {
  display: none;
}
.map-loading.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.map-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.map-loading-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(124, 58, 237, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.06);
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.65s linear infinite;
}
.btn:not(.primary):not(.danger).is-loading::after {
  border-color: rgba(124, 58, 237, 0.25);
  border-top-color: var(--accent);
}

.login-page.is-page-enter .login-card {
  animation: page-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 820px) {
  body.is-navigating .main::after {
    inset: 0;
  }
}
