:root {
  --bg: #e1e1e1;
  --panel: #efefef;
  --line: #d7d7d7;
  --line-strong: #aaaaaa;
  --header-blue: #294681;
  --header-blue-dark: #1f3768;
  --btn-orange: #f99d1c;
  --btn-dark: #595959;
  --btn-danger: #d63e35;
  --text: #1b1b1b;
  --muted: #626262;
  --link-orange: #ff551a;
  --ok-bg: #def6dc;
  --ok: #1f6a38;
  --err-bg: #fbe1e1;
  --err: #9f1e1e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 18px;
}

.layout {
  display: block;
  min-height: 100vh;
}

.sidebar {
  background: #1f3f79;
  border-right: 1px solid #18315f;
  color: #fff;
  position: fixed;
  left: 0;
  top: 0;
  width: 210px;
  height: 100vh;
  overflow: hidden;
}

.sidebar-brand {
  padding: 14px 17px 22px;
  border-bottom: 1px solid #26497f;
}

.sidebar-title {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sidebar-subtitle {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.85;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  padding: 11px 10px 13px 17px;
  text-decoration: none;
  color: #fff;
  border-top: 1px solid #274c86;
  border-bottom: 1px solid #18315f;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
  background: #163267;
}

.content {
  margin: 30px 30px 60px 240px;
  padding: 0;
}

.header-bar {
  background: var(--header-blue);
  color: #fff;
  border-radius: 2px;
  padding: 6px 11px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 31px;
}

.header-bar strong {
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 400;
}

.panel {
  background: transparent;
  border: 0;
}

.panel-title {
  margin: 0 0 8px;
  padding: 0;
  background: transparent;
  color: #1f3768;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.panel-body {
  padding: 0;
}

.hint {
  margin: 0 0 10px;
  color: #575757;
  font-size: 13px;
}

.hint-inline {
  margin: 0;
}

.form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 8px;
}

.form-row-between {
  justify-content: space-between;
}

.form-row-center {
  align-items: center;
}

.form-row-end {
  align-items: flex-end;
}

.form-row-actions {
  margin-bottom: 8px;
}

.field {
  min-width: 210px;
}

.field-filter {
  min-width: 190px;
}

.field-wide {
  min-width: 300px;
  flex: 1;
}

label {
  display: block;
  margin: 0 0 4px;
  color: #000;
  font-weight: 400;
  font-size: 14px;
}

input[type="text"],
input[type="file"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  padding: 0 3px;
  font-size: 14px;
  line-height: 1.2;
}

input[type="text"],
input[type="file"],
input[type="number"],
select {
  height: 28px;
}

textarea {
  min-height: 74px;
  resize: vertical;
  padding: 3px;
}

.choice-fieldset {
  border: 1px solid var(--line);
  background: #ededed;
  margin: 0 0 9px;
  padding: 8px 10px;
}

.choice-fieldset legend {
  padding: 0 6px;
  color: #253f74;
  font-size: 14px;
  font-weight: 700;
}

.choice-stack {
  display: grid;
  gap: 7px;
}

.choice-stack--source {
  grid-template-columns: minmax(300px, 1fr) auto minmax(300px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.choice-item {
  background: #f8f8f8;
  border: 1px solid var(--line);
  padding: 7px;
}

.choice-item--source {
  background: #fff;
  border-color: #d4d4d4;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.choice-title {
  margin: 0;
  color: #1b3262;
  font-size: 14px;
  font-weight: 700;
}

.choice-hint {
  margin-bottom: 10px;
}

.choice-divider {
  color: #6d6d6d;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.choice-note {
  margin: 0;
  color: #616161;
  font-size: 12px;
  line-height: 16px;
}

.file-upload-wrap {
  padding: 8px;
  border: 1px dashed #bbbbbb;
  border-radius: 2px;
  background: #fafafa;
}

input.file-upload-input {
  height: auto;
  min-height: 35px;
  padding: 0;
  border: 0;
  background: transparent;
}

input.file-upload-input::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 2px;
  padding: 7px 12px;
  background: var(--header-blue);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

input.file-upload-input::-webkit-file-upload-button {
  margin-right: 10px;
  border: 0;
  border-radius: 2px;
  padding: 7px 12px;
  background: var(--header-blue);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

input.file-upload-input:hover::file-selector-button,
input.file-upload-input:hover::-webkit-file-upload-button {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.checkbox {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #1b1b1b;
  font-size: 14px;
  font-weight: 400;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

.btn,
button.btn {
  display: inline-block;
  border: 0;
  border-radius: 2px;
  padding: 7px 12px;
  background: var(--btn-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.header-bar .btn {
  padding: 6px 11px;
  font-size: 12px;
}

.btn:hover,
button.btn:hover {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  filter: none;
}

.btn-dark {
  background: var(--btn-dark);
  color: #fff;
}

.btn-danger {
  background: var(--btn-danger);
}

.table-wrap {
  margin-top: 14px;
  background: #fff;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #ececec;
  padding: 10px 10px 9px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #fff;
  color: #333;
  font-weight: 700;
  border-bottom-color: #dedede;
  white-space: nowrap;
}

tbody tr:hover td {
  background: #f3f3f3;
}

td a:not(.btn) {
  color: var(--link-orange);
  text-decoration: none;
}

td a:not(.btn):hover {
  text-decoration: underline;
}

.col-date {
  width: 11%;
}

.col-plan {
  width: 32%;
}

.col-edit {
  width: 13%;
}

.col-delete {
  width: 30%;
}

.col-export {
  width: 14%;
}

.flash-ok,
.flash-err {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
}

.flash-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.flash-err {
  background: var(--err-bg);
  color: var(--err);
}

.inline-form,
.inline-form-single {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.note-inline {
  color: #727272;
}

.event-stack-item + .event-stack-item {
  border-top: 1px dashed #dddddd;
  margin-top: 8px;
  padding-top: 8px;
}

.event-label {
  color: #2a467a;
  font-weight: 700;
}

.muted {
  color: #777;
}

.empty {
  color: #707070;
}

.nowrap {
  white-space: nowrap;
}

.panel .form-row + .table-wrap,
.panel .form-row + .form-row,
.panel .choice-fieldset + .form-row {
  margin-top: 8px;
}

.form-row-actions {
  gap: 8px;
}

.form-row-actions .btn {
  min-width: 96px;
  text-align: center;
}

.center-plan-topbar {
  margin-bottom: 10px;
}

.center-plan-topbar .hint {
  max-width: 760px;
}

.center-plan-actions {
  margin-top: 0;
  margin-bottom: 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #d7d7d7;
}

.center-plan-form {
  max-width: 1120px;
  border: 1px solid #d7d7d7;
  border-radius: 2px;
  background: #fff;
  padding: 14px;
}

.center-plan-primary-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(240px, 320px);
  gap: 12px;
  align-items: end;
}

.center-plan-form .field {
  min-width: 0;
}

.center-plan-form .choice-fieldset {
  margin-top: 14px;
  margin-bottom: 0;
}

.center-plan-form .choice-fieldset legend {
  margin-left: 2px;
}

.center-plan-row {
  margin-top: 14px;
}

.center-plan-row--checkbox {
  margin-top: 12px;
}

.center-plan-row--submit {
  margin-top: 16px;
}

.center-plan-form textarea {
  min-height: 96px;
}

.center-plans-list-head {
  max-width: 1120px;
  border: 1px solid #d7d7d7;
  border-radius: 2px;
  background: #fff;
  padding: 12px 14px;
}

.center-plans-list-hint {
  margin-bottom: 10px;
}

.center-plans-list-controls {
  margin-top: 0;
  margin-bottom: 0;
  gap: 10px;
}

.center-plans-list-filter {
  margin-top: 0;
  margin-bottom: 0;
}

.center-plans-list-filter .field-filter {
  min-width: 220px;
}

.center-plans-table-wrap {
  max-width: 1120px;
  margin-top: 12px;
  border: 1px solid #d7d7d7;
  border-radius: 2px;
}

.center-plans-table-wrap table {
  margin: 0;
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .sidebar-brand {
    border-bottom: 1px solid #26497f;
    padding-bottom: 12px;
  }

  .nav-link {
    border-left: 0;
  }

  .content {
    margin: 12px;
  }

  .col-date,
  .col-plan,
  .col-edit,
  .col-delete,
  .col-export {
    width: auto;
  }

  .choice-stack--source {
    grid-template-columns: 1fr;
  }

  .choice-divider {
    justify-content: flex-start;
    padding: 0;
  }

  .center-plan-actions {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .center-plan-form {
    padding: 10px;
  }

  .center-plan-primary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .center-plan-form .choice-fieldset,
  .center-plan-row {
    margin-top: 10px;
  }

  .center-plans-list-head {
    padding: 10px;
  }

  .center-plans-list-controls {
    gap: 8px;
  }

  .center-plans-list-filter {
    width: 100%;
  }

  .center-plans-list-filter .field-filter {
    min-width: 0;
    flex: 1;
  }
}
