:root {
  --bg: #f4f3f0; --card: #ffffff; --ink: #141414; --muted: #6b6b6b; --line: #e3e1dc;
  --accent: #141414; --accent-ink: #ffffff; --ok: #1d7a3e; --ok-bg: #e7f4ec; --err: #b3261e; --err-bg: #fbeaea; --warn-bg: #fff6dc;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 2px 16px; }
.logo { font-weight: 900; letter-spacing: .12em; font-size: 22px; }
.sub { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items .nm { font-weight: 600; }
.items .ds { color: var(--muted); font-size: 14px; }
.items .pr { white-space: nowrap; font-weight: 600; }
.sumrow { display: flex; justify-content: space-between; padding: 6px 0; }
.sumrow.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #141414; outline-offset: -1px; border-color: transparent; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px 18px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 15px; padding: 10px 14px; width: auto; }
.btn.small { width: auto; padding: 10px 14px; font-size: 15px; }
.msg { border-radius: 10px; padding: 12px 14px; margin: 12px 0 0; font-size: 15px; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.warn { background: var(--warn-bg); color: #6b4e00; }
#cdek-map { width: 100%; height: 560px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fafafa; }
@media (max-width: 600px) { #cdek-map { height: 620px; } .card { padding: 16px; } }
.chosen { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #f6f5f2; font-size: 15px; }
.chosen b { display: block; }
.center { text-align: center; }
.big { font-size: 30px; font-weight: 900; letter-spacing: .02em; }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: s 1s linear infinite; margin: 12px auto; }
@keyframes s { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }

/* страница менеджера */
.row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.row > * { min-width: 0; }
.c12 { grid-column: span 12; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c2 { grid-column: span 2; } .c8 { grid-column: span 8; }
@media (max-width: 640px) { .c6, .c4, .c3, .c8 { grid-column: span 12; } .c2 { grid-column: span 6; } }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; position: relative; }
.item .del { position: absolute; right: 8px; top: 6px; background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; }
.item label { margin-top: 6px; font-size: 13px; }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radios label { display: flex; align-items: center; gap: 6px; font-weight: 500; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; cursor: pointer; }
.radios input { width: auto; }
.linkbox { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.linkbox input { font-weight: 700; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list td, table.list th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: 13px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; background: #eee; font-size: 12px; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: #6b4e00; }
.tag.err { background: var(--err-bg); color: var(--err); }

/* выбор доставки */
.ac { position: relative; }
.sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 1000; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.sug button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font: inherit; cursor: pointer; }
.sug button:last-child { border-bottom: 0; }
.sug button:hover, .sug button:focus { background: #f4f3f0; }
.sug small { display: block; color: var(--muted); font-size: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 12px; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.seg button b { display: block; font-size: 15px; }
.seg button span { color: var(--muted); font-size: 13px; }
.seg button.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
#map { width: 100%; height: 320px; border-radius: 12px; border: 1px solid var(--line); z-index: 0; }
.pvzlist { max-height: 320px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.pvz { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.pvz:last-child { border-bottom: 0; }
.pvz.on { background: #141414; color: #fff; }
.pvz.on small { color: #ddd; }
.pvz small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pvzlist .more { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted); margin: 14px 0 0; cursor: pointer; }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.consent a { color: inherit; }
