/** Общие стили рабочего пространства и страницы входа. */

:root {
  --bg: #f4f7fb;
  --white: #fff;
  --nav: #102b47;
  --nav2: #183c5c;
  --ink: #19334c;
  --muted: #73849a;
  --line: #dfe7ef;
  --blue: #237ea5;
  --blue2: #e8f4f9;
  --green: #178568;
  --amber: #af781a;
  --red: #be4e60;
  --shadow: 0 5px 24px #112d4710;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.48 "Segoe UI",
    Arial,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  font-weight: 650;
  padding: 10px 15px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:hover {
  filter: brightness(0.97);
}
a {
  color: var(--blue);
}
.app {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: #d9e6f2;
  padding: 25px 15px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  padding: 5px 12px 20px;
  border-bottom: 1px solid #345068;
  margin-bottom: 19px;
}
.brand small {
  color: #a4bbd0;
  letter-spacing: 1.4px;
  font-size: 10px;
  font-weight: 800;
}
.brand strong {
  display: block;
  color: white;
  font-size: 17px;
  line-height: 1.26;
  margin: 8px 0;
}
.brand span {
  color: #84bcd7;
  font-size: 12px;
}
.navcap {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  color: #86a8c2;
  margin: 20px 12px 8px;
}
.navbtn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 3px 0;
  text-align: left;
  background: none;
  color: #c7d6e3;
  font-weight: 560;
}
.navbtn.active,
.navbtn:hover {
  background: #276388;
  color: white;
}
.navico {
  width: 19px;
  text-align: center;
  font-size: 16px;
}
.sidebar-note {
  font-size: 11px;
  line-height: 1.6;
  color: #aec5d6;
  padding: 13px;
  background: #1d4261;
  border-radius: 11px;
  margin: 25px 6px;
}
.right {
  min-width: 0;
}
.topbar {
  height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 30px;
  background: white;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.topbar strong {
  font-size: 15px;
}
.topbar .sub {
  font-size: 12px;
  color: var(--muted);
}
.main {
  padding: 28px 30px 60px;
  max-width: 1640px;
  margin: 0 auto;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 23px;
  flex-wrap: wrap;
}
.heading h1 {
  font-size: 27px;
  letter-spacing: -0.6px;
  margin: 0 0 5px;
  font-weight: 750;
}
.hint {
  color: var(--muted);
  font-size: 12px;
}
.lead {
  color: #6b8296;
  margin: 4px 0;
}
.btn {
  background: #eaf1f7;
  color: #2b5872;
}
.btn.primary {
  background: #197ca3;
  color: white;
}
.btn.green {
  background: #198468;
  color: white;
}
.btn.warn {
  background: #fff1de;
  color: #98651f;
}
.btn.danger {
  background: #fcecf0;
  color: #ab4151;
}
.btn.minor {
  padding: 6px 10px;
  font-size: 12px;
}
.btn.white {
  background: #fff;
  border: 1px solid var(--line);
}
.actions,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.stack {
  display: grid;
  gap: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.stat,
.panel,
.tile {
  background: white;
  border: 1px solid #e1e9f1;
  border-radius: 13px;
  box-shadow: var(--shadow);
}
.stat {
  padding: 20px;
  min-height: 117px;
}
.stat strong {
  display: block;
  font-size: 31px;
  line-height: 1.2;
  margin: 10px 0 5px;
  color: #153955;
}
.stat .cap {
  font-size: 12px;
  color: #6d8599;
}
.stat .foot {
  color: #8296a7;
  font-size: 11px;
}
.stat.accent {
  border-top: 3px solid #1580a7;
}
.stat.good {
  border-top: 3px solid #23987d;
}
.stat.warn {
  border-top: 3px solid #c39143;
}
.stat.bad {
  border-top: 3px solid #c7616a;
}
.panel {
  padding: 21px;
  margin: 17px 0;
}
.panel h2 {
  font-size: 17px;
  margin: 0 0 14px;
}
.panel h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 17px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.tile {
  padding: 18px;
}
.tile h3 {
  margin: 5px 0 7px;
  font-size: 16px;
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  background: #f1f6fa;
  font-size: 11px;
  letter-spacing: 0.2px;
  color: #6d8497;
  text-align: left;
  font-weight: 750;
  white-space: nowrap;
}
td,
th {
  padding: 12px 11px;
  border-bottom: 1px solid #e9eef3;
  vertical-align: top;
}
tbody tr:hover {
  background: #f9fbfd;
}
.pill {
  display: inline-block;
  border-radius: 18px;
  padding: 4px 9px;
  background: #eaf0f5;
  color: #547086;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pill.green {
  background: #e1f4e9;
  color: #117752;
}
.pill.amber {
  background: #fff0d7;
  color: #98621c;
}
.pill.red {
  background: #ffe6eb;
  color: #a74052;
}
.pill.blue {
  background: #e1f1fa;
  color: #236e94;
}
.pill.gray {
  background: #eef0f4;
  color: #697789;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.wide {
  grid-column: 1/-1;
}
label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  color: #577085;
  font-weight: 700;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #d5e1e9;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 11px;
  width: 100%;
  min-width: 0;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a8d8ed;
  border-color: #5ba9ca;
}
.fieldhelp {
  font-size: 11px;
  color: #8192a1;
  margin-top: 4px;
}
.chiprow {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab {
  padding: 8px 14px;
  background: #e9f1f6;
  color: #4e6e86;
}
.tab.active {
  background: #216f94;
  color: #fff;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cardlist {
  display: grid;
  gap: 10px;
}
.item {
  border: 1px solid #e1e9f0;
  border-radius: 11px;
  padding: 16px;
  background: #fff;
}
.item h3 {
  margin: 5px 0 7px;
  font-size: 15px;
}
.item p {
  margin: 5px 0 9px;
}
.tag {
  color: #6990a8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 16px 0;
}
.empty {
  text-align: center;
  background: #f8fbfd;
  color: #869aad;
  padding: 33px 14px;
  border: 1px dashed #d5e2ed;
  border-radius: 10px;
}
.notice {
  padding: 14px 16px;
  background: #eaf5fb;
  color: #356077;
  border-radius: 11px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.65;
}
.notice.amber {
  background: #fff7e9;
  color: #886834;
}
.tiny {
  font-size: 11px;
  color: #7990a2;
}
.timeline {
  display: flex;
  gap: 4px;
  margin: 15px 0;
}
.step {
  flex: 1;
  font-size: 10px;
  text-align: center;
  color: #728ba0;
}
.step::before {
  content: "";
  display: block;
  height: 6px;
  background: #dbe5ed;
  border-radius: 5px;
  margin-bottom: 7px;
}
.step.on::before {
  background: #218a9e;
}
.sectionhead {
  margin: 25px 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sectionhead h2 {
  margin: 0;
  font-size: 19px;
}
.filters input,
.filters select {
  width: auto;
  min-width: 125px;
  max-width: 230px;
}
.search {
  min-width: 235px !important;
}
.personcard {
  cursor: pointer;
  transition: transform 0.12s;
}
.personcard:hover {
  transform: translateY(-2px);
}
.modalmask {
  position: fixed;
  inset: 0;
  background: #0b2237a8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 24px;
}
.modal {
  background: white;
  border-radius: 15px;
  padding: 23px;
  width: min(780px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 80px #00172960;
}
.modal h2 {
  font-size: 21px;
  margin: 0 0 16px;
}
.boxmuted {
  background: #f4f8fb;
  padding: 14px;
  border-radius: 10px;
}
.checks {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}
.checks label {
  font-weight: 500;
}
.checks input {
  width: auto;
}
.slide {
  aspect-ratio: 16/9;
  background: #fff;
  border: 1px solid #d7e3eb;
  box-shadow: var(--shadow);
  padding: 2.8%;
  margin: 15px auto;
  width: 100%;
  max-width: 920px;
  overflow: hidden;
}
.slide h2 {
  font-size: clamp(15px, 2vw, 28px);
  color: #174a71;
  margin: 0 0 10px;
}
.slide .strap {
  font-size: clamp(9px, 1vw, 12px);
  color: #738a9b;
  letter-spacing: 0.8px;
}
.slide table {
  font-size: clamp(8px, 0.9vw, 12px);
}
.slide th,
.slide td {
  padding: 6px;
}
.slide .slidefooter {
  font-size: 10px;
  color: #9daeb8;
  margin-top: 12px;
}
.progress {
  height: 7px;
  background: #e8eef4;
  border-radius: 8px;
  margin: 9px 0;
}
.progress span {
  height: 100%;
  display: block;
  border-radius: 8px;
  background: #2c91a9;
}
.kv {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 8px 12px;
  margin: 10px 0;
}
.kv div:nth-child(odd) {
  color: #7e92a2;
  font-size: 12px;
}
.kv div:nth-child(even) {
  font-weight: 550;
}
.mutedline {
  border-left: 3px solid #9acbdc;
  padding: 6px 12px;
  margin: 9px 0;
  background: #f8fbfd;
}
.help {
  font-size: 12px;
  color: #718a9c;
  line-height: 1.65;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #173e59;
  color: white;
  padding: 14px 19px;
  border-radius: 10px;
  z-index: 120;
  box-shadow: 0 12px 35px #0003;
}
.printonly {
  display: none;
}
@media (max-width: 1200px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 850px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
  }
  .sidebar nav {
    display: flex;
    gap: 4px;
    overflow: auto;
  }
  .navcap,
  .sidebar-note {
    display: none;
  }
  .navbtn {
    white-space: nowrap;
  }
  .brand {
    padding: 0 4px 9px;
    margin-bottom: 8px;
  }
  .brand strong {
    display: inline;
    font-size: 13px;
  }
  .main {
    padding: 16px;
  }
  .topbar {
    height: auto;
    padding: 12px;
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
}
@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat {
    padding: 12px;
  }
  .stat strong {
    font-size: 25px;
  }
  .heading h1 {
    font-size: 23px;
  }
  .kv {
    grid-template-columns: 1fr;
  }
}
@media print {
  .sidebar,
  .topbar,
  .no-print,
  .actions,
  .filters,
  .modalmask {
    display: none !important;
  }
  .app {
    display: block;
  }
  .main {
    max-width: none;
    padding: 0;
  }
  .slide {
    box-shadow: none;
    border: 0;
    page-break-after: always;
    width: 100%;
    max-width: none;
  }
  .panel,
  .stat {
    box-shadow: none;
  }
  body {
    background: #fff;
  }
  @page {
    size: landscape;
    margin: 12mm;
  }
}

/* Управленческая версия */
.sidebar {
  background: #153652;
}
.sidebar-note {
  background: #224966;
}
.topbar {
  height: 72px;
}
.main {
  max-width: 1720px;
}
.executive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.executive-card {
  background: #fff;
  border: 1px solid #dfe8f0;
  border-radius: 14px;
  padding: 17px;
  cursor: pointer;
  box-shadow: 0 4px 18px #1b3e5610;
  transition: 0.12s;
}
.executive-card:hover {
  border-color: #65a7c7;
  transform: translateY(-2px);
}
.executive-card.selected {
  border: 2px solid #2d8fb7;
  background: #f8fcff;
}
.executive-card h3 {
  font-size: 15px;
  min-height: 46px;
  margin: 12px 0 4px;
}
.executive-card .type {
  font-size: 10px;
  text-transform: uppercase;
  color: #748c9d;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.executive-card .metrics {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e4ecf2;
  margin-top: 12px;
  padding-top: 12px;
  gap: 5px;
}
.executive-card .metrics div {
  font-size: 10px;
  color: #7a8d9a;
}
.executive-card .metrics strong {
  display: block;
  font-size: 23px;
  color: #1d4e6d;
}
.workrows {
  display: grid;
  gap: 9px;
}
.workrow {
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid #e1e9f0;
  background: #fbfdff;
}
.workrow h4 {
  font-size: 13px;
  margin: 5px 0;
}
.workrow .hint {
  margin: 3px 0;
}
.mini-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.main-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid #e3ebf3;
  padding: 23px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.main-hero h1 {
  font-size: 27px;
  margin: 0 0 4px;
}
.big-tabbar {
  display: flex;
  gap: 6px;
  background: #edf4f9;
  padding: 5px;
  border-radius: 11px;
  flex-wrap: wrap;
}
.big-tabbar button {
  background: transparent;
  color: #547085;
  padding: 10px 13px;
}
.big-tabbar button.active {
  background: white;
  color: #176d95;
  box-shadow: 0 2px 8px #1d496120;
}
.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  overflow: auto;
}
.task-column {
  background: #f1f6fa;
  border-radius: 12px;
  padding: 12px;
  min-height: 220px;
}
.task-column h3 {
  font-size: 13px;
  margin: 4px 4px 13px;
}
.task-tile {
  background: white;
  border: 1px solid #e0e9f0;
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 10px;
  cursor: pointer;
}
.task-tile:hover {
  border-color: #66a4c5;
}
.task-tile strong {
  display: block;
  margin: 7px 0;
}
.taskmeta {
  font-size: 11px;
  color: #738ba0;
}
.focus-person {
  font-size: 18px;
  font-weight: 750;
}
.attach-file {
  border: 1px dashed #b5c8d5;
  padding: 14px;
  border-radius: 10px;
  background: #f7fafc;
}
.attachment-row {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  padding: 9px;
  border-bottom: 1px solid #e9eef2;
}
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.value-line {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.fresh-feed {
  display: grid;
  gap: 8px;
}
.fresh-feed .workrow {
  border-left: 3px solid #61a2bf;
}
.modal {
  width: min(860px, 100%);
}
.modal .actions {
  position: sticky;
  bottom: -23px;
  background: white;
  padding: 13px 0;
  border-top: 1px solid #e9eef2;
}
@media (max-width: 1350px) {
  .executive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 750px) {
  .executive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .task-board {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
}
@media print {
  .sidebar,
  .topbar,
  .no-print,
  .big-tabbar {
    display: none !important;
  }
  .app {
    display: block;
  }
  .main {
    padding: 8px;
  }
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-brand {
  background: var(--nav);
  color: white;
  padding: clamp(30px, 7vw, 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-brand h1 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.2;
}
.auth-brand p {
  color: #b7cee0;
  max-width: 440px;
  line-height: 1.8;
}
.auth-brand small {
  letter-spacing: 2px;
  color: #8ec3df;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.auth-card {
  width: 100%;
  max-width: 410px;
}
.auth-card h2 {
  font-size: 28px;
  margin: 0 0 6px;
}
.auth-card form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}
.auth-card .btn {
  width: 100%;
  padding: 13px;
}
.auth-error {
  color: #a74050;
  min-height: 22px;
}
.auth-caption {
  margin-top: 30px;
  color: var(--muted);
  font-size: 12px;
}
.auth-mark {
  font-size: 36px;
  color: #8ec3df;
  margin-bottom: 34px;
}
#roleSelect:disabled,
#whoSelect:disabled {
  opacity: 1;
  background: #f5f8fb;
}
@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    padding: 32px;
  }
  .auth-brand h1 {
    font-size: 25px;
  }
  .auth-brand p,
  .auth-mark {
    display: none;
  }
  .auth-main {
    padding: 36px 24px;
  }
}
