:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #192b2e;
  background: #f1f5f3;
  color-scheme: light;
  --ink: #192b2e;
  --muted: #526766;
  --line: #dce6e1;
  --paper: #fff;
  --accent: #087561;
  --accent-dark: #065646;
  --mint: #e4f5ee;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
h1, h2, p { margin: 0; }
.top { background: #fbfdfc; border-bottom: 1px solid var(--line); }
.top-inner,
.workspace {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
}
.top-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}
.brand { display: flex; align-items: center; gap: 15px; min-width: 0; }
.brand-icon {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 10px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 12px;
  color: #e0f7eb;
  background: #115144;
}
.brand-icon::before,
.brand-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.brand-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.brand h1 { font-size: 24px; font-weight: 750; letter-spacing: -.055em; }
.brand p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.device {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 42%;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.device-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #7a8c87; }
.device[data-status="ready"] .device-dot { background: #198461; }
.device[data-status="offline"] .device-dot { background: #a96036; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px;
  align-items: start;
  padding-block: 30px 42px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 7px 24px rgb(21 51 45 / .03);
}
.config { padding: 27px 30px 25px; }
.run-column { min-width: 0; display: grid; gap: 18px; }
h2 { font-size: 19px; font-weight: 720; letter-spacing: -.035em; }
.config h2 { margin-bottom: 25px; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
legend, .field > span, .field > label {
  padding: 0;
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.date-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  padding: 5px;
  border: 1px solid #e2ebe6;
  border-radius: 12px;
  background: #f2f7f4;
}
.choice { position: relative; min-width: 0; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice span {
  display: block;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
  color: #526765;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}
.choice input:checked + span {
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--paper);
  border-color: #cbded4;
  box-shadow: 0 1px 3px rgb(25 55 43 / .07);
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.choice input:disabled + span { cursor: default; }
#date { width: 100%; margin-top: 10px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 8px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; margin-top: 20px; }
.field { display: block; min-width: 0; }
.field:has([data-picker="clinic"]), .doctor-field { grid-column: 1 / -1; }
.field small { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
#date {
  width: 100%;
  min-height: 45px;
  border: 1px solid #cedbd5;
  border-radius: 9px;
  background: #fff;
  padding: 10px 11px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.catalog-hint { margin-top: 11px; }
#date:disabled { background: #f4f8f5; opacity: 1; color: #526861; }
.picker { position: relative; }
.picker .picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border-color: #cbdad3;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}
.picker-trigger > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.picker .picker-trigger[data-empty="true"] { color: var(--muted); font-weight: 450; }
.picker .picker-trigger:not(:disabled):hover { border-color: #81ac9d; background: #f8fbf9; }
.picker .picker-trigger[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px #e6f3eb; }
.picker .picker-trigger:disabled { background: #f5f8f6; border-color: #dce7e1; color: #5f726a; }
.picker-arrow {
  flex: none;
  width: 8px;
  height: 8px;
  margin: -4px 2px 0 0;
  border: solid #4a7669;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.picker-trigger[aria-expanded="true"] .picker-arrow { margin-top: 4px; transform: rotate(225deg); }
.picker-options {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 6px) 0 auto;
  max-height: min(330px, 45vh);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 5px;
  border: 1px solid #cbdcd2;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgb(23 55 46 / .14);
}
.picker-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.picker-option[aria-selected="true"] { background: #e5f3ec; color: var(--accent-dark); }
.picker-option:hover { background: #f0f7f3; }
.picker-option:focus { outline: none; border-color: #7cb29e; background: #edf7f1; }
.option-name { font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.option-title { color: var(--muted); font-size: 11px; }
.option-fee {
  margin-left: auto;
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  background: #eef5f0;
  color: #275c4d;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.release-control { margin-top: 19px; }
.actions { margin-top: 21px; display: flex; align-items: stretch; gap: 10px; }
button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 720;
}
button:disabled { cursor: default; }
.primary { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--accent); color: white; }
.primary:not(:disabled):hover { background: var(--accent-dark); }
.primary:disabled { background: #d9e8e0; color: #445f54; }
.primary span { font-size: 19px; font-weight: 500; line-height: .9; }
.secondary { color: #364e4a; background: #fbfdfb; border-color: #ccd9d3; white-space: nowrap; }
.secondary:not(:disabled):hover { background: #edf3ef; }
.secondary:disabled { color: var(--muted); }
:where(input, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boundary { margin-top: 12px; }
.error { margin-top: 10px; color: #922e23; font-size: 13px; line-height: 1.55; }

.schedule { padding: 22px 25px 19px; background: #183c35; border-color: #183c35; color: #f5fbf8; }
.schedule-top, .run-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.schedule h2 { font-size: 16px; letter-spacing: -.015em; }
.timezone { color: #d2e8de; font-size: 11px; }
.schedule-time { margin-top: 14px; font-size: clamp(2.3rem, 5vw, 3.5rem); font-weight: 680; letter-spacing: -.07em; line-height: 1; }
.schedule-note { margin-top: 9px; color: #cee6db; font-size: 13px; line-height: 1.5; }
.schedule-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid #426359;
  padding-top: 12px;
  margin: 17px 0 0;
}
.schedule-bottom dt { font-size: 11px; color: #cee6db; }
.schedule-bottom dd { margin: 4px 0 0; font-size: 16px; }
.schedule-time, .schedule-bottom dd, .events time { font-variant-numeric: tabular-nums; }
.run { padding: 20px 24px 22px; }
.run-top h2 { font-size: 17px; }
.job-status {
  border-radius: 99px;
  background: #edf2ef;
  color: #405853;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}
.job-status:is([data-state="preparing"], [data-state="waiting"], [data-state="booking"], [data-state="confirmation"]) { background: var(--mint); color: #0b5e4d; }
.job-status:is([data-state="failed"], [data-state="no_stock"]) { background: #fff1e8; color: #8b3c1b; }
.job-message { margin-top: 12px; color: #48605b; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.job-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 13px;
  border: 1px solid #d9e8df;
  border-radius: 10px;
  background: #f3faf6;
  margin: 13px 0 0;
  padding: 10px;
}
.job-result dt { color: var(--muted); font-size: 11px; }
.job-result dd { margin: 4px 0 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.events { list-style: none; margin: 13px 0 0; padding: 0; }
.events li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid #e1ebe5;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.events time { color: var(--muted); font-size: 11px; }

@media (max-width: 760px) {
  .top-inner, .workspace { width: min(100% - 32px, 590px); }
  .top-inner { min-height: 87px; gap: 14px; }
  .workspace { grid-template-columns: 1fr; gap: 15px; padding-block: 16px 27px; }
  .run-column { gap: 15px; }
  .config { padding: 21px; }
}
@media (max-width: 420px) {
  .top-inner { align-items: flex-start; flex-direction: column; gap: 10px; }
  .brand h1 { font-size: 21px; }
  .brand-icon { width: 37px; height: 37px; border-radius: 9px; padding: 7px; }
  .device { max-width: 100%; padding: 5px 9px; }
  .config, .schedule, .run { padding-inline: 17px; }
}
@media (max-width: 350px) {
  .fields { grid-template-columns: 1fr; }
}
