:root {
  color-scheme: light;
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #62d0ff;
  --danger: #ff6b6b;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(1200px 800px at 20% 0%, #1a2a6c33, transparent 60%),
    radial-gradient(1000px 600px at 80% 10%, #b21f1f22, transparent 55%),
    radial-gradient(900px 650px at 50% 80%, #fdbb2d22, transparent 60%),
    var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
}

.topbar__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.topbar__logo {
  width: auto;
  height: 15px;
  max-width: min(320px, 50vw);
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.topbar__title h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}

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

.topbar__repo {
  display: grid;
  grid-template-columns: auto 220px auto;
  gap: 8px;
  align-items: center;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  margin-bottom: 14px;
}

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

.row--wrap {
  flex-wrap: wrap;
}

.row--tight {
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.field--grow {
  flex: 1 1 420px;
  min-width: 280px;
}

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

.input,
.select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  outline: none;
  width: 100%;
}

.input:focus,
.select:focus {
  border-color: rgba(98, 208, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(98, 208, 255, 0.12);
}

.btn {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(98, 208, 255, 0.35);
  background: rgba(98, 208, 255, 0.18);
  color: var(--text);
  cursor: pointer;
}

.btn:hover {
  background: rgba(98, 208, 255, 0.25);
}

.btn--ghost {
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.btn--ghost:hover {
  background: rgba(0, 0, 0, 0.35);
}

.status {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.link:hover {
  text-decoration: underline;
}

.menu {
  position: relative;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu__list {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 22, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 6px;
}

.menu--right .menu__list {
  left: auto;
  right: 0;
}

.menu__item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

.menu__item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.menu__item--disabled {
  opacity: 0.55;
  pointer-events: none;
}

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

.tableHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

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

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

.pager__input {
  width: 90px;
}

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

.tableWrap {
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

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

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cellTitle {
  max-width: 360px;
}

.cellUrl {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.dialog {
  width: min(960px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 12, 22, 0.98);
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.dialog__form {
  margin: 0;
}

.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px 14px;
  border-bottom: 1px solid var(--border);
}

.dialog__title {
  font-weight: 700;
  font-size: 14px;
}

.dialog__body {
  padding: 14px;
}

.dialog__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.kv {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.kv__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

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

.kv__v {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.raw {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 10px;
}

.raw__summary {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.80);
  font-size: 13px;
  margin-bottom: 8px;
}

.code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.35;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: auto;
  max-height: 62vh;
}

.footer {
  margin-top: 10px;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__repo {
    grid-template-columns: auto 1fr auto;
  }

  .cellUrl {
    max-width: 260px;
  }

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