:root {
  --bg: #05080d;
  --panel: rgba(8, 10, 14, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #eef4ff;
  --muted: #9ba7bb;
  --accent: #7dc4ff;
  --glow: rgba(125, 196, 255, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 5%, rgba(255, 89, 0, 0.25), transparent 20%),
    radial-gradient(circle at 95% 95%, rgba(73, 124, 255, 0.25), transparent 24%),
    linear-gradient(180deg, #07090d 0%, #030507 100%);
}

.registry-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 34px;
}

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

.header-actions {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 8px;
  color: #f4c08a;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.search-wrap {
  min-width: 320px;
}

.admin-panel {
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.admin-status {
  min-height: 20px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: right;
  max-width: 420px;
}

.admin-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-btn {
  border: 1px solid rgba(125, 196, 255, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
}

.toolbar-btn:hover {
  color: var(--accent);
  border-color: rgba(125, 196, 255, 0.5);
}

.toolbar-btn.secondary {
  opacity: 0.82;
}

.toolbar-btn:disabled,
.archive-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-wrap input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 14px 18px;
  outline: none;
}

.registry-card {
  border-radius: 18px;
  border: 1px solid rgba(125, 196, 255, 0.4);
  background: var(--panel);
  box-shadow: 0 0 30px var(--glow);
  padding: 18px 22px 26px;
}

.registry-status {
  min-height: 22px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

.registry-table th,
.registry-table td {
  text-align: left;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.95rem;
}

.registry-table th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
}

.registry-table td code {
  color: var(--accent);
  background: none;
}

.copy-btn,
.import-btn,
.archive-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
}

.copy-btn:hover,
.import-btn:hover,
.archive-btn:hover {
  color: var(--accent);
  border-color: rgba(125, 196, 255, 0.5);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-btn.copied,
.import-btn.copied {
  color: #7ef0a4;
}

.archive-btn.archive {
  color: #f6c17e;
}

.archive-btn.unarchive {
  color: #7ef0a4;
}

.loading-row td,
.empty-row td {
  color: var(--muted);
}

.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.page-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-info {
  color: var(--muted);
  min-width: 120px;
  text-align: center;
}

.page-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .registry-shell {
    padding: 26px 16px;
  }

  .registry-header {
    flex-direction: column;
  }

  .header-actions,
  .admin-panel,
  .admin-buttons,
  .search-wrap {
    width: 100%;
    align-items: stretch;
    justify-content: stretch;
  }

  .admin-status {
    text-align: left;
    max-width: none;
  }
}

/* Source toggle button */
.source-toggle-wrap {
  display: flex;
  align-items: center;
}

.source-toggle-btn {
  border: 1px solid rgba(125, 196, 255, 0.28);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.source-toggle-btn:hover {
  color: var(--accent);
  border-color: rgba(125, 196, 255, 0.5);
}

.source-toggle-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(125, 196, 255, 0.08);
}
