/* ProjectSuite — общая оболочка прототипа (7 экранов). Шапка .ps-header, подвал .ps-footer,
   кнопки, пилюли статусов, карточка, таблица, аватар. Стили конкретного экрана — в его <style>
   с префиксом .scr-<имя>. Шрифты: Montserrat (марка, заголовки, меню) + Open Sans (текст). */

:root {
  /* Бренд fdot.gov — дословно */
  --fd-navy: #1F4283;
  --fd-link: #306BC1;
  --fd-deep: #002554;
  --fd-bg: #F7F7F7;
  --fd-bg-2: #EFEFEF;
  --fd-border: #DDDDDD;
  --fd-green: #13A456;

  /* Снято пипеткой с макетов (FD-B.png) */
  --ps-page: #F4F5F7;           /* фон страницы */
  --ps-surface: #FFFFFF;        /* карточки, шапка */
  --ps-ink: #17171F;            /* основной текст */
  --ps-ink-2: #3D4050;          /* вторичный текст */
  --ps-muted: #626366;          /* подписи полей */
  --ps-title: #061A6F;          /* заголовки карточек, марка */
  --ps-brand: #0A1F6E;          /* марка, меню */
  --ps-id: #0A2AA8;             /* номера пакетов CR-… */
  --ps-blue: #0055DA;           /* основная кнопка, акцент */
  --ps-blue-2: #0242D7;
  --ps-blue-line: #5D8EDF;      /* обводка вторичной кнопки */
  --ps-link-ink: #0D3FD3;       /* ссылки-действия */
  --ps-active-nav: #0A2E8A;     /* фон активного пункта меню */
  --ps-card-line: #E4E6E9;      /* рамка карточки */
  --ps-line: #D4D6DB;           /* разделитель под заголовком карточки */
  --ps-line-soft: #E6E7EA;      /* разделители строк */
  --ps-line-strong: #C8CCD2;    /* рамки вложенных блоков */
  --ps-head-bg: #F3F5F7;        /* шапки вложенных блоков, ячейки-подписи */
  --ps-sel-bg: #D9EAFE;         /* выбранная строка */
  --ps-sel-bar: #0057E2;
  --ps-row-hl: #DDECFD;         /* подсвеченная строка маршрута */
  --ps-panel-navy: #00245A;     /* тёмная шапка панели */
  --ps-warn-bg: #FDEED4;        /* плашка hold */
  --ps-warn-ink: #76330D;
  --ps-warn-line: #F2C77E;
  --ps-plaque-bg: #FEF3D8;      /* «Working as» */
  --ps-plaque-line: #F5C46A;
  --ps-plaque-ink: #382B1F;
  --ps-ok-bg: #DEF9DA;          /* зелёные пилюли / ячейки */
  --ps-ok-line: #BDE2C0;
  --ps-ok-ink: #0C4215;
  --ps-ok-cell: #E0FBDD;
  --ps-ok-dot: #0F7A34;
  --ps-info-bg: #D3E7FD;        /* синие пилюли */
  --ps-info-line: #A5C6F4;
  --ps-info-ink: #08207F;
  --ps-gray-bg: #E3E4E6;        /* серые пилюли */
  --ps-gray-line: #C4C5CA;
  --ps-gray-ink: #4E4E52;
  --ps-icon: #6B6F79;
  --ps-rail: #A3A6AC;

  --ps-font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --ps-font-text: "Open Sans", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ps-page);
  color: var(--ps-ink);
  font-family: var(--ps-font-text);
  font-size: 13px;
  line-height: 1.35;
  overflow-x: hidden;
}
a { color: var(--fd-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
button { font: inherit; }
.nowrap { white-space: nowrap; }

/* ───────────── Шапка ───────────── */
.ps-header {
  position: relative;
  display: flex;
  align-items: center;
  height: 51px;
  padding: 0 10px 0 20px;
  background: var(--ps-surface);
  border-bottom: 4px solid var(--fd-navy);
  white-space: nowrap;
}
.ps-brand {
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: 23.3px;
  letter-spacing: 0;
  color: var(--ps-brand);
  line-height: 1;
  padding-bottom: 1px;
}
.ps-brand:hover { text-decoration: none; }
.ps-sep {
  width: 2px; height: 23px; margin: 0 13px 0 15px;
  background: var(--ps-brand);
  flex: none;
}
.ps-subtitle {
  font-family: var(--ps-font-head);
  font-weight: 500;
  font-size: 15.8px;
  color: #0C1C6B;
  line-height: 1;
}
.ps-nav {
  display: flex;
  align-items: center;
  margin-left: 25px;
  flex: none;
}
.ps-nav a {
  display: block;
  height: 27px;
  line-height: 27px;
  padding: 0 9.5px;
  margin-right: 0;
  font-family: var(--ps-font-head);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--ps-brand);
  border-radius: 2px;
}
.ps-nav a:hover { text-decoration: none; background: var(--fd-bg-2); }
.ps-nav a.is-active { background: var(--ps-active-nav); color: #fff; }
.ps-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 282px;
  min-width: 150px;
  height: 25px;
  margin-left: auto;
  padding: 0 6px 0 7px;
  border: 1px solid #BEC1C6;
  border-radius: 4px;
  background: #fff;
  color: #838386;
}
.ps-search svg { flex: none; }
.ps-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; padding: 0; background: transparent;
  font: italic 400 10.5px var(--ps-font-text);
  color: var(--ps-ink);
}
.ps-search input::placeholder { color: #838386; opacity: 1; }
.ps-bell {
  position: relative;
  display: block;
  flex: none;
  margin-left: 16px;
  width: 24px; height: 26px;
  color: var(--ps-brand);
}
.ps-bell .ps-badge {
  position: absolute; top: 1px; right: -1px;
  min-width: 10px; height: 10px; padding: 0 2px;
  border-radius: 5px;
  background: #1550D0; color: #fff;
  font: 700 7px/10px var(--ps-font-text);
  text-align: center;
}
.ps-user {
  display: flex;
  align-items: center;
  flex: none;
  margin-left: 13px;
  color: var(--ps-ink);
}
.ps-user .avatar { width: 44px; height: 44px; }
.ps-user-text { margin-left: 8px; display: flex; flex-direction: column; align-items: flex-start; }
.ps-user-line { font-size: 11.2px; line-height: 15px; color: #3B3A3D; display: flex; align-items: center; }
.ps-user-line b { color: #090709; font-weight: 700; font-size: 11.3px; }
.ps-user-line svg { margin-left: 7px; color: var(--ps-brand); }
.ps-plaque {
  margin-top: 3px;
  height: 19px;
  line-height: 17px;
  padding: 0 8px;
  border: 1px solid var(--ps-plaque-line);
  border-radius: 9px;
  background: var(--ps-plaque-bg);
  color: var(--ps-plaque-ink);
  font-size: 10.7px;
}
.ps-proto {
  flex: none;
  margin-left: 14px;
  height: 24px;
  line-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--fd-navy);
  border-radius: 5px;
  color: var(--fd-navy);
  font-size: 10.6px;
  background: #fff;
}

/* ───────────── Подвал ───────────── */
.ps-footer {
  height: 24px;
  line-height: 23px;
  padding: 0 15px;
  border-top: 1px solid var(--ps-line-soft);
  background: var(--ps-page);
  color: #616164;
  font-size: 11.1px;
}

/* ───────────── Кнопки ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 30px;
  padding: 0 18px;
  border-radius: 4px;
  border: 1.5px solid var(--ps-blue-line);
  background: #fff;
  color: #0A38CA;
  font: 600 13.5px/1 var(--ps-font-text);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; background: #F2F7FF; }
.btn-primary { background: var(--ps-blue); border-color: var(--ps-blue-2); color: #fff; }
.btn-primary:hover { background: #004BC2; }
.btn-outline { background: #fff; }

/* ───────────── Пилюли статусов ───────────── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 19px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 11.5px/1 var(--ps-font-text);
  white-space: nowrap;
}
.pill-review  { background: var(--ps-info-bg); border-color: var(--ps-info-line); color: var(--ps-info-ink); }
.pill-queued  { background: #CFE4FE; border-color: #A8C7F1; color: #0A2181; }
.pill-approved{ background: var(--ps-ok-bg); border-color: var(--ps-ok-line); color: var(--ps-ok-ink); }
.pill-ready   { background: var(--ps-ok-bg); border-color: var(--ps-ok-line); color: var(--ps-ok-ink); }
.pill-active  { background: #DBF8D7; border-color: #BBE6BC; color: #083F11; }
.pill-pending { background: var(--ps-gray-bg); border-color: var(--ps-gray-line); color: var(--ps-gray-ink); }

/* ───────────── Карточка, таблица, аватар ───────────── */
.card {
  background: var(--ps-surface);
  border: 1px solid var(--ps-card-line);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
}
.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 9px 0 10px;
  border-bottom: 1px solid var(--ps-line);
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: 17.3px;
  color: var(--ps-title);
  white-space: nowrap;
}
.card-h a { color: inherit; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.4px; }
.tbl th { font-weight: 600; text-align: left; color: var(--ps-ink); }
.tbl td, .tbl th { height: 30px; padding: 0 11px; white-space: nowrap; border-bottom: 1px solid var(--ps-line-soft); }
.tbl th { height: 26px; font-size: 11.5px; color: var(--ps-muted); background: var(--ps-head-bg); }
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: #E3E6EB; }
.avatar-sm { width: 29px; height: 29px; }
.avatar-md { width: 34px; height: 34px; }
.avatar-lg { width: 44px; height: 44px; }

/* ───────────── Узкая шапка ───────────── */
@media (max-width: 1600px) {
  .ps-search { flex: 0 0 28px; min-width: 0; width: 28px; padding: 0 6px; margin-left: auto; }
  .ps-search input { display: none; }
}
@media (max-width: 1500px) {
  .ps-nav a { padding: 0 8px; }
  .ps-nav { margin-left: 22px; }
  .ps-user-role { display: none; }
}
@media (max-width: 760px) {
  .ps-header {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "brand sub sub proto"
      "work work tools tools"
      "nav nav nav nav";
    height: auto;
    row-gap: 6px;
    padding: 8px 12px 0;
  }
  .ps-brand { grid-area: brand; font-size: 16px; }
  .ps-sep { display: none; }
  .ps-subtitle { grid-area: sub; font-size: 11px; margin-left: 7px; padding-left: 7px; border-left: 2px solid var(--ps-brand); }
  .ps-proto { grid-area: proto; margin-left: 6px; font-size: 9px; height: 20px; line-height: 18px; padding: 0 5px; }
  .ps-nav {
    grid-area: nav;
    margin: 0 -12px;
    padding: 0 8px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ps-nav::-webkit-scrollbar { display: none; }
  .ps-nav a { flex: none; padding: 0 9px; }
  .ps-search, .ps-bell, .ps-user .avatar { grid-area: tools; align-self: center; }
  .ps-search { justify-self: end; margin: 0 84px 0 0; flex: none; }
  .ps-bell { justify-self: end; margin: 0 46px 0 0; }
  .ps-user { display: contents; }
  .ps-user .avatar { justify-self: end; width: 34px; height: 34px; }
  .ps-user-text { display: contents; }
  .ps-user-line { display: none; }
  .ps-plaque { grid-area: work; justify-self: start; align-self: center; margin: 0; font-size: 9.5px; height: 17px; line-height: 15px; padding: 0 6px; }
  .ps-footer { height: auto; line-height: 1.4; padding: 6px 12px; }
}
