:root {
  --at-primary: #0f79f3;
  --at-accent: #00b69b;
  --at-card: #ffffff;
  --at-muted: #697689;
  --at-border: #e7e2e2;
  --at-soft: #eff3f9;
  --at-danger: #e74c3c;
  --at-warning: #d88a16;
  --at-font: "Outfit", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--at-soft);
  color: #1f2937;
  font-family: var(--at-font);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--at-primary);
  text-decoration: none;
}

code {
  border-radius: 6px;
  background: #f1f5f9;
  padding: 2px 5px;
}

.standard-theme {
  background: var(--at-soft);
  color: #1f2937;
}

.page-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 22px;
  min-height: calc(100vh - 36px);
  margin: 18px 0 18px 18px;
  border: 1px solid var(--at-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(39, 56, 83, .08);
  padding: 22px;
}

.brand-logo {
  display: block;
  width: 210px;
  height: auto;
}

.kicker {
  margin: 0 0 3px;
  color: var(--at-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #111827;
  font-size: 30px;
  line-height: 38px;
}

h2 {
  margin-bottom: 6px;
  color: #111827;
  font-size: 26px;
  line-height: 34px;
}

h3 {
  margin-bottom: 6px;
  color: #111827;
  font-size: 20px;
  line-height: 28px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  width: 100%;
  align-self: start;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-radius: 12px;
  color: #475569;
  padding: 9px 10px;
  font-size: 15px;
  transition: background .18s ease, color .18s ease;
}

.sidebar nav a:hover,
.sidebar nav a.is-active {
  background: #f1f2fd;
  color: var(--at-primary);
}

.sidebar nav i,
.metric-grid i,
.button-secondary i {
  color: var(--at-primary);
}

.sidebar-note {
  align-self: start;
  margin: 0;
  color: var(--at-muted);
  font-size: 13px;
  line-height: 20px;
}

.content {
  min-width: 0;
  padding: 22px 30px 60px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--at-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(39, 56, 83, .06);
  padding: 18px 22px;
}

.topbar-help,
.section-help {
  margin-bottom: 0;
  color: var(--at-muted);
  font-size: 14px;
  line-height: 22px;
}

.top-actions,
.toolbar-panel {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--at-border);
  border-radius: 10px;
  background: #fff;
  color: #475569;
  padding: 10px 16px;
  white-space: nowrap;
}

.button-secondary:hover {
  border-color: rgba(15, 121, 243, .28);
  background: #f1f2fd;
  color: var(--at-primary);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric-grid article,
.panel {
  border: 1px solid var(--at-border);
  border-radius: 18px;
  background: var(--at-card);
  box-shadow: 0 10px 32px rgba(39, 56, 83, .06);
}

.metric-grid article {
  min-height: 124px;
  padding: 20px;
}

.metric-grid i {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f2fd;
  font-size: 20px;
}

.metric-grid span {
  display: block;
  margin-top: 14px;
  color: var(--at-muted);
  font-size: 14px;
}

.metric-grid strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 24px;
  line-height: 32px;
}

.panel {
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.compact-field {
  display: grid;
  gap: 6px;
  min-width: 230px;
}

.compact-field--small {
  min-width: 130px;
}

.compact-field span {
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--at-border);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  padding: 8px 10px;
}

input:focus,
select:focus {
  border-color: rgba(15, 121, 243, .55);
  box-shadow: 0 0 0 4px rgba(15, 121, 243, .10);
  outline: 0;
}

.table-frame {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--at-border);
  border-radius: 14px;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #eef2f7;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 22px;
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

tr.row-bad td {
  background: #fff7f7;
}

tr.row-warn td {
  background: #fffaf0;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--at-muted);
  font-size: 12px;
  line-height: 17px;
}

.nameservers {
  max-width: 360px;
  white-space: normal;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.badge.is-ok {
  background: #eafbf2;
  color: #0d7e61;
}

.badge.is-warn {
  background: #fff5dc;
  color: #9a620b;
}

.badge.is-bad {
  background: #fdebf3;
  color: #b42318;
}

.badge.is-pending {
  background: #eef2f7;
  color: #475569;
}

.muted {
  color: var(--at-muted);
}

.empty-row {
  color: var(--at-muted);
  text-align: center;
}

.empty-row.is-error {
  color: var(--at-danger);
}

.skeleton {
  display: inline-block;
  width: 116px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2f7, #f8fafc, #edf2f7);
  background-size: 240px 100%;
  animation: shimmer 1.1s linear infinite;
}

.skeleton-short {
  width: 66px;
}

.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pagination button {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--at-border);
  border-radius: 10px;
  background: #fff;
  color: #475569;
}

.pagination button:hover,
.pagination button.is-active {
  border-color: var(--at-primary);
  background: var(--at-primary);
  color: #fff;
}

.footer {
  margin-top: 22px;
  color: var(--at-muted);
  font-size: 13px;
}

@keyframes shimmer {
  to {
    background-position: 240px 0;
  }
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    margin: 0;
    border-radius: 0 0 18px 18px;
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .topbar,
  .section-head {
    display: grid;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-panel,
  .top-actions {
    justify-content: stretch;
  }

  .compact-field {
    min-width: 100%;
  }
}
