:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #171a16;
  --muted: #6c7269;
  --line: #dfe4da;
  --line-strong: #cbd3c3;
  --accent: #2f6f4e;
  --accent-soft: #e2efe6;
  --warn: #a66c1a;
  --error: #a13d3d;
  --success: #2f6f4e;
  --shadow: 0 24px 60px -35px rgba(28, 42, 31, 0.34);
  color-scheme: light;
  font-family: "Satoshi", "Geist", "Pretendard", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(246, 247, 244, 0.94)),
    radial-gradient(circle at 18% 12%, rgba(47, 111, 78, 0.10), transparent 28rem),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.auth-body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  padding: 32px;
  background:
    linear-gradient(135deg, #f8faf7 0%, #eef2ef 48%, #fbfaf6 100%),
    repeating-linear-gradient(90deg, rgba(23, 26, 22, 0.035) 0 1px, transparent 1px 74px);
}

.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.78), rgba(255,255,255,0.12) 42%, rgba(23,26,22,0.06)),
    repeating-linear-gradient(0deg, rgba(23, 26, 22, 0.035) 0 1px, transparent 1px 56px);
  opacity: 0.72;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  min-height: calc(100dvh - 64px);
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(320px, 0.86fr) minmax(360px, 1.14fr);
  gap: 28px;
}

.auth-shell::after {
  content: none;
}

.auth-panel {
  min-height: 620px;
  padding: 40px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow:
    0 36px 90px -54px rgba(23, 26, 22, 0.68),
    inset 0 1px 0 rgba(255,255,255,0.76);
  backdrop-filter: blur(22px);
}

.auth-panel-top,
.auth-brand,
.auth-status,
.field-label-row,
.auth-submit {
  display: flex;
  align-items: center;
}

.auth-panel-top {
  justify-content: space-between;
  gap: 18px;
}

.auth-brand {
  gap: 13px;
  min-width: 0;
}

.auth-brand-mark {
  width: 46px;
  height: 46px;
  border-color: rgba(23, 26, 22, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.auth-domain {
  margin: -4px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-status {
  min-height: 34px;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(203, 211, 195, 0.8);
  border-radius: 999px;
  background: rgba(255,255,255,0.62);
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: status-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.auth-title-block {
  align-self: center;
  padding: 58px 0 48px;
}

.auth-kicker {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.auth-title-block p:last-child {
  max-width: 31ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-panel h1,
.rail-head h1,
.workspace-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.auth-panel h1 {
  max-width: 10.6ch;
  font-size: 56px;
  line-height: 0.98;
  font-weight: 900;
  word-break: keep-all;
}

.auth-form {
  margin-top: 0;
  display: grid;
  gap: 16px;
}

.field-label-row {
  justify-content: space-between;
  gap: 12px;
}

.field-label-row span {
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-field input[type="password"] {
  height: 54px;
  border-radius: 8px;
  border-color: rgba(203, 211, 195, 0.92);
  background: rgba(255,255,255,0.82);
  padding: 0 16px;
}

.auth-field input[type="password"]::placeholder {
  color: rgba(108, 114, 105, 0.7);
}

.auth-field input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(47, 111, 78, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.86);
}

.auth-submit {
  min-height: 54px;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  padding: 0 13px 0 19px;
  box-shadow: 0 18px 35px -26px rgba(23, 26, 22, 0.76);
}

.auth-submit i {
  position: relative;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease;
}

.auth-submit i::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-1px) rotate(45deg);
}

.auth-submit:hover i {
  border-color: rgba(255,255,255,0.48);
  transform: translateX(2px);
}

.auth-visual {
  min-height: 620px;
  display: grid;
  align-items: center;
}

.visual-frame {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  padding: 28px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background:
    linear-gradient(145deg, #252a25 0%, #12150f 58%, #27382d 100%);
  box-shadow:
    0 40px 95px -55px rgba(23, 26, 22, 0.86),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08), transparent 34%, rgba(255,255,255,0.04)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 52px);
  opacity: 0.68;
}

.visual-topbar,
.visual-metrics,
.signal-board,
.visual-footer {
  position: relative;
}

.visual-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.visual-topbar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}

.visual-topbar b {
  margin-left: auto;
  color: rgba(255,255,255,0.68);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.visual-metrics {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 10px;
}

.visual-stat {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.065);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.visual-stat span,
.signal-row span,
.visual-footer span {
  color: rgba(255,255,255,0.58);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.visual-stat strong {
  color: #fff;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 36px;
  line-height: 0.9;
}

.visual-stat:not(.visual-stat-wide) strong {
  font-size: 24px;
}

.signal-board {
  align-self: center;
  display: grid;
  gap: 13px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.signal-row {
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  gap: 13px;
  align-items: center;
}

.signal-row i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.signal-row i::before {
  content: "";
  width: var(--w);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(168, 208, 181, 0.88), rgba(255,255,255,0.8));
  transform-origin: left;
  animation: signal-fill 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--d);
}

.signal-row b {
  color: rgba(255,255,255,0.82);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-align: right;
}

.visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.visual-footer i {
  width: 48px;
  height: 2px;
  background: rgba(168, 208, 181, 0.8);
}

.field-block {
  display: grid;
  gap: 9px;
}

label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input[type="password"],
input[type="number"] {
  height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 190px;
  resize: vertical;
  padding: 14px;
  line-height: 1.6;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 111, 78, 0.12);
}

.field-error {
  margin: 0;
  color: var(--error);
  font-size: 13px;
}

.primary-button,
.ghost-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.primary-button:hover {
  background: #263024;
}

.primary-button:active,
.ghost-button:active,
.tab-button:active {
  transform: translateY(1px) scale(0.99);
}

.dashboard-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
}

.control-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 30px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  background: rgba(255,255,255,0.74);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.rail-head {
  display: flex;
  gap: 16px;
  align-items: center;
}

.rail-head h1 {
  font-size: 22px;
  line-height: 1.05;
}

.collect-form {
  display: grid;
  align-content: start;
  gap: 22px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.toggle-pill {
  cursor: pointer;
}

.toggle-pill input,
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-pill span {
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  transition: all 160ms ease;
}

.toggle-pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
  align-items: end;
}

.switch-row {
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
}

.switch-row input:checked + span {
  color: var(--accent);
}

.full-button {
  width: 100%;
}

.rail-foot {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.rail-foot a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.workspace {
  min-width: 0;
  padding: 34px clamp(22px, 4vw, 58px) 56px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.workspace-header h2 {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1;
}

.export-actions {
  display: flex;
  gap: 8px;
}

.ghost-button {
  padding: 0 16px;
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  font-weight: 800;
}

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

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid;
  background: #fff;
  font-size: 14px;
}

.error-alert {
  border-color: rgba(161, 61, 61, 0.28);
  color: var(--error);
}

.success-alert {
  border-color: rgba(47, 111, 78, 0.28);
  color: var(--success);
}

.warn-alert {
  display: grid;
  gap: 6px;
  border-color: rgba(166, 108, 26, 0.28);
  color: var(--warn);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.metric-block {
  min-height: 118px;
  padding: 20px 22px;
  display: grid;
  align-content: space-between;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.58);
}

.metric-block:last-child {
  border-right: 0;
}

.metric-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-block strong {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.9;
  letter-spacing: 0;
}

.metric-block em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.service-panel,
.results-panel,
.empty-state {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.service-panel {
  padding: 22px;
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 18px;
}

.section-heading h3 {
  margin: 0;
  font-size: 18px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.service-bars {
  display: grid;
  gap: 12px;
}

.service-row {
  display: grid;
  grid-template-columns: 72px 1fr 48px;
  gap: 14px;
  align-items: center;
  font-size: 13px;
}

.service-row b {
  text-align: right;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.bar-track {
  height: 8px;
  background: #e8ece3;
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: grow-bar 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.empty-state {
  min-height: 310px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 42px;
}

.empty-state h3 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.empty-state p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.empty-line {
  width: 74px;
  height: 2px;
  background: var(--accent);
}

.results-panel {
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
}

.tab-button {
  min-width: 116px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.tab-button span {
  margin-left: 8px;
  color: var(--accent);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.tab-button.active {
  background: var(--ink);
  color: #fff;
}

.tab-button.active span {
  color: #b7d7c4;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #fbfcf9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

td {
  background: rgba(255,255,255,0.58);
}

tbody tr:hover td {
  background: #f3f7ef;
}

tbody tr.is-remembered td {
  background: #edf6ef;
}

.memory-col,
.memory-cell {
  width: 64px;
  text-align: center;
}

.memory-check {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.memory-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.memory-check span {
  width: 22px;
  height: 22px;
  display: block;
  border: 1px solid var(--line-strong);
  background: #fff;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.memory-check span::after {
  content: "";
  width: 9px;
  height: 5px;
  display: block;
  margin: 6px auto 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(-45deg);
}

.memory-check input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
}

.memory-check input:checked + span::after {
  opacity: 1;
}

.memory-check:active span {
  transform: scale(0.92);
}

.url-cell a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.empty-cell {
  height: 130px;
  text-align: center;
  color: var(--muted);
}

.loading-mask {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(246, 247, 244, 0.82);
  backdrop-filter: blur(16px);
}

.loading-mask.visible {
  display: grid;
}

.loading-panel {
  width: min(640px, calc(100vw - 36px));
  padding: 30px;
  display: grid;
  gap: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.94), rgba(248,250,247,0.9));
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: 8px;
  box-shadow:
    0 34px 80px -48px rgba(23, 26, 22, 0.72),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.loading-orbit {
  width: 54px;
  height: 54px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.loading-orbit::before {
  content: "";
  width: 34px;
  height: 34px;
  border: 1px solid rgba(47, 111, 78, 0.24);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: loading-spin 920ms linear infinite;
}

.loading-orbit span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.loading-orbit span:nth-child(1) { transform: translate(0, -25px); opacity: 0.95; }
.loading-orbit span:nth-child(2) { transform: translate(22px, 12px); opacity: 0.55; }
.loading-orbit span:nth-child(3) { transform: translate(-22px, 12px); opacity: 0.35; }

.loading-copy h3 {
  margin: -4px 0 8px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.08;
  word-break: keep-all;
}

.loading-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  word-break: keep-all;
}

.loading-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.loading-meta div {
  min-height: 78px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  border-right: 1px solid var(--line);
}

.loading-meta div:last-child {
  border-right: 0;
}

.loading-meta span,
.loading-steps span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.loading-meta strong {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 24px;
}

.loading-keywords {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loading-keywords span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.loading-steps {
  display: grid;
  gap: 10px;
}

.loading-steps div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 34px;
}

.loading-steps i {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  transition: background 240ms ease, border-color 240ms ease;
}

.loading-steps div.active i {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 5px #dfeee3;
}

.loading-steps div.active span {
  color: var(--ink);
}

.loading-progress {
  height: 8px;
  overflow: hidden;
  background: #e7ece5;
}

.loading-progress i {
  width: 38%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--accent), #b7d7c4);
  animation: loading-progress 1.3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.skeleton-line,
.skeleton-table i {
  display: block;
  background: linear-gradient(90deg, #eef1ea 0%, #f9faf6 45%, #eef1ea 90%);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  width: 62%;
  height: 16px;
  margin-bottom: 14px;
}

.skeleton-line.wide {
  width: 88%;
}

.skeleton-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.skeleton-table i {
  height: 36px;
}

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes grow-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

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

@keyframes loading-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.48; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes signal-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 980px) {
  .auth-shell,
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .auth-body {
    align-items: start;
  }

  .auth-shell {
    width: min(100%, 720px);
    min-height: auto;
    gap: 18px;
  }

  .auth-shell::after {
    display: none;
  }

  .auth-panel {
    min-height: auto;
  }

  .auth-title-block {
    padding: 54px 0 40px;
  }

  .auth-panel h1 {
    max-width: 10ch;
    font-size: 48px;
  }

  .auth-visual,
  .visual-frame {
    min-height: 340px;
  }

  .visual-frame {
    padding: 22px;
  }

  .control-rail {
    position: static;
    height: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .auth-body,
  .workspace,
  .control-rail {
    padding: 18px;
  }

  .auth-panel {
    padding: 28px;
  }

  .loading-panel {
    padding: 22px;
  }

  .loading-meta {
    grid-template-columns: 1fr;
    border-top-color: var(--line);
  }

  .loading-meta div {
    min-height: 64px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loading-meta div:last-child {
    border-bottom: 0;
  }

  .auth-panel-top {
    align-items: flex-start;
  }

  .auth-brand-mark {
    width: 42px;
    height: 42px;
  }

  .auth-status {
    display: none;
  }

  .auth-title-block {
    padding: 46px 0 34px;
  }

  .auth-panel h1 {
    max-width: 9ch;
    font-size: 38px;
  }

  .auth-title-block p:last-child {
    font-size: 15px;
  }

  .auth-submit {
    min-height: 52px;
  }

  .auth-visual {
    display: none;
  }

  .workspace-header,
  .section-heading {
    display: grid;
  }

  .metric-grid,
  .split-fields,
  .service-row {
    grid-template-columns: 1fr;
  }

  .metric-block {
    min-height: 104px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 420px) {
  .auth-body {
    padding: 14px;
  }

  .auth-panel {
    padding: 22px;
  }

  .auth-panel h1 {
    font-size: 34px;
  }

  .field-label-row span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-status span,
  .signal-row i::before,
  .loading-orbit::before,
  .loading-progress i {
    animation: none;
  }

  .auth-submit i {
    transition: none;
  }
}

/* Dashboard redesign */
.dashboard-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 76% 14%, rgba(39, 174, 96, 0.08), transparent 28rem),
    linear-gradient(135deg, #f8fafb 0%, #f4f7f5 52%, #fbfcfd 100%);
  color: #171b22;
}

.dashboard-body .dashboard-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.dashboard-body .control-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 24px 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  background: rgba(255,255,255,0.86);
  border-right: 1px solid #e8edf0;
  box-shadow: 20px 0 55px -46px rgba(31, 41, 55, 0.52);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.dashboard-body .rail-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-body .brand-mark {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #086c3b, #0f8a50);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 14px 26px -20px rgba(10, 122, 70, 0.75);
}

.dashboard-body .eyebrow {
  margin: 0 0 4px;
  color: #0b7d48;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.dashboard-body .rail-head h1 {
  font-size: 20px;
  line-height: 1.15;
}

.dashboard-body .collect-form {
  align-content: start;
  gap: 24px;
}

.dashboard-body label {
  color: #212934;
  font-size: 13px;
  font-weight: 850;
}

.keyword-field {
  gap: 11px;
}

.keyword-editor {
  overflow: hidden;
  border: 1px solid #e3e9ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px -30px rgba(31, 41, 55, 0.35);
}

.dashboard-body #keywords {
  min-height: 152px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  padding: 0;
  background:
    linear-gradient(#edf7f1, #edf7f1) 0 0 / 100% 40px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 39px, #edf1f3 39px 40px);
  color: #26313d;
  font-weight: 750;
  line-height: 40px;
  padding-left: 16px;
  padding-right: 34px;
}

.dashboard-body #keywords:focus {
  box-shadow: inset 0 0 0 2px rgba(21, 142, 82, 0.18);
}

.add-keyword-button {
  height: 42px;
  border: 1px solid #e3e9ed;
  border-radius: 8px;
  background: #fff;
  color: #2b3440;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 12px 26px -24px rgba(31, 41, 55, 0.5);
}

.add-keyword-button::before {
  content: "+";
  margin-right: 10px;
  font-size: 20px;
  font-weight: 500;
}

.dashboard-body .toggle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-body .toggle-pill span {
  height: 72px;
  display: grid;
  gap: 7px;
  place-items: center;
  border: 1px solid #e3e9ed;
  border-radius: 8px;
  background: #fff;
  color: #0d7a47;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 14px 28px -28px rgba(31, 41, 55, 0.45);
}

.dashboard-body .toggle-pill span i {
  width: 23px;
  height: 23px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.dashboard-body .service-toggle-cafe span i {
  border-radius: 999px 999px 8px 8px;
}

.dashboard-body .service-toggle-kin span i {
  border-radius: 999px;
}

.dashboard-body .toggle-pill input:checked + span {
  border-color: rgba(18, 142, 82, 0.22);
  background: #edf8f2;
  color: #0b7d48;
}

.dashboard-body .split-fields {
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 12px;
}

.dashboard-body input[type="number"] {
  height: 48px;
  border-radius: 8px;
  border-color: #dfe7eb;
  background: #fff;
}

.dashboard-body .switch-row {
  height: 48px;
  border-radius: 8px;
  border-color: #cce6d8;
  background: #edf8f2;
  color: #0b7d48;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-body .primary-button {
  min-height: 48px;
  border-radius: 8px;
  background: linear-gradient(145deg, #0b7d48, #128e52);
  box-shadow: 0 18px 34px -24px rgba(10, 122, 70, 0.76);
}

.dashboard-body .primary-button::before {
  content: "";
  width: 0;
  height: 0;
  margin-right: 10px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid currentColor;
}

.dashboard-body .rail-foot {
  padding-top: 20px;
  border-top: 0;
}

.dashboard-body .rail-foot a {
  color: #667381;
  font-size: 13px;
}

.dashboard-body .workspace {
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 52px) 42px;
}

.dashboard-body .workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 26px;
}

.result-status {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #27313d;
  font-size: 14px;
  font-weight: 760;
}

.result-status span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #45b982;
}

.result-status span::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.result-status.pending span {
  background: #cfd8de;
}

.dashboard-body .workspace-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  word-break: keep-all;
}

.dashboard-body .workspace-header h2 i {
  width: 28px;
  height: 28px;
  display: inline-block;
  background:
    radial-gradient(circle at 50% 8%, #45b982 0 4px, transparent 5px),
    radial-gradient(circle at 86% 44%, #45b982 0 3px, transparent 4px),
    radial-gradient(circle at 32% 66%, #45b982 0 5px, transparent 6px);
}

.dashboard-body .export-actions {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-body .ghost-button {
  min-height: 42px;
  border-radius: 8px;
  border-color: #e0e8ed;
  background: rgba(255,255,255,0.88);
  color: #25303b;
  box-shadow: 0 12px 26px -24px rgba(31, 41, 55, 0.55);
}

.download-button::before {
  content: "";
  width: 15px;
  height: 15px;
  margin-right: 9px;
  display: inline-block;
  border-bottom: 2px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) 6px 0 / 2px 10px no-repeat,
    linear-gradient(135deg, transparent 45%, currentColor 46% 54%, transparent 55%) 3px 6px / 9px 9px no-repeat;
}

.dashboard-body .alert {
  border-radius: 8px;
}

.dashboard-body .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  border: 0;
  margin-bottom: 20px;
}

.dashboard-body .metric-block {
  min-height: 156px;
  padding: 24px;
  display: grid;
  align-content: space-between;
  border: 1px solid #e5ebef;
  border-radius: 16px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 22px 50px -42px rgba(31, 41, 55, 0.62);
}

.metric-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.metric-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  color: var(--metric);
  border: 2px solid currentColor;
}

.icon-search {
  border-radius: 999px;
  position: relative;
}

.icon-search::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  right: -6px;
  bottom: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.icon-bars {
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) 2px 13px / 4px 9px no-repeat,
    linear-gradient(currentColor, currentColor) 9px 7px / 4px 15px no-repeat,
    linear-gradient(currentColor, currentColor) 16px 2px / 4px 20px no-repeat;
  border-bottom: 2px solid currentColor;
}

.icon-pie {
  border-radius: 999px;
  background: conic-gradient(currentColor 0 90deg, transparent 90deg);
}

.icon-trend {
  border: 0;
  background:
    linear-gradient(135deg, transparent 43%, currentColor 44% 56%, transparent 57%) 0 9px / 24px 10px no-repeat,
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 0 14px / 8px 8px no-repeat,
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 16px 0 / 8px 8px no-repeat;
}

.tone-green { --metric: #31ad6d; }
.tone-blue { --metric: #347fff; }
.tone-violet { --metric: #9747ff; }
.tone-orange { --metric: #ff8617; }

.dashboard-body .metric-block span {
  color: #293342;
  font-size: 13px;
  font-weight: 850;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dashboard-body .metric-block strong {
  font-size: 34px;
  line-height: 1;
}

.dashboard-body .metric-block em {
  color: #334155;
  font-size: 14px;
}

.metric-spark {
  height: 32px;
  display: flex;
  align-items: end;
  gap: 0;
}

.metric-spark i {
  height: 2px;
  flex: 1;
  background: var(--metric);
  opacity: 0.9;
}

.metric-spark i:nth-child(1) { height: 7px; opacity: 0.45; }
.metric-spark i:nth-child(2) { height: 12px; opacity: 0.65; }
.metric-spark i:nth-child(3) { height: 9px; opacity: 0.55; }
.metric-spark i:nth-child(4) { height: 14px; opacity: 0.75; }
.metric-spark i:nth-child(5) { height: 26px; }

.dashboard-body .service-panel,
.dashboard-body .results-panel,
.dashboard-body .empty-state {
  border: 1px solid #e5ebef;
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 24px 58px -48px rgba(31, 41, 55, 0.62);
}

.dashboard-body .service-panel {
  padding: 24px;
  margin-bottom: 22px;
}

.dashboard-body .section-heading {
  margin-bottom: 18px;
}

.dashboard-body .section-heading h3 {
  font-size: 20px;
}

.service-distribution {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.service-donut {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 41%, transparent 42%),
    conic-gradient(#31ad6d 0 var(--blog), #78c995 var(--blog) var(--cafe), #b6e2c6 var(--cafe) 360deg);
  box-shadow: inset 0 0 0 1px rgba(10, 122, 70, 0.08);
}

.service-donut span,
.service-donut em {
  color: #657281;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.service-donut strong {
  margin-top: -7px;
  font-size: 26px;
}

.dashboard-body .service-bars {
  gap: 18px;
}

.dashboard-body .service-row {
  grid-template-columns: 66px minmax(0, 1fr) 116px;
  gap: 18px;
}

.dashboard-body .bar-track {
  height: 8px;
  border-radius: 999px;
  background: #edf1f4;
}

.dashboard-body .bar-track i {
  border-radius: inherit;
  background: #31ad6d;
}

.dashboard-body .service-row b {
  color: #334155;
  font-size: 13px;
}

.dashboard-body .service-row b em {
  color: #7a8794;
  font-style: normal;
  font-weight: 650;
}

.dashboard-body .results-panel {
  padding: 22px;
  overflow: hidden;
}

.result-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 0 0 16px;
  background: transparent;
}

.dashboard-body .tabs {
  gap: 10px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.dashboard-body .tab-button {
  min-width: 92px;
  height: 42px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #fff;
  color: #26313d;
}

.dashboard-body .tab-button.active {
  border-color: #0b7d48;
  background: linear-gradient(145deg, #0b7d48, #15945a);
  color: #fff;
  box-shadow: 0 16px 30px -24px rgba(10, 122, 70, 0.78);
}

.dashboard-body .tab-button span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(49, 173, 109, 0.1);
  color: #0b7d48;
}

.dashboard-body .tab-button.active span {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.result-tools {
  display: flex;
  gap: 10px;
}

.result-search {
  position: relative;
  width: min(260px, 28vw);
}

.result-search span {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #9aa7b3;
  border-radius: 999px;
  transform: translateY(-50%);
}

.result-search span::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: #9aa7b3;
  transform: rotate(45deg);
}

.result-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 39px;
  border: 1px solid #e0e8ed;
  border-radius: 8px;
  background: #fff;
  color: #26313d;
  outline: 0;
}

.filter-button {
  height: 42px;
  min-width: 84px;
  border: 1px solid #e0e8ed;
  border-radius: 8px;
  background: #fff;
  color: #26313d;
  cursor: pointer;
  font-weight: 850;
}

.dashboard-body .table-wrap {
  border-top: 1px solid #e8edf0;
}

.dashboard-body table {
  min-width: 1080px;
}

.dashboard-body th,
.dashboard-body td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf1f4;
  font-size: 13px;
}

.dashboard-body th {
  background: rgba(249, 251, 252, 0.92);
  color: #617080;
  font-size: 12px;
}

.dashboard-body td {
  background: #fff;
  color: #334155;
}

.dashboard-body tbody tr:hover td {
  background: #f8fcfa;
}

.dashboard-body tbody tr.is-remembered td {
  background: #f1fbf5;
}

.dashboard-body .field-service-type {
  color: #0b7d48;
  font-weight: 900;
}

.dashboard-body .field-service-type::before {
  content: "";
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 3px;
  background: #d9f2e3;
}

.dashboard-body .url-cell a {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: transparent;
  border-radius: 999px;
  text-decoration: none;
}

.dashboard-body .url-cell a::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid #2e85ff;
  border-radius: 999px;
  transform: rotate(-35deg);
}

.dashboard-body .memory-col,
.dashboard-body .memory-cell {
  width: 48px;
}

.dashboard-body .memory-check span {
  border-radius: 6px;
}

.dashboard-body .empty-state {
  min-height: 360px;
}

@media (max-width: 1180px) {
  .dashboard-body .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-controls {
    grid-template-columns: 1fr;
  }

  .result-tools {
    justify-content: flex-start;
  }

  .result-search {
    width: min(100%, 360px);
  }
}

@media (max-width: 860px) {
  .dashboard-body .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-body .control-rail {
    position: static;
    height: auto;
  }

  .dashboard-body .workspace {
    padding: 24px 18px 36px;
  }

  .dashboard-body .workspace-header {
    display: grid;
  }

  .service-distribution {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-body .metric-grid,
  .dashboard-body .split-fields,
  .dashboard-body .service-row {
    grid-template-columns: 1fr;
  }

  .dashboard-body .toggle-grid {
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }

  .dashboard-body .export-actions,
  .result-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-search {
    width: 100%;
  }
}
