/* Сцена проверки по демо-отчёту владельца. Все классы с префиксом dm-, палитра фиксирована (светлая),
   чтобы не пересекаться со стилями сайта и не зависеть от темы и акцента. */

.modal.scan{--card:#fff;--card2:#f8faff;--line:#e3e9f6;--text:#2a3a6b;--muted:#8a96bd;background:#fff;color:#2a3a6b;color-scheme:light}
.modal.scan::before{display:none}
.modal.scan .modal-title{color:#2a3a6b}
.modal.scan .modal-x{background:#fff;border-color:#e3e9f6;color:#3a6bff}
.modal.scan .modal-body{padding-top:0}

.dm-root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#2a3a6b;display:flex;flex-direction:column;align-items:center;width:100%;max-width:900px;margin:0 auto}

/* ---------- таблица ---------- */
.dm-card{display:none;width:100%;max-width:900px;table-layout:fixed;border-collapse:separate;border-spacing:0;border:1px solid #e3e9f6;border-radius:20px;box-shadow:0 10px 30px rgba(60,90,200,.12);background:#fff}
.dm-card.show{display:table}
.dm-card th{padding:14px 10px;vertical-align:middle;text-align:left;font-weight:normal;background:#f8faff}
.dm-card th:first-child{width:15%;padding:12px 6px;border-radius:20px 0 0 20px}
.dm-card th:last-child{width:76px;padding:8px;border-radius:0 20px 20px 0;text-align:center}

.dm-msg{text-align:left;font-size:clamp(15px,4.4vw,26px);font-weight:600;color:#2a3a6b;word-break:break-word}
.dm-msg.ok{color:#16a34a}

/* плавное сворачивание блоков */
.dm-fold{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows .7s ease,opacity .6s ease}
.dm-fold.hidden{grid-template-rows:0fr;opacity:0}
.dm-fold>div{overflow:hidden;min-height:0}

/* адрес и баланс */
.dm-addr-box{padding:2px 12px;background:#fff;border:1px solid #e3e9f6;border-radius:12px;margin-top:14px}
.dm-addr-row{display:grid;grid-template-columns:auto 1fr auto;column-gap:10px;row-gap:3px;align-items:center;padding:7px 0}
.dm-addr-row+.dm-addr-row{border-top:1px solid #eef2fb}
.dm-tag{grid-area:1/1;min-width:52px;text-align:center;padding:2px 8px;border-radius:999px;background:#eaf1ff;color:#3a6bff;font-size:11px;font-weight:700;line-height:1.5;letter-spacing:.03em}
.dm-addr{grid-area:2/1/3/4;min-width:0;overflow:hidden;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:clamp(10px,2.7vw,12.5px);line-height:1.45;color:#6a76a3}
.dm-bal{grid-area:1/3;text-align:right;font-size:clamp(13px,3.6vw,15px);font-weight:700;color:#2a3a6b;font-variant-numeric:tabular-nums;white-space:nowrap}
.dm-bal small{font-size:.8em;font-weight:600;color:#8a96bd;margin-right:2px}
@media (min-width:640px){
  .dm-addr{grid-area:1/2}
  .dm-bal{min-width:96px}
}

/* ---------- панель выполнения ---------- */
.dm-panel{display:none;width:100%;max-width:900px;margin-top:14px;padding:14px;box-sizing:border-box;background:#f8faff;border:1px solid #e3e9f6;border-radius:20px;box-shadow:0 10px 30px rgba(60,90,200,.12);opacity:0;transform:translateY(8px);transition:opacity .7s ease,transform .7s ease}
.dm-panel.on{display:block}
.dm-panel.show{opacity:1;transform:none}
.dm-st-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.dm-st-left{display:flex;align-items:flex-start;gap:10px;min-width:0}
.dm-dot{width:10px;height:10px;flex:none;border-radius:50%;margin-top:7px;background:#ff9500;animation:dm-pulse 1s ease-in-out infinite}
@keyframes dm-pulse{0%,100%{transform:scale(.8);opacity:.6}50%{transform:scale(1.2);opacity:1}}
.dm-st-text{min-width:0;font-size:clamp(14px,3.8vw,18px);font-weight:600;color:#2a3a6b}
.dm-st-text.swap,.dm-st-desc.swap{animation:dm-swap .35s ease}
.dm-st-info{min-width:0}
.dm-st-desc{margin-top:2px;font-size:clamp(11.5px,3.1vw,13px);line-height:1.4;color:#8a96bd}
@keyframes dm-swap{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.dm-st-count{font-size:13px;font-weight:700;color:#8a96bd;font-variant-numeric:tabular-nums;white-space:nowrap}
.dm-panel.finished .dm-dot{animation:none;background:#16a34a}
.dm-panel.finished .dm-st-text{color:#16a34a}

.dm-bar-row{display:flex;align-items:center;gap:12px;margin-top:12px}
.dm-bar{position:relative;flex:1;height:12px;border-radius:999px;background:linear-gradient(90deg,#7cc4ff,#3a6bff 55%,#6a3df0);box-shadow:inset 0 1px 2px rgba(0,0,0,.12)}
.dm-bar-fill{position:absolute;inset:0;border-radius:999px;background:linear-gradient(90deg,#ffe066,#ff9500 55%,#ff3d00);clip-path:inset(0 100% 0 0 round 999px)}
.dm-bar-time{min-width:3.8em;text-align:right;font-size:clamp(16px,4.4vw,22px);font-weight:700;font-variant-numeric:tabular-nums;background:linear-gradient(180deg,#5aa2ff 0%,#3a4fe0 100%);-webkit-background-clip:text;background-clip:text;color:transparent}

.dm-steps{margin-top:12px;background:#fff;border:1px solid #e3e9f6;border-radius:14px;overflow:hidden}
.dm-steps:empty{display:none}
.dm-step{animation:dm-rowIn .45s ease}
.dm-step+.dm-step{border-top:1px solid #eef2fb}
.dm-step-head{display:flex;align-items:center;gap:8px;padding:7px 10px;font-size:clamp(12.5px,3.4vw,14px);color:#2a3a6b;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
.dm-step-head:hover{background:#f8faff}
.dm-step-head>svg{width:16px;height:16px;flex:none}
.dm-step-head>span{flex:1;min-width:0}
.dm-step-head em{font-style:normal;font-size:12px;color:#8a96bd;font-variant-numeric:tabular-nums;white-space:nowrap}
.dm-step-head .dm-chev{width:14px;height:14px;transition:transform .25s ease}
.dm-step.open .dm-chev{transform:rotate(180deg)}
.dm-step-desc{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s ease}
.dm-step.open .dm-step-desc{grid-template-rows:1fr}
.dm-step-desc>div{overflow:hidden;min-height:0}
.dm-step-desc p{margin:0;padding:0 12px 9px 34px;font-size:12px;line-height:1.45;color:#8a96bd}

/* проценты результатов */
.dm-step-head em.pct{min-width:42px;text-align:center;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:700;animation:dm-pop .45s ease both}
.pct.g1{color:#16a34a;background:#dcfce7}
.pct.g2{color:#5f9f72;background:#e8f3ea}
.pct.o{color:#d97706;background:#fef3c7}
.pct.r{color:#dc2626;background:#fee2e2}
@keyframes dm-pop{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}

/* кнопки внизу */
.dm-act{display:none;margin:14px auto 2px;padding:13px 34px;font-size:16px;font-weight:600;color:#fff;border:0;border-radius:999px;cursor:pointer;background:linear-gradient(135deg,#4facfe 0%,#00c6ff 55%,#5b8def 100%);box-shadow:0 8px 18px rgba(79,172,254,.4);opacity:0;transform:translateY(6px);transition:opacity .6s ease,transform .6s ease,box-shadow .15s;-webkit-tap-highlight-color:transparent;font-family:inherit}
.dm-act.on{display:block}
.dm-act.show{opacity:1;transform:none}
.dm-act:active{transform:scale(.96);box-shadow:0 4px 9px rgba(79,172,254,.4)}
.dm-more{display:none;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:10px;opacity:0;transition:opacity .6s ease}
.dm-more.on{display:flex}
.dm-more.show{opacity:1}
.dm-more a,.dm-more button{padding:9px 20px;border-radius:999px;border:1px solid #e3e9f6;background:#fff;color:#3a6bff;font:600 14px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;text-decoration:none}

/* подпись под крестиком */
.dm-disc{margin-top:5px;font-size:10px;letter-spacing:.02em;color:#9aa5c8;opacity:0;transition:opacity .7s ease;user-select:none}
.dm-close.show+.dm-disc{opacity:1}
@keyframes dm-rowIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* крестик */
.dm-close{width:52px;height:52px;padding:0;border:1px solid #e3e9f6;border-radius:16px;background:linear-gradient(180deg,#ffffff 0%,#eef3ff 100%);box-shadow:0 6px 14px rgba(60,90,200,.16);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .7s ease,transform .15s,box-shadow .15s;-webkit-tap-highlight-color:transparent}
.dm-close svg{width:26px;height:26px}
.dm-close.show{opacity:1;pointer-events:auto}
.dm-close:active{transform:scale(.93);box-shadow:0 3px 7px rgba(60,90,200,.16)}

/* таймер */
.dm-wrap{position:relative;width:100%;margin:0 auto;aspect-ratio:1;container-type:inline-size}
.dm-wrap>svg{width:100%;height:100%;display:block;overflow:visible}
.dm-ring-shadow{filter:drop-shadow(0 6px 8px rgba(60,90,200,.28))}
.dm-time{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:25cqw;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;user-select:none;background:linear-gradient(180deg,#5aa2ff 0%,#3a4fe0 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.dm-check{fill:none;stroke:url(#dm-greenGrad);stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;display:none}
.dm-done .dm-time{display:none}
.dm-done .dm-check{display:block;animation:dm-draw .55s ease-out forwards}
@keyframes dm-draw{to{stroke-dashoffset:0}}
.dm-done .dm-head,.dm-done .dm-sparks{display:none}

/* ====== МОБИЛЬНАЯ ВЕРСИЯ ====== */
@media (max-width:639px){
  .dm-card.show{display:block}
  .dm-card thead{display:block}
  .dm-card tr{display:grid;grid-template-columns:82px minmax(0,1fr);grid-template-areas:"ring msg" "addr addr";align-items:center;column-gap:10px;row-gap:0;padding:12px;background:#f8faff;border-radius:19px}
  .dm-card tr::before{content:"";grid-area:1/1/2/3;align-self:stretch;background:#fff;border:1px solid #e3e9f6;border-radius:12px}
  .dm-card th{display:block;padding:0;background:none}
  .dm-card th:first-child{grid-area:1/1;width:auto;padding:0;border-radius:0;margin:10px 0 10px 10px}
  .dm-card th:nth-child(2){display:contents}
  .dm-card th:last-child{display:none}
  .dm-msgfold{grid-area:1/2;margin-right:10px}
  .dm-msgfold.hidden{grid-template-rows:1fr;opacity:1}
  .dm-addrs{grid-area:addr}
  .dm-addr{width:0;min-width:100%}
  .dm-addr-box{position:relative;overflow:hidden;margin-top:12px;padding-bottom:0}
  .dm-addr-box::before{content:attr(data-title);display:block;margin:-2px -12px 4px;padding:13px 0;text-align:center;border-bottom:1px solid #e3e9f6;border-radius:11px 11px 0 0;color:#8a96bd;font:600 13px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.02em;background:linear-gradient(0deg,#ffffff 0%,#eef3ff 100%)}
  .dm-addr-box::after{content:attr(data-disc);display:block;margin:4px -12px 0;padding:13px 0;text-align:center;border-top:1px solid #e3e9f6;border-radius:0 0 11px 11px;color:#8a96bd;font:600 13px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.02em;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><defs><linearGradient id='g' gradientUnits='userSpaceOnUse' x1='4' y1='4' x2='20' y2='20'><stop offset='0' stop-color='%234facfe'/><stop offset='1' stop-color='%236a3df0'/></linearGradient></defs><path d='M5.5 5.5L18.5 18.5M18.5 5.5L5.5 18.5' stroke='url(%23g)' stroke-width='3' stroke-linecap='round' fill='none'/></svg>") no-repeat calc(50% - 54px) center/15px 15px,linear-gradient(180deg,#ffffff 0%,#eef3ff 100%)}
}
.dm-step-head em.dm-ok svg{width:20px;height:20px;display:block}
.dm-step-desc p{padding-left:12px}
/* ---- краткий отчёт: шкала, статистика, проверенные пункты ---- */
.dm-slot{width:100%;max-width:900px}
.dm-brief{margin-top:14px;padding:16px;background:#f8faff;border:1px solid #e3e9f6;border-radius:20px;box-shadow:0 10px 30px rgba(60,90,200,.12);opacity:0;transform:translateY(10px);transition:opacity .7s ease,transform .7s ease}
.dm-brief.show{opacity:1;transform:none}
.dm-bt{text-align:center;font-weight:700;font-size:13px;color:#8a96bd;letter-spacing:.06em;text-transform:uppercase;margin-bottom:6px}
.dm-gauge{max-width:300px;margin:0 auto}
.dm-gauge svg{display:block;width:100%;height:auto;overflow:visible}
.dm-needle{transition:transform 2.4s cubic-bezier(.22,1,.36,1)}
.dm-gnum{text-align:center;margin-top:-4px}
.dm-gv{display:block;font-size:38px;font-weight:800;line-height:1.1;color:#2a3a6b;font-variant-numeric:tabular-nums}
.dm-gnum span{font-weight:700;font-size:15px}
.dm-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.dm-tile{background:#fff;border:1px solid #e3e9f6;border-radius:14px;padding:10px 12px;min-width:0}
.dm-tile small{display:block;color:#8a96bd;font-size:12px}
.dm-tile b{display:block;font-size:clamp(14px,3.8vw,17px);color:#2a3a6b;font-variant-numeric:tabular-nums;word-break:break-word}
.dm-tile em{display:block;font-style:normal;color:#8a96bd;font-size:12px;margin-top:2px}
.dm-note{margin:12px 0 0;padding:10px 12px;border-radius:12px;background:#fef3c7;color:#92400e;font-size:13px;line-height:1.45}
.dm-chk{margin-top:16px;background:#fff;border:1px solid #e3e9f6;border-radius:14px;padding:12px 14px}
.dm-chk h4{margin:0 0 8px;font-size:13px;color:#8a96bd;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
.dm-chk ul{list-style:none;margin:0;padding:0;display:grid;gap:7px}
.dm-chk li{display:flex;align-items:center;gap:9px;font-size:14px;color:#2a3a6b}
.dm-chk li svg{width:18px;height:18px;flex:none}
.dm-warn{margin:14px 0 0;font-size:13px;line-height:1.5;color:#6a76a3}
.dm-fullzone.gone{display:none}
.dm-bact{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:14px}
.dm-btn{padding:13px 28px;font:600 15px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff;border:0;border-radius:999px;cursor:pointer;background:linear-gradient(135deg,#4facfe 0%,#00c6ff 55%,#5b8def 100%);box-shadow:0 8px 18px rgba(79,172,254,.4)}
.dm-btn.ghost{background:#fff;color:#3a6bff;border:1px solid #e3e9f6;box-shadow:none}
.dm-btn:active{transform:scale(.96)}
@media(min-width:640px){.dm-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
.dm-step-head em.dm-ok svg{width:20px;height:20px;display:block}
/* ---- отчёт: таблица данных с тире, шаги получения данных, шкала, disconnect только в полном ---- */
.dm-nodisc .dm-card th:last-child{display:none}
.dm-addr-box[data-disc=""]::after{display:none}
.dm-tile b{min-height:1.3em}
.dm-tile.dm-filled b{animation:dm-pop .5s ease}
.dm-dsteps{margin-top:14px}
.dm-spin{display:block;width:18px;height:18px;border-radius:50%;border:2.5px solid #dbe4fb;border-top-color:#3a6bff;animation:dm-rot .8s linear infinite}
@keyframes dm-rot{to{transform:rotate(360deg)}}
.dm-notes{display:grid;gap:8px}
.dm-brief .dm-panel{margin-top:14px}
.dm-gcard{margin-top:14px;padding:14px;background:#fff;border:1px solid #e3e9f6;border-radius:16px}