:root {
  --ink: #13232F; --paper: #F6F4EE; --card: #FFFDF8; --line: #E1DACB; --muted: #5A6570;
  --accent: #E8833A; --accent-ink: #B5561A; --blue: #2F6F8F; --ok: #2E7D5B; --bad: #B23A3A;
  --locker: #1C3242; --locker-line: #3A5266; --locker-text: #D7E0E6;
  font-family: 'IBM Plex Sans', Arial, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); min-height: 100vh; }
button, input, select { font: inherit; }
h1, h2, h3 { font-family: 'Oswald', Arial, sans-serif; font-weight: 500; margin: 0; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 5; }
.brand { font-family: 'Oswald', Arial, sans-serif; font-size: 24px; letter-spacing: 3px; }
.badge { font-family: 'IBM Plex Sans'; font-size: 12px; letter-spacing: 1px; background: var(--accent);
  color: var(--ink); padding: 2px 8px; border-radius: 99px; vertical-align: middle; }
.switch { display: none; gap: 4px; }
.switch button { background: transparent; color: var(--paper); border: 1px solid #3A5266; padding: 6px 12px;
  border-radius: 8px; cursor: pointer; }
.switch button.on { background: var(--accent); color: var(--ink); border-color: var(--accent); }

.stage > * { min-width: 0; }
.stage { display: grid; grid-template-columns: 420px 1fr; gap: 24px; padding: 24px; max-width: 1400px; margin: 0 auto; }
.phone { background: var(--ink); border-radius: 36px; padding: 14px; box-shadow: 0 20px 50px rgba(19,35,47,.25);
  align-self: start; position: sticky; top: 80px; }
.screen { background: var(--paper); border-radius: 26px; height: min(780px, calc(100vh - 140px)); overflow-y: auto;
  padding: 20px 18px 28px; }

@media (max-width: 1100px) {
  .switch { display: flex; }
  .stage { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .brand { font-size: 20px; letter-spacing: 2px; }
  .switch button { padding: 6px 10px; font-size: 14px; }
  .phone { position: static; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .screen { height: auto; border-radius: 0; padding: 4px 0 40px; background: none; }
  body[data-view="phone"] .locker, body[data-view="locker"] .phone { display: none; }
}

/* приложение */
.app-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.app-title h1 { font-size: 30px; }
.who { font-size: 13px; color: var(--muted); text-align: right; }
.link { background: none; border: 0; color: var(--accent-ink); cursor: pointer; padding: 0; text-decoration: underline; font-size: 13px; }
.nav { display: flex; gap: 6px; overflow-x: auto; margin: 0 -4px 16px; padding: 0 4px 4px; }
.nav button { flex: none; border: 1px solid var(--line); background: var(--card); padding: 8px 12px; border-radius: 99px;
  cursor: pointer; font-size: 14px; color: var(--ink); }
.nav button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nav .count { background: var(--accent); color: var(--ink); border-radius: 99px; padding: 0 6px; margin-left: 4px; font-size: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.btn { display: block; width: 100%; padding: 12px; border: 0; border-radius: 12px; background: var(--ink); color: var(--paper);
  font-weight: 600; cursor: pointer; margin-top: 12px; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { display: inline-block; width: auto; padding: 8px 12px; margin: 0; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sizes button { padding: 10px 0; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; }
.sizes button.on { background: var(--accent); border-color: var(--accent); font-weight: 600; }
.price { font-family: 'Oswald', Arial, sans-serif; font-size: 34px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.quick button { padding: 12px 8px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; cursor: pointer; text-align: left; }
.quick b { display: block; }
.quick span { font-size: 12px; color: var(--muted); }

.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: #E9E4D8; }
.status.good { background: #DCEFE5; color: var(--ok); }
.status.warn { background: #FBE3D2; color: var(--accent-ink); }
.status.bad { background: #F6DADA; color: var(--bad); }
.tn { font-family: 'Oswald', Arial, sans-serif; font-size: 18px; letter-spacing: 1px; }

.steps { list-style: none; padding: 0; margin: 8px 0 0; }
.steps li { padding: 8px 0 8px 30px; position: relative; color: var(--muted); }
.steps li::before { content: ''; position: absolute; left: 4px; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { border-color: var(--accent); background: var(--accent); animation: pulse 1s infinite alternate; }
.steps li.fail::before { background: var(--bad); border-color: var(--bad); }
@keyframes pulse { to { opacity: .35; } }
.bigcell { text-align: center; padding: 18px; border-radius: 16px; background: var(--ink); color: var(--paper); margin-top: 12px; }
.bigcell b { display: block; font-family: 'Oswald', Arial, sans-serif; font-size: 48px; color: var(--accent); }
video.selfie { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 4/3; object-fit: cover; margin-top: 8px; }

.timeline { display: flex; gap: 4px; margin: 10px 0 4px; }
.timeline i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.timeline i.on { background: var(--accent); }
.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; margin: 8px 0; font-size: 14px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi b { display: block; font-family: 'Oswald', Arial, sans-serif; font-size: 26px; }
.kpi span { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }

/* постамат */
.locker { background: var(--locker); color: var(--locker-text); border-radius: 24px; padding: 24px; min-height: 600px; }
.locker-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.locker-head h2 { color: var(--paper); font-size: 28px; }
.tabs { display: flex; gap: 6px; }
.tabs button { background: transparent; color: var(--locker-text); border: 1px solid var(--locker-line); padding: 8px 14px;
  border-radius: 10px; cursor: pointer; }
.tabs button.on { background: var(--paper); color: var(--ink); }
.hint { font-size: 14px; color: #A9B7C1; margin: 12px 0 20px; max-width: 640px; }
.cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.cell { position: relative; border: 2px solid var(--locker-line); border-radius: 10px; padding: 10px; min-height: 110px;
  display: flex; flex-direction: column; justify-content: space-between; background: #18303F; transition: background .3s; }
.cell.XL { grid-column: span 2; grid-row: span 2; }
.cell.L { grid-row: span 2; }
.cell .num { font-family: 'Oswald', Arial, sans-serif; font-size: 18px; color: var(--paper); }
.cell .st { font-size: 12px; }
.cell .kg { font-size: 12px; color: #A9B7C1; }
.cell.RESERVED { border-style: dashed; border-color: var(--accent); }
.cell.OCCUPIED { background: #2A4153; }
.cell.PENDING_PICKUP { border-color: #6FB0D2; }
.cell.BLOCKED { background: repeating-linear-gradient(45deg, #4A2A2E, #4A2A2E 8px, #3A2226 8px, #3A2226 16px); border-color: #C46060; }
.cell.MAINTENANCE { opacity: .5; }
.cell.dooropen { background: var(--accent); border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 4px rgba(232,131,58,.3);
  grid-column: span 2; grid-row: span 2; }
.cell.dooropen .num, .cell.dooropen .kg { color: var(--ink); }
.cell .acts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cell .acts button { border: 0; border-radius: 8px; padding: 8px; cursor: pointer; background: var(--ink); color: var(--paper); font-size: 13px; }
.cell .acts button.alt { background: rgba(19,35,47,.15); color: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; }
.legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--locker-line); }
.dot.RESERVED { border: 2px dashed var(--accent); }
.dot.OCCUPIED { background: #2A4153; }
.dot.OPEN { background: var(--accent); border-color: var(--accent); }
.dot.PENDING_PICKUP { border-color: #6FB0D2; }
.dot.BLOCKED { background: #C46060; border-color: #C46060; }
@media (max-width: 700px) {
  .cells { grid-template-columns: repeat(3, 1fr); }
  .locker { padding: 16px; border-radius: 16px; }
}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 12px; opacity: 0; transition: opacity .3s; pointer-events: none; max-width: 90vw; z-index: 10; }
.toast.on { opacity: 1; }
.toast.err { background: var(--bad); }
