/* RiverCert Portal — чистый CSS, без внешних зависимостей (работает офлайн) */
:root {
  --bg: #070a12;
  --bg-soft: #0d1320;
  --panel: #111a2b;
  --panel-2: #16213a;
  --border: #24314d;
  --border-soft: #1c2740;
  --text: #e8eefc;
  --muted: #93a1bd;
  --accent: #5b7cfa;
  --accent-2: #7c5bfa;
  --ok: #2fd6a3;
  --warn: #f0b429;
  --err: #f2555a;
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(91, 124, 250, .22), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(124, 91, 250, .18), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
}

a { color: #8fa7ff; text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mono { font-family: var(--mono); }

/* ---------- Layout ---------- */
.shell { width: 100%; max-width: 760px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(91, 124, 250, .35);
}

.brand-title { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.brand-sub { font-size: 12px; color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px; color: var(--muted);
  white-space: nowrap;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px rgba(47, 214, 163, .7); }
.dot.err { background: var(--err); }

.card {
  background: linear-gradient(180deg, rgba(22, 33, 58, .85), rgba(13, 19, 32, .92));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}


/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 22px;
  overflow-x: auto;
}

.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--accent); }

.panel { display: none; }
.panel.active { display: block; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #b9c6e2;
  margin-bottom: 7px;
}

input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #0a1120;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 124, 250, .18);
}

input::placeholder { color: #5b6884; }

.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(91, 124, 250, .3);
  transition: transform .12s, filter .15s;
  width: 100%;
}

.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn.secondary {
  background: var(--panel-2);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
}

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ---------- Alerts / results ---------- */
.alert {
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 13.5px;
  margin-top: 16px;
  border: 1px solid;
  display: none;
}

.alert.show { display: block; }
.alert.ok { border-color: rgba(47, 214, 163, .45); background: rgba(47, 214, 163, .1); color: #9ef0d3; }
.alert.err { border-color: rgba(242, 85, 90, .45); background: rgba(242, 85, 90, .1); color: #ffb3b5; }
.alert.warn { border-color: rgba(240, 180, 41, .45); background: rgba(240, 180, 41, .1); color: #ffdd9a; }

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 6px 12px;
  font-size: 13px;
  margin-top: 12px;
}

.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }

pre.output {
  background: #070d18;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
  font-size: 12.5px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 12px 0 0;
  color: #a9bde6;
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: step; }

.steps li {
  position: relative;
  padding-left: 34px;
  padding-bottom: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: #b9c6e2;
}

.steps li strong { color: var(--text); }

/* ---------- Grid helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 620px) {
  .grid-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin-bottom: 8px; }
  .card { padding: 20px; }
  body { padding: 18px 12px 40px; }
}

footer.foot {
  margin-top: 26px;
  font-size: 12px;
  color: #5b6884;
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
  margin-right: 7px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }


.card + .card { margin-top: 18px; }

h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.5px; }
h2 { font-size: 17px; margin: 0 0 4px; }
p.lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
