:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #0d1929;
  --panel: #111f33;
  --panel-2: #14243a;
  --panel-3: #0f1a2b;
  --line: rgba(141, 164, 196, 0.16);
  --text: #e8f1ff;
  --muted: #8fa1bd;
  --faint: #667994;
  --cyan: #19d4c2;
  --green: #2be071;
  --yellow: #f5b83d;
  --red: #f05f75;
  --blue: #5a9cff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(25, 212, 194, 0.12), transparent 24rem),
    linear-gradient(180deg, #091321 0%, #07101d 100%);
  color: var(--text);
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px 28px;
  background: rgba(7, 14, 26, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #26d9d0, #4e8cff);
  color: #eefcff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(25, 212, 194, 0.12);
}

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

.brand strong {
  font-size: 19px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.top-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a9bbd4;
  white-space: nowrap;
}

.top-nav-item:hover,
.top-nav-item.is-active {
  border-color: rgba(25, 212, 194, 0.32);
  background: rgba(25, 212, 194, 0.12);
  color: var(--cyan);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 18px;
  color: inherit;
}

.header-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 2px;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background: rgba(17, 31, 51, 0.72);
  color: #b7c8de;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-link:hover,
.auth-link.is-active {
  border-color: rgba(25, 212, 194, 0.36);
  color: var(--cyan);
}

.auth-link-primary {
  border-color: rgba(43, 224, 113, 0.32);
  background: rgba(43, 224, 113, 0.12);
  color: #baf8d0;
}

.notification-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background: rgba(17, 31, 51, 0.72);
  color: var(--text);
}

.notification-button:hover {
  border-color: rgba(25, 212, 194, 0.38);
  color: var(--cyan);
}

.notification-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid rgba(7, 14, 26, 0.98);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 14px;
}

.main {
  min-width: 0;
  padding: 24px 28px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  margin-bottom: 22px;
}

.top-adbar {
  display: block;
  min-height: 0;
  margin-bottom: 18px;
}

.top-ad-slot {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.top-ad-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: clamp(82px, 9vw, 116px);
  padding: clamp(14px, 2vw, 22px);
  overflow: hidden;
  border: 1px solid rgba(25, 212, 194, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(25, 212, 194, 0.18), rgba(90, 156, 255, 0.12)),
    rgba(17, 31, 51, 0.82);
  color: var(--text);
  text-align: left;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

button.top-ad-card {
  cursor: pointer;
}

button.top-ad-card:hover {
  border-color: rgba(25, 212, 194, 0.44);
  background:
    linear-gradient(135deg, rgba(25, 212, 194, 0.22), rgba(90, 156, 255, 0.16)),
    rgba(17, 31, 51, 0.92);
}

.top-ad-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.top-ad-label {
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(43, 224, 113, 0.13);
  color: #9df7bd;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-ad-card strong {
  min-width: 0;
  overflow: hidden;
  color: #f4fbff;
  font-size: clamp(18px, 2.1vw, 28px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-ad-card p {
  display: -webkit-box;
  max-width: 78ch;
  margin: 0;
  overflow: hidden;
  color: #b8c9e5;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.top-ad-meta {
  justify-self: end;
  max-width: min(360px, 34vw);
  overflow: hidden;
  color: #9bb6da;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.15;
}

h2 {
  margin-bottom: 4px;
  font-size: 17px;
  line-height: 1.2;
}

.status-pill,
.time-pill,
.ghost-button,
.primary-button,
.filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #b7c8de;
  white-space: nowrap;
}

.filter {
  padding: 0 13px;
  background: rgba(17, 31, 51, 0.86);
}

.filter:hover,
.filter.is-active {
  border-color: rgba(25, 212, 194, 0.36);
  background: rgba(25, 212, 194, 0.14);
  color: var(--cyan);
}

.status-pill {
  padding: 0 12px;
  background: rgba(25, 212, 194, 0.12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

.sync-countdown-button {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.sync-countdown-button:hover {
  border-color: rgba(25, 212, 194, 0.42);
  background: rgba(25, 212, 194, 0.18);
}

.sync-countdown-button.is-running {
  cursor: wait;
  opacity: 0.86;
}

.sync-countdown-button.is-error {
  border-color: rgba(255, 104, 104, 0.38);
  background: rgba(255, 104, 104, 0.13);
  color: var(--red);
}

.time-pill {
  padding: 0 12px;
  background: rgba(17, 31, 51, 0.86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 36, 58, 0.94), rgba(13, 25, 41, 0.96));
  box-shadow: var(--shadow);
}

.metric-card span,
.metric-card p {
  color: var(--muted);
}

.metric-card span {
  font-size: 13px;
  font-weight: 650;
}

.metric-card strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--cyan);
  font-size: 32px;
  line-height: 1;
}

.metric-card strong.warning {
  color: var(--yellow);
}

.metric-card p {
  margin-bottom: 0;
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 31, 51, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 18px;
  background: rgba(20, 36, 58, 0.72);
  border-bottom: 1px solid var(--line);
}

.panel-heading.compact {
  min-height: auto;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ghost-button,
.primary-button {
  padding: 0 14px;
  font-weight: 700;
}

.ghost-button {
  background: rgba(13, 25, 41, 0.86);
}

.ghost-button:hover {
  border-color: rgba(90, 156, 255, 0.42);
  color: var(--blue);
}

.primary-button {
  border-color: rgba(25, 212, 194, 0.42);
  background: linear-gradient(135deg, #16c9b8, #3d83ff);
  color: #f4fbff;
}

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

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

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(141, 164, 196, 0.1);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: rgba(9, 18, 31, 0.86);
  font-size: 12px;
  font-weight: 700;
}

td {
  color: #c9d8ec;
  font-size: 13px;
}

tbody tr {
  background: rgba(17, 31, 51, 0.5);
}

tbody tr:nth-child(odd) {
  background: rgba(15, 28, 45, 0.68);
}

tbody tr:hover {
  background: rgba(25, 212, 194, 0.08);
}

.detail-table-row {
  cursor: pointer;
}

.detail-table-row:focus-visible {
  outline: 2px solid rgba(25, 212, 194, 0.58);
  outline-offset: -2px;
}

.site-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.site-logo {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(25, 212, 194, 0.15);
  color: var(--cyan);
  font-weight: 900;
}

.site-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text);
  font-weight: 760;
}

.site-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.site-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.site-badge.positive {
  background: rgba(43, 224, 113, 0.14);
  color: var(--green);
}

.site-badge.warning {
  background: rgba(245, 184, 61, 0.16);
  color: var(--yellow);
}

.site-badge.danger {
  background: rgba(240, 95, 117, 0.16);
  color: var(--red);
}

.site-badge.neutral {
  background: rgba(124, 143, 171, 0.16);
  color: #b8c8dd;
}

.site-meta {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(124, 143, 171, 0.16);
  color: #b8c8dd;
  font-size: 11px;
  font-weight: 700;
}

.score-good {
  color: var(--green);
  font-weight: 800;
}

.score-warn {
  color: var(--yellow);
  font-weight: 800;
}

.score-bad {
  color: var(--red);
  font-weight: 800;
}

.state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.state.good {
  background: rgba(43, 224, 113, 0.14);
  color: var(--green);
}

.state.warn {
  background: rgba(245, 184, 61, 0.14);
  color: var(--yellow);
}

.state.running {
  background: rgba(25, 212, 194, 0.14);
  color: var(--cyan);
}

.state.bad {
  background: rgba(240, 95, 117, 0.14);
  color: var(--red);
}

.spark-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
  height: 138px;
  margin: 18px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(141, 164, 196, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 164, 196, 0.06) 1px, transparent 1px),
    rgba(9, 18, 31, 0.6);
  background-size: 100% 33%, 20% 100%, auto;
}

.spark-chart span {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--cyan), rgba(25, 212, 194, 0.2));
}

.bar-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.recommend-distribution-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recommend-distribution-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: #c3d2e7;
  font-size: 12px;
  font-weight: 700;
}

.recommend-distribution-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-distribution-label strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
}

.recommend-distribution-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(124, 143, 171, 0.14);
}

.recommend-distribution-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.recommend-distribution-fill.warn {
  background: linear-gradient(90deg, var(--yellow), var(--red));
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.recommend-grid.standalone {
  margin: 0;
  padding: 18px;
}

.recommend-card,
.site-card,
.queue-item,
.log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 41, 0.72);
}

.recommend-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px;
}

.recommend-card[data-site-detail],
.recommend-card[data-recommend-url] {
  cursor: pointer;
}

.recommend-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(25, 212, 194, 0.12);
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
}

.recommend-card h3,
.site-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.recommend-card p,
.site-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.recommend-score {
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.recommend-table {
  min-width: 980px;
}

.recommend-table th:nth-child(1),
.recommend-table td:nth-child(1) {
  width: 160px;
}

.recommend-table th:nth-child(2),
.recommend-table td:nth-child(2) {
  width: 130px;
}

.recommend-table th:nth-child(3),
.recommend-table td:nth-child(3) {
  min-width: 300px;
}

.recommend-table th:nth-child(4),
.recommend-table td:nth-child(4) {
  width: 220px;
}

.recommend-table th:nth-child(5),
.recommend-table td:nth-child(5) {
  width: 130px;
}

.recommend-table tbody tr:nth-child(3) {
  background: rgba(25, 212, 194, 0.08);
}

.recommendation-admin table {
  min-width: 1320px;
}

.recommend-admin-stack {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.recommend-admin-stack .admin-muted {
  line-height: 1.35;
}

.compact-admin-input {
  min-width: 88px;
}

.plain-name {
  color: var(--text);
  font-size: 14px;
}

.detail-name-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.detail-name-button:hover {
  color: var(--cyan);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 74px;
}

.star {
  color: #f3c45b;
  font-size: 20px;
  line-height: 1;
}

.star.empty {
  color: rgba(182, 195, 214, 0.22);
}

.url-cell {
  max-width: 420px;
}

.url-link {
  color: #70a8ff;
  font-size: 15px;
  text-decoration: none;
  word-break: break-all;
}

.url-link:hover {
  color: #9ec5ff;
  text-decoration: underline;
}

.vendor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vendor-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: #f7fbff;
  font-size: 14px;
  font-weight: 800;
}

.vendor-o {
  background: #4b9add;
}

.vendor-a {
  background: #df922b;
}

.vendor-g {
  background: #73bf70;
}

.vendor-other {
  background: #8c969e;
  color: #152233;
}

.price-cell {
  color: #f0f3f8;
  font-size: 15px;
  white-space: nowrap;
}

.advantage-text {
  color: #d7e0ec;
  line-height: 1.5;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-left: 10px;
  padding: 0 9px;
  border: 1px solid rgba(25, 212, 194, 0.34);
  border-radius: 6px;
  background: rgba(25, 212, 194, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.inline-link:disabled {
  cursor: not-allowed;
  border-color: rgba(141, 164, 196, 0.14);
  background: rgba(124, 143, 171, 0.08);
  color: var(--faint);
}

.inline-link.danger {
  border-color: rgba(255, 117, 136, 0.34);
  background: rgba(255, 117, 136, 0.1);
  color: #ff9aa8;
}

.inline-link.danger:hover {
  color: #ffd2d8;
}

#site-detail-view.is-visible {
  display: grid;
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 16px;
  min-height: 140px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(141, 164, 196, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(25, 212, 194, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(20, 36, 58, 0.96), rgba(8, 17, 31, 0.96));
  box-shadow: var(--shadow);
}

.detail-hero-copy,
.detail-hero-actions {
  position: relative;
  z-index: 1;
}

.detail-hero-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}

.detail-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.detail-hero h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
}

.detail-hero p {
  max-width: 780px;
  margin: 10px 0 0;
  color: #b8c8dd;
  font-size: 14px;
  line-height: 1.65;
}

.detail-hero-actions {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 12px;
  min-width: 260px;
  padding-left: 18px;
  border-left: 1px solid rgba(141, 164, 196, 0.16);
}

.detail-vendor-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 320px;
}

.detail-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-overview-item {
  display: grid;
  align-content: space-between;
  gap: 9px;
  min-width: 0;
  min-height: 100px;
  padding: 14px;
  border: 1px solid rgba(141, 164, 196, 0.16);
  border-radius: 8px;
  background: rgba(17, 31, 51, 0.88);
  box-shadow: var(--shadow);
}

.detail-overview-item span,
.detail-overview-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.detail-overview-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
}

.detail-overview-item:nth-child(1) strong,
.detail-overview-item:nth-child(2) strong,
.detail-overview-item:nth-child(4) strong {
  color: var(--green);
}

.detail-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.7fr);
  align-items: start;
  gap: 16px;
}

.detail-main-column,
.detail-side-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.detail-access-panel,
.detail-announcement-panel,
.detail-rate-panel,
.detail-price-history-panel,
.detail-monitor-panel {
  align-self: start;
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.detail-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

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

.detail-access-panel .detail-list {
  grid-template-columns: 1fr;
}

.detail-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 250, 255, 0.045), rgba(7, 14, 26, 0.28)),
    rgba(7, 14, 26, 0.34);
}

.detail-row span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
}

.detail-row strong,
.detail-link {
  min-width: 0;
  color: #dce9fb;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-all;
}

.detail-link {
  color: #80b5ff;
  text-decoration: none;
}

.detail-link:hover {
  color: #b5d4ff;
  text-decoration: underline;
}

.announcement-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.announcement-card {
  display: grid;
  gap: 9px;
  width: 100%;
  min-height: 0;
  padding: 13px 14px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.32);
  color: inherit;
  text-align: left;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.announcement-card:hover {
  border-color: rgba(25, 212, 194, 0.38);
  background: rgba(25, 212, 194, 0.08);
  transform: translateY(-1px);
}

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

.announcement-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.announcement-card small,
.modal-meta {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(90, 156, 255, 0.13);
  color: #9dc4ff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-price-history-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding: 16px;
}

.price-history-entry {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.32);
}

.price-history-entry-head,
.price-history-change {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-history-entry-head {
  justify-content: space-between;
}

.price-history-entry time {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.price-history-change {
  min-width: 0;
  color: #dce9fb;
  font-size: 13px;
  line-height: 1.35;
}

.price-history-change span,
.price-history-change strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.price-history-change b {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 12px;
}

.price-history-change strong {
  color: var(--green);
  font-size: 15px;
}

.price-history-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}

.rate-list {
  display: grid;
  gap: 10px;
  max-height: 380px;
  overflow: auto;
  padding: 16px;
}

.detail-rate-panel .rate-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-rate-panel .empty-rates {
  grid-column: 1 / -1;
}

.rate-card {
  display: grid;
  grid-template-areas:
    "copy value"
    "tag value";
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 250, 255, 0.045), rgba(7, 14, 26, 0.24)),
    rgba(7, 14, 26, 0.34);
}

.rate-card > div {
  grid-area: copy;
  min-width: 0;
}

.rate-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rate-card p {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.rate-value {
  grid-area: value;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.rate-card .tag {
  grid-area: tag;
  justify-self: start;
}

.empty-rates {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-controls {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 180px;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 14, 26, 0.22);
}

.rank-rate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 160px;
}

.rank-rate-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(40, 58, 86, 0.8);
  color: var(--text);
  white-space: nowrap;
}

.rank-rate-tag b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rank-rate-tag strong {
  color: var(--green);
  font-size: 12px;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.submit-workbench {
  display: grid;
  gap: 18px;
}

.submit-hero,
.submit-layout,
.submit-tips {
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(28, 46, 72, 0.92), rgba(14, 26, 43, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
}

.submit-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.submit-hero h2 {
  margin: 6px 0 8px;
  font-size: 34px;
  line-height: 1.05;
}

.submit-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0;
  overflow: hidden;
}

.submit-site-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

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

.submit-section-title {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}

.submit-section-title > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.09);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.submit-section-title h3 {
  margin: 0;
  font-size: 15px;
}

.submit-section-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.submit-site-form .wide-field,
.submit-form-actions {
  grid-column: 1 / -1;
}

.submit-site-form textarea {
  min-height: 138px;
  resize: vertical;
}

.submit-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
}

.submit-review-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-left: 1px solid rgba(141, 164, 196, 0.18);
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.08), rgba(80, 140, 255, 0.06)),
    rgba(7, 14, 26, 0.22);
}

.submit-panel-label {
  width: max-content;
  padding: 5px 9px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.submit-review-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.submit-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.submit-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.submit-steps span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.submit-steps p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.submit-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.submit-tips article {
  padding: 18px;
  border-right: 1px solid rgba(141, 164, 196, 0.16);
}

.submit-tips article:last-child {
  border-right: 0;
}

.submit-tips strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.submit-tips p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-workbench {
  max-width: 980px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0;
  overflow: hidden;
}

.auth-form {
  min-height: 310px;
}

.auth-form .wide-field {
  grid-column: 1 / -1;
}

.auth-side-panel {
  min-height: 310px;
}

.admin-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 14, 26, 0.88);
  backdrop-filter: blur(16px);
}

.admin-auth-card {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(141, 164, 196, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 31, 51, 0.98), rgba(10, 20, 35, 0.98));
  box-shadow: var(--shadow);
}

.admin-auth-card h2 {
  margin: 0;
  font-size: 24px;
}

.admin-auth-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.system-announcement-card {
  max-width: 720px;
}

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

.system-announcement-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(141, 164, 196, 0.16);
  border-radius: 8px;
  background: rgba(17, 31, 51, 0.72);
}

.system-announcement-item h3 {
  margin: 0;
  font-size: 16px;
}

.system-announcement-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.system-announcement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 12px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.site-footer strong {
  color: var(--text);
  white-space: nowrap;
}

.site-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.site-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.site-stat {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: rgba(20, 36, 58, 0.74);
}

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

.site-stat span {
  color: var(--faint);
  font-size: 11px;
}

.site-stat strong {
  margin-top: 3px;
  font-size: 13px;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-link,
.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.site-link {
  border: 1px solid rgba(25, 212, 194, 0.42);
  background: rgba(25, 212, 194, 0.12);
  color: var(--cyan);
}

.site-button {
  border: 1px solid rgba(90, 156, 255, 0.36);
  background: rgba(90, 156, 255, 0.1);
  color: #b9d4ff;
}

.site-link:hover,
.site-button:hover {
  transform: translateY(-1px);
}

.sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.sync-layout.is-single-column {
  grid-template-columns: minmax(0, 1fr);
}

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

.admin-sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 31, 51, 0.94);
  box-shadow: var(--shadow);
}

.admin-sidebar-head {
  display: grid;
  gap: 4px;
}

.admin-sidebar-head strong {
  color: var(--text);
  font-size: 16px;
}

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

.admin-side-nav a,
.admin-side-nav button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.admin-side-nav a:hover,
.admin-side-nav a.is-active,
.admin-side-nav button:hover,
.admin-side-nav button.is-active {
  border-color: rgba(25, 212, 194, 0.28);
  background: rgba(25, 212, 194, 0.1);
  color: var(--cyan);
}

.admin-content {
  min-width: 0;
}

.admin-anchor {
  scroll-margin-top: 96px;
}

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

.site-admin {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.channel-monitor {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.admin-overview-dashboard {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.overview-metric,
.overview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.36);
}

.overview-metric {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 13px;
}

.overview-metric span,
.overview-card p,
.overview-breakdown span,
.overview-alert-list span,
.bar-row span,
.sparkline-meta,
.overview-mini-log small {
  color: var(--muted);
  font-size: 11px;
}

.overview-metric strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.overview-metric small.good,
.overview-breakdown .good,
.overview-alert-list .good {
  color: var(--green);
}

.overview-metric small.warn,
.overview-breakdown .warn,
.overview-alert-list .warn {
  color: var(--yellow);
}

.overview-metric small.bad,
.overview-breakdown .bad,
.overview-alert-list .bad {
  color: var(--red);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 14px;
}

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

.overview-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
}

.overview-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.overview-card h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 15px;
}

.overview-card p {
  margin: 0;
}

.overview-chart-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.donut-chart {
  --ok: 0%;
  --warn: 0%;
  display: grid;
  place-items: center;
  width: 168px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 var(--ok), var(--yellow) var(--ok) var(--warn), var(--red) var(--warn) 100%);
}

.donut-chart::before {
  content: "";
  grid-area: 1 / 1;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0d1b2d;
}

.donut-chart span {
  z-index: 1;
  display: grid;
  gap: 5px;
  text-align: center;
}

.donut-chart strong {
  color: var(--text);
  font-size: 24px;
}

.donut-chart small {
  color: var(--muted);
  font-size: 11px;
}

.overview-breakdown,
.overview-alert-list {
  display: grid;
  gap: 9px;
}

.overview-breakdown div,
.overview-alert-list div,
.bar-row,
.overview-mini-log div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.overview-breakdown strong,
.overview-alert-list strong,
.bar-row strong {
  color: var(--text);
  font-size: 13px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  grid-template-columns: 78px minmax(0, 1fr) 28px;
}

.bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(141, 164, 196, 0.16);
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.sparkline-chart {
  display: grid;
  gap: 8px;
  color: var(--cyan);
}

.sparkline-chart svg {
  width: 100%;
  min-height: 132px;
  border: 1px solid rgba(141, 164, 196, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(rgba(141, 164, 196, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 164, 196, 0.08) 1px, transparent 1px);
  background-size: 100% 33%, 25% 100%;
}

.sparkline-meta {
  display: flex;
  justify-content: space-between;
}

.overview-mini-log {
  display: grid;
  gap: 10px;
}

.overview-mini-log div {
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(141, 164, 196, 0.12);
}

.overview-mini-log div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.overview-mini-log span {
  min-width: 0;
  overflow: hidden;
  color: #c8d7eb;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-empty {
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1px dashed rgba(141, 164, 196, 0.22);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.panel-heading + .admin-grid {
  border-bottom: 0;
}

.site-admin-table-wrap table {
  min-width: 960px;
}

.channel-monitor-heading,
.detail-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.channel-monitor-heading h3,
.detail-subheading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.channel-monitor-heading p,
.detail-subheading span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.channel-summary-item {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.42);
}

.channel-summary-item small,
.channel-subtext {
  color: var(--faint);
  font-size: 11px;
}

.channel-summary-item strong {
  color: var(--text);
  font-size: 15px;
}

.channel-monitor-page {
  overflow: hidden;
}

.channel-monitor-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(118px, 0.75fr)) auto;
  align-items: end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(141, 164, 196, 0.12);
  border-bottom: 1px solid rgba(141, 164, 196, 0.12);
  background: rgba(7, 14, 26, 0.24);
}

.channel-monitor-toolbar .ghost-button {
  min-height: 30px;
  padding: 0 10px;
}

.channel-result-line {
  padding: 7px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.channel-monitor-table {
  min-width: 920px;
}

.channel-monitor-table th {
  padding: 9px 12px;
  color: #8fa7c8;
  font-size: 11px;
}

.channel-monitor-table td {
  padding: 10px 12px;
  color: #bfd0eb;
  font-size: 12px;
}

.channel-monitor-table tbody tr {
  background: #101c2f;
}

.channel-monitor-table tbody tr:nth-child(odd) {
  background: #111f33;
}

.channel-monitor-table tbody tr:hover {
  background: #162d41;
}

.channel-name-cell {
  min-width: 180px;
}

.channel-monitor-table .channel-name-cell strong {
  color: #dceaff;
  font-size: 13px;
}

.channel-error-text {
  display: block;
  max-width: 300px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--red);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-score {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.channel-mini-value {
  display: block;
  max-width: 210px;
  margin-bottom: 2px;
  overflow: hidden;
  color: #dceaff;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-monitor-table .state {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

.channel-monitor-table .channel-timeline {
  min-width: 100px;
  gap: 3px;
}

.channel-monitor-table .channel-dot {
  width: 5px;
  height: 22px;
}

.channel-table-wrap td strong,
.channel-detail-card strong {
  display: block;
  margin-bottom: 3px;
}

.channel-timeline {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 96px;
}

.channel-dot {
  width: 5px;
  height: 26px;
  border-radius: 999px;
  background: var(--red);
  opacity: 0.9;
}

.channel-dot.good {
  background: var(--green);
}

.channel-dot.warn {
  background: var(--yellow);
}

.channel-detail-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.detail-monitor-panel {
  margin-top: 0;
}

.channel-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px;
}

.channel-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.46);
}

.channel-detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.monitor-card {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 250, 255, 0.06), rgba(7, 14, 26, 0.32)),
    rgba(7, 14, 26, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.monitor-card-head,
.monitor-title,
.monitor-history div,
.monitor-scale {
  display: flex;
  align-items: center;
}

.monitor-card-head {
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}

.monitor-title {
  gap: 10px;
  min-width: 0;
}

.provider-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(25, 212, 194, 0.13);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 900;
}

.provider-anthropic {
  background: rgba(245, 184, 61, 0.13);
  color: #f29e3d;
}

.provider-gemini {
  background: rgba(90, 156, 255, 0.13);
  color: var(--blue);
}

.monitor-title strong {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-title span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.monitor-title em {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(25, 212, 194, 0.14);
  color: #73d9ca;
  font-style: normal;
  font-size: 10px;
}

.monitor-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.monitor-metrics span {
  display: grid;
  gap: 5px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(141, 164, 196, 0.12);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.34);
}

.monitor-metrics small,
.monitor-availability span,
.monitor-history span,
.monitor-scale span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.monitor-metrics strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1;
}

.monitor-error {
  margin: 10px 0 0;
  padding: 8px 9px;
  border: 1px solid rgba(245, 184, 61, 0.2);
  border-radius: 8px;
  background: rgba(245, 184, 61, 0.08);
  color: #ffd18a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.monitor-availability {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(141, 164, 196, 0.12);
}

.monitor-availability strong {
  color: #65c54a;
  font-size: 20px;
  line-height: 1;
}

.monitor-history {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin-top: 12px;
}

.monitor-history div,
.monitor-scale {
  justify-content: space-between;
}

.monitor-history .channel-timeline {
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  gap: 2px;
}

.monitor-history .channel-dot {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 12px;
}

.timeline-empty {
  width: 100%;
  min-height: 22px;
  color: var(--faint);
  font-size: 11px;
}

.site-admin-table-wrap td {
  vertical-align: middle;
}

.site-admin-table-wrap td:last-child {
  min-width: 240px;
}

.recommend-admin {
  padding-top: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.admin-muted {
  color: var(--faint);
  font-size: 12px;
}

.state.neutral {
  background: rgba(124, 143, 171, 0.14);
  color: #b7c8de;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.admin-add-site {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.28);
}

.admin-user-form {
  grid-template-columns: minmax(240px, 1.2fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) minmax(220px, 1fr);
  justify-content: start;
}

.user-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.user-stat {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.28);
}

.user-stat small {
  color: var(--muted);
  font-size: 11px;
}

.user-stat strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.user-stat strong.good {
  color: var(--green);
}

.user-stat strong.warn {
  color: var(--yellow);
}

.user-stat strong.neutral {
  color: #b7c8de;
}

.user-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(140px, 180px);
  gap: 12px;
  align-items: end;
}

.user-form-actions {
  grid-column: 1 / -1;
  padding: 0;
}

.user-alert-sites-field select {
  min-height: 72px;
  padding: 7px 10px;
}

.credential-pool-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(3, minmax(130px, 0.75fr)) auto;
}

.admin-alert-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.28);
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  min-height: 34px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.72);
  color: var(--text);
  outline: none;
}

.field textarea {
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(25, 212, 194, 0.56);
}

.compact-field input,
.compact-field select,
.admin-input {
  min-height: 34px;
}

.admin-input {
  width: 100%;
  min-width: 160px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.72);
  color: var(--text);
  outline: none;
}

.admin-input.compact-admin-input {
  min-width: 88px;
}

.admin-input:focus {
  border-color: rgba(25, 212, 194, 0.56);
}

.sync-log,
.queue-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.log-item,
.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 12px;
  color: #c8d7eb;
  font-size: 13px;
}

.log-item small,
.queue-item small {
  color: var(--faint);
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(43, 224, 113, 0.1);
  flex: 0 0 auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(141, 164, 196, 0.24);
  border-radius: 8px;
  background: #101d30;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 36, 58, 0.84);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-meta {
  padding: 14px 18px 0;
}

.modal-content {
  max-height: 520px;
  overflow: auto;
  padding: 16px 18px 20px;
  color: #dce9fb;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.site-modal-card {
  width: min(860px, 100%);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
}

.price-history-modal-card {
  width: min(760px, 100%);
}

.price-history-table-wrap {
  max-height: 460px;
  margin: 16px 18px 18px;
  overflow: auto;
}

.site-modal-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 0;
}

.site-modal-form {
  display: grid;
  flex: 1 1 auto;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.site-modal-section {
  display: grid;
  gap: 12px;
}

.site-modal-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.site-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.site-flag-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(141, 164, 196, 0.16);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.3);
}

#preset-site-flag-options {
  display: contents;
}

.site-flag-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(141, 164, 196, 0.14);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-flag-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--cyan);
}

.custom-site-flags {
  padding-top: 8px;
}

.custom-site-flags[hidden] {
  display: none;
}

.site-flag-option.custom {
  border-color: rgba(25, 212, 194, 0.18);
  background: rgba(25, 212, 194, 0.06);
}

.site-flag-preview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.site-modal-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.saved-auth-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.34);
}

.saved-auth-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.saved-auth-summary span,
.saved-auth-summary small {
  color: var(--faint);
  font-size: 11px;
}

.saved-auth-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-sync-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

.site-flow-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.site-flow-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(141, 164, 196, 0.18);
  border-radius: 8px;
  background: rgba(7, 14, 26, 0.32);
}

.site-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.site-flow-head strong {
  color: var(--text);
  font-size: 13px;
}

.site-flow-card.is-active {
  border-color: rgba(90, 156, 255, 0.36);
  background: rgba(90, 156, 255, 0.08);
}

.site-flow-card.is-success {
  border-color: rgba(43, 224, 113, 0.32);
}

.site-flow-card.is-error {
  border-color: rgba(240, 95, 117, 0.28);
}

.site-admin-summary {
  display: grid;
  gap: 4px;
}

.site-admin-summary strong {
  color: var(--text);
  font-size: 12px;
}

.site-admin-summary small {
  color: var(--faint);
  font-size: 11px;
}

.auth-summary .inline-link {
  justify-self: start;
  margin-left: 0;
}

.auth-summary strong,
.auth-summary small {
  white-space: nowrap;
}

.site-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 36px;
  padding-top: 2px;
}

.site-modal-actions .admin-muted {
  margin-right: auto;
}

@media (max-width: 1180px) {
  .metrics-grid,
  .recommend-grid,
  .site-grid,
  .detail-overview-grid,
  .channel-detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .sync-layout,
  .overview-grid,
  .overview-grid.compact,
  .admin-workspace,
  .detail-dashboard,
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-review-panel {
    border-top: 1px solid rgba(141, 164, 196, 0.18);
    border-left: 0;
  }

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

  .admin-sidebar {
    position: static;
  }

  .admin-side-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .admin-side-nav a,
  .admin-side-nav button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .detail-rate-panel .rate-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: none;
  }

  .channel-monitor-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    position: sticky;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px;
  }

  .brand {
    min-height: 40px;
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 22px;
  }

  .brand strong {
    font-size: 17px;
  }

  .top-nav {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    padding: 0 2px 3px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar,
  .header-status::-webkit-scrollbar {
    display: none;
  }

  .top-nav-item {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    gap: 7px;
    font-size: 13px;
  }

  .nav-icon {
    width: 14px;
  }

  .header-status {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .auth-actions {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
  }

  .auth-link,
  .notification-button,
  .status-pill,
  .time-pill {
    flex: 0 0 auto;
  }

  .auth-link,
  .sync-status {
    min-width: 0;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main {
    padding: 14px 12px 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .top-adbar {
    margin-bottom: 14px;
  }

  .top-ad-card {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
  }

  .top-ad-card strong,
  .top-ad-meta {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .top-ad-card strong {
    overflow-wrap: anywhere;
  }

  .top-ad-meta {
    justify-self: start;
    max-width: 100%;
  }

  .metrics-grid,
  .recommend-grid,
  .site-grid,
  .submit-form-section,
  .submit-tips,
  .auth-layout,
  .admin-grid,
  .overview-metrics,
  .admin-add-site,
  .credential-pool-form,
  .admin-alert-settings,
  .admin-user-form,
  .user-admin-summary,
  .user-admin-toolbar,
  .site-modal-grid,
  .site-flow-list,
  .rank-controls,
  .channel-monitor-toolbar,
  .channel-summary,
  .channel-detail-list {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .submit-hero,
  .recommend-card,
  .site-footer,
  .modal-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .detail-hero-actions {
    justify-items: start;
    width: 100%;
    min-width: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(141, 164, 196, 0.16);
    border-left: 0;
  }

  .detail-vendor-strip {
    justify-content: flex-start;
    max-width: none;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

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

  .detail-overview-item {
    min-height: 86px;
    padding: 11px;
  }

  .detail-overview-item strong {
    font-size: 20px;
  }

  .detail-rate-panel .rate-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommend-card {
    display: flex;
  }

  .recommend-score {
    align-self: flex-end;
  }

  .site-modal-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .site-modal-actions .admin-muted {
    width: 100%;
    margin-right: 0;
  }

  .site-modal-meta-row,
  .site-modal-inline-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .donut-chart {
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .top-nav {
    display: flex;
    overflow-x: auto;
  }

  .top-nav-item {
    justify-content: flex-start;
    padding: 0 10px;
  }

  .top-nav-item span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-status,
  .auth-actions {
    display: flex;
  }

  .site-stats {
    grid-template-columns: 1fr;
  }

  .filter,
  .ghost-button,
  .primary-button {
    flex: 1 1 auto;
  }

  .submit-hero,
  .submit-site-form,
  .submit-review-panel,
  .auth-side-panel,
  .submit-tips article {
    padding: 16px;
  }

  .submit-hero h2 {
    font-size: 28px;
  }

  .submit-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-form-actions .admin-muted {
    width: 100%;
  }

  .rate-card {
    grid-template-areas:
      "copy"
      "value"
      "tag";
    grid-template-columns: 1fr;
  }

  .detail-rate-panel .rate-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-monitor-heading,
  .detail-subheading,
  .announcement-card-head,
  .announcement-card-foot,
  .price-history-entry-head,
  .price-history-change,
  .channel-detail-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}
