/* Interactive demo of the SimplePanel interface (demo.js). The browser window has a fixed design size
   (1100×690) and is scaled to fit; all coordinates of the cursor and the spotlight are in that space. */

.demo-open { overflow: hidden; }
.dm { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto; background: #0f1115; color: #e8eaef;
  font: 15px/1.4 "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; opacity: 0; transition: opacity .25s; }
.dm.on { opacity: 1; }
.dm button { font: inherit; cursor: pointer; }
.dm-head { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-bottom: 1px solid #23262d; }
.dm-title { font-weight: 800; font-size: 18px; letter-spacing: -.01em; margin-right: auto; }
.dm-title span { color: #F5D731; }
.dm-tabs { display: flex; padding: 4px; border-radius: 12px; background: #1b1e24; }
.dm-tabs button { border: 0; background: none; color: #b8bcc6; padding: 9px 16px; border-radius: 9px; font-weight: 600; }
.dm-tabs button.on { background: #F5D731; color: #171919; }
.dm-x { border: 0; background: #1b1e24; color: #e8eaef; width: 40px; height: 40px; border-radius: 10px; font-size: 22px; line-height: 1; }
.dm-x:hover { background: #2a2e36; }
.dm-stage { position: relative; overflow: hidden; display: grid; place-items: center; padding: 18px; }
.dm-scaler { width: 1280px; height: 800px; transform-origin: center center; position: relative; flex: none; }
.dm-foot { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid #23262d; }
.dm-foot .sp { flex: 1; display: flex; align-items: center; justify-content: center; gap: 14px; }
.dm-btn { border: 1px solid #3a3e47; background: transparent; color: #e8eaef; padding: 11px 18px; border-radius: 11px; font-weight: 700; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.dm-btn:disabled { opacity: .35; cursor: default; }
.dm-btn.pri { background: #F5D731; color: #171919; border-color: #F5D731; }
.dm-btn.ghost { border-color: transparent; color: #9aa0ac; }
.dm-dots { display: flex; gap: 6px; }
.dm-dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a3e47; transition: background .2s, width .2s; }
.dm-dots i.done { background: #8a7a2a; } .dm-dots i.on { background: #F5D731; width: 22px; border-radius: 4px; }
.dm-count { color: #9aa0ac; font-size: 13px; min-width: 60px; text-align: center; }
@media (max-width: 700px) { .dm-title { font-size: 15px; } .dm-tabs button { padding: 8px 10px; font-size: 13px; } .dm-dots { display: none; } .dm-btn { padding: 10px 12px; } .dm-foot .ghost { display: none; } }

/* ---------- the browser window */
.br { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; background: #f5f7fb; box-shadow: 0 40px 100px -30px rgba(0,0,0,.7); display: grid; grid-template-rows: 46px 1fr; color: #495057; }
.br-bar { display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #e9ebef; border-bottom: 1px solid #d5d8de; }
.br-lights { display: flex; gap: 7px; } .br-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; } .br-lights i:nth-child(2) { background: #febc2e; } .br-lights i:nth-child(3) { background: #28c840; }
.br-addr { flex: 1; max-width: 640px; margin: 0 auto; height: 30px; border-radius: 8px; background: #fff; border: 1px solid #d5d8de; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 14px; color: #2b2f36; }
.br-addr .lock { color: #1a7f37; font-size: 12px; }
.br-view { position: relative; overflow: hidden; background: #f5f7fb; }
.br-frame { display: block; width: 100%; height: 100%; border: 0; }
.dm-extra { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

/* typing caret */
.tx.typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; background: currentColor; margin-left: 1px; vertical-align: -2px; animation: dm-caret .8s steps(1) infinite; }
@keyframes dm-caret { 50% { opacity: 0; } }

/* ---------- panel look (AdminKit-like, as in the real SimplePanel admin) */
.pn { position: absolute; inset: 0; display: grid; grid-template-columns: 220px 1fr; background: #f5f7fb; font-size: 14px; transition: background .4s, color .4s; }
.pn-side { background: #222e3c; color: rgba(233,236,239,.6); padding: 18px 0; }
.pn-brand { color: #f8f9fa; font-weight: 700; font-size: 18px; padding: 4px 24px 20px; }
.pn-hdr { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 14px 24px 8px; color: #ced4da; opacity: .7; }
.pn-link { display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-left: 3px solid transparent; }
.pn-link.on { color: #e9ecef; background: linear-gradient(90deg, rgba(59,125,221,.1), rgba(59,125,221,.0875) 50%, transparent); border-left-color: #3b7ddd; }
.pn-link i { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 4px; opacity: .8; }
.pn-sub { padding-left: 50px; font-size: 13px; }
.pn-main { display: grid; grid-template-rows: 60px 1fr; min-width: 0; }
.pn-nav { background: #fff; box-shadow: 0 0 2rem 0 rgba(33,37,41,.1); display: flex; align-items: center; padding: 0 22px; gap: 18px; }
.pn-nav .burger { width: 20px; height: 14px; border-top: 2px solid #495057; border-bottom: 2px solid #495057; position: relative; }
.pn-nav .burger::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 2px solid #495057; }
.pn-nav .sp { flex: 1; }
.pn-mode { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; }
.pn-user { display: flex; align-items: center; gap: 8px; color: #495057; }
.pn-user i { width: 30px; height: 30px; border-radius: 50%; background: #3b7ddd; color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; }
.pn-content { padding: 26px 28px; overflow: hidden; }
.pn-h1 { font-size: 22px; color: #000; font-weight: 500; margin: 0 0 16px; }
.cd { background: #fff; border-radius: 6px; box-shadow: 0 0 .875rem 0 rgba(33,40,50,.05); margin-bottom: 18px; }
.cd-h { padding: 14px 18px; border-bottom: 1px solid #edf0f3; font-weight: 600; color: #212529; display: flex; justify-content: space-between; align-items: center; }
.cd-b { padding: 16px 18px; }
.bt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 4px; font-size: 13px; font-weight: 500; background: #3b7ddd; color: #fff; border: 1px solid #3b7ddd; }
.bt.lg { padding: 10px 16px; font-size: 16px; width: 100%; justify-content: center; }
.bt.sec { background: #6c757d; border-color: #6c757d; }
.bt.out { background: transparent; color: #3b7ddd; }
.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; margin-bottom: 6px; color: #495057; font-size: 14px; }
.inp { height: 38px; border: 1px solid #ced4da; border-radius: 4px; background: #fff; display: flex; align-items: center; padding: 0 12px; color: #212529; font-size: 14px; }
.inp.lg { height: 46px; font-size: 16px; }
.inp .ph { color: #9aa0a6; }
.sw { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sw i { width: 34px; height: 18px; border-radius: 10px; border: 1px solid #ced4da; background: #fff; position: relative; transition: background .2s, border-color .2s; }
.sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #adb5bd; transition: left .2s, background .2s; }
.sw.on i { background: #3b7ddd; border-color: #3b7ddd; } .sw.on i::after { left: 18px; background: #fff; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 9px 10px; border-bottom: 2px solid #dee2e6; color: #212529; font-weight: 600; }
.tbl td { padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: middle; }
.tbl tr.new td { background: #fffbe6; }
.uname b { color: #212529; font-weight: 600; display: block; } .uname small { color: #6c757d; font-size: 12px; }
.trf { min-width: 150px; } .trf .lbl { font-size: 12px; color: #6c757d; display: flex; justify-content: space-between; }
.trf .bar { height: 5px; border-radius: 3px; background: #e9ecef; margin-top: 4px; overflow: hidden; } .trf .bar b { display: block; height: 100%; background: #3b7ddd; }
.trf .bar b.warn { background: #fcb92c; }
.bdg { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.bdg.ok { background: rgba(28,187,140,.15); color: #138a66; } .bdg.off { background: #e9ecef; color: #6c757d; }
.acts { display: flex; gap: 4px; justify-content: flex-end; }
.acts i { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: #495057; background: #f1f3f5; }
.acts i.qr { background: #e7f0fd; color: #3b7ddd; } .acts i.tg { background: #e6f4fb; color: #229ed9; } .acts i.ml { background: #fff4e5; color: #d9822b; }
.search { margin-bottom: 14px; }
.mdl-back { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; animation: dm-fade .2s; }
@keyframes dm-fade { from { opacity: 0; } }
.mdl { width: 460px; background: #fff; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.mdl-h { padding: 14px 18px; border-bottom: 1px solid #dee2e6; font-size: 17px; font-weight: 500; color: #212529; display: flex; justify-content: space-between; }
.mdl-b { padding: 16px 18px; } .mdl-f { padding: 12px 18px; border-top: 1px solid #dee2e6; display: flex; justify-content: flex-end; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qrc { width: 200px; height: 200px; margin: 6px auto 14px; display: grid; grid-template-columns: repeat(25, 1fr); padding: 10px; background: #fff; border: 1px solid #dee2e6; }
.qrc b { background: #111; } .qrc s { background: transparent; }
.uri { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: #f1f3f5; padding: 8px 10px; border-radius: 4px; word-break: break-all; color: #495057; }
.rad { display: flex; gap: 10px; margin-bottom: 12px; } .rad i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #adb5bd; flex: none; margin-top: 2px; }
.rad.on i { border: 5px solid #3b7ddd; }
.rad small { display: block; color: #6c757d; }
.pbadge { margin-left: 8px; display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #1cbb8c; color: #fff; }
.pbadge.wait { background: #fcb92c; color: #212529; }
.ok-line { color: #138a66; font-size: 13px; margin-bottom: 12px; }

/* dark theme of the panel (step «тема») */
.pn.dark { background: #19222c; color: #bdc0c5; }
.pn.dark .pn-nav { background: #222e3c; } .pn.dark .pn-nav .burger, .pn.dark .pn-nav .burger::after { border-color: #ced4da; }
.pn.dark .cd, .pn.dark .mdl { background: #222e3c; } .pn.dark .cd-h { border-color: #2b3947; color: #e9ecef; }
.pn.dark .pn-h1, .pn.dark .uname b, .pn.dark .tbl th { color: #e9ecef; }
.pn.dark .tbl th, .pn.dark .tbl td { border-color: #2b3947; } .pn.dark .inp { background: #19222c; border-color: #3d4b5a; color: #e9ecef; }
.pn.dark .pn-user { color: #ced4da; } .pn.dark .acts i { background: #2b3947; color: #ced4da; } .pn.dark .trf .bar { background: #2b3947; }
.pn.dark .sw i { background: #19222c; border-color: #3d4b5a; }

/* user side */
.au { position: absolute; inset: 0; background: #f5f7fb; display: grid; place-items: center; }
.au-box { width: 420px; }
.au-box h2 { text-align: center; font-size: 26px; color: #212529; margin: 0 0 4px; font-weight: 600; }
.au-box p.lead { text-align: center; font-size: 17px; color: #495057; margin: 0 0 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #3b7ddd; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.seg span { padding: 9px; text-align: center; color: #3b7ddd; font-weight: 500; } .seg span.on { background: #3b7ddd; color: #fff; }
.digits { display: flex; gap: 8px; justify-content: center; margin: 6px 0 16px; }
.digits span { width: 46px; height: 54px; border: 1px solid #ced4da; border-radius: 6px; background: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 600; color: #212529; }
.toast { position: absolute; right: 22px; top: 22px; width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.2); padding: 14px 16px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; animation: dm-in .35s ease-out; }
.toast i { width: 40px; height: 40px; border-radius: 50%; background: #229ed9; color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 800; }
.toast b { color: #212529; } .toast p { margin: 2px 0 0; color: #495057; font-size: 14px; } .toast p strong { letter-spacing: .1em; color: #212529; }
@keyframes dm-in { from { transform: translateY(-20px); opacity: 0; } }
.cab { position: absolute; inset: 0; display: grid; grid-template-rows: 60px 1fr; background: #f5f7fb; }
.cab-nav { background: #fff; box-shadow: 0 0 2rem 0 rgba(33,37,41,.1); display: flex; align-items: center; padding: 0 28px; gap: 16px; font-weight: 700; color: #212529; font-size: 18px; }
.cab-nav .sp { flex: 1; }
.cab-body { padding: 26px 28px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-content: start; }
.stat { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat div { background: #f8f9fa; border-radius: 6px; padding: 14px; } .stat small { color: #6c757d; display: block; } .stat b { font-size: 22px; color: #212529; font-weight: 600; }
.big-bar { height: 10px; border-radius: 6px; background: #e9ecef; overflow: hidden; margin: 10px 0 6px; } .big-bar b { display: block; height: 100%; background: #3b7ddd; width: 34%; }

/* ---------- overlay: cursor, spotlight, hint */
.dm-cur { position: absolute; left: 0; top: 0; z-index: 30; width: 22px; height: 30px; pointer-events: none; transition: transform .7s cubic-bezier(.45,.05,.25,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.dm-ripple { position: absolute; z-index: 29; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid #F5D731; pointer-events: none; animation: dm-rip .5s ease-out forwards; }
@keyframes dm-rip { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.dm-spot { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; opacity: 0; transition: opacity .35s; }
.dm-spot.on { opacity: 1; }
.dm-ring { fill: none; stroke: #F5D731; stroke-width: 2.5; }
.dm-hint { position: absolute; z-index: 31; width: 340px; background: #fff; color: #1f2329; border-radius: 14px; padding: 16px 18px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.5); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none; font-size: 15px; }
.dm-hint.on { opacity: 1; transform: none; }
.dm-hint b { display: block; font-size: 16px; margin-bottom: 4px; color: #111; }
.dm-hint .arw { position: absolute; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.dm-end { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(15,17,21,.82); animation: dm-fade .3s; }
.dm-end div { text-align: center; color: #fff; max-width: 560px; }
.dm-end h3 { font-size: 34px; margin: 0 0 10px; letter-spacing: -.02em; }
.dm-end p { color: #c4c8d0; font-size: 18px; margin: 0 0 26px; }
.dm-end .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* landing button */
.btn-demo::before { content: "▶"; font-size: .8em; }
@media (prefers-reduced-motion: reduce) { .dm-cur { transition: none; } .dm-spot, .dm-hint { transition: none; } }
