/* Sentinel Scan Pro — minimal, professional CSS */
:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
  flex: 1;
  width: 100%;
}

.hero {
  text-align: center;
  padding: 48px 24px;
}

.logo {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
}

.logo-small {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

h1 {
  font-size: 2.4em;
  margin: 0 0 16px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.6em;
  margin: 0 0 16px 0;
}

h3 {
  font-size: 1.1em;
  margin: 32px 0 12px 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9em;
}

.tagline {
  font-size: 1.1em;
  color: var(--muted);
  margin: 0 0 32px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.form {
  text-align: left;
  max-width: 480px;
  margin: 24px auto;
}

label {
  display: block;
  margin-bottom: 20px;
}

label > span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95em;
}

.req { color: var(--danger); }

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1em;
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus {
  border-color: var(--accent);
}

small {
  display: block;
  color: var(--muted);
  font-size: 0.85em;
  margin-top: 4px;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.form button {
  width: 100%;
  margin-top: 8px;
}

.nip-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.nip-row input {
  flex: 1;
}

.nip-row .btn-secondary {
  width: auto;
  margin-top: 0;
  padding: 0 16px;
  white-space: nowrap;
  font-size: 14px;
}

#nip-status[data-kind="error"], #krs-status[data-kind="error"]  { color: #c0392b; }
#nip-status[data-kind="ok"], #krs-status[data-kind="ok"]        { color: #1f8a47; }
#nip-status[data-kind="loading"], #krs-status[data-kind="loading"] { color: var(--muted); }

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--muted);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
}
.help-btn:hover { color: var(--accent); border-color: var(--accent); }

.help-box {
  display: none;
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--bg-input);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.help-box.visible { display: block; }
.help-box p { margin: 6px 0; }
.help-box strong { color: var(--text); }

.version-badge {
  display: inline-block;
  padding: 1px 7px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: baseline;
  margin: 0 2px;
}

.changelog {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  margin-top: 14px;
  max-height: 65vh;
  overflow-y: auto;
}

.trust {
  margin-top: 32px;
  padding: 20px;
  background: var(--bg-input);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.trust small {
  color: var(--muted);
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 24px auto;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-pending {
  margin: 24px 0;
  padding: 16px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--warning);
  border-radius: 6px;
  font-size: 0.95em;
}

.status-rejected {
  margin: 24px 0;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--danger);
  border-radius: 6px;
  color: var(--danger);
}

.status-success {
  margin: 24px 0;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--success);
  border-radius: 6px;
  color: var(--success);
}

.downloads {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

.downloads a {
  text-align: center;
  padding: 20px 32px;
}

code {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.9em;
}

footer {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.85em;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .container { padding: 24px 16px; }
  .card { padding: 24px; }
  h1 { font-size: 1.8em; }
  .logo { width: 80px; height: 80px; }
}
