/* SAP Заявки — PWA-стиль, клон KPS (kasspromservis app.css v581, упрощённый).
   Основа взята почти дословно из KPS; вырезано X5/ITSM-специфичное:
   сети чижик/пятёрочка, OLA, маршруты, push, задания, чат, профиль, админка. */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[v-cloak] { display: none; }

:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #1a1d26;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d9930d;
  --border: #e8eaf2;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --radius: 16px;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== ЛОГИН (KPS .login-*) ===== */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--grad);
}
.login-card {
  background: var(--card);
  border-radius: 22px;
  padding: 34px 26px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 18px 50px rgba(20,20,60,.28);
  animation: fadeUp .35s ease both;
}
.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(37,99,235,.35);
}
.login-logo svg { width: 28px; height: 28px; stroke: #fff; }
.login-card h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

/* Вкладки «Магазин»/«Инженер» на логине — KPS .seg/.seg-btn */
.seg { display: flex; gap: 8px; margin-top: 14px; }
.seg-btn { flex: 1; min-height: 44px; padding: 8px 0; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg-btn.on { background: #2563eb; border-color: #2563eb; color: #fff; }

input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fafbfd;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}

button {
  min-height: 46px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  background: var(--grad);
  color: #fff;
  transition: transform .12s, box-shadow .18s, opacity .18s, background .18s, color .18s, border-color .18s;
}
button:active { transform: scale(.97); }
button:disabled { opacity: .55; cursor: default; transform: none; }

.app-wrap { padding-bottom: 86px; padding-bottom: calc(86px + env(safe-area-inset-bottom)); animation: fadeIn .2s ease; }

/* ===== TOPBAR (KPS) ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px calc(14px + 6px);
  background: var(--grad);
  color: #fff;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 24px rgba(37,99,235,.28);
}
.topbar-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-brand {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .85;
}
.topbar-title {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.topbar .badge { background: rgba(255,255,255,.22); color: #fff; }

.btn-icon {
  min-height: 0;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon:active { background: rgba(255,255,255,.3); }

/* ===== ТАБЫ СТАТУСОВ (KPS .tabs) ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin: 16px 16px 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  background: transparent;
  color: #9aa1ac;
  border: none;
  border-radius: 14px;
  padding: 9px 18px;
  font-size: .95rem;
  font-weight: 600;
}
.tabs button.on {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(16,24,40,.08), 0 6px 16px rgba(16,24,40,.06);
}

/* ===== ФИЛЬТРЫ/ПОИСК (KPS .filters) ===== */
.filters {
  display: flex;
  gap: 12px;
  padding: 14px 16px 6px;
}
.filters input {
  flex: 1;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  padding-left: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24' fill='none' stroke='%239AA1AC' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
}
.filters input:focus { box-shadow: var(--shadow-sm), 0 0 0 3px rgba(37,99,235,.14); }
.search-wrap { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.search-wrap input { flex: 1; padding-right: 34px; }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: transparent; color: #E5484D;
  font-size: 16px; font-weight: 700; line-height: 1; min-height: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.search-clear:active { background: rgba(229,72,77,.12); }
.search-wrap input::-webkit-search-cancel-button,
.search-wrap input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

.pad { padding: 12px 16px; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin-top: 10px; }

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 44px 0;
  color: var(--muted);
  font-size: .9rem;
}
.loader::before {
  content: '';
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3.5px solid #dfe3f0;
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 52px 20px;
  color: var(--muted);
  animation: fadeIn .25s ease;
}
.empty svg { width: 52px; height: 52px; stroke: #c3c9da; }
.empty p { font-size: .95rem; }

/* ===== ЛЕНТА КАРТОЧЕК (KPS .cards/.card) ===== */
.cards { list-style: none; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.card {
  position: relative;
  background: var(--card);
  border: none;
  border-radius: 18px;
  padding: 16px 16px 14px 21px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16,24,40,.04), 0 10px 24px rgba(16,24,40,.06);
  animation: fadeUp .3s ease both;
  transition: transform .14s, box-shadow .18s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: #2FBF8F;
}
.card:active { transform: scale(.985); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.card-head-right { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.card-head-right .badge { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: clip; flex: 0 1 auto; min-width: 0; font-weight: 400; }
@media (max-width: 500px) {
  .card-head-right .badge { padding: 4px 8px; font-size: .72rem; }
}

.rid {
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: -.1px;
  color: #5A55D2;
  white-space: nowrap;
  flex: 0 0 auto;
}

.store-ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: #F1F2F5;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.store-ico svg { width: 18px; height: 18px; color: #6B7280; }
.card-store { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: #9AA1AC; font-weight: 600; min-width: 0; }
.card-store b { font-weight: 700; color: #111827; font-size: 1rem; }
.card-store .sapid { margin-right: 5px; }
.card-store-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.card-engineer { color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 5px; flex: none; }
.card-engineer b { font-weight: 500; }
.card-engineer svg { width: 17px; height: 17px; flex: none; color: #9AA1AC; }
.card-title { margin: 10px 0 0; font-size: .94rem; line-height: 1.35; font-weight: 500; color: #24262B; }
.route-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 30px;
  margin-left: 8px;
  vertical-align: middle;
}
.card-route { position: absolute; right: 14px; bottom: 12px; margin-left: 0; width: 28px; height: 28px; background: #FDECEC; border-radius: 50%; padding: 6px; }
.card-route svg { width: 100%; height: 100%; fill: #E05A4E; display: block; }
.card-foot { justify-content: space-between; }
.card-meta { font-size: .9rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.card-foot { margin-top: 12px; padding-top: 10px; border-top: 1.5px dashed #E4E6EA; font-size: .78rem; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.card-foot svg { width: 14px; height: 14px; vertical-align: -3px; margin-right: 5px; color: #B0B6BF; }

/* ===== БЕЙДЖИ СТАТУСОВ (цвета SAP-портала, НЕ менять) ===== */
.badge {
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: #e22400;
  color: #ffffff;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.badge.st-new         { background: #00a1d8; color: #fff; }
.badge.st-accepted    { background: #e07b39; color: #fff; }
.badge.st-in_progress { background: #669d34; color: #fff; }
.badge.st-closed      { background: #707070; color: #fff; }

/* ===== КАРТОЧКА ЗАЯВКИ (KPS .detail) ===== */
.detail { padding: 16px; animation: slideIn .22s ease; }
.detail h2 { font-size: 1.14rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; letter-spacing: -.01em; }
.detail h3 { font-size: 1rem; font-weight: 700; margin: 22px 0 10px; letter-spacing: -.01em; }
.store-head h2.store-head-line { margin-bottom: 6px; }
.store-head h2.store-head-line:first-child { margin-bottom: 1px; color: blue; }
.store-head h2.store-head-line:last-child { margin-bottom: 0; }
.store-short-link { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.store-head h2.store-head-line a.store-short-link { font-size: .85rem; font-weight: 400; color: #92400E; }
.desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: .92rem;
  line-height: 1.5;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 13px 15px;
  margin-bottom: 14px;
}
.fields { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 4px 16px; }
.fields > div { display: flex; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.fields > div:last-child { border-bottom: none; }
.fields dt { width: 116px; flex: none; color: var(--muted); }
.fields dd { flex: 1; word-break: break-word; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .btn-main { flex: 1 1 100%; min-height: 48px; font-weight: 600; }
.actions button { min-height: 48px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.3); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 6px 16px rgba(220,38,38,.25); }
.btn-ghost { background: var(--card); color: var(--text); border: 1.5px solid var(--border); }

/* ===== ФОТО ===== */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.photos .ph {
  position: relative;
  border: none; background: #eef0f5; border-radius: 12px; padding: 0; min-height: 0;
  aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
}
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph .ph-load {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .75rem;
}
.photo-view { position: fixed; inset: 0; z-index: 60; background: rgba(10,12,20,.94); display: flex; align-items: center; justify-content: center; }
.photo-view img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.photo-view-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px);
  width: 40px; height: 40px; min-width: 0; min-height: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.photo-view-close svg { width: 20px; height: 20px; }

/* ===== КОММЕНТАРИИ (KPS .comments) ===== */
.comments { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.comments li {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 11px 14px;
  font-size: .9rem;
  line-height: 1.45;
  animation: fadeUp .25s ease both;
}
.comments li .muted { font-size: .8rem; margin-left: 6px; }
.comments li div { margin-top: 4px; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.comments li.c-system { background: transparent; box-shadow: none; border: 1px dashed var(--border); color: var(--muted); }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.detail textarea { background: var(--card); box-shadow: var(--shadow-sm); border: none; border-radius: 12px; padding: 12px; font-size: .95rem; color: var(--text); resize: vertical; font-family: inherit; }
.closed-note { margin-top: 12px; color: var(--muted); font-size: .88rem; text-align: center; }

/* ===== ФОРМА СОЗДАНИЯ (KPS .file-*) ===== */
.form-block { margin-bottom: 14px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.close-files { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.file-btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; min-height: 44px; border-radius: 10px; font-size: .88rem; cursor: pointer; background: var(--card); color: var(--text); border: 1.5px solid var(--border); }
.file-btn input { display: none; }
.file-hint { color: var(--muted); font-size: .78rem; }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; font-size: .86rem; background: var(--card); }
.file-list .file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .file-size { color: var(--muted); font-size: .78rem; flex-shrink: 0; }
.file-list .file-del { background: none; border: none; color: var(--danger); cursor: pointer; font-size: .9rem; padding: 2px 6px; min-height: 0; box-shadow: none; }
.file-list img.file-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }

/* ===== НАЗНАЧЕНИЕ (KPS .assign-row) ===== */
.assign-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: nowrap; }
.assign-row .assign-select { flex: 1 1 0; width: auto; min-width: 0; padding: 10px; font-size: .88rem; min-height: 44px; background: var(--card); }
.assign-row .btn-primary { flex: 0 0 auto; width: auto; margin-top: 0; padding: 11px 14px; font-size: .9rem; min-height: 44px; }

/* ===== FAB «+» (стиль KPS: градиент, тень) ===== */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 25;
  width: 58px; height: 58px;
  min-height: 0; padding: 0;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 32px; font-weight: 400; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(37,99,235,.4);
}
.fab:active { transform: scale(.94); }

/* ===== МОДАЛКА (KPS .modal) ===== */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(20,22,40,.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
  animation: fadeIn .18s ease;
}
.modal {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 480px;
  animation: fadeUp .25s ease;
}
.modal h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.modal .warn { color: var(--danger); font-size: .88rem; line-height: 1.45; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 12px; margin-top: 14px; }
.modal-actions button { flex: 1; min-height: 48px; font-weight: 600; }

/* ===== ТОСТ (KPS .toast, v535) ===== */
.toast { position: fixed; left: 0; right: 0; margin: 0 auto; top: 85px; box-sizing: border-box; width: fit-content; min-width: 200px; max-width: calc(100vw - 60px); background: #111827; color: #fff; padding: 10px 16px 10px 10px; border-radius: 999px; font-size: .88rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; align-items: center; gap: 9px; z-index: 1200; }
.toast-ic { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #16A34A; }
.toast-ic svg { width: 13px; height: 13px; }
.toast.t-err .toast-ic { background: #dc2626; }
.toast.t-warn .toast-ic { background: #d9930d; }
.toast.t-info .toast-ic { background: #2563eb; }
.toast-enter-active, .toast-leave-active { transition: opacity .22s ease, transform .22s ease; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(80px); }

html, body { overflow-x: hidden; overflow-x: clip; }
.detail input, .detail textarea, .detail select { box-sizing: border-box; }

/* ===== ТЕМА 2 KPS (переопределения, как в app.css v581 с line 1030) ===== */
:root {
  --bg: #EFF0F5;
  --line: #EBECF2;
  --ink2: #5B5F72;
  --ink3: #9B9FB2;
  --acc2: #5A54D8;
  --acc2-soft: #EFEEFB;
  --shadow: 0 1px 3px rgba(29,31,43,.05), 0 6px 18px rgba(29,31,43,.05);
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }

.tabs {
  display: flex; gap: 3px;
  margin: 16px 12px 0;
  padding: 4px;
  background: #E9EAEF;
  border-radius: 14px;
}
.tabs button {
  flex: 1;
  min-height: 0;
  background: transparent;
  color: var(--ink3);
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap;
}
.tabs button.on {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(29,31,43,.1);
}

.filters { display: flex; gap: 8px; padding: 10px 12px 0; }
.filters input {
  flex: 1.2;
  min-height: 40px; height: 40px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0 11px 0 33px;
  font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239B9FB2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
}
.filters input:focus { border-color: var(--acc2); box-shadow: var(--shadow); }

.cards { padding: 12px 12px 16px; gap: 8px; }
.card {
  border: none;
  border-left: 3px solid #e22400;
  border-radius: 16px;
  padding: 11px 12px 5px 13px;
  box-shadow: var(--shadow);
  overflow: visible;
}
.card::before { content: none; }
.card.st-new         { border-left-color: #00a1d8; }
.card.st-accepted    { border-left-color: #e07b39; }
.card.st-in_progress { border-left-color: #669d34; }
.card.st-closed      { border-left-color: #707070; }
.card-head { gap: 7px; }
.rid {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--acc2);
}
.card-head-right { gap: 4px; }
.card-head-right .badge { font-size: 11px; padding: 2.5px 8px; border-radius: 99px; }
@media (max-width: 500px) {
  .card-head-right .badge { padding: 2.5px 8px; font-size: 11px; }
}

.card-store-row { margin-top: 8px; gap: 8px; }
.store-ico {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--acc2-soft); color: var(--acc2);
}
.store-ico svg { width: 14px; height: 14px; stroke-width: 2; }
.card-store { gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink3); }
.card-store b { font-size: 14px; font-weight: 700; color: var(--text); }
.card-engineer { font-size: 12.5px; font-weight: 600; color: var(--ink2); gap: 5px; }
.card-engineer b { font-weight: 600; }
.card-engineer svg { width: 14px; height: 14px; color: #8A8FA3; stroke-width: 1.8; }

.card-title {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { margin-top: 4px; font-size: 12px; }

.card-foot {
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  gap: 8px;
}
.card-foot svg {
  width: 9.5px;
  height: 9.5px;
  vertical-align: -1px;
  margin-right: 2px;
  margin-left: 1px;
  color: var(--ink3);
}

.card-route {
  position: static;
  width: 19px; height: 19px;
  background: #FDF0EE;
  border-radius: 6px;
  padding: 0;
  margin-left: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.card-route svg { width: 11px; height: 11px; fill: #E05A4E; display: block; }
.card-foot { justify-content: space-between; }

@media (min-width: 720px) {
  .tabs { margin: 18px 16px 0; }
  .tabs button { font-size: 15px; padding: 10px 4px; }
  .filters { gap: 10px; padding: 12px 16px 0; }
  .filters input { min-height: 48px; height: 48px; font-size: 15px; padding-left: 40px; background-position: 14px center; border-radius: 14px; }
  .cards { padding: 14px 16px 20px; gap: 12px; }
  .card { padding: 16px 16px 9px 19px; border-radius: 18px; }
  .rid { font-size: 15px; }
  .card-head-right .badge { font-size: 12px; padding: 3px 10px; }
  .card-store-row { margin-top: 12px; }
  .store-ico { width: 34px; height: 34px; border-radius: 10px; }
  .store-ico svg { width: 18px; height: 18px; }
  .card-store { font-size: 13px; gap: 10px; }
  .card-store b { font-size: 16px; }
  .card-engineer { font-size: 14px; gap: 6px; }
  .card-engineer svg { width: 17px; height: 17px; }
  .card-title { font-size: 15px; margin-top: 10px; -webkit-line-clamp: 3; }
  .card-meta { font-size: 13px; }
  .card-foot { font-size: 12px; margin-top: 10px; padding-top: 8px; }
  .card-route { width: 26px; height: 26px; border-radius: 8px; }
  .card-route svg { width: 15px; height: 15px; }
  .card-foot svg { width: 13px; height: 13px; }
}

/* ===== WAVE1 (2026-11-13): пагинация ленты / назначение / фото инженера ===== */
.feed-status { padding: 0 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.feed-loader { padding: 18px 0; }
.feed-error { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; font-size: .88rem; }
.feed-retry, .feed-more { min-height: 44px; padding: 10px 22px; font-size: .9rem; font-weight: 600; }
.feed-end { text-align: center; font-size: .8rem; padding: 10px 0 4px; }
.feed-sentinel { width: 100%; height: 2px; }
.empty .feed-retry { margin-top: 6px; }
.assign-block { margin-top: 12px; }
.assign-state { display: flex; align-items: center; gap: 10px; font-size: .88rem; padding: 4px 0; flex-wrap: wrap; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .85rem; }
.upload-block { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.upload-block .upload-submit { align-self: stretch; }
.upload-error { margin-top: 0; }
.file-btn.disabled { opacity: .55; pointer-events: none; }

/* ===== WAVE2 (2026-11-13): suspend/close/tasks/protocol/comments ===== */
/* Статус «Приостановлена» (фиолетовый accent-2 темы, KPS-стиль) */
.badge.st-suspended { background: #7c3aed; color: #fff; }
.card.st-suspended  { border-left-color: #7c3aed; }

/* Баннер pending-запроса на закрытие */
.close-pending-banner {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 11px 14px;
  background: #FFF7E8; border: 1px solid #F3DFB8; border-radius: 12px;
  color: #925E0B; font-size: .88rem; font-weight: 600;
}
.close-pending-banner svg { width: 18px; height: 18px; flex: none; }

/* Решение по закрытой заявке */
.resolution-block h3 { margin-top: 18px; }

/* Кнопки suspend/unsuspend и блок закрытия */
.btn-suspend { border-color: #C9B8F5; color: #6D31D9; }
.btn-unsuspend { box-shadow: 0 6px 16px rgba(124,58,237,.3); }
.close-blocked-hint {
  flex: 1 1 100%; margin: 2px 0 0;
  color: var(--warn); font-size: .8rem; text-align: center;
}

/* Модалки форм: обязательность, ошибки */
.req { color: var(--danger); }
.modal .form-block textarea { background: #fafbfd; border: 1.5px solid var(--border); box-shadow: none; }
.modal .form-block textarea:focus { border-color: var(--accent); background: #fff; }
.close-error, .suspend-error, .task-modal-error, .cr-modal-error,
.task-form-error { margin: 4px 0 0; font-size: .85rem; }
.suspend-until:disabled { background: #F1F2F5; color: var(--muted); }
.suspend-auto-hint { display: block; margin-top: 6px; }

/* ===== Задачи (wave2B) ===== */
.tasks-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 22px; }
.tasks-head h3 { margin: 0; }
.tasks-count { font-weight: 400; }
.task-add-btn { flex: none; }
.tasks-empty { font-size: .88rem; padding: 4px 0; }
.tasks { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.task {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 11px 13px; font-size: .9rem;
  border-left: 3px solid #9AA1AC;
}
.task.ts-issued    { border-left-color: #00a1d8; }
.task.ts-done      { border-left-color: #669d34; }
.task.ts-cancelled { border-left-color: #B0B6BF; opacity: .8; }
.task-head { display: flex; align-items: center; gap: 8px; }
.task-num {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; font-weight: 700; color: var(--acc2); letter-spacing: -.2px;
}
.badge.task-badge { margin-left: auto; font-size: 11px; padding: 2.5px 8px; }
.badge.task-badge.ts-issued    { background: #00a1d8; }
.badge.task-badge.ts-done      { background: #669d34; }
.badge.task-badge.ts-cancelled { background: #9099a8; }
.task-title { margin-top: 5px; font-weight: 600; line-height: 1.35; }
.task-desc { margin-top: 3px; font-size: .84rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { margin-top: 5px; font-size: .78rem; }
.task-solution {
  margin-top: 7px; padding: 8px 10px; border-radius: 9px;
  background: #F0F7EA; border: 1px solid #D9E9CB;
  font-size: .85rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere;
}
.task-cancel-info {
  margin-top: 7px; padding: 8px 10px; border-radius: 9px;
  background: #F6F7F9; border: 1px dashed var(--border);
  font-size: .85rem; color: var(--ink2);
}
.task-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.task-form {
  margin-top: 10px; background: var(--card); border-radius: 14px;
  box-shadow: var(--shadow-sm); padding: 14px;
}

/* ===== Протокол (wave2A) ===== */
.proto-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.proto-entry {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow-sm);
  padding: 9px 12px; font-size: .86rem; line-height: 1.45;
}
.proto-entry.proto-system { background: transparent; box-shadow: none; border: 1px dashed var(--border); color: var(--muted); }
.proto-head { display: flex; align-items: baseline; gap: 8px; }
.proto-head .muted { font-size: .76rem; margin-left: auto; flex: none; }
.proto-text { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ===== Комментарии: флаги (wave2) ===== */
.comments li.c-internal { border-left: 3px solid #d9930d; }
.comment-badge-internal { background: #d9930d; margin-left: 6px; font-size: 10px; padding: 2px 7px; }
.comment-badge-itsm { background: #2563eb; margin-left: 6px; font-size: 10px; padding: 2px 7px; }
.comment-flags { display: flex; flex-direction: column; gap: 6px; }
.comment-flag {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--ink2); cursor: pointer;
}
.comment-flag input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); }

/* ===== Запросы на закрытие (wave2, senior) ===== */
.cr-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cr-item {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 12px 14px; font-size: .9rem;
}
.cr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cr-head .muted { font-size: .78rem; }
.cr-meta { margin-top: 4px; font-size: .82rem; }
.cr-text { margin-top: 7px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-actions { display: flex; gap: 8px; margin-top: 10px; }
.cr-actions button { flex: 1; }
