/* «DMALL» — the personal DMALL section of the partner cabinet (pdmall.js). Builds on partner.css,
   theme-allan.css and pbot.css (pb-panel, pb-f, pb-check, pb-seg, pb-modal, pb-embed …). */
#app[data-pane="dmall"] #p-cards,#app[data-pane="dmall"] #xp-edit,#app[data-pane="dmall"] #xp-dm{display:none}
#pdm-root{display:flex;flex-direction:column;gap:22px;min-width:0}
#pdm-root .pb-bar,#pdm-root .pb-cards{margin-bottom:0}
.pdm-head-act{display:flex;gap:8px;flex-wrap:wrap}
#pdm-root .pdm-actas{margin:0}
.pdm-sec{display:flex;flex-direction:column;gap:14px;min-width:0}
.pdm-sec>h2{margin:0}
.pdm-sec-h{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pdm-sec-h h2{margin:0}
.pdm-search{position:relative;display:flex;align-items:center;flex:0 1 340px;min-width:0}
.pdm-search svg{position:absolute;left:12px;width:17px;height:17px;color:var(--muted);pointer-events:none}
.pdm-search input{width:100%;box-sizing:border-box;padding-left:38px;min-height:40px;font-weight:500}
.pdm-hint{margin:0}

/* Server cards */
.pdm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.pdm-srv{position:relative;display:flex;flex-direction:column;min-width:0;background:var(--panel);border:1px solid var(--glass-bd,var(--stroke));border-radius:12px;overflow:hidden;cursor:pointer;color:var(--text);text-align:left;font:inherit;padding:0;transition:border-color .15s,transform .15s}
.pdm-srv:hover,.pdm-srv:focus-visible{border-color:rgba(129,140,248,.6);outline:none}
.pdm-srv.checking{opacity:.6;pointer-events:none}
.pdm-banner{height:64px;flex:none;background:linear-gradient(120deg,#3a3f6b,#1e293b);background-size:cover;background-position:center}
.pdm-srv-body{display:flex;flex-direction:column;gap:8px;padding:0 16px 16px;min-width:0}
.pdm-srv-top{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;margin-top:-26px}
.pdm-av{width:52px;height:52px;flex:none;border-radius:50%;border:3px solid #1e293b;background:#334155;display:grid;place-items:center;overflow:hidden;font-weight:700;font-size:20px;color:#e2e8f0;box-sizing:border-box}
.pdm-av img{width:100%;height:100%;object-fit:cover}
.pdm-av.sm{width:34px;height:34px;border-width:0;font-size:14px}
.pdm-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.pdm-badge{font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:999px;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}
.pdm-badge.red{background:rgba(248,113,113,.15);color:#fca5a5}
.pdm-badge.amber{background:rgba(245,158,11,.15);color:#fcd34d}
.pdm-srv-name{font-size:16px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:28px}
.pdm-meta{display:flex;flex-direction:column;gap:5px;font-size:13.5px;color:var(--muted)}
.pdm-stat{display:flex;align-items:center;gap:6px;min-width:0}
.pdm-stat svg{width:15px;height:15px;flex:none;opacity:.8}
.pdm-stat b{color:var(--text);font-weight:700}
.pdm-addbot{font-size:13.5px;font-weight:600;color:#818cf8;text-decoration:none;align-self:flex-start}
.pdm-addbot:hover{text-decoration:underline}
.pdm-menu-btn{position:absolute;right:10px;bottom:10px;width:30px;height:30px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;padding:0}
.pdm-menu-btn svg{width:17px;height:17px}
.pdm-menu-btn:hover,.pdm-menu-btn.on{background:#1e293b;border-color:#334155;color:#fff}
.pdm-menu{position:absolute;right:10px;bottom:46px;z-index:5;min-width:150px;background:#1e293b;border:1px solid #334155;border-radius:10px;padding:5px;box-shadow:0 16px 40px -16px rgba(0,0,0,.8)}
.pdm-mi{display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:7px;padding:9px 12px;font:inherit;font-size:14.5px;font-weight:600;cursor:pointer}
.pdm-mi:hover{background:rgba(248,113,113,.12)}
.pdm-add{align-items:center;justify-content:center;gap:10px;min-height:190px;border-style:dashed;border-width:2px;border-color:#334155;background:rgba(15,23,42,.35);color:var(--muted);font-weight:600;font-size:15px}
.pdm-add:hover{color:#c7d2fe}
.pdm-plus{width:44px;height:44px;border-radius:50%;background:rgba(99,102,241,.15);color:#818cf8;display:grid;place-items:center}
.pdm-plus svg{width:24px;height:24px}

/* Console */
.pdm-selbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.pdm-selname{display:inline-flex;align-items:center;gap:10px;min-width:0;font-size:16px}
.pdm-selname b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pdm-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.pdm-cols>div{display:flex;flex-direction:column;gap:16px;min-width:0}
.pdm-cols .pb-panel{margin-bottom:0;display:flex;flex-direction:column;gap:12px}
.pdm-cols .pb-panel h3{margin:0}
.pdm-panel-h{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.pdm-exbtns{display:flex;gap:8px;flex-wrap:wrap}
.pdm-sub{border-top:1px solid #334155;padding-top:12px;margin-top:4px}
.pdm-sub h4{margin:0 0 4px;font-size:15px}
.pdm-sub p{margin:0}
.pdm-h4{margin:6px 0 0;font-size:15px}
.pdm-editor .pb-f span em,.pdm-launch .pb-f span em{font-style:normal;float:right;font-weight:600;letter-spacing:0;text-transform:none}
.pdm-ta{width:100%;box-sizing:border-box;resize:vertical;min-height:70px;line-height:1.45;font-weight:500}
.pdm-cols .plog-inp,.pdm-cols .plog-sel{width:100%;box-sizing:border-box;min-width:0;min-height:40px;font-weight:500}
.pdm-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.pdm-grid2 .wide{grid-column:1/-1}
.pdm-color{display:flex;gap:8px;align-items:center}
.pdm-color input[type=color]{width:42px;height:40px;flex:none;padding:2px;border:1px solid #334155;border-radius:8px;background:#0f172a;cursor:pointer}
.pdm-avrow{display:flex;gap:12px;align-items:flex-start}
.pdm-avprev{width:56px;height:56px;flex:none;border-radius:50%;background:#334155;display:grid;place-items:center;overflow:hidden;color:var(--muted);font-weight:700}
.pdm-avprev img{width:100%;height:100%;object-fit:cover}
.pdm-avcol{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.pdm-avbtns{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pdm-quick{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.pdm-cool{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px;color:var(--muted)}
.pdm-cool input{width:84px!important;flex:none}
.pdm-sched{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pdm-sched-x{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:14px}
.pdm-sched-x input[type=number]{width:90px!important}
.pdm-sched-x input[type=datetime-local]{width:auto!important;color-scheme:dark}
.pdm-sum{display:flex;flex-wrap:wrap;gap:6px 18px;background:#0f172a;border:1px solid #1e293b;border-radius:10px;padding:10px 14px;font-size:14px;color:var(--muted)}
.pdm-sum b{color:var(--text)}
.pdm-short,.pdm-short b{color:#fca5a5!important}
.pdm-go .btn{min-height:42px}
.pdm-status{font-size:14px;line-height:1.45;border-radius:10px;padding:9px 12px;background:#0f172a;border:1px solid #334155;color:#cbd5e1;overflow-wrap:anywhere}
.pdm-status.ok{border-color:rgba(52,211,153,.4);color:#6ee7b7}
.pdm-status.err{border-color:rgba(248,113,113,.4);color:#fca5a5}
.pdm-status.pending{border-color:rgba(129,140,248,.4);color:#c7d2fe}
.pdm-runs .pb-seg{flex-wrap:wrap}
.pdm-run{background:rgba(15,23,42,.45);border-color:#334155}
.pb-chip.r{background:rgba(248,113,113,.15);color:#fca5a5}

/* Discord DM preview */
.pdm-dm{display:flex;gap:12px;background:#313338;border-radius:10px;padding:14px;min-width:0;color:#dbdee1;font-size:15px}
.pdm-dm-av{width:40px;height:40px;flex:none;border-radius:50%;background:#5865f2;overflow:hidden}
.pdm-dm-av img{width:100%;height:100%;object-fit:cover}
.pdm-dm-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.pdm-dm-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pdm-dm-head b{color:#f2f3f5}
.pdm-app{background:#5865f2;color:#fff;font-size:10px;font-weight:700;border-radius:3px;padding:1px 4px}
.pdm-dm-time{font-size:12px;color:#949ba4}
.pdm-dm-text{line-height:1.45}
.pdm-embed{flex-direction:row;gap:12px;max-width:440px}
.pdm-embed-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.pdm-embed-img{max-width:100%;border-radius:4px;margin-top:4px}
.pdm-embed-th{width:72px;height:72px;flex:none;border-radius:4px;object-fit:cover}
.pb-embed-title.pdm-link{color:#00a8fc}

/* Order history */
.pdm-ords{display:flex;flex-direction:column;gap:8px}
/* the server's 24h limit — on the card and in the console's bar */
.pdm-cap{display:flex;flex-direction:column;gap:5px;margin-top:10px;font-size:12.5px;min-width:0}
.pdm-cap-h{display:flex;justify-content:space-between;gap:8px;color:#94a3b8}
.pdm-cap-h b{color:#e2e8f0;font-weight:600;white-space:nowrap}
.pdm-cap-bar{height:5px;border-radius:999px;background:#1e293b;overflow:hidden}
.pdm-cap-bar i{display:block;height:100%;border-radius:999px;background:#818cf8}
.pdm-cap.warn .pdm-cap-bar i{background:#f59e0b}
.pdm-cap.full .pdm-cap-bar i{background:#ef4444}
.pdm-cap-f{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#94a3b8}
.pdm-cap.full .pdm-cap-t{color:#fca5a5}
.pdm-cap-q{color:#fbbf24}
.pdm-cap.wide{margin:0 0 0 auto;width:260px;max-width:100%}
.pdm-srv .pdm-cap-f{padding-right:30px}
/* «Активные рассылки» under «Мои серверы» */
.pdm-live-n{font-size:.8em;font-weight:500}
.pdm-lives{display:flex;flex-direction:column;gap:8px}
.pdm-live{display:flex;flex-direction:column;gap:9px;background:var(--panel);border:1px solid var(--glass-bd,var(--stroke));border-radius:12px;padding:12px 16px;cursor:pointer;min-width:0}
.pdm-live:hover,.pdm-live:focus-visible{border-color:rgba(129,140,248,.5);outline:none}
.pdm-live.off{cursor:default}
.pdm-live.off:hover{border-color:var(--glass-bd,var(--stroke))}
.pdm-live-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.pdm-live-path{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.pdm-live-path b,.pdm-live-to{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pdm-live-path b{flex:0 1 auto;max-width:45%}
.pdm-live-dest{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0}
.pdm-live-to{flex:1 1 auto;color:var(--muted,#94a3b8)}
.pdm-live-arrow{flex:none;color:var(--muted,#94a3b8)}
.pdm-live-top .pb-chip{flex:none}
.pdm-live-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.pdm-live-go{font-size:13px;font-weight:600;color:#a5b4fc}
.pdm-ord{display:flex;align-items:center;gap:12px;background:var(--panel);border:1px solid var(--glass-bd,var(--stroke));border-radius:12px;padding:12px 16px;cursor:pointer;min-width:0}
.pdm-ord:hover,.pdm-ord:focus-visible{border-color:rgba(129,140,248,.5);outline:none}
.pdm-ord-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pdm-ord-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdm-ord-r{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.pdm-ref{color:#6ee7b7}

/* Dialogs */
.pdm-modal .pb-modal-box.pdm-wide{width:min(640px,100%)}
.pdm-modal .pb-form-act{margin-top:4px}
.pdm-botlink{justify-self:start;text-decoration:none}
.pdm-break{word-break:break-all}
.pdm-faq{display:flex;flex-direction:column;gap:8px}
.pdm-qa{background:#0f172a;border:1px solid #334155;border-radius:10px;padding:0 14px}
.pdm-qa summary{cursor:pointer;font-weight:600;padding:12px 0;list-style:none;display:flex;justify-content:space-between;gap:10px}
.pdm-qa summary::-webkit-details-marker{display:none}
.pdm-qa summary::after{content:'+';color:#818cf8;font-weight:700;flex:none}
.pdm-qa[open] summary::after{content:'−'}
.pdm-qa p{margin:0 0 12px;font-size:14.5px;line-height:1.55;color:#cbd5e1}
.pdm-kvs{display:flex;flex-direction:column;border:1px solid #334155;border-radius:10px;overflow:hidden}
.pdm-kv{display:flex;justify-content:space-between;gap:12px;padding:9px 12px;font-size:14px}
.pdm-kv+.pdm-kv{border-top:1px solid #1e293b}
.pdm-kv span:last-child{text-align:right;overflow-wrap:anywhere;min-width:0}

/* «⏱ Таймер» — the panel under a text field */
.pdm-tm{margin-top:10px;padding:12px;border:1px solid var(--stroke-2);border-radius:10px;background:var(--panel-2);display:flex;flex-direction:column;gap:10px}
.pdm-tm-h{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.pdm-tm-row{display:flex;gap:8px;flex-wrap:wrap}
.pdm-tm-row .plog-inp{width:auto;flex:1 1 180px;min-width:0}
.pdm-tm-n{flex:0 0 110px!important}
.pdm-tm-prev{font-size:14px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;overflow-wrap:anywhere}
.pdm-tm-out{background:rgba(255,255,255,.08);border-radius:4px;padding:1px 6px;color:var(--text)}
.pdm-tm-prev code{color:#c7d2fe;font-size:12.5px}
.pdm-tm-act{display:flex;gap:8px}
.pdm-tm .muted.sm{margin:0}
.pb-chip-b.on{color:var(--text);border-style:solid;border-color:rgba(129,140,248,.6)}

@media (max-width:1100px){
  .pdm-cols{grid-template-columns:1fr}
}
@media (max-width:600px){
  #pdm-root{gap:18px}
  .pdm-head-act{width:100%}
  .pdm-head-act .btn{flex:1;min-height:42px}
  .pdm-search{flex:1 1 100%}
  .pdm-grid{grid-template-columns:1fr}
  .pdm-add{min-height:96px;flex-direction:row}
  .pdm-grid2{grid-template-columns:1fr}
  .pdm-go .btn{flex:1 1 100%}
  .pdm-sched .pb-seg{flex-wrap:wrap}
  .pdm-ord{padding:11px 12px;gap:10px}
  .pdm-live{padding:11px 12px}
  .pdm-cap.wide{margin:6px 0 0;width:100%}
  .pdm-live-path{flex-wrap:wrap;row-gap:4px}
  .pdm-live-path b{flex:1 1 0;max-width:none}
  .pdm-live-dest{flex-basis:100%;padding-left:36px}
  .pdm-embed-th{width:52px;height:52px}
}

/* «Добавить на один сервер» + «Журнал аудита сервера» (pdmauth.js) */
.pda{gap:14px}
.pda .pda-panel{margin:0;display:flex;flex-direction:column;gap:12px}
.pda .pda-panel h3{margin:0}
.pda-h{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.pda-lead{margin:0;max-width:820px}
.pda-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.pda-form.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.pda-form .plog-sel,.pda-form .plog-inp{width:100%;box-sizing:border-box;min-width:0;min-height:40px;font-weight:500}
.pda-user{display:flex;gap:6px;align-items:center}
.pda-user .plog-inp{flex:1}
.pda-acts{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.pda-res{font-size:14px;padding:10px 12px;border-radius:9px;border:1px solid}
.pda-res.ok{background:rgba(52,211,153,.08);border-color:rgba(52,211,153,.35);color:#6ee7b7}
.pda-res.err{background:rgba(248,113,113,.08);border-color:rgba(248,113,113,.35);color:#fca5a5}
.pda-au td{vertical-align:top}
.pda-au tr.hit td{background:rgba(248,113,113,.07)}
.pda-au tr.hit td:first-child{box-shadow:inset 3px 0 0 #f87171}
.pda-nw{white-space:nowrap}
.pda-danger{color:#fca5a5}
.pda-who{display:inline-flex;align-items:center;gap:7px;min-width:0}
.pda-who img,.pda-who i{width:22px;height:22px;border-radius:50%;flex:none;background:#334155}
.pda-who-nm{background:none;border:0;padding:0;font:inherit;color:var(--text);font-weight:600;cursor:pointer;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
button.pda-who-nm:hover{color:#a5b4fc;text-decoration:underline}
.pda-tag{font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;background:#334155;color:#cbd5e1;white-space:nowrap}
.pda-tag.ours{background:rgba(99,102,241,.2);color:#c7d2fe}
.pda-tag.self{background:rgba(52,211,153,.15);color:#6ee7b7}
.pda-chgs{min-width:220px}
.pda-chg{display:block;font-size:12.5px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.pda-chg.add{color:#6ee7b7}
.pda-chg.rem{color:#fca5a5}
.pda-chg.why{font-style:italic}
.pda-more{display:flex;justify-content:center}
/* the lists with pictures (pickHtml): the button looks like the select; the list opens under it */
.pda-pick{position:relative;min-width:0}
.pda-pick-btn{display:flex;align-items:center;gap:9px;width:100%;box-sizing:border-box;min-height:40px;text-align:left;font-weight:500;font-size:13.5px}
.pda-pick-btn .pda-pn,.pda-po .pda-pn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pda-pick-btn small,.pda-po small{flex:none;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.pda-pi{width:24px;height:24px;flex:none;border-radius:7px;object-fit:cover;background:#334155}
.pda-pi.round{border-radius:50%}
.pda-pi.txt{display:grid;place-items:center;font-size:12px;font-weight:700;color:#e2e8f0}
.pda-pop{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:40;display:flex;flex-direction:column;gap:6px;padding:6px;background:#1e293b;border:1px solid #334155;border-radius:10px;box-shadow:0 18px 44px -14px rgba(0,0,0,.85)}
.pda-pq{width:100%;box-sizing:border-box;min-width:0;min-height:38px;font-weight:500}
.pda-pl{display:flex;flex-direction:column;max-height:300px;overflow-y:auto}
.pda-po{display:flex;align-items:center;gap:10px;width:100%;padding:7px 9px;border:0;border-radius:7px;background:transparent;color:var(--text);font:inherit;font-size:14px;text-align:left;cursor:pointer}
.pda-po:hover{background:rgba(255,255,255,.06)}
.pda-po.on{background:rgba(99,102,241,.18)}
.pda-po[hidden]{display:none}
.pda-pe{padding:6px 9px}
@media (max-width:700px){
  .pda-form,.pda-form.three{grid-template-columns:minmax(0,1fr)}
  .pda-pick-btn small,.pda-po small{display:none}
  /* the log as cards: a row per entry, each cell with its label */
  .pda-au thead{display:none}
  .pda-au,.pda-au tbody,.pda-au tr,.pda-au td{display:block;width:100%;box-sizing:border-box}
  .pda-au{min-width:0!important}
  .pda-au tr{padding:8px 0;border-bottom:1px solid var(--stroke)}
  .pda-au td{border:0;padding:3px 12px;white-space:normal}
  .pda-au td::before{content:attr(data-l);display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
  .pda-chgs{min-width:0}
}
