:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #0c1017;
  color: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0c1017;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #29313e;
  background: #111722;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #24a3a7;
  color: #061315;
}

.status {
  color: #aab5c5;
  font-size: 13px;
}

.status.ok {
  color: #4bd7a0;
}

.status.error {
  color: #ff8e8e;
}

main {
  width: min(880px, calc(100% - 32px));
  margin: 32px auto;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #29313e;
}

.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  background: transparent;
  color: #9ea9b9;
  cursor: pointer;
  font: inherit;
}

.tab.active {
  border-bottom-color: #42c6c8;
  color: #f5f8fb;
}

.panel {
  display: none;
  padding: 28px 0;
}

.panel.active {
  display: block;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.field label {
  color: #c5ceda;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #354052;
  border-radius: 6px;
  padding: 12px;
  background: #151c28;
  color: #f4f7fa;
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #42c6c8;
}

textarea {
  resize: vertical;
}

.counter {
  justify-self: end;
  color: #778397;
  font-size: 12px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 16px;
}

.primary {
  min-width: 160px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  background: #22a6aa;
  color: #071415;
  font-weight: 700;
}

.primary:disabled {
  cursor: not-allowed;
  background: #303948;
  color: #7f8a9b;
}

@media (max-width: 600px) {
  .topbar {
    padding: 0 16px;
  }

  main {
    margin-top: 20px;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .primary {
    width: 100%;
  }
}
