:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #f7faff;
  --ink: #0e1a2f;
  --muted: #5a6b85;
  --line: #e1e8f3;
  --brand: #0b3a82;
  --brand-2: #1d5cc0;
  --brand-soft: #e8f0ff;
  --ok: #0d9f6e;
  --ok-soft: #e6f7f0;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --info: #0b6bcb;
  --info-soft: #e6f1fe;
  --danger: #d1293d;
  --danger-soft: #fdecef;
  --ring: rgba(29, 92, 192, .22);
  --shadow: 0 24px 48px -32px rgba(11, 32, 66, .45);
  --radius: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1120;
    --surface: #111a2e;
    --surface-2: #0d1627;
    --ink: #e9eefb;
    --muted: #93a3bd;
    --line: #20304d;
    --brand: #7fa9ff;
    --brand-2: #4d8bff;
    --brand-soft: #152a4d;
    --ok: #34d399;
    --ok-soft: #0f2b23;
    --warn: #fbbf24;
    --warn-soft: #2f2410;
    --info: #60a5fa;
    --info-soft: #122542;
    --danger: #fb7185;
    --danger-soft: #361722;
    --ring: rgba(77, 139, 255, .28);
    --shadow: 0 24px 48px -32px rgba(0, 0, 0, .75);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(29, 92, 192, .10), transparent 60%),
    radial-gradient(900px 480px at -10% 6%, rgba(13, 159, 110, .08), transparent 55%),
    var(--bg);
}

img, svg { display: block; max-width: 100%; }

.ico { width: 16px; height: 16px; flex: none; }

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0a2f6b 0%, #0b3a82 45%, #1256a8 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 320px at 80% 8%, rgba(255, 255, 255, .16), transparent 62%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px);
}

.hero-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr);
  gap: 40px;
  align-items: center;
  padding-top: 52px;
  padding-bottom: 60px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 14px;
  max-width: 18ch;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.hero .lead {
  max-width: 58ch;
  font-size: 17px;
  color: rgba(255, 255, 255, .86);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: rgba(255, 255, 255, .92);
}

.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: #7ef0c4; flex: none; }

.rector {
  position: relative;
  justify-self: end;
  width: min(330px, 100%);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  box-shadow: 0 34px 64px -34px rgba(0, 0, 0, .7);
}

.rector::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(60% 60% at 50% 30%, rgba(126, 240, 196, .2), transparent 70%);
  filter: blur(10px);
}

.rector-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 10px;
  overflow: hidden;
  border-radius: 18px;
  background: #0a2a5c;
}

.rector-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.rector-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(8, 24, 48, .58);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.rector figcaption { display: grid; gap: 4px; padding: 0 18px 18px; }
.rector figcaption strong { font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.rector figcaption span { font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .72); }

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

@media (prefers-color-scheme: dark) {
  .topbar { background: rgba(10, 17, 32, .82); }
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand-lock {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}

.emblem { width: 30px; height: 30px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }

.top-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #0b3a82, #1d5cc0);
  box-shadow: 0 10px 22px -14px rgba(11, 58, 130, .85);
}

.btn-primary:hover { box-shadow: 0 14px 26px -14px rgba(11, 58, 130, .95); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand-2); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 14px 20px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .ico { width: 17px; height: 17px; }
.btn-sm .ico { width: 15px; height: 15px; }

/* ---------- Layout / cards ---------- */

.page { padding-top: 32px; padding-bottom: 64px; }

.layout {
  display: grid;
  grid-template-columns: 1.55fr .85fr;
  gap: 24px;
  align-items: start;
}

.layout > *, .hero-in > * { min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}

.card-head h2 { font-size: 22px; letter-spacing: -.02em; }
.card-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---------- Forms ---------- */

.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 20px; }

.form-section {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 -4px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-section .ico { width: 14px; height: 14px; }

.form-section::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; min-width: 0; }
.label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; }
.label .ico { width: 16px; height: 16px; color: var(--muted); transition: color .15s; }
.field:focus-within > .label .ico { color: var(--brand-2); }
.req { color: var(--danger); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.segmented label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.segmented label:hover { border-color: var(--brand-2); }
.segmented .ico { width: 18px; height: 18px; color: var(--muted); transition: color .15s; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.segmented input:checked ~ span { color: var(--brand); font-weight: 700; }
.segmented label:has(input:checked) .ico { color: var(--brand); }

.segmented label:has(input:checked) {
  border-color: var(--brand-2);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

.segmented label:has(input:focus-visible) { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.input:hover { border-color: #c8d5e8; }

.input:focus {
  outline: none;
  border-color: var(--brand-2);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--ring);
}

textarea.input { min-height: 132px; resize: vertical; line-height: 1.55; }

select.input { appearance: auto; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.filedrop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.filedrop:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.filedrop:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--ring); }

.filedrop-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--brand);
}

.filedrop-ico svg { width: 20px; height: 20px; }

.filedrop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.filedrop-text b { font-size: 14px; }
.filedrop-text .hint { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Alerts / badges ---------- */

.alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14.5px;
}

.alert strong { display: block; font-size: 15px; }
.alert p { margin-top: 2px; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.alert-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }

.alert-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: rgba(13, 159, 110, .14);
}

.alert-ico .ico { width: 19px; height: 19px; }
.alert.err .alert-ico { background: rgba(209, 41, 61, .12); }

.alert.ok { background: var(--ok-soft); border-color: rgba(13, 159, 110, .25); color: var(--ok); }
.alert.ok .id-badge { background: var(--surface); color: var(--ok); border-color: rgba(13, 159, 110, .3); }
.alert.err { background: var(--danger-soft); border-color: rgba(209, 41, 61, .22); color: var(--danger); }

.id-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(29, 92, 192, .18);
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.id-badge.big { padding: 8px 14px; font-size: 20px; }
.id-badge.sm { padding: 4px 8px; font-size: 12.5px; }

/* ---------- Status card ---------- */

.status-card { position: sticky; top: 84px; }

.status-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
}

.status-icon svg { width: 26px; height: 26px; }

.status-card h2 { font-size: 20px; letter-spacing: -.01em; }
.status-card > p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.status-card code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12.5px;
}

.status-form-col { display: grid; gap: 14px; margin: 18px 0; }
.status-form-col .input { font-family: var(--mono); letter-spacing: .04em; }

/* ---------- Status page ---------- */

.status-view { max-width: 660px; margin: 0 auto; }

.status-top { display: flex; align-items: center; gap: 16px; }
.status-view .status-icon { width: 64px; height: 64px; margin: 0; border-radius: 20px; flex: none; }
.status-view .status-icon svg { width: 30px; height: 30px; }

.eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 6px;
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.s-new { background: var(--info-soft); color: var(--info); }
.pill.s-work { background: var(--warn-soft); color: var(--warn); }
.pill.s-done { background: var(--ok-soft); color: var(--ok); }
.pill.s-muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

.status-icon.s-new { background: var(--info-soft); color: var(--info); }
.status-icon.s-work { background: var(--warn-soft); color: var(--warn); }
.status-icon.s-done { background: var(--ok-soft); color: var(--ok); }
.status-icon.s-muted { background: var(--surface-2); color: var(--muted); }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 28px 0 20px;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.steps li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.steps li:first-child::before { left: 50%; }
.steps li:last-child::before { right: 50%; }

.steps .dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.steps .lbl { font-weight: 650; color: var(--ink); }
.steps li.todo .lbl { font-weight: 500; color: var(--muted); }

.steps li.done .dot { border-color: var(--ok); background: var(--ok); }
.steps li.done::before { background: var(--ok); }

.steps li.cur .dot {
  border-color: var(--brand-2);
  background: var(--brand-2);
  box-shadow: 0 0 0 5px var(--ring);
}

.steps li.cur::before { background: var(--brand-2); }

.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---------- Empty state ---------- */

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 28px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--muted);
}

.empty-icon svg { width: 28px; height: 28px; }
.empty h1 { font-size: 24px; letter-spacing: -.02em; }
.empty p { max-width: 44ch; }

/* ---------- Admin ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-head h1 { font-size: 28px; letter-spacing: -.02em; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.search input {
  min-width: 210px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  outline: none;
}

.search input:focus { outline: none; }
.search .btn { border-radius: 9px; }

.records { display: grid; gap: 12px; }

.rec {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color .15s;
}

.rec[open] { border-color: rgba(29, 92, 192, .35); }

.rec-sum {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto 20px;
  grid-template-areas: "id who pill chev";
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
}

.rec-sum::-webkit-details-marker { display: none; }
.rec-sum:hover { background: var(--surface-2); }
.rec-sum:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }

.rec-sum .id-badge { grid-area: id; justify-self: start; }
.rec-who { grid-area: who; display: flex; flex-direction: column; min-width: 0; }
.rec-sum .pill { grid-area: pill; }
.chev { grid-area: chev; color: var(--muted); transition: transform .2s ease; }
.chev svg { width: 18px; height: 18px; }
.rec[open] .chev { transform: rotate(180deg); }

.rec-who strong,
.rec-who span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rec-who strong { font-size: 15px; }

.rec-body {
  display: grid;
  gap: 16px;
  padding: 4px 18px 20px;
  border-top: 1px solid var(--line);
}

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 16px; }
.facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.facts a { display: inline-flex; align-items: center; gap: 6px; }
.facts a .ico { width: 15px; height: 15px; }

.msg { display: grid; gap: 6px; }

.msg p {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.pre { white-space: pre-wrap; }

.rec-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-form select.input { width: auto; min-height: 40px; padding: 8px 10px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

/* ---------- Login ---------- */

.login-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 120px);
  padding: 40px 20px;
}

.login-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  width: min(920px, 100%);
  padding: 0;
  overflow: hidden;
}

.login-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 40px 36px;
  color: #fff;
  background: linear-gradient(150deg, #0a2f6b, #0b3a82 55%, #1256a8);
}

.login-side .emblem { width: 52px; height: 52px; margin-bottom: 4px; }
.login-side h2 { font-size: 24px; letter-spacing: -.02em; }
.login-side p { font-size: 14.5px; color: rgba(255, 255, 255, .82); }
.login-back { margin-top: 14px; font-size: 13.5px; color: #cfe0ff; }
.login-back:hover { color: #fff; }

.login-form { display: grid; gap: 16px; align-content: center; padding: 40px 36px; }
.login-form h1 { font-size: 26px; letter-spacing: -.02em; }
.login-form .alert { margin: 0; }

/* ---------- Footer ---------- */

.foot { padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .status-card { position: static; }
  .rec-sum { grid-template-columns: 96px minmax(0, 1fr) auto 20px; }
}

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; padding-bottom: 44px; }
  .rector {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    justify-self: start;
    width: 100%;
    max-width: 440px;
    padding: 10px;
    border-radius: 18px;
  }
  .rector::before { display: none; }
  .rector-photo { width: 84px; height: 84px; margin: 0; border-radius: 50%; aspect-ratio: auto; }
  .rector-photo img { object-position: center 15%; }
  .rector-badge { display: none; }
  .rector figcaption { padding: 0; gap: 2px; }
  .rector figcaption strong { font-size: 15px; }
  .rector figcaption span { font-size: 12px; }
}

@media (max-width: 820px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .login-card { grid-template-columns: 1fr; }
  .login-side { padding: 28px; }
  .login-side .emblem { width: 40px; height: 40px; }
  .login-form { padding: 30px 26px; }
  .brand-name { font-size: 14px; }
}

@media (max-width: 720px) {
  .rec-sum {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "id chev" "who pill";
    gap: 8px 12px;
  }
  .rec-sum .pill { justify-self: end; }
  .rec-who strong { font-size: 14.5px; }
  .page-actions { width: 100%; }
  .search { flex: 1; }
  .search input { min-width: 0; width: 100%; }
}

@media (max-width: 620px) {
  .grid2 { grid-template-columns: 1fr; }
  .status-view .status-top { align-items: flex-start; }
  .id-badge.big { font-size: 17px; }
  .steps { grid-template-columns: 1fr; gap: 14px; justify-items: start; }
  .steps li { display: flex; align-items: center; gap: 10px; text-align: left; }
  .steps li::before { display: none; }
  .facts { grid-template-columns: 1fr; }
  .rec-actions { flex-direction: column; align-items: stretch; }
  .rec-actions form { width: 100%; }
  .rec-actions .btn { width: 100%; }
  .status-form select.input { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
