* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1c2430;
  background: #eef2f6;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.error { color: #d14343; min-height: 22px; font-size: 13px; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, #d9ebff, transparent 36%),
    #eef2f6;
}
.login-card {
  width: min(420px, calc(100% - 32px));
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 18px 50px rgba(28, 55, 90, 0.12);
}
.brand { color: #1f6feb; font-weight: 700; letter-spacing: 0.08em; }
.login-card h1 { margin: 8px 0 6px; font-size: 26px; }
.login-card p, .hint { color: #667085; font-size: 14px; }
.login-card label, .field { display: block; margin-top: 14px; font-size: 14px; color: #344054; }
input, select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d5dde6;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  outline: none;
}
input:focus, select:focus { border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12); }
.login-card button, .dialog button[type="submit"], .primary {
  margin-top: 16px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #1f6feb;
  color: #fff;
  padding: 12px 16px;
}
.form-card { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-start; }
.form-card .primary, .form-actions .primary { width: auto; min-width: 128px; margin-top: 8px; }
.note {
  margin: 0;
  background: #f4f7fb;
  color: #344054;
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.6;
  font-size: 14px;
}
.app { min-height: 100vh; display: grid; grid-template-columns: 228px 1fr; }
.side { background: #172033; color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; }
.side-brand { font-size: 18px; font-weight: 700; padding: 6px 12px 18px; }
#navList { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.nav {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #c9d4e5;
  border-radius: 10px;
  padding: 12px;
  white-space: nowrap;
}
.nav.active, .nav:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.logout { margin-top: auto; }
.account-name { color: #9aa8bd; font-size: 12px; padding: 8px 12px 4px; }
textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d5dde6;
  border-radius: 10px;
  padding: 11px 12px;
  min-height: 220px;
  resize: vertical;
  outline: none;
  font: inherit;
}
textarea:focus { border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12); }
.dialog.wide { width: min(680px, 100%); }
.tier { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef2f6; }
.tier b { font-size: 14px; }
.tier label { display: block; font-size: 13px; color: #344054; }
.perms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 14px; }
.perm-group {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 4px 0 8px;
  border-bottom: 1px solid #eef2f6;
}
.perm-group b { min-width: 72px; font-size: 14px; }
.stars { color: #e25b12; letter-spacing: 1px; }
main { padding: 24px 28px 40px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.top h1 { margin: 0; font-size: 24px; }
.top .primary { width: auto; margin: 0; }
#pageActions { display: flex; gap: 8px; }
.card {
  margin-top: 16px;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
  overflow-x: auto;
}
.setting { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.setting button {
  width: auto;
  justify-self: start;
  margin: 0;
  padding: 11px 18px;
  border: 0;
  border-radius: 10px;
  background: #1f6feb;
  color: #fff;
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid #eef2f6; font-size: 14px; white-space: nowrap; }
td:nth-child(2) { white-space: normal; }
th { color: #667085; font-weight: 600; }
.price { color: #e25b12; font-weight: 700; }
.tag { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; background: #e8f7ee; color: #17803d; }
.tag.off { background: #f3f4f6; color: #667085; }
.row-actions { display: flex; gap: 8px; }
.ghost, .danger, .link {
  width: auto;
  margin: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #f3f6fa;
  color: #1c2430;
  border: 0;
  white-space: nowrap;
  line-height: 1.2;
}
.danger { color: #c53434; }
.toolbar { display: flex; gap: 12px; align-items: end; }
.toolbar .field { margin: 0; min-width: 260px; }
.empty { color: #667085; padding: 28px 8px; text-align: center; }
.mask {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 38, 0.45);
  display: grid;
  justify-items: center;
  align-items: start;
  overflow: auto;
  padding: 24px 16px;
}
.dialog {
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  margin: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dialog h2 { margin: 0 0 8px; font-size: 20px; flex: none; }
#editorBody {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f6;
  flex: none;
}
.dialog-actions .ghost,
.dialog-actions button[type="submit"] {
  width: auto;
  min-width: 96px;
  margin: 0;
  padding: 10px 18px;
  white-space: nowrap;
  line-height: 1.2;
  flex: none;
}
.dialog-actions .ghost {
  background: #fff;
  border: 1px solid #d5dde6;
}
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; }
.sign-preview {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f7f8fa;
  border: 1px solid #eef2f6;
  border-radius: 12px;
}
.check input { width: auto; margin: 0; }
.badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 99px;
  background: #e25b12;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; }
.filters .field { margin: 0; min-width: 120px; }
.statline { margin: 8px 0 14px; font-size: 14px; color: #344054; }
.agree-box {
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  background: #f7f8fa;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.thumb { display: block; max-width: 220px; max-height: 160px; margin: 8px 0; border-radius: 8px; }
.block-item { border: 1px solid #e7edf3; border-radius: 12px; padding: 12px; margin: 12px 0; }
.block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.nav { display: flex; align-items: center; }
table { font-size: 13px; }
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .side { padding-bottom: 16px; }
  .logout { margin-top: 12px; }
  .setting, .toolbar, .form-grid { grid-template-columns: 1fr; display: grid; }
}
