:root {
  --ink: #17201c;
  --muted: #68726c;
  --line: #dfe5e1;
  --soft-line: #edf1ee;
  --bg: #f4f6f4;
  --surface: #ffffff;
  --green: #16774a;
  --green-dark: #0f5b38;
  --green-soft: #e8f4ed;
  --amber: #b46d16;
  --amber-soft: #fbf0df;
  --red: #b8453d;
  --red-soft: #fae9e7;
  --blue: #3e6d8c;
  --shadow: 0 18px 48px rgba(27, 48, 37, 0.07);
  font-family: "Avenir Next", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 5%, rgba(42, 135, 87, 0.07), transparent 28rem),
    var(--bg);
}

.login-page {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(22, 119, 74, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 88%, rgba(62, 109, 140, 0.12), transparent 26rem),
    #eff3f0;
}

.login-shell {
  width: min(100%, 440px);
}

.login-panel {
  padding: 38px;
  border: 1px solid rgba(223, 229, 225, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(20, 35, 28, 0.13);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand .brand-mark {
  background: var(--green-soft);
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 15px;
}

.login-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.login-copy {
  margin: 42px 0 28px;
}

.login-copy h1 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.login-copy > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 9px;
}

.login-form label {
  margin-top: 8px;
  color: #4f5c55;
  font-size: 12px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfcfb;
}

.login-form input:focus {
  border-color: var(--green);
  background: white;
}

.login-error {
  min-height: 18px;
  margin: 3px 0 0;
  color: var(--red);
  font-size: 11px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  justify-content: center;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-note {
  margin: 24px 0 0;
  color: #8b958f;
  font-size: 10px;
  text-align: center;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(22, 119, 74, 0.25);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 30px 20px 22px;
  background: #14231c;
  color: #eef5f1;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 30px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef8f2;
  color: var(--green);
}

.brand-mark svg {
  width: 27px;
  fill: currentColor;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand span {
  margin-top: 3px;
  color: #8fa99b;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  position: relative;
  border: 0;
  border-radius: 12px;
  padding: 12px 13px;
  color: #aabdb2;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 120ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-item:active {
  transform: scale(0.98);
}

.nav-item.active {
  background: #2b493b;
  color: #ffffff;
}

.nav-item svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d7f0e1;
  color: #155f3c;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 12px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-foot p {
  margin: 7px 0 0;
  color: #728e80;
  font-size: 11px;
}

.status-line {
  font-size: 12px;
  color: #c7d8cf;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #64c68f;
  box-shadow: 0 0 0 5px rgba(100, 198, 143, 0.1);
  animation: breathe 2.4s ease-in-out infinite;
}

.main-content {
  min-width: 0;
  padding: 32px 38px 48px;
}

.topbar {
  max-width: 1440px;
  margin: 0 auto 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-chip {
  padding: 10px 14px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.btn,
.text-button,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:active,
.text-button:active,
.icon-button:active {
  transform: scale(0.98);
}

.btn {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.btn svg,
.icon-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.btn.primary {
  background: var(--green);
  color: white;
}

.btn.primary:hover {
  background: var(--green-dark);
}

.btn.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.btn.secondary:hover {
  border-color: #c3cec7;
  background: #f9fbfa;
}

.btn.danger {
  background: var(--red-soft);
  color: var(--red);
}

.demo-banner {
  max-width: 1440px;
  margin: 0 auto 20px;
  padding: 10px 14px;
  border: 1px solid #e6d5b9;
  border-radius: 10px;
  color: #7a582b;
  background: #fdf9f1;
  font-size: 12px;
}

.demo-banner span {
  margin-right: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  background: #ead4ad;
  color: #68471b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.view {
  display: none;
  max-width: 1440px;
  margin: 0 auto;
  animation: enter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
  display: block;
}

.crawler-status {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}

.crawler-status[data-status="running"] {
  color: #7a582b;
  background: var(--amber-soft);
}

.crawler-status[data-status="error"],
.crawler-status[data-status="unknown"] {
  color: var(--red);
  background: var(--red-soft);
}

.crawler-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}

.crawler-form {
  padding: 0 22px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crawler-form .field {
  display: grid;
  gap: 7px;
}

.crawler-form .field.full {
  grid-column: 1 / -1;
}

.crawler-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label-row > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.field-label-row .text-button + .text-button {
  margin-left: 12px;
}

.platform-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.platform-option {
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfb;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.platform-option:has(input:checked) {
  border-color: #8ab89e;
  color: var(--green-dark);
  background: var(--green-soft);
}

.crawler-form .platform-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.platform-cookie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-cookie-grid > label {
  display: grid;
  gap: 6px;
}

.platform-cookie-grid > label.hidden {
  display: none;
}

.field-help {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.crawler-form input,
.crawler-form select,
.crawler-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fbfcfb;
  resize: vertical;
}

.crawler-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
}

.crawler-summary {
  padding: 0 22px 22px;
  display: grid;
  gap: 13px;
}

.crawler-summary > div {
  padding-bottom: 11px;
  border-bottom: 1px solid var(--soft-line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 12px;
}

.crawler-summary span,
.crawler-summary p {
  color: var(--muted);
}

.crawler-summary .crawler-batch-error {
  color: var(--red);
}

.crawler-summary p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.7;
}

.crawler-log-panel,
.crawler-files-panel {
  min-height: 260px;
}

.crawler-logs,
.crawler-files {
  max-height: 340px;
  padding: 0 22px 22px;
  overflow: auto;
  color: var(--muted);
  font-size: 11px;
}

.crawler-log {
  padding: 7px 0;
  border-bottom: 1px solid var(--soft-line);
  color: #445149;
  line-height: 1.5;
}

.crawler-log span {
  margin-right: 9px;
  color: #8b958f;
  font-variant-numeric: tabular-nums;
}

.crawler-log.error {
  color: var(--red);
}

.crawler-file {
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

.crawler-file strong,
.crawler-file span {
  display: block;
}

.crawler-file strong {
  color: var(--ink);
}

.crawler-file span {
  margin-top: 4px;
}

.metric-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
}

.metric {
  min-width: 0;
  padding: 19px 20px 17px;
  border-right: 1px solid var(--line);
}

.metric:first-child {
  padding-left: 0;
}

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

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-value {
  display: inline-block;
  margin-top: 6px;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.metric-note {
  margin-left: 7px;
  color: var(--muted);
  font-size: 10px;
}

.metric.urgent .metric-value {
  color: var(--red);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.panel-head {
  padding: 21px 22px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.workspace-head h2,
.report-shell h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.trend-panel {
  min-height: 350px;
}

.chart-wrap {
  height: 270px;
  padding: 0 20px 16px;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid {
  stroke: #e8edea;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #8a948e;
  font-size: 10px;
}

.chart-area {
  fill: url("#areaGradient");
}

.chart-volume,
.chart-negative {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-volume {
  stroke: var(--green);
  stroke-width: 3;
}

.chart-negative {
  stroke: #d79455;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.chart-dot {
  fill: white;
  stroke: var(--green);
  stroke-width: 2;
}

.legend {
  display: flex;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}

.legend-line.negative {
  background: #d79455;
}

.source-breakdown {
  padding: 0 22px 22px;
}

.source-row,
.city-row {
  margin-top: 15px;
}

.source-label,
.city-label {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.source-label strong,
.city-label strong {
  color: var(--ink);
  font-weight: 700;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1ee;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left;
  animation: grow 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.source-row:nth-child(2) .bar-fill {
  background: #4e8c69;
}

.source-row:nth-child(3) .bar-fill {
  background: #74a486;
}

.source-row:nth-child(n+4) .bar-fill {
  background: #9ebbaa;
}

.queue-panel {
  min-height: 320px;
}

.text-button {
  padding: 4px 0;
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.priority-list {
  border-top: 1px solid var(--soft-line);
}

.priority-item {
  width: 100%;
  padding: 16px 22px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 12px;
  text-align: left;
  transition: background 160ms ease;
}

.priority-item:hover {
  background: #f8faf8;
}

.priority-level {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.priority-level.high {
  background: var(--red);
}

.priority-copy strong,
.priority-copy span {
  display: block;
}

.priority-copy strong {
  font-size: 12px;
  line-height: 1.5;
}

.priority-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.priority-heat {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.city-panel {
  min-height: 320px;
}

.city-bars {
  padding: 3px 22px 22px;
}

.city-row {
  display: grid;
  grid-template-columns: 68px 1fr 22px;
  align-items: center;
  gap: 10px;
}

.city-row .city-label {
  margin: 0;
}

.city-count {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.workspace-head {
  margin: 4px 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.workspace-head h2 {
  font-size: 21px;
}

.workspace-head p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.segmented {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #edf1ee;
  display: flex;
}

.segmented button {
  border: 0;
  border-radius: 7px;
  padding: 7px 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.segmented button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 2px 8px rgba(24, 44, 34, 0.08);
}

.data-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f7f9f7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
}

.data-table td {
  padding: 16px 15px;
  border-bottom: 1px solid var(--soft-line);
  font-size: 11px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: #fbfcfb;
}

.event-title strong,
.event-title span {
  display: block;
}

.event-title strong {
  max-width: 360px;
  font-size: 12px;
  line-height: 1.45;
}

.event-title span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.source-chip,
.status-chip,
.level-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  white-space: nowrap;
}

.source-chip {
  padding: 4px 8px;
  color: var(--blue);
  background: #eaf0f4;
  font-size: 9px;
}

.status-chip {
  padding: 5px 8px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 700;
}

.status-chip.pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-chip.ignored {
  color: var(--muted);
  background: #edf0ee;
}

.ai-judgement strong,
.ai-judgement span {
  display: block;
}

.ai-judgement strong {
  font-size: 10px;
}

.ai-judgement span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.heat-cell {
  width: 90px;
}

.heat-number {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
}

.heat-track {
  width: 68px;
  height: 4px;
  border-radius: 9px;
  background: #ecefec;
}

.heat-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #dda865, #bd5145);
}

.row-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.row-action:hover {
  border-color: var(--green);
  color: var(--green);
}

.table-empty {
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.order-item {
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 140px minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 22px;
}

.order-main span,
.order-main strong {
  display: block;
}

.order-main span {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.order-main strong {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.order-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.progress-label {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.progress-label strong {
  color: var(--ink);
}

.progress-track {
  height: 7px;
  border-radius: 99px;
  background: #e9eeeb;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: transform 500ms ease;
  transform-origin: left;
}

.report-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.report-cover {
  min-height: 230px;
  padding: 38px 42px;
  color: white;
  background:
    linear-gradient(120deg, rgba(12, 61, 39, 0.98), rgba(22, 119, 74, 0.9)),
    #123c29;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-cover p {
  margin: 0;
  color: #b9d8c8;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.report-cover h2 {
  max-width: 620px;
  margin-top: 16px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.report-cover-meta {
  font-size: 11px;
}

.report-body {
  padding: 32px 42px 42px;
}

.report-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.report-stat-grid {
  margin: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.report-stat {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.report-stat:last-child {
  border-right: 0;
}

.report-stat span,
.report-stat strong {
  display: block;
}

.report-stat span {
  color: var(--muted);
  font-size: 10px;
}

.report-stat strong {
  margin-top: 7px;
  font-size: 24px;
}

.report-section {
  margin-top: 30px;
}

.report-section h3 {
  margin: 0 0 13px;
  font-size: 15px;
}

.report-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-section li {
  padding: 12px 0 12px 20px;
  border-top: 1px solid var(--soft-line);
  color: #465049;
  font-size: 12px;
  line-height: 1.7;
  position: relative;
}

.report-section li::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 29, 22, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(520px, 100vw);
  background: white;
  box-shadow: -28px 0 60px rgba(18, 36, 27, 0.15);
  transform: translateX(102%);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  padding: 24px 25px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.drawer-head h2 {
  max-width: 390px;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f4f2;
  display: grid;
  place-items: center;
}

.drawer-body {
  overflow-y: auto;
  padding: 22px 25px 32px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.detail-cell {
  padding: 12px;
  border-radius: 10px;
  background: #f5f7f5;
}

.detail-cell span,
.detail-cell strong {
  display: block;
}

.detail-cell span {
  color: var(--muted);
  font-size: 9px;
}

.detail-cell strong {
  margin-top: 5px;
  font-size: 11px;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  margin: 0 0 9px;
  font-size: 12px;
}

.detail-section p {
  margin: 0;
  color: #4e5a53;
  font-size: 12px;
  line-height: 1.75;
}

.ai-reason {
  padding: 14px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}

.confidence-line {
  margin-top: 10px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 800;
}

.review-form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  color: var(--ink);
  background: white;
  font-size: 11px;
}

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

.review-actions {
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
}

.review-actions .btn {
  justify-content: center;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  gap: 9px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 42px rgba(21, 43, 31, 0.16);
  color: #3d4841;
  font-size: 11px;
  animation: toast-in 220ms ease;
}

.toast.error {
  border-left-color: var(--red);
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, #edf1ee 25%, #f7f9f7 50%, #edf1ee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.chart-skeleton {
  width: 100%;
  height: 220px;
}

.report-skeleton {
  height: 520px;
}

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

@keyframes enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes breathe {
  50% { opacity: 0.55; transform: scale(0.82); }
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 13px;
  }

  .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .brand > div:last-child,
  .nav-item:not(.active) .nav-count,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 13px;
  }

  .nav-item svg {
    width: 21px;
  }

  .nav-count {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
  }

  .sidebar-foot {
    display: none;
  }

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

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

  .order-item {
    grid-template-columns: 1fr 120px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    height: 62px;
    padding: 7px;
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(10, 28, 18, 0.28);
  }

  .brand,
  .sidebar-foot {
    display: none;
  }

  .nav-list {
    height: 100%;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
  }

  .nav-item,
  .nav-item:not(.active) {
    font-size: 0;
  }

  .main-content {
    padding: 24px 16px 100px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .time-chip {
    display: none;
  }

  .btn {
    min-height: 38px;
    padding-inline: 12px;
  }

  .btn.secondary {
    width: 38px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .review-actions {
    grid-template-columns: 1fr 1fr;
  }

  .review-actions .btn.secondary {
    width: auto;
    padding-inline: 12px;
    font-size: 12px;
  }

  .review-actions .btn.primary {
    grid-column: 1 / -1;
  }

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

  .metric {
    padding-left: 13px;
    border-bottom: 1px solid var(--line);
  }

  .metric:first-child {
    padding-left: 13px;
  }

  .metric:nth-child(2n) {
    border-right: 0;
  }

  .metric:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    max-width: 100%;
    overflow-x: auto;
  }

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

  .data-table {
    min-width: 780px;
  }

  .order-item {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .crawler-form {
    grid-template-columns: 1fr;
  }

  .crawler-form .field.full {
    grid-column: auto;
  }

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

  .platform-cookie-grid {
    grid-template-columns: 1fr;
  }

  .report-cover,
  .report-body {
    padding: 28px 22px;
  }

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

  .report-stat:nth-child(2) {
    border-right: 0;
  }

  .report-stat:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

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