:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #111;
  background: #f2f2ef;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 2px solid #111;
}

.mono,
.badge,
.panel-title > span {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
}

h1 {
  margin: 9px 0 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -.055em;
}

.topbar a {
  color: #111;
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.status-row {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  padding: 7px 10px;
  background: #111;
  border-radius: 4px;
  color: #fff;
}

.save-status {
  color: #74746f;
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr);
  gap: 18px;
}

.side-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel {
  padding: 28px;
  background: #fff;
  border: 1px solid #d5d5d0;
  border-radius: 10px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.panel-title > span {
  min-width: 30px;
  color: #777772;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
}

.panel-title.compact { margin-top: 2px; }

.field-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #333;
  font-size: 12px;
  font-weight: 700;
}

.field small {
  min-height: 32px;
  color: #80807b;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.6;
}

input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  background: #fafaf8;
  border: 1px solid #cfcfca;
  border-radius: 6px;
  color: #111;
  outline: none;
}

input:focus { border: 2px solid #111; }

.number-input { position: relative; }
.number-input input { padding-right: 44px; font-size: 19px; font-weight: 750; }
.number-input i {
  position: absolute;
  top: 16px;
  right: 14px;
  color: #777772;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

.separator {
  height: 1px;
  margin: 30px 0;
  background: #deded9;
}

.days-field {
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.days-field legend {
  margin-bottom: 11px;
  color: #333;
  font-size: 12px;
  font-weight: 700;
}

.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span {
  height: 42px;
  display: grid;
  place-items: center;
  background: #fafaf8;
  border: 1px solid #d4d4cf;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
}
.days input:checked + span { background: #111; border-color: #111; color: #fff; }

.admin-key-field { margin-top: 24px; }

.primary,
.outline {
  width: 100%;
  min-height: 50px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
}
.primary { margin-top: 30px; background: #111; border: 1px solid #111; color: #fff; }
.outline { background: #fff; border: 1px solid #111; color: #111; }

.big-stat {
  margin-top: 26px;
  padding: 22px 0;
  border-top: 1px solid #deded9;
  border-bottom: 1px solid #deded9;
}
.big-stat strong { display: block; font-size: 62px; line-height: 1; letter-spacing: -.06em; }
.big-stat span { display: block; margin-top: 8px; color: #777772; font-size: 11px; }

.plan-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0; gap: 18px; }
.plan-stats strong { display: block; font-size: 17px; }
.plan-stats span { display: block; margin-top: 4px; color: #777772; font-size: 10px; }

.api-panel code {
  margin-top: 12px;
  display: block;
  padding: 8px 9px;
  background: #f1f1ee;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.api-panel .panel-title + code { margin-top: 22px; }
.api-panel p { margin: 18px 0 0; color: #6f6f6a; font-size: 10px; line-height: 1.7; }
.api-panel p code { display: inline; padding: 2px 4px; }

@media (max-width: 800px) {
  .shell { width: min(100% - 24px, 620px); padding-top: 24px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 20px; }
  .layout { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .panel { padding: 22px 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .days { gap: 3px; }
}
