.admin-heading {
  align-items: flex-start;
  background: linear-gradient(135deg, #173a40, #24555c);
  border-radius: 20px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 28px 30px;
}

.admin-heading h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 4px 0 8px;
}

.admin-heading p {
  color: rgb(255 255 255 / 78%);
  margin: 0;
}

.admin-heading > span {
  background: rgb(255 255 255 / 12%);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  padding: 9px 14px;
}

.admin-tabs {
  background: #fff;
  border: 1px solid #cad8d8;
  border-radius: 16px;
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding: 7px;
}

.admin-tabs button {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #496064;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 700;
  padding: 11px 15px;
}

.admin-tabs button:hover,
.admin-tabs button.active {
  background: #e3efee;
  color: #173a40;
}

.admin-content {
  min-height: 420px;
}

.admin-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.admin-metrics button {
  background: #fff;
  border: 1px solid #cad8d8;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 20px;
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.admin-metrics button:hover {
  box-shadow: 0 12px 28px rgb(22 56 61 / 12%);
  transform: translateY(-2px);
}

.admin-metrics small,
.admin-metrics span {
  color: #687c7f;
}

.admin-metrics strong {
  color: #173a40;
  font-size: 36px;
  line-height: 1.2;
  margin: 8px 0;
}

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

.admin-module-grid button {
  align-items: center;
  background: #fff;
  border: 1px solid #cad8d8;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  gap: 18px;
  padding: 22px;
  text-align: left;
}

.admin-module-grid button:hover {
  border-color: #5c8a8e;
}

.admin-module-grid > button > span {
  align-items: center;
  background: #173a40;
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex: 0 0 44px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
}

.admin-module-grid div {
  display: grid;
  gap: 5px;
}

.admin-module-grid b {
  color: #173a40;
  font-size: 17px;
}

.admin-module-grid small {
  color: #687c7f;
  line-height: 1.5;
}

.admin-panel,
.admin-translation-frame,
.admin-empty {
  background: #fff;
  border: 1px solid #cad8d8;
  border-radius: 18px;
}

.admin-panel {
  padding: 22px;
}

.admin-panel > header,
.admin-translation-frame > header {
  align-items: center;
  border-bottom: 1px solid #dce5e5;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.admin-panel h2,
.admin-translation-frame h2 {
  color: #173a40;
  margin: 3px 0 0;
}

.admin-panel header > small {
  color: #687c7f;
  max-width: 440px;
  text-align: right;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
  width: 100%;
}

.admin-table-wrap th,
.admin-table-wrap td {
  border-bottom: 1px solid #dce5e5;
  padding: 13px 12px;
  text-align: left;
  vertical-align: middle;
}

.admin-table-wrap th {
  background: #edf4f3;
  color: #365458;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table-wrap td small {
  color: #708184;
}

.admin-customer-row {
  cursor: pointer;
}

.admin-customer-row td {
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.admin-customer-row:hover td,
.admin-customer-row:focus-visible td {
  background: #edf4f3;
}

.admin-customer-row:focus-visible {
  outline: none;
}

.admin-customer-row:focus-visible td:first-child,
.admin-customer-row.is-editing td:first-child {
  box-shadow: inset 4px 0 #2d7277;
}

.admin-customer-row.is-editing td {
  background: #e3efee;
}

.admin-empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 260px;
  padding: 30px;
  text-align: center;
}

.admin-empty b {
  color: #173a40;
  font-size: 20px;
}

.admin-empty span {
  color: #687c7f;
}

.admin-translation-frame {
  min-height: 720px;
  overflow: hidden;
}

.admin-translation-frame > header {
  margin: 0;
  padding: 18px 22px;
}

.admin-translation-frame iframe {
  border: 0;
  display: block;
  height: calc(100vh - 260px);
  min-height: 650px;
  width: 100%;
}

.admin-narrow {
  max-width: 760px;
}

.admin-rule-callout {
  background: #edf4f3;
  border-left: 4px solid #2d7277;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
  padding: 16px;
}

.admin-rule-callout b {
  color: #173a40;
}

.admin-rule-callout span,
.admin-stack-form p {
  color: #587074;
}

.admin-stack-form {
  display: grid;
  gap: 16px;
}

.admin-stack-form label,
.admin-profile-form > label {
  display: grid;
  gap: 7px;
}

.admin-stack-form select,
.admin-profile-form input,
.admin-profile-form select,
.admin-profile-form textarea {
  background: #fff;
  border: 1px solid #b9cbcc;
  border-radius: 9px;
  font: inherit;
  padding: 10px 11px;
  width: 100%;
}

.admin-split {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.admin-profile-form {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

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

.admin-form-grid label {
  display: grid;
  gap: 6px;
}

.admin-form-grid span,
.admin-profile-form > label > span {
  color: #496064;
  font-size: 13px;
  font-weight: 700;
}

.admin-form-grid textarea {
  min-height: 84px;
  resize: vertical;
}

.admin-span-2 {
  grid-column: span 2;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-status-on {
  color: #24714d;
  font-weight: 700;
}

.admin-status-off {
  color: #9a4b44;
  font-weight: 700;
}

.button-danger {
  background: #fff0ee;
  border-color: #d9a19a;
  color: #9b3028;
}

@media (max-width: 1100px) {
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-split {
    grid-template-columns: 1fr;
  }

  .admin-profile-form {
    position: static;
  }
}

@media (max-width: 680px) {
  .admin-heading {
    gap: 20px;
    padding: 22px;
  }

  .admin-heading > span {
    display: none;
  }

  .admin-metrics,
  .admin-module-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-span-2 {
    grid-column: auto;
  }

  .admin-panel {
    padding: 16px;
  }
}
