html {
  font-size: 14px;
  min-height: 100%;
  position: relative;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: #f5f6f8;
  color: #1f2933;
  min-height: 100vh;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #258cfb;
}

.navbar-brand {
  font-weight: 700;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.page-head h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.page-head p {
  color: #667085;
  margin: 4px 0 0;
}

.entry-form {
  align-items: end;
  background: #fff;
  border: 1px solid #dde2e8;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(140px, 0.8fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(220px, 2fr) auto;
  padding: 16px;
}

.entry-form label {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.grid-wrap {
  background: #fff;
  border: 1px solid #dde2e8;
  border-radius: 8px;
  max-height: calc(100vh - 250px);
  min-height: 360px;
  overflow: auto;
}

.short-grid {
  max-height: 520px;
}

.grid-wrap table {
  margin: 0;
  min-width: 880px;
}

.grid-wrap thead th {
  background: #f8fafc;
  border-bottom: 1px solid #dde2e8;
  color: #475467;
  font-size: 0.78rem;
  letter-spacing: 0;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.row-actions {
  text-align: right;
  white-space: nowrap;
}

.row-actions form {
  display: inline;
}

.grid-status {
  border-top: 1px solid #eef1f4;
  color: #667085;
  font-size: 0.9rem;
  padding: 12px 16px;
  text-align: center;
}

.login-panel {
  background: #fff;
  border: 1px solid #dde2e8;
  border-radius: 8px;
  margin: 10vh auto 0;
  max-width: 420px;
  padding: 28px;
}

.login-panel h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-panel p {
  color: #667085;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .entry-form {
    grid-template-columns: 1fr 1fr;
  }

  .description-field,
  .form-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 576px) {
  .entry-form,
  .page-head {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .grid-wrap {
    max-height: calc(100vh - 340px);
  }
}
