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

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

body {
  padding-top: 52px;
  color: #243038;
  background: #eef2f4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: #0b6f99;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: #222;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 18px 0 10px;
  color: #fff;
  background: #005f87;
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar a {
  color: #fff;
  text-decoration: none;
}

.brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.top-right a {
  color: #ddd;
}

.top-right a:hover {
  color: #fff;
}

.sidebar {
  position: fixed;
  top: 52px;
  bottom: 0;
  left: 0;
  width: 240px;
  overflow: auto;
  background: #fff;
  border-right: 1px solid #e1e7eb;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 10px;
  padding: 10px 12px;
  color: #243038;
  text-decoration: none;
  border-radius: 8px;
}

.sidebar a svg {
  flex: 0 0 auto;
}

.sidebar a:hover {
  background: #f3f7f9;
}

.sidebar a.active,
.sidebar a.active:hover {
  color: #005f87;
  background: #e7f4f8;
  font-weight: 700;
}

.main {
  min-height: calc(100vh - 52px);
  margin-left: 240px;
  padding: 22px 28px 64px;
}

h1 {
  margin: 0 0 4px;
  color: #16323c;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

h2.section {
  margin: 28px 0 10px;
  color: #16323c;
  font-size: 18px;
  font-weight: 700;
}

.nr {
  margin-left: 6px;
  color: #999;
  font-size: 14px;
}

.crumbs {
  margin: 0 0 14px;
  color: #5c6b73;
  font-size: 14px;
}

.crumbs a {
  color: #2f6f9f;
  text-decoration: none;
}

.crumbs a:hover,
.grid a:hover,
.panel a:hover {
  text-decoration: underline;
}

.crumbs .sep {
  margin: 0 6px;
  color: #b0b0b0;
}

.tabbar {
  display: flex;
  align-items: stretch;
  min-height: 44px;
  margin: 16px -28px 18px;
  padding: 0 16px;
  background: #005f87;
}

.tabbar a,
.tabbar span {
  padding: 12px 16px;
  color: #d7ebf4;
  text-decoration: none;
}

.tabbar a:hover {
  color: #fff;
}

.tabbar a.active {
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 #c8d200;
}

.tabbar .disabled {
  color: #9a9a9a;
}

.banner-warn,
.flash {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #e4d7a4;
  border-radius: 8px;
  background: #fff8e8;
  line-height: 1.45;
}

.flash.ok {
  border-color: #b7d7b4;
  background: #f1f8f0;
}

.flash.error {
  border-color: #e3b4b4;
  background: #fdf1f1;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e1e7eb;
  border-radius: 8px;
}

.toolbar .spacer {
  flex: 1;
}

.toolbar input[type="search"] {
  width: 240px;
  padding: 8px 10px;
  border: 1px solid #c5ced4;
  border-radius: 6px;
  background: #fff;
}

.toolbar select {
  padding: 8px 10px;
  border: 1px solid #c5ced4;
  border-radius: 6px;
  background: #fff;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  color: #16323c;
  line-height: 1.35;
  text-decoration: none;
  background: #fff;
  border: 1px solid #c5ced4;
  border-radius: 6px;
  cursor: pointer;
}

.btn:hover {
  background: #e9e9e9;
  text-decoration: none;
}

.btn-primary,
.btn-primary:hover {
  color: #fff;
  background: #005f87;
  border-color: #005f87;
}

.btn-primary:hover {
  background: #004968;
  border-color: #004968;
}

.table-wrap {
  overflow-x: auto;
  padding: 4px 8px 8px;
  background: #fff;
  border: 1px solid #e1e7eb;
  border-radius: 8px;
}

.grid {
  width: 100%;
  min-width: 920px;
  margin-top: 2px;
  border-collapse: collapse;
}

.grid th {
  padding: 12px;
  color: #3d4c55;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  background: #f7fafb;
  border-bottom: 1px solid #e1e7eb;
}

.grid td {
  padding: 13px 12px;
  vertical-align: top;
  border-bottom: 1px solid #eef2f4;
}

.grid tbody tr:hover td {
  background: #f4f8fb;
}

.grid tr.group td {
  padding-top: 18px;
  padding-bottom: 6px;
  color: #005f87;
  font-size: 15px;
  font-weight: 700;
  background: #fff;
  border-bottom: none;
}

.grid tr.group:hover td {
  background: #fff;
}

.grid a {
  text-decoration: none;
}

.grid tr.past td {
  color: #8a8a8a;
}

.grid tr.past a {
  color: #6a93b5;
}

.grid tr.is-active td {
  background: #f3f7fb;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: #888;
}

.panel {
  margin: 0 0 18px;
  padding: 22px 24px 18px;
  background: #fff;
  border: 1px solid #e1e7eb;
  border-radius: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  margin: 0 0 14px;
}

.form-row label {
  padding-top: 8px;
  color: #16323c;
  font-weight: 700;
  text-align: left;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #c5ced4;
  border-radius: 6px;
}

.form-row textarea {
  min-height: 58px;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: #7eb6e6;
  outline: 1px solid #7eb6e6;
}

.field-m {
  max-width: 280px;
}

.field-date {
  max-width: 170px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.time-line,
.price-line,
.zip-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-row .time-line input[type="time"] {
  width: 130px;
}

.form-row .price-line input {
  width: 140px;
}

.zip-line .zip-wrap {
  flex: 0 0 110px;
  width: 110px;
}

.zip-line .city-wrap {
  flex: 1;
}

.zip-line .zip {
  width: 90px;
  flex: 0 0 90px;
}

.zip-line .city {
  flex: 1;
}

.hint {
  display: block;
  margin-top: 4px;
  color: #5c6b73;
  font-size: 13px;
}

.field-error {
  margin-top: 3px;
  color: #a40000;
  font-size: 12px;
}

.has-error input,
.has-error select,
.has-error textarea {
  border-color: #d27 !important;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.below-actions {
  margin-top: -6px;
}

.link-danger {
  padding: 0;
  color: #a33;
  font: inherit;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}

.inline {
  display: inline;
}

.empty {
  margin: 28px 0;
  color: #555;
}

.empty .btn {
  margin-top: 8px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-wrap {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 52px);
  padding-top: 72px;
  background: #eef2f4;
}

.login-panel {
  width: min(440px, calc(100% - 32px));
  height: fit-content;
  margin: 0;
}

.login-panel h1 {
  margin-bottom: 14px;
}

.login-panel .form-row {
  grid-template-columns: 90px minmax(0, 1fr);
}

.page-login {
  background: #eef2f4;
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid #cfcfcf;
  }

  .sidebar nav {
    display: flex;
  }

  .sidebar a {
    border-bottom: 0;
  }

  .main {
    margin-left: 0;
  }

  .shell {
    display: flex;
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row label {
    padding-top: 0;
    text-align: left;
  }

  .tabbar {
    margin-right: -28px;
    margin-left: -28px;
    overflow-x: auto;
  }
}
