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

body {
  background: #f6f7f9;
  color: #18202a;
  margin-bottom: 60px;
}

.container {
  max-width: 1320px;
}

.navbar-brand {
  letter-spacing: 0;
}

.page-title {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 8px 0 24px;
}

.page-title h1,
h1 {
  font-size: 1.65rem;
  line-height: 1.2;
  margin: 0 0 6px;
}

.page-title p,
p {
  color: #657080;
}

.section-title {
  font-size: 1.05rem;
  margin: 28px 0 10px;
}

.metrics-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 24px;
}

.metric {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 14px 16px;
}

.metric span {
  color: #657080;
  display: block;
  font-size: .85rem;
  margin-bottom: 4px;
}

.metric strong {
  font-size: 1.35rem;
}

.table {
  background: #fff;
  border: 1px solid #dde2ea;
}

.table thead th {
  background: #f0f3f7;
  color: #445064;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wide-form,
.login-panel {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 20px;
}

.login-panel {
  margin: 64px auto;
  max-width: 420px;
}

.form-actions,
.actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.code-area,
.code-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .9rem;
}

.code-preview {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 16px;
  white-space: pre-wrap;
}

.selector-cell {
  width: 40px;
}

.editor-tabs {
  margin-top: 8px;
}

.editor-tab-content {
  background: #fff;
  border: 1px solid #dde2ea;
  border-top: 0;
  padding: 18px;
}

.override-note {
  color: #657080;
  font-size: .9rem;
  margin-bottom: 14px;
}

.preview-frame {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  min-height: 520px;
  width: 100%;
}

.bulk-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.schedule-input {
  max-width: 240px;
}

.role-grid,
.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.settings-field {
  min-width: 0;
}

.settings-dl {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 16px;
}

.media-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.media-card {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.media-card img {
  aspect-ratio: 16 / 10;
  background: #f0f3f7;
  display: block;
  object-fit: cover;
  width: 100%;
}

.media-card-body {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.media-card-body strong,
.media-card-body span,
.media-card-body small,
.media-card-body code {
  overflow-wrap: anywhere;
}

.guide-meta {
  color: #657080;
  font-size: .9rem;
  margin-top: -12px;
}

.guide-content {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 24px;
}

.guide-content h1 {
  border-bottom: 1px solid #dde2ea;
  font-size: 1.8rem;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.guide-content h2 {
  font-size: 1.28rem;
  margin: 30px 0 12px;
}

.guide-content h3 {
  font-size: 1.08rem;
  margin: 22px 0 10px;
}

.guide-content h4 {
  font-size: 1rem;
  margin: 18px 0 8px;
}

.guide-content p,
.guide-content li,
.guide-content td,
.guide-content th {
  line-height: 1.58;
}

.guide-content table {
  border: 1px solid #dde2ea;
  margin: 14px 0 22px;
  width: 100%;
}

.guide-content th {
  background: #f0f3f7;
  color: #445064;
  font-weight: 700;
}

.guide-content th,
.guide-content td {
  border: 1px solid #dde2ea;
  padding: 8px 10px;
  vertical-align: top;
}

.guide-content pre {
  background: #f6f7f9;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(13, 110, 253, .22);
}

@media (max-width: 767px) {
  .page-title {
    display: block;
  }

  .page-title .btn,
  .page-title form {
    margin-top: 12px;
  }

  .bulk-actions,
  .form-actions,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-input {
    max-width: none;
  }
}
