html {
  font-size: 14px;
}

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

body {
  background: #f5f7f9;
  color: #1f2933;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

.app-nav {
  background: #1f2933;
}

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

.page-header,
.section-title {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.section-title {
  align-items: center;
}

.page-header {
  margin: 1.5rem 0;
}

.page-header h1,
.section-title h2,
.create-form h3 {
  color: #111827;
  line-height: 1.2;
  margin: 0;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
}

.page-header p,
.api-block p {
  color: #52616f;
  margin: .35rem 0 0;
}

.status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.status-summary span,
.status-pill {
  border: 1px solid #d5dce3;
  border-radius: 8px;
  display: inline-flex;
  gap: .25rem;
  min-height: 32px;
  padding: .35rem .65rem;
  white-space: nowrap;
}

.section-band {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.two-column {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
}

.monitor-table {
  margin-bottom: .75rem;
}

.monitor-table th {
  color: #52616f;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.monitor-table td small,
.recipient-row small {
  color: #66788a;
  display: block;
}

.status-pill {
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  justify-content: center;
  min-width: 84px;
}

.status-ok {
  background: #e8f7ee;
  border-color: #afd9be;
  color: #176b3a;
}

.status-down {
  background: #fdeceb;
  border-color: #efb5b0;
  color: #a62920;
}

.status-disabled {
  background: #eef1f4;
  border-color: #cbd4dc;
  color: #52616f;
}

.status-unknown {
  background: #fff7df;
  border-color: #ead38b;
  color: #7a5b00;
}

.actions-cell {
  text-align: right;
}

.inline-form,
.create-form,
.settings-form {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.inline-form > *,
.create-form > *,
.settings-form > * {
  min-width: 0;
}

.monitored-app-form .wide-field {
  min-width: 0;
}

.monitored-app-form button[type="submit"] {
  min-width: 140px;
}

.create-form {
  border-top: 1px solid #dde3ea;
  margin-top: 1rem;
  padding-top: 1rem;
}

.create-form h3 {
  font-size: 1rem;
  grid-column: 1 / -1;
}

.compact-form {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) auto;
}

.modal-form-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-form-grid.single-column {
  grid-template-columns: 1fr;
}

.modal-form-grid > * {
  min-width: 0;
}

.modal-form-grid .wide-field {
  grid-column: 1 / -1;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.check-field {
  align-items: center;
  display: flex;
  gap: .5rem;
  min-height: 38px;
}

.delete-form {
  margin-top: .75rem;
}

.recipient-list {
  display: grid;
  gap: .5rem;
  margin-top: .75rem;
}

.recipient-row {
  align-items: center;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  padding: .75rem;
}

.api-block {
  margin-top: .75rem;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin: 4rem auto 0;
  max-width: 460px;
  padding: 1.5rem;
}

.auth-panel h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.validation-summary:empty,
.validation-summary ul:empty {
  display: none;
}

.auth-form small {
  color: #66788a;
  display: block;
  margin-top: .25rem;
}

.monitored-app-form [hidden] {
  display: none;
}

pre {
  background: #17212b;
  border-radius: 8px;
  color: #f3f6f8;
  overflow-x: auto;
  padding: .85rem;
}

code {
  color: inherit;
}

.empty-cell {
  color: #66788a;
  padding: 1rem;
}

@media (max-width: 960px) {
  .two-column,
  .inline-form,
  .create-form,
  .compact-form,
  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    display: block;
  }

  .status-summary {
    justify-content: flex-start;
    margin-top: .75rem;
  }

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