

:root {
  --bg: #fff;
  --panel: #fff;
  --line: #f1f1f1;
  --line-strong: #ddd;

  --text: #1f2124;
  --label: #000;
  --section: #a2a6ad;
  --link: #2f7de1;
  --link-dark: #2569c0;

  /* акцент — тёплый песочный, читаемый, но не «горчица» */
  --accent: #fff6d9;
  --accent-line: #f3e3b0;
  --accent-text: #8a6b1f;

  --green: #edfaf1;
  --green-line: #c9ebd6;
  --green-text: #2f7a52;

  --yellow: #faffcb;
  --yellow-divider: #e7efa8;  /* только для разделителя внутри подсветки */

  --blue-soft: #f2f7fe;
  --blue-line: #d8e6fa;

  --danger: #d6453c;
  --danger-bg: #fef4f3;
  --danger-line: #f6d5d2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.45 "Helvetica Neue", Inter, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 72px; }

a { color: var(--link); }
.hidden { display: none !important; }
.muted { color: var(--label); }
.spacer { flex: 1; }


.head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.head .crumb { color: var(--link); text-decoration: underline; font-size: 12px; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font-size: 12px; white-space: nowrap;
}
.badge.green { background: var(--green); border-color: var(--green-line); color: var(--green-text); }
.badge.grey { background: #f6f7f8; border-color: #ececec; color: #82868d; }
.badge.red { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }


.section { margin-bottom: 16px; }
.section > h2 {
  font-size: 12px; font-weight: 400; color: var(--section);
  margin: 0 0 5px 2px;
}

.panel { background: var(--panel); border: 1px solid #ededed; border-radius: 8px; padding: 16px; }
.panel.yellow { background: var(--yellow); border: none; }
.panel.blue { background: var(--blue-soft); border-color: var(--blue-line); }
.panel.green { background: var(--green); border-color: var(--green-line); }
.panel + .panel { margin-top: 10px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }


.field { display: block; }
.field .label { display: block; font-size: 12px; color: var(--label); margin-bottom: 3px; }

input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%; background: #fff; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 8px 10px; font: inherit; font-size: 13px; outline: none;
  transition: border-color .12s;

  width: 100%;
  height: 40px;
  border-radius: 6px;
  background: #f0f0f0;
  border: none;
  font-size: 14px;
  outline: none;
  font-weight: 400;
  padding: 0 10px;
  border: 1px dashed transparent;
  box-sizing: border-box;
}
input::placeholder { color: #b6b5ae; }
textarea { resize: vertical; min-height: 68px; }

button {
  font: inherit; border-radius: 6px; padding: 8px 18px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  transition: background .12s, border-color .12s;
}
button:hover:not(:disabled) { background: #fafafa; border-color: #ccc; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: #265fc6; border-color: #265fc6; color: #fff; }
button.primary:hover:not(:disabled) { background: var(--link-dark); border-color: var(--link-dark); }
button.small { padding: 4px 10px; font-size: 12px; }
button b { font-weight: 700; }


.slots { display: flex; gap: 8px; flex-wrap: wrap; }
.slot {
  flex: 1 1 92px; text-align: center;
  border: 1px solid #ededed; border-radius: 8px; background: #fcfcfd;
  padding: 10px 6px;
}
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot .usd { font-size: 16px; font-weight: 700; }
.slot .rub { font-size: 12px; color: var(--label); margin-top: 1px; }
.slot.on { background: var(--accent); border-color: var(--accent-line); }
.slot.on .rub { color: var(--accent-text); }
.slot.off { opacity: .45; cursor: not-allowed; }

.guide { margin: 0; padding-left: 20px; font-size: 13px; color: #45483c; }
.guide li { margin-bottom: 5px; }
.guide li:last-child { margin-bottom: 0; }
.guide b { font-weight: 700; color: var(--text); }
.guide-extra { margin-top: 10px; white-space: pre-line; color: #4d5158; }
.guide-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--yellow-divider); color: #6b7050; }
.card-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-id { font-size: 15px; font-weight: 700; }
.card-warning { color: var(--danger); }

.slot-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slot-chips b { font-weight: 700; color: var(--text); margin-right: 2px; }
.slot-chip {
  background: #edf3b4; color: #000;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; white-space: nowrap;
}

/* ---- итог ---- */

.total { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.total .sum { font-size: 22px; font-weight: 700; color: var(--link); }
.total .sum small { font-size: 12px; font-weight: 400; color: var(--label); display: block; }
.breakdown { font-size: 12px; color: var(--label); }


.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--label); font-size: 12px; }
.kv dd { margin: 0; font-size: 13px; word-break: break-word; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  text-align: left; font-weight: 400; color: var(--label); font-size: 11px;
  padding: 0 8px 8px 0; border-bottom: 1px solid #ededed;
}
td { padding: 9px 8px 9px 0; border-bottom: 1px solid #f4f4f4; vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; padding-right: 14px; white-space: nowrap; }
td:last-child, th:last-child { padding-right: 0; }
td.actions, td.nowrap { white-space: nowrap; }
td.actions button + button { margin-left: 4px; }

.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; gap: 10px; padding: 3px 0; font-size: 12.5px; }
.log time { color: var(--label); white-space: nowrap; }

.note { font-size: 13px; color: #55585e; }
.error { color: var(--danger); font-size: 12.5px; }

.steps { display: flex; gap: 0; margin: 0 0 12px; padding: 0; list-style: none; }
.steps li {
  flex: 1; font-size: 11.5px; color: var(--label); padding: 5px 8px;
  border: 1px solid #ededed; border-right: none; background: #fafafa; text-align: center;
}
.steps li:first-child { border-radius: 6px 0 0 6px; }
.steps li:last-child { border-right: 1px solid #ededed; border-radius: 0 6px 6px 0; }
.steps li.on { background: var(--accent); border-color: var(--accent-line); color: var(--accent-text); }
.steps li.done { background: var(--green); border-color: var(--green-line); color: var(--green-text); }
.steps li.bad { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }

.msg { padding: 10px 14px; border-radius: 6px; font-size: 12.5px; margin-bottom: 12px; }
.msg.err { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger); }
.msg.ok { background: var(--green); border: 1px solid var(--green-line); }

@media (max-width: 720px) {
  .cols, .cols-3 { grid-template-columns: 1fr; }
  .slots .slot { flex: 1 1 calc(33% - 8px); }
  .total { gap: 10px; }
  .total button { width: 100%; }
  table { font-size: 12px; }
}
