:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: #172b4d;
  background: #f4f7fb;
  font-size: 15px;
  line-height: 1.65;
  font-synthesis: none;
  --blue: #0965e8;
  --blue-dark: #0753c1;
  --text: #172b4d;
  --muted: #53647c;
  --line: #d5dfeb;
  --soft: #f7f9fc;
  --radius: 16px;
  --shadow: 0 12px 38px rgba(27, 48, 79, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  border-radius: 8px;
}
input,
textarea,
select {
  border: 1px solid #c9d5e5;
  padding: 10px 13px;
  min-height: 44px;
  color: var(--text);
  background: #fff;
  width: 100%;
  caret-color: var(--blue);
}
input::placeholder,
textarea::placeholder {
  color: #596b84;
  opacity: 1;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
select {
  width: auto;
  max-width: 100%;
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--blue);
  flex-shrink: 0;
  padding: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
}
:focus-visible {
  outline: 3px solid #7eb4ff;
  outline-offset: 3px;
}
::selection {
  background: #cde2ff;
  color: #112f5e;
}
* {
  scrollbar-color: #a9bad0 #f0f4f9;
  scrollbar-width: thin;
}
svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  font-weight: 600;
}
small,
.field-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.site-header {
  height: 80px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand > svg {
  color: var(--blue);
  width: 30px;
  height: 30px;
}
.quiet-link,
.text-button {
  color: var(--muted);
  font-size: 14px;
}
.quiet-link {
  text-decoration: none;
}
.quiet-link:hover,
.text-button:hover {
  color: var(--blue);
}
.text-button {
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 6px 8px;
}
.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.public-main {
  max-width: 980px;
  margin: 12px auto 0;
  padding: 0 24px 32px;
}
.announcement {
  display: flex;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 12px;
  background: #e8f2ff;
  color: #1e4b85;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.announcement svg {
  width: 21px;
  margin-top: 2px;
}
.announcement strong {
  font-size: 15px;
  font-weight: 650;
}
.announcement p {
  font-size: 14px;
  white-space: pre-wrap;
  margin-top: 3px;
  line-height: 1.75;
}
.business-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
}
.business-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: #53647c;
  min-height: 64px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  padding: 14px 18px;
}
.business-tab.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.business-tab:not(.active):hover {
  border-color: #7ea9e9;
  color: var(--blue);
}
.business-tab:disabled {
  opacity: 0.5;
}
.form-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.field {
  margin: 0 0 22px;
}
.field > label {
  display: block;
  font-weight: 600;
  margin: 0 0 7px;
}
.field small,
.field-hint {
  display: block;
  margin-top: 6px;
}
.option-group {
  border: 0;
  margin: 0 0 24px;
  padding: 0;
  min-width: 0;
}
.option-group legend {
  float: left;
  width: 100%;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
  font-size: 14px;
}
.option-group::after {
  content: '';
  display: block;
  clear: both;
}
.choice-grid {
  display: grid;
  gap: 12px;
  clear: both;
}
.choice-grid.two {
  grid-template-columns: repeat(2, 1fr);
}
.choice-grid.five {
  grid-template-columns: repeat(5, 1fr);
}
.choice {
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  left: 0;
  top: 0;
  cursor: pointer;
}
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  font-size: 14px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.choice input:checked + span {
  background: #176ee6;
  color: white;
  border-color: #176ee6;
  font-weight: 600;
}
.choice input:focus-visible + span {
  outline: 3px solid #7eb4ff;
  outline-offset: 3px;
}
.choice input:not(:checked):hover + span {
  border-color: #6599e4;
}
.video-field {
  margin-top: 0;
}
.custom-duration {
  clear: both;
  padding-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.custom-duration > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-duration input {
  width: 100px;
}
.primary,
.secondary {
  min-height: 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s;
}
.primary {
  background: var(--blue);
  color: #fff;
}
.primary:hover {
  background: var(--blue-dark);
}
.primary:disabled {
  background: #a9c6ec;
  color: #203f6a;
}
.secondary {
  background: #fff;
  border-color: #c9d5e5;
  color: #314967;
}
.secondary:hover,
.secondary.active {
  background: #edf4ff;
  border-color: #84afe8;
  color: #1459b6;
}
.send-button {
  width: 100%;
  min-height: 52px;
  font-size: 17px;
  margin-top: 0;
}
.submit-note {
  text-align: center;
  color: #53647c;
  font-size: 13px;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.message.error {
  background: #fff0ef;
  color: #9e2d27;
}
.message.success {
  background: #e9f6ef;
  color: #1d6743;
}
.message.info {
  background: #edf4ff;
  color: #24558d;
}
.result-panel {
  background: #fff;
  padding: 28px 32px;
  border-radius: 16px;
  margin-top: 24px;
  border: 1px solid #dbe4ef;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.result-panel .section-heading {
  margin-bottom: 6px;
}
.section-heading > span,
.section-heading > small {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.result-rows {
  margin: 18px 0;
}
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #e3e9f2;
  padding: 16px 0;
  align-items: flex-start;
}
.result-row strong {
  font-size: 14px;
}
.result-row p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.status {
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 5px;
  color: #53647c;
  background: #edf1f6;
}
.status.sent {
  background: #e6f5ed;
  color: #17633e;
}
.status.failed {
  background: #fff0ef;
  color: #9e2d27;
}
.status.unknown {
  background: #fff5df;
  color: #795014;
}
.status.sending {
  color: #155bb9;
  background: #e8f2ff;
}
.login-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 460px;
  margin: 9vh auto;
  padding: 34px;
}
.login-panel h1 {
  margin-bottom: 28px;
}
.login-panel .primary {
  width: 100%;
}
.admin-body .site-header {
  max-width: none;
  background: #fff;
  border-bottom: 1px solid #e0e7ef;
  height: 72px;
  padding: 0 32px;
}
.admin-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}
.admin-sidebar {
  border-right: 1px solid #e0e7ef;
  background: #fff;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.admin-sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 13px 18px;
  color: #465c78;
  font-size: 14px;
  min-height: 46px;
}
.nav-item.active {
  background: #eaf2ff;
  color: #125bbb;
  font-weight: 600;
}
.nav-item:hover {
  background: #f2f6fc;
}
.admin-main {
  padding: 32px 40px 52px;
  min-width: 0;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.admin-heading h1 {
  font-size: 25px;
}
.editor-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 28px;
}
.editor-section {
  padding: 26px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #dce4ef;
}
.editor-section > h2 {
  margin-bottom: 23px;
}
.editor-section .field:last-child {
  margin-bottom: 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.checkline {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 14px;
  margin: 0 0 18px;
  min-height: 28px;
  cursor: pointer;
}
.preview-section {
  min-width: 0;
}
.preview-section > h2 {
  font-size: 16px;
  margin: 0 0 15px;
}
.preview-section .announcement {
  padding: 18px;
  margin-bottom: 20px;
}
.preview-form {
  padding: 24px;
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 12px;
}
.preview-form h3 {
  margin-bottom: 20px;
}
.preview-form label {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.preview-input {
  font-size: 13px;
  color: #596b84;
  border: 1px solid #d5dfeb;
  border-radius: 6px;
  min-height: 42px;
  padding: 9px 11px;
  margin-bottom: 17px;
  overflow-wrap: anywhere;
}
.save-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #d5dfeb;
}
.save-bar > span {
  color: #53647c;
  font-size: 13px;
}
.switches {
  padding-top: 26px;
}
.pool-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.account-list {
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  padding: 0 24px;
  margin-bottom: 24px;
}
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}
.account-row + .account-row {
  border-top: 1px solid #e2e8f0;
}
.account-id {
  color: #53647c;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.actions .secondary {
  padding: 8px 13px;
}
.secondary.danger {
  color: #b42318;
  border-color: #e8b4b0;
}
.secondary.danger:hover {
  background: #fff1f0;
  border-color: #b42318;
}
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #53647c;
  font-size: 14px;
}
.job-block {
  padding: 24px;
  background: white;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  margin-bottom: 18px;
}
.job-block > .muted {
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-bottom: 14px;
}
.job-block .result-row:last-child {
  padding-bottom: 0;
}
.narrow {
  max-width: 650px;
}
.narrow .muted {
  margin-bottom: 20px;
}
@media (min-width: 1600px) {
  .public-main {
    margin-top: 24px;
  }
}
@media (max-width: 1100px) {
  .admin-workspace {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .admin-main {
    padding: 28px 24px;
  }
  .editor-columns {
    grid-template-columns: 1fr;
  }
  .preview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .preview-section > h2 {
    grid-column: 1/-1;
    margin-bottom: 0;
  }
  .account-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .site-header {
    height: 68px;
    padding: 0 20px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .quiet-link {
    font-size: 13px;
  }
  .public-main {
    padding: 0 16px 24px;
    margin-top: 8px;
  }
  .announcement {
    padding: 15px 16px;
    margin-bottom: 18px;
  }
  .business-tabs {
    gap: 10px;
    margin-bottom: 14px;
  }
  .business-tab {
    font-size: 15px;
    min-height: 56px;
    gap: 7px;
    padding: 12px 6px;
  }
  .business-tab svg {
    width: 20px;
  }
  .form-panel {
    padding: 24px 20px;
    border-radius: 14px;
  }
  .form-heading {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .form-heading h1 {
    font-size: 24px;
  }
  .field {
    margin-bottom: 20px;
  }
  .option-group {
    margin-bottom: 22px;
  }
  .choice-grid {
    gap: 8px;
  }
  .choice-grid.five {
    grid-template-columns: repeat(3, 1fr);
  }
  .choice span {
    padding: 8px 5px;
    font-size: 13px;
  }
  .send-button {
    min-height: 50px;
  }
  .result-panel {
    padding: 22px 20px;
  }
  .result-row {
    gap: 12px;
  }
  .login-panel {
    margin: 8vh 16px;
    padding: 28px;
  }
  .admin-body .site-header {
    height: auto;
    min-height: 68px;
    padding: 12px 16px;
    gap: 8px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions .quiet-link {
    font-size: 12px;
  }
  .admin-workspace {
    display: block;
  }
  .admin-sidebar {
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid #e0e7ef;
  }
  .admin-sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .nav-item {
    padding: 10px 12px;
    text-align: center;
    min-height: 42px;
    font-size: 13px;
  }
  .admin-main {
    padding: 24px 16px 36px;
  }
  .admin-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
  }
  .admin-heading h1 {
    font-size: 23px;
  }
  .admin-heading .secondary,
  .admin-heading .primary {
    padding: 9px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .editor-section {
    padding: 20px 16px;
  }
  .editor-columns {
    gap: 16px;
  }
  .preview-section {
    display: block;
  }
  .preview-section > h2 {
    margin-bottom: 12px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .switches {
    padding-top: 0;
  }
  .section-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .section-heading select {
    font-size: 13px;
  }
  .save-bar {
    align-items: flex-start;
  }
  .save-bar .primary {
    white-space: nowrap;
    padding: 10px 14px;
  }
  .pool-tabs .secondary {
    font-size: 13px;
    padding: 10px 12px;
    flex: 1;
  }
  .account-list {
    padding: 0 18px;
  }
  .account-row .actions {
    gap: 8px;
  }
  .job-block {
    padding: 20px 16px;
  }
  .message {
    font-size: 13px;
  }
  .status {
    max-width: 120px;
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.account-identity {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
