*{box-sizing:border-box;margin:0}body{font-family:-apple-system,Roboto,sans-serif;background:#f4f4f8;color:#1a1a2e}
main{max-width:480px;margin:0 auto;padding:20px}h1{font-size:1.3rem;margin:8px 0}
.bar{display:flex;justify-content:space-between;align-items:center}.muted{color:#777;margin:8px 0 16px}
label{display:block;font-weight:600;margin:12px 0 4px}input{width:100%;padding:14px;font-size:1.1rem;border:1px solid #ccc;border-radius:10px}
button{width:100%;padding:14px;border:0;border-radius:10px;background:#1a1a2e;color:#fff;font-size:1rem;margin:12px 0;cursor:pointer}
button.sec{width:auto;background:#e8e8ef;color:#1a1a2e;padding:8px 14px}
.back-link{display:inline-block;text-decoration:none;border-radius:10px}
.tile{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #e3e3ea;border-radius:12px;padding:18px;margin:10px 0;text-decoration:none;color:#1a1a2e}
.tile .ic{font-size:26px}.tile .arr{margin-left:auto;color:#bbb;font-size:22px}.err{color:#c0392b}
.login-brand{display:flex;flex-direction:column;align-items:center;text-align:center;margin:18px 0 10px}
.login-brand img{width:96px;height:96px;border-radius:22px;box-shadow:0 8px 24px rgba(0,0,0,.12);margin-bottom:12px}
.login-brand h1{margin:0}
.role-choice{display:grid;gap:12px;margin-top:14px}
.role-tile{width:100%;min-height:92px;margin:0;padding:22px 20px;text-align:left;font:inherit}
.store-pick-tile{min-height:100px;padding:25px 20px}
.role-tile .ic{font-size:34px}
.role-tile span:not(.ic):not(.arr){font-size:1.12rem;font-weight:700}
.card{background:#fff;border:1px solid #ececf3;border-radius:12px;padding:12px;margin:10px 0}
.inline{display:flex;align-items:center;gap:8px;font-weight:500}
.inline input{width:auto}
.settings-row,.supplier-row{border-top:1px solid #ececf3;padding-top:10px;margin-top:10px}
.settings-row:first-of-type{border-top:0}
select,textarea{width:100%;padding:12px;font-size:1rem;border:1px solid #ccc;border-radius:10px;background:#fff}

.tile.soon{width:100%;text-align:left;cursor:pointer;font:inherit}
.tile.soon .arr{color:#bbb}

/* маленькие вкладки выбора магазина */
.store-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.store-tabs .tab{width:auto;margin:0;background:#fff;border:1px solid #d8d8e0;
  color:#1a1a2e;padding:10px 16px;border-radius:999px;font-size:1rem;cursor:pointer}
.store-tabs .tab:active,.store-tabs .tab:hover,.store-tabs .tab.active{border-color:#b91c1c;color:#b91c1c}
.store-tabs .tab.active{background:#fdeeee;font-weight:700}
.filters{background:#fff;border:1px solid #ececf3;border-radius:12px;padding:12px;margin:10px 0}
.filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.filter-grid label{font-size:.85rem;margin:0;color:#555}
.filter-grid input,.filter-grid select{width:100%;margin-top:4px;padding:10px;border:1px solid #d8d8e0;border-radius:10px;background:#fff;font-size:1rem}
.filter-actions{display:flex;gap:8px;margin-top:10px}
.filter-actions button{margin:0}
.filter-actions .sec{width:auto;min-width:110px}

/* крупная кнопка съёмки накладной */
.bigcam{width:100%;padding:26px;font-size:1.25rem;font-weight:600;background:#b91c1c;
  color:#fff;border:0;border-radius:14px;margin:12px 0;cursor:pointer}
.bigcam:active{background:#9d1818}

/* мини-превью листов накладной */
.ph-previews{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.ph-thumb{position:relative;width:46px;height:46px}
.ph-thumb.lb-photo{display:block;width:46px;height:46px;margin:0;padding:0;background:none;border:0;border-radius:6px;cursor:zoom-in}
.ph-thumb img{width:46px;height:46px;object-fit:cover;border-radius:6px;border:1px solid #ddd}
.ph-thumb button{position:absolute;top:-5px;right:-5px;width:18px;height:18px;border-radius:50%;
  border:0;background:#b91c1c;color:#fff;font-size:12px;line-height:1;cursor:pointer;padding:0;margin:0}
.thread{margin:10px 0}
.msg{background:#fff;border:1px solid #ececf3;border-radius:10px;padding:8px 10px;margin:6px 0}
.msg.manager{background:#fdeeee}
.msg-h{font-size:.78rem;color:#888;margin-bottom:2px}
.msg-img{width:90px;height:90px;object-fit:cover;border-radius:8px;margin:4px 4px 0 0}
.msg-photo{display:inline-block;width:90px;height:90px;margin:4px 4px 0 0;padding:0;background:none;border:0;border-radius:8px;cursor:zoom-in}
.msg-photo img{width:90px;height:90px;object-fit:cover;border-radius:8px}
.compose{margin-top:10px}
.compose .file{display:inline-flex;align-items:center;justify-content:center;width:54px;height:54px;
  margin:8px 8px 8px 0;padding:0;border-radius:12px;background:#e8e8ef;color:#1a1a2e;
  font-size:1.45rem;font-weight:700;vertical-align:middle;cursor:pointer}
.compose .file:active{background:#d8d8e0}

/* Просмотр фото как в фотоотчёте: оверлей, зум, свайп, стрелки. */
.lb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000;
  display: none; flex-direction: column; }
.lb-overlay.open { display: flex; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; }
.lb-img { max-width: 100%; max-height: 100%; transform-origin: center center;
  transition: transform .05s linear; user-select: none; -webkit-user-drag: none; }
.lb-close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px;
  background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer; z-index: 2; margin: 0; padding: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px;
  background: rgba(255,255,255,.12); color: #fff; border: 0; font-size: 2rem; cursor: pointer;
  z-index: 2; margin: 0; padding: 0; }
.lb-prev { left: 8px; border-radius: 0 10px 10px 0; }
.lb-next { right: 8px; border-radius: 10px 0 0 10px; }
.lb-bottom { color: #fff; text-align: center; padding: 12px; display: flex; gap: 12px;
  justify-content: center; align-items: center; }
.lb-counter { opacity: .7; font-size: .85rem; }
.lb-cap { font-weight: 600; }
