:root {
  --theme: #2b4c7e;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1e1a26;
  background: #f4f2f7;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
h1 {
  font-size: 24px;
}
h2 {
  font-size: 18px;
}
p {
  line-height: 1.7;
}
.muted {
  color: #6b6476;
  font-size: 13px;
}
.center {
  text-align: center;
}
.loading {
  padding: 40px;
}
.button {
  border: 1px solid #e3deea;
  border-radius: 9px;
  padding: 10px 15px;
  min-height: 44px;
  background: white;
  color: inherit;
  margin: 3px;
}
.button:hover {
  background: #eeebf3;
}
.button.primary {
  background: var(--theme);
  color: white;
  border-color: var(--theme);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}
input,
select,
textarea {
  border: 1px solid #d0c9d8;
  border-radius: 9px;
  padding: 11px 12px;
  min-height: 44px;
  width: 100%;
  background: white;
  color: inherit;
}
input:focus,
select:focus {
  outline: 2px solid var(--theme);
  outline-offset: 2px;
}
input[type="checkbox"] {
  width: 22px;
  accent-color: var(--theme);
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 60% 40%;
  background: white;
}
.hero {
  position: relative;
  isolation: isolate;
  background: #1b2e4c;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: white;
  white-space: pre-line;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0006;
  z-index: -1;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.6;
  max-width: 650px;
}
.hero-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 9px;
}
.fallback {
  display: grid;
  place-items: center;
  background: var(--theme);
  color: white;
  font-size: 22px;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-panel form {
  width: 100%;
  max-width: 360px;
}
.login-panel .primary {
  width: 100%;
  margin: 15px 0;
}
.challenge {
  min-height: 70px;
}
.app-frame {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
aside {
  background: white;
  padding: 24px 15px;
  border-right: 1px solid #e3deea;
}
.brand {
  margin-bottom: 40px;
}
aside > .button {
  display: block;
  border: 0;
  text-align: left;
  width: 100%;
  margin: 9px 0;
}
header {
  height: 64px;
  background: white;
  border-bottom: 1px solid #e3deea;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
}
header strong {
  margin-right: auto;
}
.content {
  padding: 28px;
  max-width: 1360px;
}
.panel {
  background: white;
  border: 1px solid #e3deea;
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
}
.narrow {
  max-width: 520px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #e3deea;
  border-radius: 14px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 680px;
}
th,
td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid #eeeaf2;
}
th {
  background: #f9f8fb;
  color: #6b6476;
  font-size: 12px;
}
td > .button {
  padding: 6px 9px;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid #eeeaf2;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  background: #1e1a2660;
}
.drawer {
  width: min(520px, 100%);
  height: 100%;
  overflow: auto;
  background: white;
  padding: 28px;
  box-shadow: -8px 0 30px #0001;
}
.secret {
  display: block;
  font-size: 24px;
  padding: 24px;
  background: #f4f2f7;
  user-select: all;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: #1e1a26;
  color: white;
  padding: 16px 24px;
  border-radius: 9px;
  z-index: 50;
  box-shadow: 0 5px 20px #0003;
}
button:focus-visible {
  outline: 2px solid var(--theme);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .login-layout {
    display: flex;
    flex-direction: column;
  }
  .hero {
    min-height: 280px;
    padding: 26px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .login-panel {
    padding: 30px 22px;
  }
  .app-frame {
    display: block;
  }
  aside {
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-bottom: 1px solid #e3deea;
  }
  .brand {
    width: 100%;
    margin-bottom: 10px;
  }
  aside > .button {
    width: auto;
    margin: 0;
  }
  header {
    padding: 0 14px;
    gap: 8px;
  }
  .content {
    padding: 18px;
  }
  .panel {
    padding: 18px;
  }
  .row {
    flex-wrap: wrap;
  }
  .drawer {
    padding: 20px;
  }
}
:root {
  --theme: #3b2a5e;
}
.auth-card {
  max-width: 460px;
  background: white;
  border: 1px solid #e3deea;
  border-radius: 14px;
  margin: 8vh auto;
  padding: 36px;
}
aside {
  background: #231a33;
  color: white;
}
aside .muted {
  color: #c5bacf;
}
aside > .button {
  background: transparent;
  color: white;
}
aside > .button:hover {
  background: #3b2a5e;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.grid .panel {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.brand-preview {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
}
.secret {
  overflow-wrap: anywhere;
}
input[type="color"] {
  padding: 3px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .auth-card {
    margin: 20px;
    padding: 22px;
  }
}
.preserve-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.impact-note {
  background: #fff4e5;
  color: #895d20;
  border-radius: 9px;
  padding: 14px;
}
.error {
  color: #a33;
}
.panel select {
  min-height: 44px;
  max-width: 100%;
}
.promo-preview {
  display: block;
  max-width: 360px;
  width: 100%;
  height: auto;
}
.promo-editor {
  display: block;
  width: 100%;
  max-height: 600px;
  touch-action: none;
  border: 1px solid #ddd;
}
.promo-editor rect {
  cursor: move;
}
fieldset {
  border: 1px solid #e3deea;
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
}
