body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  background: #eef2f7;
  color: #172033;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.layout-narrow {
  max-width: 520px;
  padding-top: 48px;
}

.page-header,
.section-header,
.nav-links,
.split {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.page-header {
  margin-bottom: 20px;
}

.split {
  align-items: stretch;
}

.split > div {
  flex: 1;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card-accent {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #c7d8ee;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
button,
textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #c8d2df;
  background: #fff;
}

input:focus,
select:focus,
button:focus,
textarea:focus,
a:focus {
  outline: 2px solid #7aa2e3;
  outline-offset: 2px;
}

button {
  cursor: pointer;
  background: #1d4ed8;
  color: #fff;
  border: 1px solid #1d4ed8;
  font-weight: 600;
}

button:hover {
  background: #1b45bf;
}

.section-header button,
.actions button {
  white-space: nowrap;
}

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

th,
td {
  border: 1px solid #dde5ef;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f6f8fb;
  font-size: 0.95rem;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

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

.status-card pre {
  min-height: 72px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

a {
  color: #1d4ed8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 6px;
  color: #315b95;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lead {
  margin: 0;
  max-width: 780px;
  color: #42526b;
}

.hint {
  margin: 0 0 12px;
  color: #5b667a;
  font-size: 0.95rem;
}

.steps {
  margin: 8px 0 0;
  padding-left: 20px;
}

.steps li + li {
  margin-top: 8px;
}

.nav-links {
  flex-wrap: wrap;
}

.nav-links form {
  margin: 0;
}

#api-keys-table,
#jobs-table,
#job-runs-table,
#job-progress-table,
#job-records-table {
  overflow-x: auto;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #374151;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.off {
  background: #fee2e2;
  color: #991b1b;
}

.badge.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.alert-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 900px) {
  .grid-two,
  .split {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-header,
  .section-header,
  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .layout {
    padding: 16px 12px 28px;
  }
}

@media (max-width: 640px) {
  table {
    min-width: 560px;
  }
}
