.filing-footer {
  padding: 16px 24px 24px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.filing-footer a {
  color: inherit;
  text-decoration: none;
}

.filing-footer a:hover {
  text-decoration: underline;
}

.filing-footer a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

:root {
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-soft: #f8f9fc;
  --ink: #111b30;
  --ink-soft: #526078;
  --muted: #7a879f;
  --line: #e7eaf1;
  --line-strong: #d9dee9;
  --accent: #da124c;
  --accent-strong: #bd083d;
  --accent-soft: #fff0f5;
  --blue: #3a67ef;
  --blue-soft: #eef3ff;
  --success: #16825d;
  --warning: #9a6400;
  --danger: #ad1745;
  --focus: #245ee8;
  --shadow-soft: 0 18px 55px rgba(35, 45, 73, 0.08);
  --shadow-float: 0 16px 34px rgba(218, 18, 76, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content: 1180px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 11% 8%, rgba(255, 223, 235, 0.72), transparent 26rem),
    radial-gradient(circle at 92% 17%, rgba(222, 232, 255, 0.75), transparent 28rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-150%);
}

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

:focus-visible {
  outline: 3px solid rgba(36, 94, 232, 0.42);
  outline-offset: 3px;
}

.site-header,
.page-shell {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-block;
  border-radius: 12px;
  background: linear-gradient(145deg, #f31d59, #c90840);
  box-shadow: 0 8px 18px rgba(218, 18, 76, 0.22);
}

.brand-mark span {
  position: absolute;
  display: block;
  width: 14px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.brand-mark span::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  right: -1px;
  bottom: -2px;
  background: #fff;
  transform: rotate(30deg);
}

.brand-mark span:first-child {
  top: 8px;
  left: 7px;
}

.brand-mark span:last-child {
  right: 6px;
  bottom: 7px;
}

.service-state {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 224, 234, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(10px);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.logout-button {
  min-height: 38px;
  padding: 8px 13px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 720;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.logout-button:hover:not(:disabled) {
  color: var(--accent-strong);
  background: #fff;
  border-color: #efb2c5;
}

.logout-button:disabled {
  opacity: 0.55;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2a321;
  box-shadow: 0 0 0 4px rgba(226, 163, 33, 0.12);
}

.service-state.is-ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22, 130, 93, 0.12);
}

.service-state.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(173, 23, 69, 0.12);
}

.hero {
  padding: 70px 0 54px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.hero h1 {
  max-width: 820px;
  margin: 12px auto 18px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-copy {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.8;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.query-panel,
.results-panel {
  background: var(--surface);
  border: 1px solid rgba(224, 227, 235, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.query-panel {
  position: sticky;
  top: 22px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.results-panel {
  min-height: 670px;
  padding: 30px;
  border-radius: var(--radius-xl);
}

.panel-heading,
.results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading {
  margin-bottom: 26px;
}

.panel-heading h2,
.results-heading h2 {
  margin: 6px 0 0;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.step-index {
  color: #e2e6ef;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.08em;
}

.field-group {
  margin: 0 0 21px;
  padding: 0;
  border: 0;
}

.field-group label,
.field-group legend {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: #9aa4b7;
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus {
  background: #fff;
  border-color: rgba(36, 94, 232, 0.55);
  box-shadow: 0 0 0 4px rgba(36, 94, 232, 0.08);
  outline: 0;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  padding-left: 42px;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 15px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -5px;
  bottom: -3px;
  background: var(--muted);
  border-radius: 2px;
  transform: rotate(45deg);
}

.field-hint,
.field-error {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  color: var(--danger);
  font-weight: 650;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  background: #f0f2f7;
  border-radius: 16px;
}

.segment-control label {
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.segment-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segment-control label > span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.segment-control input:checked + span {
  color: var(--ink);
  background: #fff;
  border-color: rgba(222, 225, 233, 0.8);
  box-shadow: 0 4px 12px rgba(31, 43, 69, 0.08);
}

.segment-control input:focus-visible + span {
  outline: 3px solid rgba(36, 94, 232, 0.42);
  outline-offset: 2px;
}

.segment-glyph {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid currentColor;
}

.mini-glyph {
  border-radius: 6px;
  transform: rotate(10deg);
}

.account-glyph {
  border-radius: 50%;
}

.all-glyph {
  position: relative;
  border-radius: 5px;
}

.all-glyph::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row.is-single-control {
  grid-template-columns: 1fr;
}

.compact-field select {
  padding-right: 30px;
  font-size: 12px;
}

.compact-field select:disabled {
  color: #7d89a7;
  background-color: #f1f3f8;
  border-color: #e2e6ef;
  opacity: 0.72;
}

.city-field {
  margin-top: 3px;
}

.city-control {
  position: relative;
}

.city-control select {
  padding-left: 47px;
  padding-right: 34px;
  color: #244288;
  background-color: var(--blue-soft);
  border-color: #dbe5ff;
  font-weight: 680;
}

.city-control select:hover:not(:disabled) {
  border-color: #b9caff;
}

.city-control select:disabled {
  color: #7d89a7;
  background-color: #f1f3f8;
  border-color: #e2e6ef;
  opacity: 1;
}

.scope-pin {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 13px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--blue);
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg) scale(0.72);
  pointer-events: none;
}

.scope-pin::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

.city-control select:disabled + .scope-pin,
.city-control:has(select:disabled) .scope-pin {
  border-color: #8d98af;
}

.city-control:has(select:disabled) .scope-pin::after {
  background: #8d98af;
}

.city-hint {
  min-height: 18px;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: 0;
  border-radius: 15px;
  box-shadow: var(--shadow-float);
  font-size: 14px;
  font-weight: 750;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 19px 38px rgba(218, 18, 76, 0.27);
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  opacity: 0.68;
  box-shadow: none;
}

.button-arrow {
  font-size: 19px;
  line-height: 1;
}

.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.primary-button.is-loading .button-arrow {
  display: none;
}

.primary-button.is-loading .button-spinner {
  display: inline-block;
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

.quick-searches button {
  min-height: 44px;
  padding: 5px 10px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.quick-searches button:hover {
  color: var(--accent);
  border-color: #f3b4c8;
}

.results-heading {
  padding: 2px 2px 24px;
  border-bottom: 1px solid var(--line);
}

.results-summary {
  max-width: 54%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

.results-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.results-stage {
  min-height: 510px;
}

.initial-state,
.empty-state,
.error-state {
  min-height: 510px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
  text-align: center;
}

.initial-state h3,
.empty-state h3,
.error-state h3 {
  margin: 26px 0 8px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.initial-state > p,
.empty-state > p,
.error-state > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.radar-visual {
  position: relative;
  width: 176px;
  height: 176px;
  overflow: hidden;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 240, 246, 0.74));
  border: 1px solid #f5dbe5;
  border-radius: 50%;
  box-shadow: 0 20px 46px rgba(218, 18, 76, 0.1);
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(218, 18, 76, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one { width: 52px; height: 52px; }
.ring-two { width: 103px; height: 103px; }
.ring-three { width: 154px; height: 154px; }

.radar-visual::before,
.radar-visual::after {
  content: "";
  position: absolute;
  background: rgba(218, 18, 76, 0.1);
}

.radar-visual::before {
  top: 13px;
  bottom: 13px;
  left: 50%;
  width: 1px;
}

.radar-visual::after {
  top: 50%;
  right: 13px;
  left: 13px;
  height: 1px;
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 74px;
  background: linear-gradient(25deg, rgba(218, 18, 76, 0.18), transparent 64%);
  transform-origin: 0 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.radar-point {
  position: absolute;
  z-index: 1;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(218, 18, 76, 0.12);
}

.point-one { top: 50px; left: 58px; }
.point-two { top: 104px; right: 38px; }
.point-three { right: 67px; bottom: 27px; }

.initial-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 12px;
}

.initial-features span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--success);
  font-weight: 800;
}

.loading-state {
  padding: 18px 0 0;
}

.loading-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.loading-caption::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(218, 18, 76, 0.1);
}

.loading-detail {
  margin: -2px 0 8px 16px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.skeleton-row {
  display: grid;
  grid-template-columns: 42px 48px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.skeleton {
  background: linear-gradient(90deg, #f0f2f6 25%, #f9fafc 48%, #f0f2f6 72%);
  background-size: 220% 100%;
  border-radius: 8px;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-rank { width: 26px; height: 18px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 15px; }
.skeleton-lines { display: grid; gap: 9px; }
.skeleton-line { width: 76%; height: 11px; }
.skeleton-line.short { width: 42%; }

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px 52px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-height: 94px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-item.is-target {
  position: relative;
  margin-inline: -12px;
  padding-inline: 14px;
  background: linear-gradient(90deg, var(--accent-soft), rgba(255, 240, 245, 0.3));
  border-bottom-color: transparent;
  border-radius: 16px;
}

.rank-number {
  color: #a0a8b8;
  font-size: 16px;
  font-weight: 780;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ranking-item:nth-child(1) .rank-number { color: #e29a17; font-size: 21px; }
.ranking-item:nth-child(2) .rank-number { color: #7b879d; font-size: 20px; }
.ranking-item:nth-child(3) .rank-number { color: #b87648; font-size: 19px; }

.entity-avatar {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #ef3e70, #e5a2b8);
  border: 1px solid rgba(208, 214, 226, 0.75);
  border-radius: 16px;
  font-size: 18px;
  font-weight: 780;
}

.entity-avatar.is-mini {
  background: linear-gradient(145deg, #416fe9, #9ab4fa);
}

.entity-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.entity-body {
  min-width: 0;
}

.entity-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.entity-title {
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-badge,
.target-badge,
.kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.verified-badge {
  color: #3157b6;
  background: var(--blue-soft);
}

.target-badge {
  color: var(--accent-strong);
  background: #ffe0eb;
}

.kind-badge {
  color: #4d5a72;
  background: #eef1f7;
}

.kind-badge.is-mini-program {
  color: #3157b6;
  background: var(--blue-soft);
}

.kind-badge.is-video-account {
  color: #8b4b10;
  background: #fff0d7;
}

.entity-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 6px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.entity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.entity-meta span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-meta strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.empty-visual,
.error-visual {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #f5ccd9;
  border-radius: 24px;
  font-size: 29px;
  font-weight: 800;
}

.error-visual {
  color: var(--danger);
  background: #fff1f4;
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.secondary-button,
.text-button {
  min-height: 44px;
  padding: 8px 15px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.secondary-button {
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.text-button {
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.auth-shell {
  width: min(calc(100% - 40px), 460px);
  margin-inline: auto;
  padding: clamp(46px, 9vw, 88px) 0 72px;
}

.auth-card {
  padding: 34px;
  background: var(--surface);
  border: 1px solid rgba(224, 227, 235, 0.92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h1 {
  margin: 8px 0 10px;
  font-size: clamp(27px, 6vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.auth-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.auth-error-summary {
  margin: 0 0 22px;
  padding: 13px 15px;
  color: var(--danger);
  background: #fff1f4;
  border: 1px solid #f5ccd9;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.auth-error-summary p,
.auth-error-summary ul {
  margin: 0;
}

.auth-error-summary ul {
  padding-left: 20px;
}

.auth-error-summary p + ul {
  margin-top: 5px;
}

.auth-error-summary a {
  color: inherit;
  text-underline-offset: 2px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  align-items: start;
  gap: 10px;
}

.captcha-control {
  display: grid;
  gap: 7px;
}

.captcha-image {
  width: 144px;
  height: 48px;
  display: block;
  object-fit: contain;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.captcha-image.is-loading {
  background: linear-gradient(90deg, #f0f2f6 25%, #f9fafc 48%, #f0f2f6 72%);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.captcha-refresh {
  width: 100%;
  min-height: 38px;
  padding-block: 5px;
}

.auth-note {
  margin: 20px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}

@keyframes status-pulse {
  50% { opacity: 0.45; }
}

@media (max-width: 920px) {
  .hero {
    padding-top: 52px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .query-panel {
    position: static;
  }

  #query-form {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    column-gap: 18px;
    align-items: end;
  }

  #query-form > .field-group,
  #query-form > fieldset {
    margin-bottom: 18px;
  }

  #query-form > .field-row,
  #query-form > .city-field,
  #query-form > .primary-button {
    grid-column: 1 / -1;
  }

  .results-panel {
    min-height: 620px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .page-shell {
    width: min(calc(100% - 24px), var(--content));
  }

  .site-header {
    min-height: 66px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .service-state {
    max-width: 46%;
    padding-inline: 9px;
  }

  .header-actions {
    gap: 6px;
  }

  .logout-button {
    min-height: 36px;
    padding-inline: 10px;
  }

  .service-state span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding: 44px 4px 36px;
    text-align: left;
  }

  .hero h1 {
    margin-inline: 0;
    font-size: clamp(37px, 12vw, 52px);
  }

  .hero-copy {
    margin-inline: 0;
    font-size: 14px;
  }

  .query-panel,
  .results-panel {
    padding: 20px;
    border-radius: 22px;
  }

  #query-form {
    display: block;
  }

  .field-row {
    gap: 9px;
  }

  .compact-field select {
    font-size: 16px;
  }

  .segment-control label > span {
    gap: 5px;
    font-size: 12px;
  }

  .segment-glyph {
    width: 16px;
    height: 16px;
  }

  .results-panel {
    min-height: 560px;
  }

  .results-heading {
    align-items: flex-end;
  }

  .results-summary {
    max-width: 58%;
    font-size: 12px;
  }

  .initial-state,
  .empty-state,
  .error-state {
    min-height: 430px;
    padding-inline: 0;
  }

  .radar-visual {
    width: 148px;
    height: 148px;
  }

  .ranking-item {
    grid-template-columns: 29px 44px minmax(0, 1fr);
    gap: 10px;
    min-height: 86px;
  }

  .entity-avatar {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .entity-description {
    -webkit-line-clamp: 2;
  }

  .entity-meta span:nth-child(n + 2) {
    display: none;
  }

}

@media (max-width: 480px) {
  .auth-shell {
    width: min(calc(100% - 24px), 460px);
    padding-top: 38px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 22px;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .captcha-control {
    grid-template-columns: 144px minmax(0, 1fr);
    align-items: center;
  }

  .captcha-refresh {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* User management */
.header-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.header-link:hover {
  color: var(--accent-strong);
  background: #fff;
  border-color: #efb2c5;
}

.admin-shell {
  padding: 54px 0 80px;
}

.admin-intro {
  max-width: 720px;
  margin-bottom: 34px;
}

.admin-intro h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.admin-intro > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.admin-panel {
  padding: 28px;
  background: var(--surface);
  border: 1px solid rgba(224, 227, 235, 0.92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.create-user-panel {
  position: sticky;
  top: 22px;
}

.admin-success,
.users-feedback {
  margin: 0 0 20px;
  padding: 13px 14px;
  color: #0d6849;
  background: #ecfbf5;
  border: 1px solid #bdebd9;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.users-feedback.is-error {
  color: var(--danger);
  background: var(--accent-soft);
  border-color: #f4bfd0;
}

.users-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.users-panel-heading h2 {
  margin: 6px 0 0;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.user-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.users-loading,
.users-empty,
.users-error {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 28px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.users-error p {
  margin: 0;
}

.inline-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e3e7ef;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.users-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.users-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 13px;
}

.users-table th,
.users-table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.users-table thead th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.users-table tbody th {
  color: var(--ink);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.users-table tbody tr:last-child > * {
  border-bottom: 0;
}

.role-badge,
.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: #2850ab;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.role-badge.is-admin {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.account-status {
  color: var(--success);
  background: #ecfbf5;
}

.user-delete-button {
  min-height: 34px;
  padding: 6px 11px;
  color: var(--danger);
  background: #fff;
  border: 1px solid #efc0cf;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 720;
}

.user-delete-button:hover {
  background: var(--accent-soft);
  border-color: #e892ad;
}

.protected-account {
  color: var(--muted);
  font-size: 12px;
}

.confirm-dialog {
  width: min(calc(100% - 32px), 430px);
  padding: 28px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(17, 27, 48, 0.24);
}

.confirm-dialog::backdrop {
  background: rgba(17, 27, 48, 0.42);
  backdrop-filter: blur(4px);
}

.confirm-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: var(--accent-soft);
  border: 1px solid #f3bfd0;
  border-radius: 15px;
  font-size: 24px;
  font-weight: 850;
}

.confirm-dialog h2 {
  margin: 18px 0 8px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.confirm-dialog p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.confirm-dialog-target {
  margin-top: 14px !important;
  padding: 11px 12px;
  color: var(--ink) !important;
  background: var(--surface-soft);
  border-radius: 11px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.danger-button {
  min-height: 42px;
  padding: 9px 16px;
  color: #fff;
  background: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 760;
}

.danger-button:hover:not(:disabled) {
  background: #8f1037;
}

.danger-button:disabled {
  opacity: 0.62;
}

@media (max-width: 920px) {
  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .create-user-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-shell {
    padding: 38px 0 60px;
  }

  .admin-intro {
    margin-bottom: 24px;
  }

  .admin-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .users-table-wrap {
    overflow: visible;
    border: 0;
  }

  .users-table {
    min-width: 0;
  }

  .users-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .users-table tbody,
  .users-table tr,
  .users-table th,
  .users-table td {
    display: block;
    width: 100%;
  }

  .users-table tr {
    margin-bottom: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
  }

  .users-table th,
  .users-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border: 0;
  }

  .users-table th::before,
  .users-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
  }

  .confirm-dialog-actions > * {
    flex: 1;
  }
}

