/* ===========================================================================
   DMALL — mass-DM broadcast console (shell / placeholder UI).
   Isolated from the main admin styles; everything is prefixed `dm-`.
   Reuses the admin CSS variables (loaded before this file).
   =========================================================================== */

:root{
  --dm-bg:#0c1017;
  --dm-card:#151a23;
  --dm-card-2:#1b212c;
  --dm-inset:#0e131b;
  --dm-line:rgba(255,255,255,.07);
  --dm-line-2:rgba(255,255,255,.13);
  --dm-txt:#e9edf5;
  --dm-mut:#8a95a8;
  --dm-dim:#5f6b80;
  --dm-blurple:#5b8def;
  --dm-green:#57f287;
  --dm-red:#ed4245;
  --dm-amber:#fee75c;
  --dm-orange:#f0902f;
  --dm-pink:#f47fff;
  --dm-purple:#b18cff;
}

/* ---- app-shell layout, like the admin panel: full-width topbar, a flush full-height
   left sidebar, content on the right. Applied only while the sidebar is shown. ---- */
#app:has(#dm-modebar:not([hidden])){ display:grid; grid-template-columns:210px minmax(0,1fr); grid-template-rows:auto 1fr; min-height:100vh; }
#app:has(#dm-modebar:not([hidden])) > .topbar{ grid-column:1 / -1; }
main.wrap:has(> #dm-modebar:not([hidden])){ display:contents; }
.dm-content{ display:flex; flex-direction:column; gap:28px; min-width:0; padding:30px 36px 60px; max-width:1160px; }
.dm-side{ align-self:stretch; display:flex; flex-direction:column; gap:4px; background:var(--panel,#141b26); border-right:1px solid var(--stroke,#232d3d); padding:22px 14px; }
.dm-side[hidden]{ display:none; }
/* Matches the admin sidebar tabs: text-only, muted, subtle blue-tinted active. */
.dm-mode{
  width:100%; text-align:left;
  border:0; background:transparent; color:var(--dm-mut);
  font:inherit; font-weight:600; font-size:14.5px;
  padding:10px 12px; border-radius:8px; cursor:pointer; transition:background .15s,color .15s;
}
.dm-mode svg{ display:none; }
.dm-mode:hover{ color:var(--dm-txt); background:rgba(255,255,255,.04); }
.dm-mode.active{ background:rgba(91,141,239,.15); color:#9cb8f7; }
.dm-mode[hidden]{ display:none; }

/* When DMALL/Cabinet/API is on: hide the Stays order content (now inside .dm-content) and widen. */
.wrap.dmall-on{ max-width:1200px; }
.wrap.dmall-on .dm-content > *:not(#dm-selbar):not(#dmall):not(#dmapi):not(#dmcab):not(#dmtickets):not(.dm-nbell):not(.dm-notif){ display:none; }

/* ---- DMALL cabinet (dashboard) ---- */
#dmcab{ width:100%; color:var(--dm-txt); }
.dmc-head h1{ font-size:26px; margin:0 0 4px; }
.dmc-lead{ color:var(--dm-mut); margin:0 0 20px; font-size:14px; }
.dmc-stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:26px; }
.dmc-stat{ background:var(--dm-card); border:1px solid var(--dm-line); border-radius:14px; padding:15px 16px; display:flex; flex-direction:column; gap:6px; }
.dmc-k{ color:var(--dm-mut); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; }
.dmc-v{ font-size:22px; font-weight:800; }
.dmc-sec{ margin-bottom:26px; }
.dmc-sec h3{ font-size:15px; margin:0 0 12px; }
.dmc-list{ display:flex; flex-direction:column; gap:8px; }
.dmc-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--dm-card); border:1px solid var(--dm-line); border-radius:12px; padding:11px 14px; }
.dmc-row-l{ display:flex; align-items:center; gap:11px; min-width:0; }
.dmc-row-main{ min-width:0; }
.dmc-row-t{ font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:340px; }
.dmc-row-sub{ color:var(--dm-mut); font-size:12.5px; margin-top:2px; }
.dmc-row-r{ text-align:right; flex:0 0 auto; }
.dmc-amt{ font-weight:800; }
.dmc-amt.dmc-pos{ color:#57f287; }
.dmc-amt.dmc-neg{ color:#ff6b6e; }
.dmc-badge{ font-size:11.5px; color:var(--dm-mut); margin-top:3px; }
.dmc-refund{ color:#57f287; }
.dmc-av{ width:32px; height:32px; border-radius:50%; flex:0 0 auto; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; line-height:1; background:#3a4256; }
.dmc-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.dmc-av-txt{ font-size:13px; font-weight:700; color:#cfd6e6; }
.dmc-empty{ color:var(--dm-mut); font-size:14px; padding:8px 2px; }

/* ---- mobile: sidebar becomes a horizontal scroll bar on top ---- */
@media (max-width:760px){
  #app:has(#dm-modebar:not([hidden])){ grid-template-columns:1fr; grid-template-rows:auto auto 1fr; }
  .dm-side{ align-self:auto; flex-direction:row; width:100%; overflow-x:auto; gap:6px; padding:8px 12px; border-right:0; border-bottom:1px solid var(--stroke,#232d3d); -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .dm-side::-webkit-scrollbar{ display:none; }
  .dm-side .dm-mode{ width:auto; white-space:nowrap; padding:9px 14px; }
  .dm-content{ padding:18px 14px 48px; }
  .dmc-head h1{ font-size:22px; }
  .dmc-row-t{ max-width:180px; }
}
/* DMALL external-API docs */
#dmapi{ width:100%; color:var(--dm-txt); }
.dmapi-doc{ max-width:900px; }
.dmapi-doc h1{ font-size:24px; margin:0 0 6px; }
.dmapi-doc h2{ font-size:16px; margin:26px 0 10px; }
.dmapi-lead{ color:var(--dm-mut,#9aa6b8); font-size:14.5px; line-height:1.6; margin:0 0 18px; max-width:760px; }
.dmapi-doc code{ background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.10); border-radius:6px; padding:1px 6px; font-size:13px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.dmapi-key{ background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
.dmapi-key > div{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.dmapi-k{ display:inline-block; min-width:74px; color:var(--dm-mut,#9aa6b8); font-size:11px; text-transform:uppercase; letter-spacing:.05em; font-weight:700; }
.dmapi-key code{ font-size:13.5px; word-break:break-all; }
.dmapi-note{ color:var(--dm-mut,#9aa6b8); font-size:12.5px; line-height:1.5; }
.dmapi-steps{ margin:0; padding-left:20px; color:var(--dm-txt); font-size:14px; line-height:1.8; }
.dmapi-ep{ display:flex; align-items:baseline; gap:10px; padding:7px 0; border-bottom:1px solid rgba(255,255,255,.06); flex-wrap:wrap; }
.dmapi-ep .m{ font-size:11px; font-weight:800; padding:2px 8px; border-radius:6px; letter-spacing:.03em; }
.dmapi-ep .m.get{ background:rgba(87,242,135,.15); color:#57f287; }
.dmapi-ep .m.post{ background:rgba(91,141,239,.18); color:#8b9bff; }
.dmapi-ep .d{ color:var(--dm-mut,#9aa6b8); font-size:13px; }
.dmapi-code{ background:#0c1016; border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:14px 16px; overflow-x:auto; font-size:12.5px; line-height:1.55; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; color:#cdd6e4; white-space:pre; }
.dm-launch-status{ margin-top:10px; font-size:13px; line-height:1.5; }
.dm-launch-status.pending{ color:var(--dm-mut,#9aa6b8); }
.dm-launch-status.ok{ color:#57f287; }
.dm-launch-status.err{ color:#ed4245; }

/* ---- console shell ---- */
#dmall{ width:100%; color:var(--dm-txt); }
#dmall *{ box-sizing:border-box; }

/* ===== server picker (shown before the settings) ===== */
#dm-serverpick{ display:none; }
#dmall.picking #dm-serverpick{ display:block; }
#dmall.picking .dm-panel.active{ display:none; }
.dm-sp-head{ display:flex; align-items:center; justify-content:flex-start; gap:10px; flex-wrap:wrap; text-align:left; color:var(--dm-txt); font-weight:800; font-size:clamp(21px,2.2vw,27px); margin:0 0 4px; }
.dm-sp-logo{ width:27px; height:20px; }
.dm-sp-sub{ color:var(--dm-mut); font-size:14px; margin:0 0 20px; }
.dm-sp-search{ position:relative; max-width:520px; margin:0 0 24px; }
.dm-sp-search svg{ position:absolute; left:16px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--dm-mut); }
.dm-sp-search input{ width:100%; background:var(--dm-inset); border:1px solid var(--dm-line-2); color:var(--dm-txt); font:inherit; font-size:15px; padding:13px 16px 13px 44px; border-radius:12px; }
.dm-sp-search input:focus{ outline:none; border-color:var(--dm-blurple); }
.dm-sp-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; }
.dm-sp-card{ position:relative; text-align:left; background:var(--dm-card); border:1px solid var(--dm-line); border-radius:14px; overflow:hidden; cursor:pointer; padding:0; display:flex; flex-direction:column; transition:border-color .15s,transform .12s,box-shadow .15s; font:inherit; }
/* loading skeletons (shimmer) shown while the lot list is fetching */
.dm-sp-skel{ cursor:default; pointer-events:none; }
.dm-sp-skel .dm-sp-banner{ height:96px; }
.dm-sp-skel .dm-sp-banner, .dm-sp-skel .dm-sp-av, .dm-skel-line{ background:linear-gradient(90deg,rgba(255,255,255,.045) 25%,rgba(255,255,255,.09) 37%,rgba(255,255,255,.045) 63%); background-size:400% 100%; animation:dmshimmer 1.3s ease infinite; }
.dm-sp-skel .dm-sp-av{ color:transparent; }
.dm-skel-line{ height:11px; border-radius:6px; margin-top:11px; }
.dm-skel-line.short{ width:55%; }
@keyframes dmshimmer{ 0%{ background-position:100% 0; } 100%{ background-position:0 0; } }
.dm-sp-card:hover{ border-color:rgba(91,141,239,.4); transform:translateY(-2px); box-shadow:0 12px 26px -16px rgba(0,0,0,.7); }
.dm-sp-card:active{ transform:translateY(0); }
.dm-sp-banner{ height:118px; position:relative; overflow:hidden; }
.dm-sp-banner-blur{ position:absolute; inset:-20%; background-size:cover; background-position:center; filter:blur(9px); transform:scale(0.9); }
.dm-sp-scrim{ position:absolute; inset:0; z-index:0; background:linear-gradient(180deg,rgba(0,0,0,.5),rgba(0,0,0,0) 58%); pointer-events:none; }
/* banner top line: server name (flex, truncates) + badges — never overlap */
.dm-sp-topline{ position:absolute; z-index:2; top:11px; left:14px; right:11px; display:flex; align-items:flex-start; gap:8px; }
.dm-sp-title{ flex:1 1 auto; min-width:0; font-weight:700; font-size:15px; color:#fff; text-shadow:0 1px 4px rgba(0,0,0,.55); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dm-sp-badges{ display:flex; flex-direction:column; align-items:flex-end; gap:5px; flex:0 0 auto; }
.dm-sp-body{ display:block; padding:0 15px 40px; }
.dm-sp-av{ position:relative; z-index:1; width:56px; height:56px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:22px; line-height:1; color:#fff; margin-top:-28px; border:4px solid var(--dm-card); box-sizing:border-box; overflow:hidden; }
.dm-sp-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.dm-sp-foot{ margin-top:11px; }
.dm-sp-online{ display:inline-flex; align-items:center; gap:7px; color:var(--dm-mut); font-size:13px; font-weight:500; }
.dm-sp-stats{ margin-top:5px; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; color:var(--dm-mut); font-size:12px; font-weight:500; }
.dm-sp-stats [data-dm]{ color:var(--dm-dim); }
.dm-sp-dot{ width:10px; height:10px; border-radius:50%; background:var(--dm-green); flex:none; }
.dm-sp-mico{ flex:none; display:block; }
.dm-sp-mico .p{ fill:var(--dm-card); }
.dm-access{ max-width:560px; margin:26px auto 0; }
.dm-access-desc{ color:var(--dm-mut); font-size:13.5px; margin:-8px 0 16px; }
.dm-access-add{ display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.dm-access-add .dm-input{ flex:1; }
.dm-access-add .dm-btn{ white-space:nowrap; }
.dma-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-top:1px solid var(--dm-line); }
.dma-row:first-child{ border-top:none; }
.dma-uid{ font-variant-numeric:tabular-nums; font-size:13.5px; color:var(--dm-txt); }
.dma-empty{ color:var(--dm-mut); font-size:13px; }
.dm-sp-invite{ display:inline-block; color:var(--dm-mut); font-size:12px; font-weight:700; letter-spacing:.05em; padding:6px 11px; border-radius:8px; margin-left:-11px; transition:background .12s,color .12s; }
.dm-sp-card[data-bot="0"]:hover .dm-sp-invite{ background:rgba(255,255,255,.09); color:var(--dm-txt); }
#dm-selbar{ display:flex; align-items:center; gap:10px; margin-left:6px; }
#dm-selbar[hidden]{ display:none; }
.dm-selname{ font-weight:700; color:var(--dm-txt); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.dm-tabsbar{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px; }
.dm-tab{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--dm-line-2); background:var(--dm-card-2); color:var(--dm-mut);
  font:inherit; font-weight:700; font-size:13.5px; padding:9px 16px; border-radius:10px; cursor:pointer; transition:.15s;
}
.dm-tab:hover{ color:var(--dm-txt); border-color:rgba(255,255,255,.22); }
.dm-tab.active{ color:#cfe4ff; border-color:var(--dm-blurple); background:rgba(91,141,239,.16); }
.dm-tab .dm-ico{ width:16px; height:16px; opacity:.9; }
.dm-tab .dm-badge{ background:var(--dm-blurple); color:#fff; font-size:11px; font-weight:800; min-width:18px; height:18px; padding:0 5px; border-radius:8px; display:inline-grid; place-items:center; }

.dm-panel{ display:none; }
.dm-panel.active{ display:block; }

/* two-column (form | preview) layout */
.dm-cols{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; align-items:start; }

/* ---- cards ---- */
.dm-card{ background:var(--dm-card); border:1px solid var(--dm-line); border-radius:16px; padding:20px 22px; }
.dm-card + .dm-card{ margin-top:18px; }
.dm-card-h{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.dm-card-h h2{ font-size:18px; font-weight:800; margin:0; }
.dm-sub{ color:var(--dm-mut); font-size:13px; line-height:1.5; margin:-8px 0 16px; }

/* ---- form fields ---- */
.dm-field{ margin-bottom:15px; }
.dm-field:last-child{ margin-bottom:0; }
.dm-label{ display:block; color:var(--dm-mut); font-size:12.5px; font-weight:600; margin-bottom:6px; }
.dm-input, .dm-textarea, .dm-select{
  width:100%; background:var(--dm-inset); border:1px solid var(--dm-line-2); color:var(--dm-txt);
  font:inherit; font-size:14px; padding:11px 13px; border-radius:9px; transition:border-color .15s;
}
.dm-textarea{ resize:vertical; min-height:92px; line-height:1.5; }
.dm-input:focus, .dm-textarea:focus, .dm-select:focus{ outline:none; border-color:var(--dm-blurple); }
.dm-input::placeholder, .dm-textarea::placeholder{ color:var(--dm-dim); }
.dm-select{ cursor:pointer; appearance:none; -webkit-appearance:none; padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b97ab' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; }
.dm-hint{ color:var(--dm-dim); font-size:12px; margin-top:5px; }
.dm-counter{ color:var(--dm-dim); font-size:11px; font-weight:600; font-style:italic; margin-left:6px; }

/* placeholder-insert chips */
.dm-chips{ display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:10px 0 4px; }
.dm-chips-lbl{ color:var(--dm-mut); font-size:12.5px; font-weight:600; }
.dm-chip{
  font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:12.5px; font-weight:700;
  color:var(--dm-pink); background:rgba(244,127,255,.08); border:1px solid rgba(244,127,255,.18);
  padding:3px 9px; border-radius:7px; cursor:pointer; transition:.12s;
}
.dm-chip:hover{ background:rgba(244,127,255,.16); }
.dm-chip.link{ color:var(--dm-purple); background:rgba(177,140,255,.08); border-color:rgba(177,140,255,.2); cursor:default; }

/* color field */
.dm-color-row{ display:flex; gap:10px; align-items:center; }
.dm-color-row .dm-input{ flex:1; }
.dm-swatch{ width:44px; height:44px; border-radius:9px; border:1px solid var(--dm-line-2); flex:none; padding:0; cursor:pointer; background:var(--dm-blurple); }

/* section divider label */
.dm-divide{ margin:22px 0 14px; padding-top:18px; border-top:1px solid var(--dm-line); }
.dm-divide h3{ font-size:14px; font-weight:800; margin:0; letter-spacing:.01em; }
.dm-divide p{ color:var(--dm-mut); font-size:12.5px; line-height:1.5; margin:6px 0 0; }

/* file upload box */
.dm-upload{ margin-top:10px; display:flex; gap:14px; align-items:center; background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:12px; padding:12px; }
.dm-upload-th{ width:66px; height:66px; border-radius:10px; background:#3b4166; border:1px solid var(--dm-line-2); flex:none; display:grid; place-items:center; color:#8b93c9; font-size:22px; overflow:hidden; }
.dm-upload-th img{ width:100%; height:100%; object-fit:cover; }
.dm-upload-main{ min-width:0; }
.dm-file-btn{ display:inline-block; background:#3a3f4b; color:#fff; border:0; font:inherit; font-weight:600; font-size:13px; padding:8px 14px; border-radius:8px; cursor:pointer; }
.dm-file-btn:hover{ filter:brightness(1.12); }
.dm-upload-hint{ color:var(--dm-dim); font-size:11.5px; line-height:1.4; margin-top:7px; }

/* checkbox rows */
.dm-check{ display:flex; align-items:center; gap:10px; padding:8px 0; cursor:pointer; font-size:14px; font-weight:600; color:var(--dm-txt); }
.dm-check input{ width:17px; height:17px; accent-color:var(--dm-blurple); cursor:pointer; }
.dm-reveal{ display:none; margin:2px 0 10px 27px; }
.dm-reveal.on{ display:block; }

/* buttons */
.dm-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; font:inherit; font-weight:700; font-size:14px; padding:11px 20px; border-radius:10px; cursor:pointer; transition:.15s; }
.dm-btn.primary{ background:var(--dm-blurple); color:#fff; }
.dm-btn.primary:hover{ filter:brightness(1.08); }
.dm-btn.primary:disabled{ opacity:.5; cursor:not-allowed; }
.dm-btn.ghost{ background:rgba(255,255,255,.04); border-color:var(--dm-line-2); color:var(--dm-txt); }
.dm-btn.ghost:hover{ background:rgba(255,255,255,.09); }
.dm-btn.sm{ padding:7px 13px; font-size:12.5px; }
.dm-btn.full{ width:100%; }
.dm-btn.danger{ background:transparent; border-color:rgba(237,66,69,.4); color:var(--dm-red); }
.dm-btn.danger:hover{ background:rgba(237,66,69,.12); }
.dm-form-actions{ display:flex; gap:10px; margin-top:20px; }

/* toggle switch (iOS style) */
.dm-toggle-row{ display:flex; align-items:flex-start; gap:14px; justify-content:space-between; background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:12px; padding:13px 15px; margin-bottom:10px; }
.dm-toggle-row .dm-tr-main{ min-width:0; }
.dm-toggle-row .dm-tr-title{ font-weight:700; font-size:14px; }
.dm-toggle-row .dm-tr-sub{ color:var(--dm-mut); font-size:12px; line-height:1.45; margin-top:3px; }
.dm-sw{ position:relative; width:44px; height:25px; flex:none; }
.dm-sw input{ opacity:0; width:0; height:0; }
.dm-sw .dm-sw-t{ position:absolute; inset:0; background:#3a3f4b; border-radius:8px; transition:.2s; }
.dm-sw .dm-sw-t::before{ content:""; position:absolute; width:19px; height:19px; left:3px; top:3px; border-radius:50%; background:#fff; transition:.2s; }
.dm-sw input:checked + .dm-sw-t{ background:var(--dm-blurple); }
.dm-sw input:checked + .dm-sw-t::before{ transform:translateX(19px); }
.dm-cool-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; color:var(--dm-mut); font-size:13px; }
.dm-cool-row .dm-num{ width:70px; text-align:center; }

/* inline note (blue info strip) */
.dm-note{ background:rgba(91,141,239,.09); border:1px solid rgba(91,141,239,.22); border-radius:10px; padding:10px 13px; font-size:12.5px; color:#c7cdfb; }

/* ---- Discord message preview ---- */
.dm-preview{ background:#313338; border-radius:12px; padding:16px 16px 18px; min-height:120px; }
.dm-preview.empty{ display:grid; place-items:center; color:#8b93a7; font-size:14px; min-height:120px; text-align:center; }
.dm-msg{ display:flex; gap:14px; }
.dm-av{ width:40px; height:40px; border-radius:50%; flex:none; background:linear-gradient(150deg,#5865f2,#8a5cf6); overflow:hidden; }
.dm-av img{ width:100%; height:100%; object-fit:cover; }
.dm-mbody{ min-width:0; flex:1; }
.dm-mhead{ display:flex; align-items:center; gap:8px; margin-bottom:3px; }
.dm-mname{ color:#fff; font-weight:600; font-size:15px; }
.dm-app{ background:var(--dm-blurple); color:#fff; font-size:10px; font-weight:700; padding:1px 5px; border-radius:4px; }
.dm-mtime{ color:#949ba4; font-size:11px; }
.dm-mtext{ color:#dbdee1; font-size:14px; line-height:1.5; word-break:break-word; }
.dm-h{ display:block; color:#f2f3f5; font-weight:700; line-height:1.3; margin:4px 0 2px; }
.dm-h1{ font-size:1.5em; }
.dm-h2{ font-size:1.25em; }
.dm-h3{ font-size:1.07em; }
.dm-mtext i, .dm-embed-desc i{ font-style:italic; }
.dm-mtext u, .dm-embed-desc u{ text-decoration:underline; }
.dm-mtext s, .dm-embed-desc s{ text-decoration:line-through; }
.dm-spoiler{ background:#1e1f22; color:transparent; border-radius:4px; padding:0 3px; cursor:pointer; }
.dm-spoiler:hover{ color:inherit; background:rgba(255,255,255,.08); }
.dm-inline-code{ background:#1e1f22; border-radius:4px; padding:1px 4px; font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:.86em; }
.dm-code{ display:block; background:#1e1f22; border:1px solid #111214; border-radius:5px; padding:8px 10px; margin:5px 0; font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:.82em; line-height:1.3; white-space:pre-wrap; word-break:break-word; }
.dm-quote{ border-left:4px solid #4e5058; margin:2px 0; padding:0 10px; }
.dm-subtext{ font-size:.8em; color:#949ba4; margin:1px 0; }
.dm-li{ margin:1px 0; padding-left:2px; }
.dm-mention{ color:#c9cdfb; background:rgba(91,141,239,.28); padding:0 3px; border-radius:4px; }
.dm-mlink,
a.dm-mlink,
.dm-mlink b, .dm-mlink i, .dm-mlink u, .dm-mlink s{ color:#00a8fc; }
a.dm-mlink{ text-decoration:none; cursor:pointer; }
a.dm-mlink:hover{ text-decoration:underline; }
.dm-embed{ position:relative; margin-top:8px; border-left:4px solid var(--dm-blurple); background:#2b2d31; border-radius:4px; padding:12px 14px; max-width:432px; display:flex; gap:12px; }
.dm-embed-main{ min-width:0; flex:1; }
.dm-embed-author{ color:#f2f3f5; font-weight:700; font-size:13.5px; margin-bottom:5px; }
.dm-embed-desc{ color:#dbdee1; font-size:13.5px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.dm-embed-foot{ color:#949ba4; font-size:11.5px; margin-top:8px; }
.dm-embed-th{ width:72px; height:72px; border-radius:6px; flex:none; overflow:hidden; background:#1e1f22; }
.dm-embed-th img{ width:100%; height:100%; object-fit:cover; }
.dm-embed-img{ margin-top:10px; border-radius:6px; max-width:100%; max-height:200px; }
.dm-btn-discord{ margin-top:10px; display:inline-flex; align-items:center; gap:7px; background:#4e5058; color:#fff; border:0; font:inherit; font-weight:600; font-size:13.5px; padding:8px 15px; border-radius:8px; }

/* ---- saved templates list ---- */
.dm-saved-h{ font-size:18px; font-weight:800; margin:22px 0 12px; }
.dm-tpl{ display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--dm-card); border:1px solid var(--dm-line); border-radius:12px; padding:13px 15px; margin-bottom:10px; }
.dm-tpl-main{ min-width:0; }
.dm-tpl-title{ font-weight:700; font-size:14px; line-height:1.35; }
.dm-tpl-meta{ color:var(--dm-mut); font-size:12px; margin-top:4px; line-height:1.4; }
.dm-tpl-acts{ display:flex; flex-direction:column; gap:7px; flex:none; }

/* ---- Боты: pool stats ---- */
.dm-pool{ display:flex; flex-wrap:wrap; gap:9px; }
.dm-pill{ display:inline-flex; align-items:center; gap:6px; background:var(--dm-inset); border:1px solid var(--dm-line-2); border-radius:8px; padding:8px 15px; font-size:13.5px; font-weight:600; color:var(--dm-txt); }
.dm-pill b{ font-weight:800; }
.dm-pill.g b{ color:var(--dm-green); }
.dm-pill.r b{ color:var(--dm-red); }
.dm-pill.a b{ color:var(--dm-amber); }
.dm-pill.p b{ color:var(--dm-purple); }

/* free-pool banner box (Запуск) */
.dm-poolbox{ background:rgba(91,141,239,.08); border:1px solid rgba(91,141,239,.2); border-radius:12px; padding:14px 16px; margin-top:8px; }
.dm-poolbox b{ color:var(--dm-green); font-size:20px; font-weight:800; }
.dm-poolbox .dm-poolsub{ color:var(--dm-mut); font-size:12.5px; margin-top:3px; }

/* quick amount buttons */
.dm-quick{ display:flex; flex-wrap:wrap; gap:8px; margin-top:9px; }
.dm-quick button{ background:var(--dm-inset); border:1px solid var(--dm-line-2); color:var(--dm-txt); font:inherit; font-size:13px; font-weight:600; padding:7px 14px; border-radius:8px; cursor:pointer; }
.dm-quick button:hover{ border-color:var(--dm-blurple); color:#cfe4ff; }
/* scheduled-start segmented control */
.dm-seg{ display:inline-flex; flex-wrap:wrap; gap:4px; padding:4px; background:var(--dm-inset); border:1px solid var(--dm-line); border-radius:10px; }
.dm-seg-btn{ border:0; background:transparent; color:var(--dm-mut); font:inherit; font-size:13px; font-weight:600; padding:7px 14px; border-radius:8px; cursor:pointer; transition:background .15s,color .15s; }
.dm-seg-btn:hover{ color:var(--dm-txt); }
.dm-seg-btn.active{ background:var(--dm-blurple); color:#fff; }
.dm-sched-extra{ margin-top:11px; display:flex; align-items:center; gap:8px; color:var(--dm-mut); font-size:13px; }
.dm-sched-extra input[type=number]{ width:90px; }
.dm-sched-extra input[type=datetime-local]{ max-width:250px; }

/* launch summary box */
.dm-summary{ background:rgba(91,141,239,.08); border:1px solid rgba(91,141,239,.2); border-radius:12px; padding:15px 17px; margin-top:16px; }
.dm-summary .dm-sum-top{ font-size:16px; font-weight:800; margin-bottom:3px; }
.dm-summary .dm-sum-hint{ color:var(--dm-mut); font-size:12px; margin-bottom:10px; }
.dm-summary .dm-sum-row{ font-size:13.5px; margin:3px 0; }
.dm-summary .dm-sum-row b{ color:var(--dm-txt); }
.dm-sum-key{ color:var(--dm-mut); }

/* ---- Задачи: broadcast task cards ---- */
.dm-task{ background:var(--dm-card); border:1px solid var(--dm-line); border-radius:16px; padding:16px 18px; margin-bottom:16px; }
.dm-task.on{ border-color:rgba(91,141,239,.5); }
.dm-task-h{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.dm-task-title{ font-weight:800; font-size:15px; line-height:1.3; }
.dm-task-date{ color:var(--dm-mut); font-size:12px; margin-top:3px; }
.dm-status{ font-size:11px; font-weight:800; letter-spacing:.03em; padding:4px 10px; border-radius:6px; white-space:nowrap; flex:none; }
.dm-status.dm{ background:rgba(254,231,92,.16); color:var(--dm-amber); }
.dm-status.err{ background:rgba(237,66,69,.16); color:#ff8a8d; }
.dm-status.stop{ background:rgba(240,144,47,.16); color:#ffb87a; }
.dm-status.done{ background:rgba(87,242,135,.16); color:var(--dm-green); }
.dm-bigrow{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:13px 0; }
.dm-bigbox{ display:flex; align-items:center; gap:12px; background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:12px; padding:12px 14px; }
.dm-bigbox .dm-bb-ic{ width:26px; height:26px; flex:none; display:grid; place-items:center; color:var(--dm-mut); }
.dm-bigbox .dm-bb-k{ color:var(--dm-mut); font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; }
.dm-bigbox .dm-bb-v{ font-weight:800; font-size:15px; margin-top:1px; }
.dm-bigbox.g{ background:rgba(87,242,135,.06); }
.dm-bigbox.b{ background:rgba(91,141,239,.06); }
.dm-mini{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.dm-minibox{ background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:10px; padding:8px 12px; min-width:78px; }
.dm-minibox .dm-mb-k{ display:flex; align-items:center; gap:5px; color:var(--dm-mut); font-size:10px; text-transform:uppercase; letter-spacing:.03em; font-weight:700; }
.dm-minibox .dm-mb-v{ font-weight:800; font-size:15px; margin-top:2px; }
.dm-minibox .dm-mb-v.g{ color:var(--dm-green); }
.dm-minibox .dm-mb-v.r{ color:var(--dm-red); }
.dm-minibox .dm-mb-v.b{ color:#7d8cff; }
.dm-prog-lbl{ display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12.5px; color:var(--dm-mut); margin:12px 0 6px; }
.dm-prog-lbl b{ color:var(--dm-txt); }
.dm-prog{ height:10px; background:var(--bg); border:1px solid var(--stroke-2); border-radius:8px; overflow:hidden; margin:14px 0 8px; }
.dm-prog > span{ display:block; height:100%; border-radius:8px; background:linear-gradient(90deg,var(--blue),var(--blue-2)); }
.dm-task-note{ color:var(--dm-mut); font-size:12px; margin:8px 0; }
.dm-route{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:10px; padding:10px 12px; font-size:12.5px; margin:8px 0; }
.dm-route .dm-r-from,.dm-route .dm-r-to{ display:flex; align-items:center; gap:6px; min-width:0; }
.dm-route .dm-r-arrow{ color:var(--dm-dim); font-weight:800; }
.dm-route .dm-r-mut{ color:var(--dm-mut); }
.dm-route .dm-r-inv{ color:#00a8fc; }
.dm-aud{ color:var(--dm-mut); font-size:12px; }
.dm-aud b{ color:var(--dm-txt); }
.dm-task-err{ background:rgba(237,66,69,.1); border:1px solid rgba(237,66,69,.28); color:#ff9a9c; border-radius:10px; padding:9px 12px; font-size:12.5px; margin:10px 0; }
.dm-task-acts{ display:flex; gap:9px; justify-content:flex-end; margin-top:12px; }

/* ---- Уведомления panel ---- */
.dm-notif{ position:fixed; right:22px; bottom:22px; width:330px; max-width:calc(100vw - 32px); background:var(--dm-card); border:1px solid var(--dm-line-2); border-radius:16px; box-shadow:0 24px 60px -20px rgba(0,0,0,.8); z-index:60; display:none; }
.dm-notif.on{ display:block; }
.dm-notif-h{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--dm-line); }
.dm-notif-h h3{ margin:0; font-size:16px; font-weight:800; color:#cfe4ff; }
.dm-notif-list{ max-height:min(60vh,440px); overflow-y:auto; padding:10px; }
.dm-nitem{ display:flex; gap:11px; padding:12px; border-radius:12px; }
.dm-nitem:hover{ background:rgba(255,255,255,.03); }
.dm-nitem .dm-n-ic{ width:34px; height:34px; border-radius:50%; flex:none; display:grid; place-items:center; background:rgba(91,141,239,.16); color:#8b9bff; }
.dm-nitem .dm-n-body{ min-width:0; }
.dm-nitem .dm-n-txt{ font-size:12.5px; line-height:1.45; color:var(--dm-txt); }
.dm-nitem .dm-n-txt b{ color:#cfe4ff; }
.dm-nitem .dm-n-time{ color:var(--dm-dim); font-size:11px; margin-top:6px; }
.dm-nbell{ position:fixed; right:22px; bottom:22px; width:52px; height:52px; border-radius:50%; background:var(--dm-blurple); border:0; color:#fff; cursor:pointer; z-index:59; box-shadow:0 12px 30px -8px rgba(91,141,239,.7); display:grid; place-items:center; }
.dm-nbell .dm-nbell-dot{ position:absolute; top:8px; right:9px; width:11px; height:11px; border-radius:50%; background:var(--dm-red); border:2px solid var(--dm-blurple); }

.dm-empty{ text-align:center; color:var(--dm-mut); padding:50px 20px; font-size:14px; }

/* collapsible embed blocks (Discohook-style) */
.dm-two{ display:flex; gap:12px; flex-wrap:wrap; }
.dm-two > .dm-field{ flex:1 1 180px; margin-bottom:0; }
.dm-embed-block{ border:1px solid var(--dm-line-2); border-radius:12px; margin-bottom:12px; overflow:hidden; background:var(--dm-card-2); }
.dm-eb-head{ display:flex; align-items:center; gap:6px; padding:11px 12px; }
.dm-eb-toggle{ flex:1; min-width:0; text-align:left; background:0; border:0; color:var(--dm-txt); font:inherit; font-weight:700; font-size:14px; cursor:pointer; display:flex; align-items:center; gap:8px; }
.dm-eb-title2{ flex:1; min-width:0; color:var(--dm-txt); font-weight:700; font-size:14px; }
.dm-eb-caret{ font-size:10px; opacity:.7; width:10px; flex:none; }
.dm-eb-actions{ display:flex; gap:2px; flex:none; }
.dm-eb-actions button{ background:0; border:0; color:var(--dm-mut); cursor:pointer; padding:5px 7px; font-size:14px; border-radius:6px; line-height:1; }
.dm-eb-actions button:hover{ background:rgba(255,255,255,.07); color:var(--dm-txt); }
.dm-eb-body{ padding:0 14px 8px; }
.dm-eb-body[hidden]{ display:none; }
.dm-eb-sec{ border-top:1px solid var(--dm-line); }
.dm-eb-sec-h{ width:100%; text-align:left; background:0; border:0; color:var(--dm-mut); font:inherit; font-weight:600; font-size:13.5px; cursor:pointer; padding:11px 0; display:flex; align-items:center; gap:8px; }
.dm-eb-sec-h:hover{ color:var(--dm-txt); }
.dm-eb-sec-body{ padding:0 0 12px; }
.dm-eb-sec-body[hidden]{ display:none; }
.eb-count{ color:var(--dm-dim); font-size:11px; font-weight:600; font-style:italic; margin-left:6px; }

/* embed fields (repeatable, Discohook-style) */
.dm-field-row{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:8px; }
.dm-field-row .dm-input{ flex:1 1 140px; }
.dm-inline-lbl{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--dm-mut); white-space:nowrap; cursor:pointer; }
.dm-inline-lbl input{ width:16px; height:16px; accent-color:var(--dm-blurple); cursor:pointer; }
.dm-field-del{ background:transparent; border:0; color:var(--dm-dim); cursor:pointer; font-size:15px; padding:4px 8px; line-height:1; }
.dm-field-del:hover{ color:var(--dm-red); }

/* preview: title, author/footer icons, fields */
.dm-embed-author{ display:flex; align-items:center; gap:6px; }
.dm-ea-ic{ width:20px; height:20px; border-radius:50%; object-fit:cover; flex:none; }
.dm-embed-title{ font-weight:700; color:#fff; font-size:15px; margin-bottom:5px; }
.dm-embed-title .dm-mlink{ color:#00a8fc; }
.dm-embed-foot{ display:flex; align-items:center; gap:6px; }
.dm-ef-ic{ width:18px; height:18px; border-radius:50%; object-fit:cover; flex:none; }
.dm-embed-fields{ display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:9px; }
.dm-embed-field{ flex:1 1 100%; min-width:0; }
.dm-embed-field.inline{ flex:1 1 30%; }
.dm-embed-field .fn{ font-weight:700; color:#f2f3f5; font-size:13.5px; margin-bottom:2px; }
.dm-embed-field .fv{ color:#dbdee1; font-size:13.5px; line-height:1.4; white-space:pre-wrap; word-break:break-word; }

/* task cards pager */
.dm-pager{ display:flex; align-items:center; justify-content:center; gap:10px; margin-top:12px; }
.dm-pager .cp-nav{ width:34px; height:34px; border-radius:9px; border:1px solid var(--dm-line-2); background:transparent; color:var(--dm-txt); font-size:15px; cursor:pointer; display:grid; place-items:center; }
.dm-pager .cp-nav:hover:not(:disabled){ background:rgba(255,255,255,.06); border-color:var(--dm-blurple); color:#cfe4ff; }
.dm-pager .cp-nav:disabled{ opacity:.4; cursor:default; }
.dm-pager .cp-info{ color:var(--dm-mut); font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }

/* simplified route (Откуда / Куда: avatar + name + link) */
.dm-route2{ display:flex; flex-direction:column; gap:6px; background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:10px; padding:9px 12px; margin:8px 0; font-size:12.5px; }
.dm-r2-row{ display:flex; align-items:center; gap:7px; min-width:0; flex-wrap:wrap; }
.dm-r2-lbl{ color:var(--dm-mut); font-weight:700; flex:none; }
.dm-r2-av{ width:20px; height:20px; border-radius:50%; flex:none; display:grid; place-items:center; font-size:11px; background:#3b4166; color:#fff; overflow:hidden; }
.dm-r2-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.dm-r2-name{ color:var(--dm-txt); font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dm-r2-link{ color:#00a8fc; }

/* broadcast settings tucked inside the preview card, below the message — slide-open */
.dm-launch-wrap{ margin-top:14px; }
.dm-launch-toggle{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--dm-card-2); border:1px solid var(--dm-line); border-radius:10px; color:var(--dm-txt); font:inherit; font-weight:700; font-size:14px; padding:12px 14px; cursor:pointer; transition:border-color .15s; }
.dm-launch-toggle:hover{ border-color:rgba(255,255,255,.2); }
.dm-lt-caret{ font-size:11px; opacity:.7; transition:transform .18s ease; }
.dm-launch-toggle.open .dm-lt-caret{ transform:rotate(90deg); }
.dm-launch-body{ padding:10px 2px 2px; }
.dm-launch-body[hidden]{ display:none; }
.dm-launch-body .dm-divide:first-child{ margin-top:6px; padding-top:0; border-top:0; }

/* task cards relocated under the Setup preview — Stays-style .camp cards */
.camp-actions.dm-actions-right{ justify-content:flex-end; }   /* Repeat / Stop button sits in the right corner */
.dm-stop-btn:hover{ background:rgba(237,66,69,.16); border-color:rgba(237,66,69,.4); color:#ff8f92; }
.camp-headmain{ min-width:0; flex:1; }
/* "from → to" server flow on a run card */
.dm-flow{ display:flex; align-items:center; flex-wrap:wrap; gap:5px 7px; margin-top:5px; font-size:.82rem; color:var(--dm-mut,#8a93a6); }
.dm-flow-srv{ display:inline-flex; align-items:center; gap:5px; max-width:100%; min-width:0; }
.dm-flow-av{ width:18px; height:18px; border-radius:50%; flex:0 0 auto; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; line-height:1; background:#3a4256; }
.dm-flow-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.dm-flow-av-txt{ font-size:.62rem; font-weight:700; color:#cfd6e6; }
.dm-flow-name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; color:#cfd6e6; }
.dm-flow-arrow{ color:#7b86a0; font-weight:700; padding:0 1px; }
.dm-flow-plus{ color:#7b86a0; font-weight:700; }
.dm-flow-dest .dm-flow-name{ color:#8a93a6; }
.dm-flow-link{ margin-left:5px; font-size:.76rem; color:#5b6b8f; white-space:nowrap; }
@media (max-width:560px){ .dm-flow-name{ max-width:140px; } }
#dm-task-tabs{ margin:18px 0 6px; }
.dm-setup-tasks{ margin-top:0; }
.dm-setup-tasks .camp{ margin-bottom:14px; }
.camp-aud{ margin-top:8px; color:var(--dm-mut); font-size:12.5px; line-height:1.45; }
.camp-aud b{ color:#dfe7f4; }
/* (legacy compact .dm-task rules below are unused now) */
.dm-setup-tasks-legacy{ display:flex; flex-direction:column; gap:10px; }
.dm-setup-tasks .dm-task{ padding:12px 14px; margin-bottom:0; border-radius:12px; }
.dm-setup-tasks .dm-task-title{ font-size:13px; }
.dm-setup-tasks .dm-task-date{ font-size:11px; }
.dm-setup-tasks .dm-status{ font-size:10px; padding:3px 8px; }
.dm-setup-tasks .dm-bigrow{ grid-template-columns:1fr 1fr; gap:8px; margin:10px 0; }
.dm-setup-tasks .dm-bigbox{ padding:9px 11px; border-radius:10px; }
.dm-setup-tasks .dm-bigbox .dm-bb-ic{ width:20px; height:20px; }
.dm-setup-tasks .dm-bigbox .dm-bb-v{ font-size:13px; }
.dm-setup-tasks .dm-prog-lbl{ font-size:11.5px; margin:9px 0 5px; }
.dm-setup-tasks .dm-prog{ height:8px; margin:0 0 6px; }
.dm-setup-tasks .dm-task-note,
.dm-setup-tasks .dm-route,
.dm-setup-tasks .dm-aud,
.dm-setup-tasks .dm-task-err{ font-size:11.5px; }
.dm-setup-tasks .dm-route{ padding:8px 10px; }
.dm-setup-tasks .dm-task-acts{ margin-top:10px; }
@media (max-width:560px){ .dm-setup-tasks .dm-bigrow{ grid-template-columns:1fr; } }

/* =================== responsive =================== */
@media (max-width:900px){
  .dm-cols{ grid-template-columns:1fr; }
  .dm-bigrow{ grid-template-columns:1fr; }
}
/* ===== Mobile: 600 px ===== */
@media (max-width:600px){
  .dm-modebar{ flex-wrap:wrap; gap:6px; }
  .dm-mode{ min-height:36px; padding:7px 14px; }
  #dm-selbar{ flex-wrap:wrap; }
  /* server picker: single column on phones */
  .dm-sp-grid{ grid-template-columns:1fr; }
  .dm-access-add{ flex-wrap:wrap; }
  .dm-access-add .dm-btn{ width:100%; justify-content:center; }
}

@media (max-width:520px){
  .dm-card{ padding:16px 14px; border-radius:14px; }
  .dm-tab{ padding:8px 12px; font-size:12.5px; }
  .dm-tab .dm-tab-txt{ display:inline; }
  .dm-embed{ flex-direction:column; }
  .dm-embed-th{ width:100%; height:auto; max-height:160px; }
  .dm-task-acts{ flex-wrap:wrap; }
  .dm-notif{ right:10px; left:10px; bottom:10px; width:auto; }
  .dm-nbell{ right:14px; bottom:14px; }
  .dm-cool-row .dm-num{ width:58px; }
}

.dm-sp-empty{grid-column:1/-1;padding:34px 20px;text-align:center;color:var(--muted,#8b97ab);font-size:14px;background:var(--panel,#141b26);border:1px dashed var(--stroke-2,#2d3a4d);border-radius:14px}

.dm-notif-empty{padding:22px 16px;text-align:center;color:var(--muted,#8b97ab);font-size:13.5px}

.dm-sp-empty .dm-connect{margin-top:14px;display:inline-block}

/* Staff-only "view as" tester bar */
.dm-viewas{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; max-width:600px; margin:0 auto 20px; padding:10px 14px; background:var(--dm-card-2); border:1px solid var(--dm-line-2); border-radius:12px; }
.dm-viewas-lbl{ color:var(--dm-mut); font-size:12.5px; font-weight:700; }
.dm-viewas input{ flex:1; min-width:150px; background:var(--dm-inset); border:1px solid var(--dm-line-2); color:var(--dm-txt); font:inherit; font-size:13.5px; padding:8px 12px; border-radius:9px; }
.dm-viewas input:focus{ outline:none; border-color:var(--dm-blurple); }
.dm-viewas-cur{ color:var(--dm-green); font-size:12.5px; font-weight:700; }

/* ---- DMALL lots: "+" add cell, lot card extras, create-lot modal ---- */
.dm-mut{ color:var(--dm-mut); }
.dm-sp-add{ align-items:stretch; }
.dm-sp-add .dm-sp-add-inner{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:150px; color:var(--dm-mut); border:2px dashed var(--dm-line-2); border-radius:14px; margin:0; font-weight:700; font-size:14px; transition:.15s; }
.dm-sp-add:hover .dm-sp-add-inner{ color:var(--dm-txt); border-color:var(--dm-blurple); background:rgba(91,141,239,.07); }
.dm-sp-plus{ display:inline-flex; align-items:center; justify-content:center; color:var(--dm-blurple); }
.dm-sp-plus svg{ width:30px; height:30px; display:block; }
.dm-lot-card .dm-sp-banner{ height:96px; }
.dm-lot-badge{ font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; background:rgba(87,242,135,.2); color:#57f287; padding:3px 8px; border-radius:8px; white-space:nowrap; }
.dm-lot-del{ position:absolute; z-index:3; top:8px; left:10px; width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:rgba(0,0,0,.45); color:#fff; font-size:12px; cursor:pointer; }
.dm-lot-del:hover{ background:#ed4245; }
/* private badge (sits top-left; "yours" stays top-right) */
.dm-lot-badge-priv{ background:rgba(148,163,184,.25); color:#cbd5e1; }
/* broadcast-viability pre-check: spinner while checking; dimmed + red badge when unavailable */
.dm-lot-checking{ pointer-events:none; }
.dm-lot-checking::after{ content:""; position:absolute; inset:0; z-index:6; background:rgba(12,16,23,.55); border-radius:14px; }
.dm-lot-checking::before{ content:""; position:absolute; z-index:7; top:50%; left:50%; width:26px; height:26px; margin:-13px 0 0 -13px; border:3px solid rgba(255,255,255,.22); border-top-color:var(--dm-blurple); border-radius:50%; animation:dmspin .7s linear infinite; }
@keyframes dmspin{ to{ transform:rotate(360deg); } }
.dm-lot-unavail{ opacity:.5; }
.dm-lot-unavail:hover{ opacity:.68; }
.dm-lot-badge-unavail{ background:rgba(237,66,69,.28); color:#ff9a9c; }
/* owner "⋮" menu in the bottom-right corner + its popover (opens upward, inside the card) */
.dm-lot-menu-btn{ position:absolute; z-index:4; bottom:8px; right:8px; width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(0,0,0,.45); color:#cfd6e6; cursor:pointer; opacity:0; pointer-events:none; transition:background .15s,color .15s,opacity .15s; }
.dm-lot-menu-btn svg{ width:15px; height:15px; display:block; }
/* hidden until the card is hovered (or the menu is open); always visible on touch */
.dm-sp-card:hover .dm-lot-menu-btn, .dm-lot-menu-btn.on{ opacity:1; pointer-events:auto; }
.dm-lot-menu-btn:hover, .dm-lot-menu-btn.on{ background:rgba(91,141,239,.92); color:#fff; }
@media (hover:none){ .dm-lot-menu-btn{ opacity:1; pointer-events:auto; } }
.dm-lot-menu{ position:absolute; z-index:5; right:8px; bottom:34px; min-width:172px; background:var(--dm-card-2); border:1px solid var(--dm-line-2); border-radius:12px; box-shadow:0 12px 30px rgba(0,0,0,.5); padding:5px; display:none; flex-direction:column; }
.dm-lot-menu.open{ display:flex; }
@media (hover:hover){ .dm-sp-card:hover .dm-lot-menu-btn:hover + .dm-lot-menu, .dm-lot-menu:hover{ display:flex; } }
.dm-lot-mi{ padding:9px 12px; border-radius:8px; font-size:13px; color:#cfd6e6; cursor:pointer; white-space:nowrap; }
.dm-lot-mi:hover{ background:rgba(255,255,255,.06); }
.dm-lot-mi-del{ color:#ff6b6e; }
.dm-lot-mi-del:hover{ background:rgba(237,66,69,.15); }
/* edit mode: server is fixed, hide the add-bot helper */
.dm-modal-overlay.editing .dm-lot-hint, .dm-modal-overlay.editing #dm-lot-invite{ display:none; }
.dm-input.dm-ro{ opacity:.65; cursor:not-allowed; }
.dm-lot-card .dm-sp-online{ font-weight:700; color:var(--dm-txt); display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; }
.dm-sp-mem, .dm-sp-price{ white-space:nowrap; }

.dm-modal-overlay{ position:fixed; inset:0; z-index:120; background:rgba(6,9,14,.72); display:flex; align-items:center; justify-content:center; padding:20px; -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); }
.dm-modal-overlay[hidden]{ display:none; }
.dm-modal{ position:relative; width:100%; max-width:460px; background:var(--dm-card); border:1px solid var(--dm-line-2); border-radius:16px; padding:24px 22px; box-shadow:0 30px 80px -30px rgba(0,0,0,.85); }
.dm-modal h2{ margin:0 0 6px; font-size:19px; }
.dm-modal-close{ position:absolute; top:12px; right:14px; border:none; background:transparent; color:var(--dm-mut); font-size:18px; cursor:pointer; }
.dm-modal-close:hover{ color:var(--dm-txt); }
.dm-lot-hint{ color:var(--dm-mut); font-size:13px; line-height:1.5; margin:0 0 14px; }
.dm-lot-invite{ display:inline-block; margin-bottom:16px; }
.dm-lot-foot{ margin:8px 0 4px; font-size:13.5px; color:var(--dm-txt); }
.dm-lot-note{ margin-top:8px; color:var(--dm-mut); font-size:12.5px; line-height:1.5; }
.dm-lot-status{ margin:10px 0; font-size:13px; }
.dm-lot-status.pending{ color:var(--dm-mut); }
.dm-lot-status.err{ color:#ed4245; }
.dm-btn.full{ width:100%; margin-top:14px; }

/* ---- Mobile: DMALL lots + create-lot modal ---- */
@media (max-width:600px){
  .dm-modal-overlay{ padding:12px; }
  .dm-modal{ padding:20px 16px; max-width:100%; }
  .dm-sp-head{ font-size:clamp(17px,5.5vw,22px); margin-bottom:16px; }
  .dm-sp-search{ margin-bottom:18px; }
  .dm-sp-add .dm-sp-add-inner{ min-height:96px; }
  .dm-sp-plus{ font-size:30px; }
  .dm-lot-card .dm-sp-banner{ height:80px; }
  .dm-lot-foot, .dm-lot-note, .dm-lot-hint{ font-size:12.5px; }
  .dm-field .dm-input{ font-size:16px; }   /* avoid iOS zoom on focus */
  .dm-lot-modal input, #dm-lot-server, #dm-lot-price{ font-size:16px; }
}
@media (max-width:380px){
  .dm-modal h2{ font-size:17px; }
  .dm-sp-grid{ gap:12px; }
}

.dm-run-reason{ margin-top:6px; font-size:12px; color:var(--dm-mut); line-height:1.45; }

/* actionable toast: message + one action button (e.g. broadcast failed → "Other offers") */
.dm-act-toast{ position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:80; display:flex; align-items:center; gap:12px; max-width:calc(100vw - 32px); background:var(--dm-card-2); border:1px solid var(--dm-line-2); border-radius:12px; box-shadow:0 18px 44px -18px rgba(0,0,0,.8); padding:12px 12px 12px 16px; }
.dm-act-toast[hidden]{ display:none; }
.dm-at-msg{ color:var(--dm-txt); font-size:13.5px; line-height:1.4; max-width:400px; }
.dm-at-btn{ flex:0 0 auto; background:var(--dm-blurple); color:#fff; border:0; border-radius:8px; font:inherit; font-weight:700; font-size:13px; padding:8px 14px; cursor:pointer; white-space:nowrap; transition:filter .15s; }
.dm-at-btn:hover{ filter:brightness(1.08); }
.dm-at-x{ flex:0 0 auto; width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; background:transparent; border:0; color:var(--dm-mut); cursor:pointer; border-radius:8px; }
.dm-at-x:hover{ background:rgba(255,255,255,.06); color:var(--dm-txt); }
.dm-at-x svg{ width:14px; height:14px; display:block; }
.dm-at-copy{ flex:0 0 auto; width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,.05); border:1px solid var(--dm-line-2); color:var(--dm-mut); cursor:pointer; border-radius:8px; transition:background .15s,color .15s,border-color .15s; }
.dm-at-copy:hover{ background:rgba(91,141,239,.16); border-color:var(--dm-blurple); color:#cfe4ff; }
.dm-at-copy svg{ width:15px; height:15px; display:block; }
.dm-at-copy.ok{ background:rgba(87,242,135,.18); border-color:rgba(87,242,135,.4); color:#57f287; }
@media (max-width:560px){ .dm-act-toast{ left:12px; right:12px; transform:none; max-width:none; flex-wrap:wrap; } .dm-at-msg{ max-width:none; } .dm-at-btn{ flex:1 1 auto; } }

/* DMALL cabinet — payout details block */
.dmc-req-sub{ color:var(--dm-mut); font-size:13px; margin:2px 0 12px; }
.dmc-req-ta{ width:100%; min-height:96px; resize:vertical; }
.dmc-req-actions{ display:flex; justify-content:flex-end; margin-top:12px; }

/* ---- sidebar unread badge (Tickets) ---- */
.dm-side-badge{ display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; margin-left:6px; border-radius:9px; background:var(--dm-red); color:#fff; font-size:11px; font-weight:800; line-height:1; }
.dm-mode .dm-side-badge[hidden]{ display:none; }

/* ============================ DMALL support tickets ============================ */
#dmtickets{ width:100%; color:var(--dm-txt); display:flex; flex-direction:column; min-height:0; }
.tk-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.tk-head h1{ font-size:26px; margin:0 0 4px; }
.tk-filters{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.tk-fbtn{ background:var(--dm-card); border:1px solid var(--dm-line); color:var(--dm-mut); border-radius:8px; padding:7px 13px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tk-fbtn:hover{ color:var(--dm-txt); }
.tk-fbtn.on{ background:rgba(91,141,239,.15); border-color:rgba(91,141,239,.4); color:#9cb8f7; }
.tk-body{ display:grid; grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:18px; align-items:start; min-height:0; }
.tk-list{ display:flex; flex-direction:column; gap:8px; min-width:0; }
.tk-empty{ color:var(--dm-mut); font-size:14px; padding:18px 4px; }
.tk-row{ position:relative; text-align:left; background:var(--dm-card); border:1px solid var(--dm-line); border-radius:12px; padding:12px 14px; cursor:pointer; font:inherit; color:var(--dm-txt); transition:border-color .15s, background .15s; }
.tk-row:hover{ border-color:var(--dm-line-2); }
.tk-row.on{ border-color:rgba(91,141,239,.5); background:rgba(91,141,239,.08); }
.tk-row-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tk-row-subj{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-row-sub{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:5px; color:var(--dm-mut); font-size:12px; }
.tk-row-user{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-row.unread .tk-row-subj{ font-weight:800; }
.tk-row-dot{ position:absolute; top:12px; right:12px; width:8px; height:8px; border-radius:50%; background:var(--dm-red); }
.tk-chip{ flex:none; font-size:11px; font-weight:700; padding:3px 9px; border-radius:8px; white-space:nowrap; }
.tk-chip.amber{ color:var(--dm-amber); background:rgba(254,231,92,.14); }
.tk-chip.blue{ color:#9cb8f7; background:rgba(91,141,239,.15); }
.tk-chip.dim{ color:var(--dm-mut); background:rgba(255,255,255,.06); }

/* thread */
.tk-thread{ background:var(--dm-card); border:1px solid var(--dm-line); border-radius:14px; min-height:320px; display:flex; flex-direction:column; overflow:hidden; }
.tk-thread:empty{ background:transparent; border:1px dashed var(--dm-line); align-items:center; justify-content:center; }
.tk-th-head{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--dm-line); flex-wrap:wrap; }
.tk-back{ display:none; background:transparent; border:0; color:var(--dm-mut); font-size:20px; cursor:pointer; line-height:1; padding:0 4px; }
.tk-th-title{ display:flex; align-items:center; gap:10px; min-width:0; flex:1; }
.tk-th-title b{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-th-user{ color:var(--dm-mut); font-size:12.5px; font-weight:600; }
.tk-msgs{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; max-height:56vh; }
.tk-msg{ max-width:88%; align-self:flex-start; background:var(--dm-inset); border:1px solid var(--dm-line); border-radius:12px; padding:9px 13px; }
.tk-msg.staff{ align-self:flex-end; background:rgba(91,141,239,.12); border-color:rgba(91,141,239,.28); }
.tk-msg-head{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--dm-mut); margin-bottom:4px; }
.tk-msg-head b{ color:var(--dm-txt); font-size:13px; }
.tk-badge-staff{ font-size:10px; font-weight:800; color:#9cb8f7; background:rgba(91,141,239,.2); border-radius:5px; padding:1px 6px; text-transform:uppercase; letter-spacing:.03em; }
.tk-msg-time{ margin-left:auto; }
.tk-msg-body{ font-size:14px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.tk-closed-note{ padding:10px 16px; color:var(--dm-mut); font-size:13px; border-top:1px solid var(--dm-line); }
.tk-reply{ display:flex; gap:10px; align-items:flex-end; padding:12px 16px; border-top:1px solid var(--dm-line); }
.tk-reply .dm-textarea{ flex:1; min-height:44px; max-height:140px; resize:vertical; }
.tk-new{ padding:16px; display:flex; flex-direction:column; gap:12px; }
.tk-new .dm-textarea{ min-height:130px; resize:vertical; }
.tk-new-status{ color:var(--dm-red); font-size:13px; }

@media (max-width:820px){
  .tk-body{ grid-template-columns:1fr; }
  .tk-thread{ display:none; }
  .tk-thread.open{ display:flex; }
  .tk-body:has(.tk-thread.open) .tk-list{ display:none; }
  .tk-back{ display:inline-block; }
  .tk-msgs{ max-height:60vh; }
}

/* ---- ticket attachments ---- */
.tk-reply-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.tk-clip{ flex:none; width:40px; height:40px; padding:0; border-radius:8px; background:var(--dm-inset); border:1px solid var(--dm-line); color:var(--dm-mut); font-size:18px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.tk-clip.wide{ width:auto; padding:0 14px; gap:6px; font-size:14px; font-weight:600; }
.tk-clip:hover{ color:var(--dm-txt); border-color:var(--dm-line-2); }
.tk-new-row{ display:flex; gap:10px; align-items:center; }
.tk-new-row .dm-btn{ flex:1; }
.tk-pend{ display:flex; flex-wrap:wrap; gap:6px; }
.tk-pend:empty{ display:none; }
.tk-attchip{ display:inline-flex; align-items:center; gap:2px; max-width:220px; background:var(--dm-inset); border:1px solid var(--dm-line); border-radius:8px; padding:5px 9px; font-size:12.5px; color:var(--dm-txt); cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-attchip b{ color:var(--dm-mut); font-weight:700; margin-left:2px; }
.tk-attchip:hover b{ color:var(--dm-red); }
.tk-msg-atts{ display:flex; flex-direction:column; gap:6px; margin-top:7px; }
.tk-att-img{ max-width:260px; max-height:280px; border-radius:10px; cursor:zoom-in; display:block; }
.tk-att-vid{ max-width:280px; max-height:300px; border-radius:10px; display:block; }
.tk-att-file{ display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border-radius:9px; background:var(--dm-inset); border:1px solid var(--dm-line); color:var(--dm-txt); text-decoration:none; max-width:100%; }
.tk-att-file span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-lb{ position:fixed; inset:0; z-index:1400; background:rgba(0,0,0,.82); display:flex; align-items:center; justify-content:center; }
.tk-lb img{ max-width:92vw; max-height:88vh; border-radius:10px; }
.tk-lb-x{ position:fixed; top:16px; right:18px; width:40px; height:40px; border-radius:50%; border:0; background:rgba(0,0,0,.4); color:#fff; font-size:18px; cursor:pointer; }
@media (max-width:820px){ .tk-att-img,.tk-att-vid{ max-width:70vw; } }

/* ---- ticket input: reuse the chat input bar look/mechanics ---- */
.tk-reply{ border-top:1px solid var(--dm-line); padding:12px 16px; display:flex; flex-direction:column; align-items:stretch; gap:8px; }
.tk-reply .dm-chat-form{ padding:0; border-top:0; }
.tk-new-bar.dm-chat-form{ padding:0; border-top:0; }
/* Match the default (placeholder) height so an empty, focused composer doesn't collapse:
   one text line (14px × 1.5) + the .dm-chat-input padding (7px top+bottom) = 35px. */
.tk-inbar .dm-chat-input{ min-height:35px; box-sizing:border-box; }
.tk-new .tk-pend{ margin-top:-4px; }

/* ---- admin Stays-embed (?embed=stays): neutralize the DMALL app-shell grid so the plain Stays
   layout (order.css hides topbar + #dm-modebar) renders as before. dmall.js won't self-activate
   DMALL in this mode, so the DMALL panels stay hidden and the Stays orders show. ---- */
html.embed-stays #app{ display:block !important; }
html.embed-stays main.wrap{ display:block !important; }

/* ---- ticket message hover actions (delete own / staff restrict) ---- */
.tk-inbar{ align-items:center; }
.tk-msg-actions{ display:inline-flex; align-items:center; gap:2px; opacity:0; transition:opacity .12s; }
.tk-msg:hover .tk-msg-actions{ opacity:1; }
@media (hover:none){ .tk-msg-actions{ opacity:1; } }
.tk-msg-del, .tk-msg-mute{ background:transparent; border:0; color:var(--dm-dim); cursor:pointer; padding:1px 3px; border-radius:5px; line-height:1; font-size:12px; display:inline-flex; align-items:center; }
.tk-msg-del:hover{ color:var(--dm-red); background:rgba(237,66,69,.12); }
.tk-msg-mute:hover{ color:var(--dm-amber); background:rgba(245,179,0,.12); }
.tk-msg-mute svg{ width:14px; height:14px; display:block; }
.tk-del-ticket{ background:transparent; border:0; color:var(--dm-dim); cursor:pointer; padding:5px; border-radius:8px; display:inline-flex; }
.tk-del-ticket svg{ width:17px; height:17px; display:block; }
.tk-del-ticket:hover{ color:var(--dm-red); background:rgba(237,66,69,.12); }
#tk-new-btn:disabled{ opacity:.5; cursor:not-allowed; }

/* ---- Order details modal (cabinet: click an order row) ---- */
.dmc-row-click{ cursor:pointer; transition:background .12s; }
.dmc-row-click:hover{ background:var(--dm-inset); }
.dm-ord-modal{ position:fixed; inset:0; z-index:1500; background:rgba(0,0,0,.62); display:flex; align-items:center; justify-content:center; padding:18px; }
.dm-ord-box{ width:100%; max-width:560px; max-height:88vh; display:flex; flex-direction:column; background:var(--dm-card); border:1px solid var(--dm-line); border-radius:16px; overflow:hidden; }
.dm-ord-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--dm-line); font-size:16px; }
.dm-ord-x{ background:transparent; border:0; color:var(--dm-mut); font-size:18px; cursor:pointer; line-height:1; }
.dm-ord-x:hover{ color:var(--dm-txt); }
.dm-ord-body{ padding:14px 16px 18px; overflow-y:auto; }
.dm-ord-loading{ color:var(--dm-mut); text-align:center; padding:24px; }
.dm-ord-top{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.dm-ord-srv{ font-weight:700; font-size:15px; color:var(--dm-txt); }
.dm-ord-badge{ font-size:12.5px; color:var(--dm-mut); margin-top:2px; }
.dm-ord-sec{ margin-top:14px; }
.dm-ord-sec-h{ font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--dm-mut); margin-bottom:7px; }
.dm-ord-row{ display:flex; justify-content:space-between; gap:14px; padding:5px 0; border-bottom:1px solid rgba(255,255,255,.04); font-size:13.5px; }
.dm-ord-row:last-child{ border-bottom:0; }
.dm-ord-k{ color:var(--dm-mut); flex:none; }
.dm-ord-v{ color:var(--dm-txt); text-align:right; word-break:break-word; min-width:0; }
.dm-ord-v a{ color:#5b9dff; }
.dm-ord-v code{ font-size:12px; background:var(--dm-inset); padding:2px 6px; border-radius:6px; }
.dm-ord-user{ display:flex; align-items:center; gap:10px; padding:4px 0 8px; }
.dm-ord-uname{ font-weight:600; color:var(--dm-txt); font-size:14px; }
.dm-ord-uid{ font-size:12px; color:var(--dm-mut); }
/* message preview */
.dm-ord-msg{ background:var(--dm-inset); border:1px solid var(--dm-line); border-radius:12px; padding:12px; }
.dm-ord-msg-text{ color:var(--dm-txt); font-size:14px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.dm-ord-nomsg{ color:var(--dm-mut); font-size:13.5px; }
.dm-ord-embed{ border-left:4px solid #4b5563; background:rgba(255,255,255,.03); border-radius:6px; padding:10px 12px; margin-top:10px; }
.dm-ord-em-author{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--dm-txt); font-weight:600; margin-bottom:4px; }
.dm-ord-em-author img{ width:20px; height:20px; border-radius:50%; }
.dm-ord-em-title{ font-weight:700; color:var(--dm-txt); font-size:14px; margin-bottom:4px; }
.dm-ord-em-row{ display:flex; gap:10px; }
.dm-ord-em-main{ flex:1; min-width:0; }
.dm-ord-em-desc{ color:var(--dm-txt); font-size:13px; line-height:1.45; white-space:pre-wrap; word-break:break-word; }
.dm-ord-em-fields{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.dm-ord-em-field{ flex:1 1 100%; }
.dm-ord-em-field.inline{ flex:1 1 40%; }
.dm-ord-em-fname{ font-weight:700; font-size:12.5px; color:var(--dm-txt); }
.dm-ord-em-fval{ font-size:12.5px; color:var(--dm-mut); }
.dm-ord-em-thumb{ width:64px; height:64px; border-radius:8px; object-fit:cover; flex:none; }
.dm-ord-em-img{ max-width:100%; border-radius:8px; margin-top:8px; display:block; }
.dm-ord-em-footer{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--dm-mut); margin-top:8px; }
.dm-ord-em-footer img{ width:16px; height:16px; border-radius:50%; }
.dm-ord-btns{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.dm-ord-btn{ display:inline-block; padding:7px 14px; border-radius:8px; background:#4356b8; color:#fff; text-decoration:none; font-size:13px; font-weight:600; }
.dm-ord-btn:hover{ filter:brightness(1.1); }
@media (max-width:560px){ .dm-ord-box{ max-height:92vh; } }

/* ---- Server picker: search + sort/filter chips (chips right of search on desktop, below on mobile) ---- */
.dm-sp-controls{ display:flex; align-items:center; gap:14px; margin:0 0 24px; flex-wrap:wrap; }
.dm-sp-controls .dm-sp-search{ flex:1 1 280px; min-width:240px; max-width:none; margin:0; }
.dm-sp-filters{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.dm-sp-chip{ background:var(--dm-inset); border:1px solid var(--dm-line-2); color:var(--dm-mut); font:inherit; font-size:13px; font-weight:600; padding:9px 14px; border-radius:10px; cursor:pointer; white-space:nowrap; transition:background .12s,border-color .12s,color .12s; }
.dm-sp-chip:hover{ color:var(--dm-txt); border-color:var(--dm-mut); }
.dm-sp-chip.active{ background:var(--dm-blurple); border-color:var(--dm-blurple); color:#fff; }
.dm-sp-chip-tgl{ margin-left:4px; }
.dm-sp-chip-tgl.active{ background:#2f9e6b; border-color:#2f9e6b; color:#fff; }
@media (max-width:720px){
  .dm-sp-controls{ gap:12px; margin-bottom:18px; }
  .dm-sp-controls .dm-sp-search{ flex-basis:100%; }
  .dm-sp-filters{ overflow-x:auto; -webkit-overflow-scrolling:touch; flex-wrap:nowrap; width:100%; padding-bottom:2px; }
  .dm-sp-chip{ flex:0 0 auto; }
  .dm-sp-chip-tgl{ margin-left:0; }
}

/* ================= Product-card meta redesign ================= */
.dm-sp-info{ padding:0 2px; display:flex; flex-direction:column; gap:9px; }
.dm-sp-priceline{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.dm-sp-price{ color:var(--dm-txt); font-size:14px; white-space:nowrap; }
.dm-sp-price b{ font-size:19px; font-weight:800; letter-spacing:-.3px; }
.dm-sp-price span{ color:var(--dm-mut); font-size:12px; }
.dm-sp-rate{ display:inline-flex; align-items:center; gap:5px; font-size:13px; color:var(--dm-txt); white-space:nowrap; }
.dm-sp-rate b{ font-weight:700; }
.dm-sp-rate i{ color:var(--dm-mut); font-style:normal; font-size:12px; }
.dm-sp-rate-none{ color:var(--dm-mut); font-size:12.5px; }
.dm-stars{ display:inline-flex; gap:1px; }
.dm-star-svg{ width:14px; height:14px; display:block; }
/* Bigger stars where they matter: card rating badge, review rows, and the summary average. */
.dm-sp-rate .dm-star-svg{ width:16px; height:16px; }
.dm-rev-stars .dm-star-svg{ width:18px; height:18px; }
.dm-rev-avg .dm-star-svg{ width:22px; height:22px; }
.dm-star svg path{ fill:#40454f; }
.dm-star.on svg path{ fill:#f5b301; }
.dm-star.half svg path{ fill:#f5b301; opacity:.5; }
/* Minimalist stat line (no boxes): icon + number + muted label, spaced. */
.dm-sp-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:7px 16px; color:var(--dm-mut); font-size:12.5px; }
.dm-sp-stat{ display:inline-flex; align-items:center; gap:6px; }
.dm-sp-stat svg{ width:16px; height:16px; opacity:.55; }
.dm-sp-stat b{ color:var(--dm-txt); font-weight:700; }
/* Plain (no background) button pinned to the card's bottom-left corner, mirroring the ⋮ menu. */
.dm-sp-reviews{ position:absolute; left:14px; bottom:10px; z-index:4; display:inline-flex; align-items:center; gap:6px; background:transparent; border:0; padding:0; font-size:13px; font-weight:600; color:var(--dm-mut); cursor:pointer; transition:color .12s; }
.dm-sp-reviews:hover{ color:var(--dm-txt); }
.dm-sp-reviews svg{ width:16px; height:16px; }
.dm-sp-reviews em{ font-style:normal; color:var(--dm-mut); font-weight:700; }

/* ================= Reviews panel (chat-like: side dock on desktop, bottom sheet on mobile) ================= */
.dm-rev-modal{ position:fixed; inset:0; z-index:1450; display:flex; align-items:flex-end; justify-content:center; background:rgba(0,0,0,.5); }
.dm-rev-boxwrap{ display:contents; }
.dm-rev-box{ display:flex; flex-direction:column; width:100%; max-height:88vh; background:var(--dm-card); color:var(--dm-txt); border-radius:16px 16px 0 0; overflow:hidden; }
.dm-rev-topbar{ position:relative; display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--dm-line); flex:none; }
.dm-rev-handle{ position:absolute; top:6px; left:50%; transform:translateX(-50%); width:38px; height:4px; border-radius:3px; background:var(--dm-line-2); }
.dm-rev-title{ font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.dm-rev-x{ background:transparent; border:0; color:var(--dm-mut); font-size:18px; cursor:pointer; line-height:1; flex:none; }
.dm-rev-x:hover{ color:var(--dm-txt); }
.dm-rev-body{ padding:14px 16px 16px; overflow-y:auto; }
.dm-rev-summary{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.dm-rev-avg{ display:inline-flex; align-items:center; gap:7px; }
.dm-rev-avg b{ font-size:26px; font-weight:800; }
.dm-rev-count{ color:var(--dm-mut); font-size:13px; }
.dm-rev-list{ display:flex; flex-direction:column; gap:14px; }
.dm-rev-empty{ color:var(--dm-mut); font-size:13.5px; padding:8px 0; }
.dm-rev-item{ border-bottom:1px solid rgba(255,255,255,.05); padding-bottom:12px; }
.dm-rev-item:last-child{ border-bottom:0; }
.dm-rev-head{ display:flex; align-items:center; gap:10px; }
.dm-rev-av{ width:34px; height:34px; border-radius:50%; overflow:hidden; flex:none; display:grid; place-items:center; background:#3a4256; }
.dm-rev-av img{ width:100%; height:100%; object-fit:cover; }
.dm-rev-av-txt{ font-weight:700; font-size:14px; color:#fff; }
.dm-rev-who{ flex:1; min-width:0; }
.dm-rev-name{ font-weight:600; font-size:14px; }
.dm-rev-you{ color:var(--dm-mut); font-weight:500; font-size:11.5px; }
.dm-rev-stars{ display:flex; align-items:center; gap:6px; margin-top:2px; }
.dm-rev-time{ color:var(--dm-mut); font-size:11.5px; }
.dm-rev-del{ background:transparent; border:0; color:var(--dm-dim); cursor:pointer; font-size:14px; flex:none; padding:2px 6px; border-radius:6px; }
.dm-rev-del:hover{ color:var(--dm-red); background:rgba(237,66,69,.12); }
.dm-rev-text{ margin-top:7px; font-size:13.5px; line-height:1.5; color:var(--dm-txt); white-space:pre-wrap; word-break:break-word; }
.dm-rev-reply{ margin:9px 0 0 14px; padding:9px 12px; background:var(--dm-inset); border-left:3px solid var(--dm-blurple); border-radius:0 9px 9px 0; }
.dm-rev-reply-head{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--dm-mut); margin-bottom:3px; }
.dm-rev-reply-head b{ color:var(--dm-txt); font-weight:700; }
.dm-rev-reply-text{ font-size:13px; line-height:1.45; white-space:pre-wrap; word-break:break-word; }
.dm-rev-mini{ background:transparent; border:0; color:var(--dm-mut); font-size:12px; cursor:pointer; padding:0; }
.dm-rev-mini:hover{ color:var(--dm-txt); }
.dm-rev-mini-del:hover{ color:var(--dm-red); }
.dm-rev-reply-add{ margin:8px 0 0 14px; display:inline-block; }
.dm-rev-replybox{ margin:8px 0 0 14px; }
.dm-rev-form{ margin-top:16px; padding-top:14px; border-top:1px solid var(--dm-line); }
.dm-rev-form-h{ font-size:13px; font-weight:700; margin-bottom:8px; }
.dm-rev-pick{ display:flex; gap:4px; margin-bottom:10px; }
.dm-rev-pstar{ cursor:pointer; }
.dm-rev-pstar .dm-star-svg{ width:28px; height:28px; }
.dm-rev-pstar svg path{ fill:#40454f; transition:fill .1s; }
.dm-rev-pstar.on svg path{ fill:#f5b301; }
/* Hover preview: while pointing at the picker, show only the hover fill (left-to-current),
   overriding the currently-selected stars until the pointer leaves. */
.dm-rev-pick.previewing .dm-rev-pstar svg path{ fill:#40454f; }
.dm-rev-pick.previewing .dm-rev-pstar.hover svg path{ fill:#ffc93c; }
.dm-rev-input{ width:100%; background:var(--dm-inset); border:1px solid var(--dm-line-2); color:var(--dm-txt); font:inherit; font-size:14px; padding:10px 12px; border-radius:10px; resize:vertical; box-sizing:border-box; }
.dm-rev-input:focus{ outline:none; border-color:var(--dm-blurple); }
.dm-rev-form-btns{ display:flex; gap:8px; margin-top:10px; }
.dm-rev-locked{ margin-top:16px; padding:12px 14px; background:var(--dm-inset); border:1px solid var(--dm-line); border-radius:10px; color:var(--dm-mut); font-size:13px; text-align:center; }

/* Desktop: dock to the right like the chat panel (no dimming). */
@media (min-width:721px){
  .dm-rev-modal{ background:transparent; pointer-events:none; justify-content:flex-end; align-items:stretch; }
  .dm-rev-box{ pointer-events:auto; position:fixed; top:66px; right:14px; bottom:14px; width:400px; max-height:none; height:auto; border:1px solid var(--dm-line-2); border-radius:14px; box-shadow:0 18px 50px rgba(0,0,0,.5); }
  .dm-rev-handle{ display:none; }
}
