:root {
  --night: #16232e;
  --night-2: #223847;
  --paper: #f1f4f6;
  --white: #fff;
  --ink: #16232e;
  --muted: #647582;
  --line: #d9e0e5;
  --blue: #269ad6;
  --blue-deep: #1476b6;
  --mint: #59c3ae;
  --danger: #bd4e4e;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
input,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  outline: 0;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
input:focus,
textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(38, 154, 214, 0.15);
}
textarea {
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
  color: #465966;
  font-size: 12px;
  font-weight: 700;
}
.simple-header {
  height: 64px;
  background: var(--night);
  color: #fff;
}
.header-inner {
  height: 100%;
  max-width: 1240px;
  margin: auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 650;
}
.wordmark b {
  color: var(--mint);
  font-size: 18px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
}
.header-actions a {
  color: #c6d4dc;
  text-decoration: none;
}
.local-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #bde7df;
}
.local-status:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}
.settings-page {
  max-width: 1240px;
  margin: auto;
  padding: 38px 30px 70px;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 30px;
}
.notice,
.page-intro {
  grid-column: 1/-1;
}
.notice {
  margin: 0;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 13px;
}
.notice.success {
  background: #e4f6f1;
  color: #216b5d;
}
.notice.error {
  background: #fff0ef;
  color: #9e3e3e;
}
.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
  margin-bottom: -10px;
}
.page-intro h1,
.section-title h2,
.new-menu h3,
.new-group h3,
.login-copy h1 {
  margin: 0;
  letter-spacing: 0;
  font-weight: 760;
}
.page-intro h1 {
  font-size: 30px;
  line-height: 1.15;
}
.page-intro p,
.section-title p,
.plain-note,
.save-row span {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.settings-tabs {
  grid-column: 1;
  align-self: start;
  position: sticky;
  top: 26px;
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--night);
  border-radius: var(--radius);
}
.tab-button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b7c8d1;
  padding: 12px 13px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}
.tab-button:hover,
.tab-button.active {
  background: var(--night-2);
  color: #fff;
}
.tab-button.active {
  box-shadow: inset 3px 0 var(--mint);
}
.tab-panel {
  grid-column: 2;
  min-width: 0;
}
.tab-panel[hidden] {
  display: none;
}
.settings-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 12px 26px rgba(22, 35, 46, 0.06);
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-title h2 {
  font-size: 21px;
  line-height: 1.25;
}
.section-title-with-action {
  align-items: flex-start;
}
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.switch span {
  width: 41px;
  height: 23px;
  border-radius: 20px;
  background: #bdc9d0;
  position: relative;
  transition: background 0.16s;
}
.switch span:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.16s;
}
.switch input:checked + span {
  background: var(--blue);
}
.switch input:checked + span:after {
  transform: translateX(18px);
}
.switch input:focus-visible + span {
  outline: 3px solid rgba(38, 154, 214, 0.24);
  outline-offset: 2px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.single-field {
  grid-template-columns: minmax(0, 620px);
}
.field-span {
  grid-column: 1/-1;
  max-width: 510px;
}
.plain-note {
  padding-top: 15px;
}
.save-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 26px;
}
.button-primary {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 11px 18px;
  font-weight: 750;
}
.button-primary:hover {
  background: var(--blue-deep);
}
.menu-title > span,
.menu-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.menu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 34px;
}
.menu-row,
.new-menu,
.group-row,
.new-group {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.menu-row:first-child,
.group-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.menu-row-head,
.group-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.check-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}
.menu-fields,
.group-fields {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 13px;
}
.link-field {
  grid-column: 1/-1;
}
.menu-row-actions,
.group-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}
.menu-row-actions label {
  width: 68px;
}
.menu-row-actions input {
  padding: 8px;
}
.button-link,
.button-danger {
  border: 0;
  background: transparent;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 750;
}
.button-link {
  color: var(--blue-deep);
}
.button-danger {
  color: var(--danger);
}
.new-menu h3,
.new-group h3 {
  font-size: 15px;
  margin-bottom: 14px;
}
.menu-preview {
  padding-left: 25px;
  border-left: 1px solid var(--line);
}
.menu-preview > span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.phone {
  width: 185px;
  height: 330px;
  overflow: hidden;
  border: 6px solid var(--night);
  border-radius: 23px;
  background: #e8eef2;
  box-shadow: 0 12px 24px rgba(22, 35, 46, 0.17);
}
.phone-bar {
  height: 37px;
  padding: 0 10px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}
.more-symbol {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    5px 0 #fff,
    10px 0 #fff;
}
.phone-chat {
  height: 202px;
  padding: 12px;
  display: flex;
  align-items: flex-end;
}
.bubble {
  max-width: 130px;
  padding: 8px 9px;
  background: #fff;
  border-radius: 8px 8px 8px 2px;
  color: #425460;
  font-size: 10px;
}
.phone-keys {
  padding: 6px;
  background: #dbe4e8;
}
.phone-keys > div {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.phone-keys > div > b {
  min-width: 0;
  flex: 1;
  padding: 6px 4px;
  overflow: hidden;
  background: #fff;
  color: #40769b;
  border-radius: 4px;
  font-size: 8px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.phone-keys .phone-input {
  height: 27px;
  align-items: center;
  padding: 0 7px;
  margin: 0;
  background: #fff;
  border-radius: 5px;
  color: #8b9da7;
  font-size: 9px;
}
.phone-input span {
  flex: 1;
}
.grid-symbol {
  width: 13px;
  height: 13px;
  flex: none;
  background:
    linear-gradient(#4385af, #4385af) 0 0/5px 5px no-repeat,
    linear-gradient(#4385af, #4385af) 100% 0/5px 5px no-repeat,
    linear-gradient(#4385af, #4385af) 0 100%/5px 5px no-repeat,
    linear-gradient(#4385af, #4385af) 100% 100%/5px 5px no-repeat;
}
.group-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #eff6f8;
  border-radius: 8px;
}
.group-note code {
  font-weight: 800;
  color: var(--night);
}
.group-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 16px 0;
}
.keywords-field {
  max-width: 620px;
}
.empty-message {
  color: var(--muted);
  padding: 20px 0;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--night);
}
.login-box {
  width: min(400px, 100%);
  padding: 34px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}
.login-box .wordmark {
  color: var(--night);
}
.login-box .wordmark b {
  color: var(--blue);
}
.login-copy {
  margin: 34px 0 25px;
}
.login-copy h1 {
  font-size: 24px;
}
.login-copy p {
  color: var(--muted);
  margin: 5px 0 0;
}
.login-box form {
  display: grid;
  gap: 19px;
}
.login-box .button-primary {
  width: 100%;
}
@media (max-width: 780px) {
  .header-inner,
  .settings-page {
    padding-left: 18px;
    padding-right: 18px;
  }
  .settings-page {
    display: block;
    padding-top: 28px;
  }
  .page-intro {
    display: block;
    margin-bottom: 20px;
  }
  .settings-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    margin-bottom: 18px;
    padding: 7px;
  }
  .tab-button {
    flex: none;
  }
  .tab-panel {
    min-width: 0;
  }
  .settings-section {
    padding: 23px 18px;
  }
  .field-grid,
  .menu-fields,
  .group-fields {
    grid-template-columns: 1fr;
  }
  .field-span {
    grid-column: auto;
    max-width: none;
  }
  .section-title {
    margin-bottom: 22px;
  }
  .menu-layout {
    grid-template-columns: 1fr;
  }
  .menu-preview {
    padding: 21px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .phone {
    margin: auto;
  }
  .menu-row-actions {
    flex-wrap: wrap;
  }
  .save-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .login-box {
    padding: 28px 24px;
  }
}
