* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f3f6f8;
  color: #203d50;
  font-family: system-ui, 'Microsoft YaHei', sans-serif;
  font-size: 14px;
}
aside {
  position: fixed;
  width: 230px;
  background: #fff;
  height: 100vh;
  padding: 30px 22px;
  border-right: 1px solid #e2eaf0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 700;
}
.brand span {
  font-size: 19px;
}
aside p {
  color: #8b9ca8;
  margin: 42px 12px 18px;
}
aside a,
aside button {
  display: block;
  width: 100%;
  text-decoration: none;
  padding: 14px;
  color: #466679;
  margin-top: 8px;
}
aside .active {
  background: #e8f0f6;
  color: #2d6a91;
}
main {
  margin-left: 230px;
  padding: 36px 42px;
  max-width: 1800px;
}
header,
.actions,
.dialog-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
header small {
  color: #7b929f;
}
h1 {
  font-size: 29px;
  margin: 8px 0;
}
h2 {
  font-size: 20px;
  margin: 0;
}
h3 {
  font-size: 19px;
  margin: 0 0 12px;
}
button,
a {
  cursor: pointer;
}
button {
  font: inherit;
  border: 1px solid #dae4ec;
  border-radius: 9px;
  background: white;
  padding: 10px 16px;
  color: #36586c;
}
button:hover {
  border-color: #6a98b4;
}
.primary {
  background: #357ba4;
  color: #fff;
  border-color: #357ba4;
}
#metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0;
}
.metric,
.org-card,
.panel {
  background: #fff;
  border: 1px solid #e4ebf0;
  border-radius: 16px;
  box-shadow: 0 5px 22px #223c4a06;
  padding: 24px;
}
.metric strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}
.metric:nth-child(2) strong {
  color: #438b7a;
}
.metric:nth-child(3) strong {
  color: #97804b;
}
#organizations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.org-card.selected {
  border: 2px solid #6099b7;
}
.org-card .logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e8f2ef;
  color: #388471;
  font-size: 25px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.muted {
  color: #81949f;
}
.org-card .actions {
  margin-top: 24px;
}
.badge {
  display: inline-block;
  padding: 4px 9px;
  background: #edf4ef;
  color: #4c8065;
  border-radius: 6px;
  font-size: 12px;
}
.badge.off {
  background: #f9eee9;
  color: #ae785a;
}
#detail {
  margin-top: 30px;
}
.panel {
  margin-top: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  text-align: left;
}
th {
  color: #8396a2;
  font-weight: 500;
  font-size: 13px;
}
th,
td {
  padding: 15px 10px;
  border-bottom: 1px solid #edf1f4;
}
dialog {
  border: 0;
  border-radius: 18px;
  width: 570px;
  max-width: 95vw;
  padding: 28px;
  box-shadow: 0 20px 80px #1c394526;
}
dialog::backdrop {
  background: #1d405b55;
  backdrop-filter: blur(4px);
}
label {
  display: block;
  margin: 18px 0;
  color: #587383;
}
input,
select {
  font: inherit;
  width: 100%;
  padding: 11px;
  border: 1px solid #d8e3ea;
  border-radius: 8px;
  margin-top: 8px;
  color: #203d50;
}
label.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
label.check input {
  width: auto;
  margin: 0;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.checks label {
  margin: 10px 0;
}
#error,
#notice {
  color: #b05243;
}
#edit-form > .primary {
  width: 100%;
  margin-top: 15px;
}
@media (max-width: 800px) {
  aside {
    position: static;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
  }
  aside p,
  aside button {
    display: none;
  }
  aside a {
    width: auto;
    margin-left: auto;
  }
  main {
    margin: 0;
    padding: 20px;
  }
  #metrics {
    gap: 8px;
  }
  .metric {
    padding: 14px;
  }
  .metric strong {
    font-size: 28px;
  }
  .panel {
    overflow: auto;
  }
  header {
    align-items: flex-start;
  }
}
textarea {
  width: 100%;
  min-height: 86px;
  margin-top: 8px;
  border: 1px solid #d8e3ea;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}
.brand-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.brand-images img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 12px;
}

dialog {
  max-height: 90vh;
  overflow: auto;
}
.brand-code {
  border-top: 1px solid #e2eaf0;
  padding-top: 20px;
  margin-top: 22px;
}
.brand-code button {
  margin-top: 12px;
}
.brand-code img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 16px auto;
}
.brand-code a {
  display: block;
  text-align: center;
}
