:root {
  --blue: #2a7fc1;
  --blue-d: #0b5fa8;
  --ink: #1f2b3d;
  --muted: #5d6b80;
  --line: #d9e4ef;
  --bg: #eef4fa;
  --card: #ffffff;
  --ok: #1f8a4c;
  --err: #c0392b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Roboto", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }

.card {
  background: var(--card); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20, 50, 90, .06), 0 8px 24px rgba(20, 50, 90, .06);
  padding: 24px;
}
.card + .card { margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--blue); color: #fff; font-weight: 500; cursor: pointer;
  text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--blue-d); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--line); }
.btn.ghost:hover { background: #f3f8fd; }

label.f { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(42, 127, 193, .15); }
textarea { resize: vertical; min-height: 64px; line-height: 1.4; }

.cert-scale { width: 100%; position: relative; overflow: hidden; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(20, 50, 90, .15); background: #fff; }
.cert-scale > .cert { position: absolute; left: 0; top: 0; }

.hint { font-size: 13px; color: var(--muted); }
.err { color: var(--err); }

.topnav { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.topnav a { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 14px; background: #fff; border: 1px solid var(--line); }
.topnav a.on { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn[hidden] { display: none; }
.topnav { align-items: center; }
.topnav .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.topnav .who button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 12px; cursor: pointer; color: var(--ink); font-size: 14px; }
.topnav .who button:hover { background: #f3f8fd; }
.warnbar { background: #fff6e0; border: 1px solid #f0d58a; color: #6b5310; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: -4px 0 14px; }
.warnbar a { color: inherit; }
@media (max-width: 520px) { .topnav .who { margin-left: 0; width: 100%; justify-content: space-between; } }

/* Меню закреплено сверху; место под него и под полосу прокрутки зарезервировано, чтобы страницы не «прыгали» */
html { scrollbar-gutter: stable; overflow-y: scroll; }
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  margin: -24px 0 14px; padding: 14px 0 12px; min-height: 64px;
  box-shadow: 0 8px 10px -12px rgba(20, 50, 90, .35);
}
.topnav .who { min-height: 34px; min-width: 120px; justify-content: flex-end; }
