@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #05060c;
  --surface: rgba(12, 14, 22, 0.78);
  --surface2: rgba(232, 234, 242, 0.06);
  --border: rgba(232, 234, 242, 0.12);
  --text: #e8eaf2;
  --muted: #8b90a3;
  --accent: #5eead4;
  --accent2: #99f6e4;
  --good: #5eead4;
  --warn: #fbbf24;
  --bad: #fb7185;
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1100px 580px at 80% -12%, rgba(94, 234, 212, 0.08), transparent 50%),
    radial-gradient(800px 480px at 6% 92%, rgba(99, 102, 241, 0.16), transparent 56%),
    #05060c;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { color: #fff; }

.hidden { display: none !important; }

.logo-mark {
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
  font-size: 1.45rem;
}

.logo-mark.sm { font-size: 1.25rem; width: auto; height: auto; background: none; border-radius: 0; }

.license-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--bg);
}

.license-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(18px);
}

.license-card h1 {
  margin: 0.75rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.license-card p { color: var(--muted); margin: 0 0 1.25rem; }

.license-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 6, 12, 0.7);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-family: inherit;
}

.license-card input:focus {
  outline: 2px solid rgba(94, 234, 212, 0.4);
  border-color: transparent;
}

.license-error { color: var(--bad); font-size: 0.85rem; margin: 0 0 0.75rem; }

.app-shell { padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 2.5rem; }

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.brand { display: flex; gap: 0.7rem; align-items: center; }

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.brand p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }

.topbar-actions { display: flex; gap: 0.55rem; align-items: center; flex-wrap: wrap; }

.license-badge {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  color: #04110f;
  border-color: var(--accent);
}
.btn.primary:hover { background: #99f6e4; color: #04110f; }
.btn.secondary { background: transparent; }
.btn.wide { width: 100%; margin-top: 0.25rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-spinner {
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btnSpin 0.65s linear infinite;
  flex: 0 0 auto;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation: none; border-right-color: currentColor; opacity: 0.55; }
}

.progress-panel { margin-bottom: 1rem; }

.progress-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#progressFill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s ease;
}

#progressText { color: var(--muted); font-size: 0.85rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  backdrop-filter: blur(14px);
}

.card .label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card .value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 0.2rem;
  letter-spacing: -0.03em;
}
.card .value.sm { font-size: 0.95rem; font-weight: 600; line-height: 1.35; font-family: var(--font); }
.card.wide { grid-column: 1 / -1; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

.chip select,
.batch-input {
  margin-left: 0.2rem;
  padding: 0.25rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(5, 6, 12, 0.7);
  color: var(--text);
  font-family: inherit;
}

.table-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  align-self: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.pagination #pageLabel {
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 6rem;
  text-align: center;
}

.btn.sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}

.batch-input.sm { width: 3.25rem; }
.batch-input { width: 4.5rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(14px);
}

table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }

th, td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(5, 6, 12, 0.55);
}

.grade {
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
}

.grade.high { background: rgba(5, 150, 105, 0.12); color: var(--good); }
.grade.mid { background: rgba(217, 119, 6, 0.12); color: var(--warn); }
.grade.low { background: rgba(220, 38, 38, 0.12); color: var(--bad); }

.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  background: var(--bg);
}

.badge.yes { color: var(--good); }
.badge.no { color: var(--muted); }

.buy-domain {
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
  background: var(--accent);
  color: #04110f;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}
.buy-domain:hover { background: #99f6e4; }

.badge.industry {
  color: var(--text);
  background: var(--bg);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: capitalize;
  white-space: nowrap;
}

footer { margin-top: 1.5rem; color: var(--muted); font-size: 0.78rem; }
