/* Брендбук ИЛЛИС: Circe, бордовый #7C1B25, белый фон, мотив «шкала». */

@font-face {
  font-family: "Circe";
  src: url("../fonts/Circe-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("../fonts/Circe-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("../fonts/Circe-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --maroon: #7C1B25;
  --heading: #000000;
  --ink: #333333;
  --muted: #666666;
  --line: #CCCCCC;
  --bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --wash: #F2F2F2;
  --accent: var(--maroon);
  --accent2: var(--maroon);
}

* { box-sizing: border-box; }

html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: Circe, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 { color: var(--heading); }

a { color: var(--maroon); }

/* Полоса знаков аккредитации убрана из шапки — плитки на главной. */
header { background: #fff; }
.bar {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.bar a { color: var(--ink); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.brand img { height: 88px; width: auto; object-fit: contain; flex-shrink: 0; }
.brand .t2 {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--heading);
}
.bar .spacer { flex: 1; min-width: 12px; }
.bar nav { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bar nav a { color: var(--muted); white-space: nowrap; font-size: .84rem; }
.bar nav a:hover { color: var(--maroon); }

/* Фирменный мотив «шкала»: по ширине как шапка, не на весь экран. */
.ruler-wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.ruler {
  height: 14px;
  width: 100%;
  background-image:
    repeating-linear-gradient(90deg, #999 0 1px, transparent 1px 45px),
    repeating-linear-gradient(90deg, #ccc 0 1px, transparent 1px 9px);
  background-size: 100% 14px, 100% 9px;
  background-position: bottom left, bottom left;
  background-repeat: repeat-x;
}

@media (max-width: 900px) {
  .bar { flex-wrap: wrap; }
  .brand .t2 { white-space: normal; }
  .bar nav { width: 100%; gap: 12px 16px; flex-wrap: wrap; }
}

main { max-width: 1000px; margin: 24px auto; padding: 0 20px; flex: 1; width: 100%; box-sizing: border-box; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card.narrow { max-width: 600px; margin-left: auto; margin-right: auto; }
.login-box { max-width: 520px; margin: 0 auto; }

h1 { font-size: 1.5rem; margin: .2em 0 .6em; }
h2 { font-size: 1.15rem; }

label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .92rem; }
input, textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
input[type=file] { padding: 7px; background: var(--wash); }
input[type=checkbox] { width: auto; margin-right: 8px; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin-top: 12px; }

.section {
  margin: 22px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  color: var(--maroon);
  font-size: .95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 18px;
  align-items: start;
}
.form-grid .field { display: flex; flex-direction: column; }
.form-grid label { margin-top: 8px; }
.form-grid .field.full, .form-grid .section, .form-grid .notice,
.form-grid .fileblock, .form-grid .consent { grid-column: 1 / -1; }
@media (max-width: 820px) { .form-grid { grid-template-columns: 1fr; } }

.helptext, .help { color: var(--muted); font-size: .83rem; }

.btn {
  display: inline-block;
  background: var(--maroon);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { filter: brightness(.93); color: #fff; }
.btn.secondary {
  background: #fff;
  color: var(--maroon);
  border: 1px solid var(--maroon);
}
.btn.secondary:hover { color: var(--maroon); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .8rem;
  background: #eef2ff;
  color: #3730a3;
}
.badge.status-new { background: #f3f4f6; color: #374151; }
.badge.status-accepted { background: #fef3c7; color: #92400e; }
.badge.status-in_progress { background: #dbeafe; color: #1d4ed8; }
.badge.status-ready { background: #dcfce7; color: #166534; }
.badge.status-released, .badge.status-done { background: #bbf7d0; color: #15803d; }
.badge.status-canceled { background: #fee2e2; color: #b91c1c; }

.errorlist, ul.errorlist { color: #b91c1c; font-size: .85rem; margin: 4px 0; padding-left: 18px; }
.has-error input, .has-error textarea, .has-error select {
  border-color: #dc2626;
  background: #fef2f2;
}
.has-error > label { color: #b91c1c; }

.consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-weight: 400; }
.consent input { width: auto; margin-top: 3px; }
.consent .req { color: #dc2626; }
.consent a { color: var(--maroon); white-space: nowrap; }

.notice {
  background: #e8f1f4;
  border: 1px solid #b7d0d8;
  color: #00536F;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

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

/* Информационные оповещения — дэним брендбука, не бордовый. */
.card.announcement { border-left: 4px solid #00536F; }
#about { scroll-margin-top: 16px; }

.register-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .register-grid { grid-template-columns: 1fr; } }

/* Плитки (ховер как на главной ЛИС: серая плашка → бордовый акцент). */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 14px;
}
.tile-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center;
}
@media (max-width: 820px) {
  .tile-grid, .tile-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .tile-grid, .tile-grid-3 { grid-template-columns: 1fr; }
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  min-height: 132px;
  padding: 18px 14px;
  border: 1px solid rgba(128, 128, 128, .18);
  border-left: 6px solid rgb(153, 153, 153);
  border-radius: 12px;
  background-color: rgba(153, 153, 153, .05);
  transition: transform .08s ease, box-shadow .18s ease, background-color .18s ease,
              border-color .18s ease;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 27, 37, .22);
  background-color: rgba(124, 27, 37, .06);
  border-color: rgba(124, 27, 37, .35);
  border-left-color: var(--maroon);
  color: var(--ink);
}
.tile img { height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.tile-mark {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem; color: var(--maroon);
  border: 1px solid var(--line); background: #fff;
}
.tile-name { font-size: .85rem; font-weight: 600; line-height: 1.3; }

/* Футер — плашка в стиле ИЛЛИС (не тёмно-бирюзовая заливка rostcsm). */
.site-footer {
  background: #F2F2F2;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 28px 20px 32px;
  color: var(--ink);
}
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: 24px 40px;
  align-items: start;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contacts { text-align: left; }
}
.footer-copy { font-size: .88rem; line-height: 1.45; margin-bottom: 16px; color: var(--heading); }
.footer-social { display: flex; gap: 10px; margin-bottom: 16px; }
.soc {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(128, 128, 128, .18);
  border-left: 4px solid rgb(153, 153, 153);
  background: rgba(153, 153, 153, .05);
  color: var(--ink);
  text-decoration: none;
  transition: transform .08s ease, box-shadow .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease;
}
.soc svg { width: 22px; height: 22px; display: block; }
.soc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 27, 37, .22);
  background-color: rgba(124, 27, 37, .06);
  border-color: rgba(124, 27, 37, .35);
  border-left-color: var(--maroon);
  color: var(--maroon);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a { color: var(--ink); text-decoration: none; font-size: .9rem; }
.footer-nav a:hover { color: var(--maroon); }
.footer-contacts { font-size: .88rem; color: var(--muted); line-height: 1.55; }
@media (min-width: 721px) { .footer-contacts { text-align: right; } }
.footer-contacts p { margin: 4px 0; }
.footer-contacts a { color: var(--maroon); text-decoration: none; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-phone {
  display: block; font-size: 1.25rem; font-weight: 700;
  text-decoration: none; margin-bottom: 8px;
}
.footer-contacts a.footer-phone { color: var(--heading); text-decoration: none; }
.footer-contacts a.footer-phone:hover { color: var(--maroon); text-decoration: none; }

.login-logo {
  display: block;
  height: auto;
  max-height: 160px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 18px;
  object-fit: contain;
}
.brand-illis { color: var(--maroon); font-weight: 700; }
