:root {
  --bg: #0d0d0e; --fg: #fff; --muted: #8a8a90; --line: #2a2a2e; --card: #121214;
  --ok: #3ddc84; --bad: #ff5c5c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: 'Montserrat', system-ui, sans-serif; }
body { padding-bottom: 76px; min-height: 100vh; }
#app { padding: 0 20px 20px; max-width: 560px; margin: 0 auto; }

/* шапка */
.head { display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: 4px; }
.sub { font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.pill { border: 1.5px solid var(--fg); border-radius: 20px; padding: 7px 14px;
  font-weight: 700; font-size: 13px; background: none; color: var(--fg); font-family: inherit; }

/* заголовки */
.title { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted);
  text-transform: uppercase; margin: 22px 0 12px; }
.back { display: flex; align-items: center; gap: 16px; padding: 4px 0 16px;
  border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.back button { background: none; border: 0; color: var(--fg); font: 700 13px 'Montserrat';
  text-transform: uppercase; cursor: pointer; padding: 0; }
.back h2 { margin: 0; font-size: 16px; letter-spacing: 1.5px; text-transform: uppercase; }

/* кнопки */
.btn { display: block; width: 100%; padding: 17px 14px; margin-bottom: 12px; text-align: center;
  background: none; color: var(--fg); border: 1px solid var(--fg); font: 700 14px 'Montserrat';
  letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; border-radius: 0; }
.btn.fill { background: var(--fg); color: #000; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 11px; font-size: 12px; margin: 0; }
.btn:disabled { opacity: .35; cursor: default; }

/* чипы разделов */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -20px 16px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 10px 16px; border: 1px solid var(--line); background: none; color: var(--fg);
  font: 700 12px 'Montserrat'; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.chip.on { background: var(--fg); color: #000; border-color: var(--fg); }

/* сетка каталога */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { border: 1px solid var(--line); background: var(--card); cursor: pointer; position: relative; }
.card .img { aspect-ratio: 1; background: #1a1a1d center/cover no-repeat; display: flex;
  align-items: center; justify-content: center; font-size: 42px; }
.card .body { padding: 11px 12px 13px; }
.card .name { font-size: 13px; font-weight: 700; line-height: 1.3; min-height: 34px; }
.card .price { margin-top: 6px; font-size: 14px; font-weight: 800; }
.card .price small { color: var(--muted); font-weight: 500; font-size: 11px; }
.card.busy .img { filter: grayscale(1) brightness(.5); }
.tag { position: absolute; left: 8px; top: 8px; background: var(--fg); color: #000; font-size: 9px;
  font-weight: 800; letter-spacing: 1px; padding: 5px 8px; text-transform: uppercase; }
.tag.busy { background: var(--bad); color: #fff; }

/* строки таблицы */
.box { border: 1px solid var(--line); padding: 4px 16px; background: var(--card); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.row:last-child { border-bottom: 0; }
.row span { color: var(--muted); }
.row b { font-weight: 700; text-align: right; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-row .ic { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 20px; flex: none; }
.list-row .t { font-weight: 700; font-size: 15px; }
.list-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-row .ar { margin-left: auto; color: var(--muted); font-size: 22px; }

/* карточка товара */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .slide { flex: none; width: 100%; aspect-ratio: 1; scroll-snap-align: center; background: #1a1a1d center/cover;
  display: flex; align-items: center; justify-content: center; font-size: 80px; border: 1px solid var(--line); }
.p-title { font-size: 22px; font-weight: 800; margin: 18px 0 6px; line-height: 1.25; }
.p-price { font-size: 20px; font-weight: 800; }
.p-price small { color: var(--muted); font-size: 12px; font-weight: 500; }
.deposit { border: 1px solid var(--fg); padding: 12px 14px; margin: 14px 0; font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.desc { font-size: 13px; line-height: 1.6; color: #cfcfd4; white-space: pre-wrap; }
.busybox { border: 1px solid var(--bad); color: var(--bad); padding: 16px; text-align: center; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin: 16px 0; }

/* формы */
label { display: block; font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin: 14px 0 6px; font-weight: 700; }
input, textarea, select { width: 100%; background: var(--card); color: var(--fg); border: 1px solid var(--line);
  padding: 14px; font: 500 14px 'Montserrat'; border-radius: 0; outline: none; color-scheme: dark; }
input:focus, textarea:focus, select:focus { border-color: var(--fg); }
textarea { min-height: 80px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.total { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; padding: 16px 0; }

/* профиль */
.ava { text-align: center; padding: 18px 0 8px; }
.ava img, .ava .ph { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #222;
  display: inline-flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; }
.ava .n { font-weight: 800; font-size: 18px; margin-top: 10px; }
.ava .u { color: var(--muted); font-size: 13px; margin-top: 2px; }
.idbox { border: 1px solid var(--fg); text-align: center; padding: 20px 10px; margin: 14px 0; }
.idbox .l { font-size: 11px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.idbox .v { font-size: 30px; font-weight: 800; margin: 8px 0; letter-spacing: 1px; }
.idbox .c { font-size: 11px; color: var(--muted); font-family: monospace; }
.bk { border: 1px solid var(--line); background: var(--card); padding: 14px; margin-bottom: 10px; font-size: 13px; }
.bk .t { font-weight: 700; margin-bottom: 6px; }
.bk .m { color: var(--muted); line-height: 1.6; }
.st { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 3px 7px; margin-left: 6px; text-transform: uppercase; }
.st.active { background: var(--ok); color: #000; } .st.cancelled { background: #444; color: #ccc; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }

/* нижнее меню */
#tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #15171a;
  border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
#tabs button { flex: 1; background: none; border: 0; color: var(--muted); padding: 10px 0 12px;
  font: 700 10px 'Montserrat'; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; }
#tabs button i { display: block; font-style: normal; font-size: 22px; margin-bottom: 3px; filter: grayscale(1) opacity(.55); }
#tabs button.on { color: #fff; } #tabs button.on i { filter: none; }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: #fff; color: #000;
  padding: 12px 20px; font-weight: 700; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 20; max-width: 90%; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs div { width: 64px; height: 64px; background: #222 center/cover; position: relative; border: 1px solid var(--line); }
.thumbs div b { position: absolute; top: -6px; right: -6px; background: var(--bad); width: 20px; height: 20px; border-radius: 50%;
  font-size: 12px; text-align: center; line-height: 20px; cursor: pointer; }
