/* ===== Админка: верификация (карточки) + общие элементы и мобильная рейка ===== */
.kyc-view { display: none !important; }
body.mode-kyc .chat-view { display: none !important; }
body.mode-kyc .kyc-view { display: block !important; }

.kyc-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.seg.us-seg .kyc-n { margin-left: 4px; padding: 1px 6px; border-radius: 99px; font-size: 11px; background: #eef0f6; color: #6b7280; }
.seg.us-seg .kyc-n.pending { background: #fff4e0; color: #b45309; }
.kyc-hint { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #8b93a7; }
.kyc-hint svg { width: 15px; height: 15px; flex: none; }

.kyc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.kyc-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 16px; text-align: center; color: #8b93a7; font-size: 13.5px; }
.kyc-empty .ds-ic { margin-bottom: 8px; }
.kyc-empty b { font-size: 16px; color: #111827; }

/* --- Карточка --- */
.kc { padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .2s, border-color .2s; }
.kc.pending { border-color: #fde9c4; }
.kc.flash { border-color: #3b5bfd; box-shadow: 0 0 0 4px rgba(59, 91, 253, .15); }
.kc-head { display: flex; align-items: center; gap: 12px; }
.kc-name { font-size: 15.5px; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-rows { display: flex; flex-direction: column; }
.kc-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed #eef0f5; }
.kc-row:last-child { border-bottom: 0; }
.kc-row span { color: #8b93a7; }
.kc-row b { color: #0f172a; font-weight: 600; text-align: right; }

.kc-photos { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kc-ph { margin: 0; cursor: zoom-in; }
.kc-img {
  aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: #eef0f6; color: #b7bdcb; transition: transform .15s, box-shadow .15s;
}
.kc-img > svg { width: 26px; height: 26px; }
.kc-img img { width: 100%; height: 100%; object-fit: cover; }
.kc-ph:hover .kc-img img { transform: scale(1.04); }
.kc-img img { transition: transform .2s; }
.kc-ph figcaption { margin-top: 6px; text-align: center; font-size: 11.5px; font-weight: 600; color: #6b7280; }
.kc-photos.hidden .kc-ph { cursor: default; filter: blur(.3px); }
.kc-reveal {
  position: absolute; left: 50%; top: calc(50% - 10px); transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid #e3e6ee; background: #fff; color: #374151; font: inherit; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(17, 24, 39, .1);
}
.kc-reveal svg { width: 16px; height: 16px; }
.kc-reveal:hover { border-color: #c9d2ff; color: #3b5bfd; }

.kc-wait { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #b45309; }
.kc-wait svg { width: 15px; height: 15px; }
.kc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid transparent; font: inherit; font-size: 14px; font-weight: 700; transition: background .15s, transform .1s, box-shadow .15s;
}
.kc-btn svg { width: 18px; height: 18px; }
.kc-btn:active { transform: scale(.98); }
.kc-btn:disabled { opacity: .6; cursor: default; }
.kc-btn.ok { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; box-shadow: 0 6px 16px rgba(16, 185, 129, .28); }
.kc-btn.ok:hover { box-shadow: 0 8px 22px rgba(16, 185, 129, .38); }
.kc-btn.bad { background: #fff; color: #dc2626; border-color: #fecaca; }
.kc-btn.bad:hover { background: #fef2f2; }

.kc-result { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.kc-result svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.kc-result small { display: block; margin-top: 2px; font-weight: 500; opacity: .8; }
.kc-result em { display: block; margin-top: 6px; font-style: normal; font-weight: 500; }
.kc-result.approved { background: #e7f8ef; color: #047857; }
.kc-result.rejected { background: #fef2f2; color: #b91c1c; }

.us-dialog.kc-dialog { max-width: 460px; text-align: left; }
.kc-dialog .us-dlg-ic, .kc-dialog h3, .kc-dialog .us-dlg-who { text-align: center; }
.kc-dialog .kr-reasons { margin: 8px 0 12px; }
.kc-dialog .kr-text { margin-bottom: 12px; }

.kc-lb { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.kc-lb img { max-width: 100%; max-height: calc(100dvh - 100px); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.kc-lb figcaption { color: #cbd5e1; font-size: 13px; }

/* --- Общие элементы решений (используются и в других разделах) --- */
.kr-load { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #d1d5e0; border-top-color: #3b5bfd; animation: kr-spin .8s linear infinite; }
@keyframes kr-spin { to { transform: rotate(360deg); } }
.kr-miss { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: #9ca3af; }
.kr-miss svg { width: 20px; height: 20px; }

.kr-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border: 1.5px solid transparent; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700; transition: background .15s, transform .1s;
}
.kr-btn:active { transform: scale(.98); }
.kr-btn svg { width: 18px; height: 18px; }
.kr-btn.approve { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; box-shadow: 0 6px 18px rgba(16, 185, 129, .3); }
.kr-btn.reject { background: #fff; color: #dc2626; border-color: #fecaca; }
.kr-btn.reject:hover { background: #fef2f2; }
.kr-btn.reject.solid { background: #ef4444; color: #fff; border-color: #ef4444; }
.kr-btn.ghost { background: #fff; color: #374151; border-color: #e5e7eb; }
.kr-btn:disabled { opacity: .6; cursor: default; }

.kr-reject-title { font-size: 13px; font-weight: 700; color: #374151; }
.kr-reasons { display: flex; flex-direction: column; gap: 6px; }
.kr-reason {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer;
  border: 1.5px solid #eef0f4; border-radius: 10px; font-size: 13.5px;
}
.kr-reason:has(input:checked) { border-color: #fca5a5; background: #fef2f2; }
.kr-reason input { flex: none; accent-color: #ef4444; }
.kr-text {
  width: 100%; min-height: 70px; resize: vertical; padding: 10px 12px; outline: none;
  border: 1.5px solid #e5e7eb; border-radius: 10px; font: inherit; font-size: 14px;
}
.kr-text:focus { border-color: #ef4444; }
.kr-text[hidden] { display: none; }
.kr-row { display: flex; gap: 10px; }

.kr-lb {
  position: fixed; inset: 0; z-index: 100; padding: 24px; cursor: zoom-out;
  display: grid; place-items: center; background: rgba(5, 8, 16, .88);
  animation: kr-fade .15s ease-out;
}
@keyframes kr-fade { from { opacity: 0; } }

/* Мобилка: рейка превращается в нижнее меню */
@media (max-width: 820px) {
  .rail {
    display: flex !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(62px + env(safe-area-inset-bottom, 0px)); padding: 0 0 env(safe-area-inset-bottom, 0px);
    flex-direction: row; justify-content: center; gap: 36px;
  }
  .rail-head, .rail-group, .rail .spacer, .rail-toggle, .rail-me, #logout, .rail-label { display: none !important; }
  .rail-btn { justify-content: center; padding: 0; }
  .rail-badge { position: absolute; top: 3px; right: 0; min-width: 18px; height: 18px; font-size: 10.5px; border: 2px solid #0f172a; }
  .rail-btn.active::before { display: none; }
  .admin { height: calc(100dvh - 62px - env(safe-area-inset-bottom, 0px)); }
  .kyc-grid { grid-template-columns: 1fr; gap: 12px; }
  .kyc-hint { display: none; }
  .kc { padding: 16px; }
}
