/* Контрольная панель HedgeBots: поверх общих стилей симулятора (цвета, кнопки, окна, плашки) */
html, body { height: auto; min-height: 100%; }
body { display: block; overflow: auto; font-size: 13px; }

.pn-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 52px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--bg); }
.pn-brand { font-size: 16px; font-weight: 700; color: var(--orange); white-space: nowrap; }
.pn-brand span { color: var(--text); font-weight: 400; }
.pn-sum { display: flex; align-items: center; gap: 14px; color: var(--text2); white-space: nowrap; }
.pn-sum b { color: var(--text); font-weight: 600; }
.pn-sum i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: var(--muted); }
.pn-sum .on i { background: var(--green); }

.pn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 1600px; margin: 0 auto; padding: 12px; }
.pn-col { min-width: 0; background: var(--panel); border-radius: var(--radius); }
.pn-col-head { display: flex; align-items: center; justify-content: center; height: 64px; border-bottom: 1px solid var(--line); }
.pn-sec { padding: 14px 16px 16px; }
.pn-sec + .pn-sec { border-top: 1px solid var(--line); }
.pn-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pn-sec-title { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pn-sec-title em { color: var(--muted); font-style: normal; font-weight: 400; }
.pn-sec-head button { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.pn-empty { padding: 18px 0; color: var(--muted); text-align: center; }

.pn-row { display: grid; grid-template-columns: 10px 28px minmax(96px, 1fr) auto auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border-radius: var(--radius); }
.pn-row:hover { background: var(--panel2); }
.pn-row.pn-dragging { opacity: .45; }
/* Ручка перетаскивания — шесть точек, видна при наведении на строку */
.pn-grip { width: 10px; height: 18px; cursor: grab; opacity: 0; background: radial-gradient(circle, var(--muted) 1.2px, transparent 1.4px) 0 0 / 5px 6px; }
.pn-row:hover .pn-grip { opacity: 1; }
.pn-coin { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--hover); }
.pn-coin-letter { display: flex; align-items: center; justify-content: center; color: var(--text2); font-size: 12px; font-weight: 600; }
.pn-name { min-width: 0; }
.pn-name b { display: block; font-size: 13px; font-weight: 600; }
.pn-name span { display: block; overflow: hidden; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.pn-name .pn-row-err { color: var(--red); }
.pn-acts { display: flex; align-items: center; gap: 6px; }
.pn-acts button, .pn-acts a { display: flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.pn-acts .btn-gray, .pn-acts .btn-primary { min-width: 84px; }
.pn-acts a { background: var(--hover); color: var(--text); }
.pn-acts a:hover { background: #363a42; }
.pn-acts a.off { background: none; color: var(--muted); pointer-events: none; opacity: .5; }
.pn-acts .pn-ico { width: 28px; padding: 0; background: none; color: var(--muted); }
.pn-acts .pn-ico:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.pn-acts .pn-del:hover:not(:disabled) { color: var(--red); }
.pn-acts button:disabled { cursor: default; opacity: .35; }
.badge.pn-off { background: none; color: var(--muted); padding-left: 0; padding-right: 0; }

.pn-dlg { max-width: 420px; }
.pn-dlg-body { padding: 0 18px 8px; }
.pn-lbl { display: block; margin-bottom: 6px; color: var(--text2); }
.pn-dlg input { width: 100%; }
.pn-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.pn-err { margin: 8px 0 0; color: var(--red); font-size: 12px; }
.pn-ask { margin: 0 0 8px; color: var(--text2); line-height: 1.5; white-space: pre-line; }
.pn-hid-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.pn-hid-row b { margin-right: auto; font-weight: 600; }
.pn-hid-row button { padding: 5px 10px; font-size: 12px; }
#dlgHidden .pn-dlg-body { padding-bottom: 16px; }

.pn-toast { position: fixed; bottom: 18px; left: 50%; z-index: 20; max-width: min(640px, calc(100vw - 32px)); padding: 9px 14px; border-radius: var(--radius); background: var(--hover); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transform: translateX(-50%); }
.pn-toast.err { background: var(--red); color: #fff; }

.pn-sum .btn-gray { padding: 4px 10px; font-size: 12px; }
.pn-login { display: flex; flex-direction: column; width: min(340px, calc(100vw - 32px)); padding: 24px; border-radius: 12px; background: var(--panel); }
.pn-login .pn-brand { margin-bottom: 18px; text-align: center; }
.pn-login .pn-lbl { margin-top: 10px; }
.pn-login input { width: 100%; }
.pn-login .btn-primary { margin-top: 16px; }
body.pn-wait { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.pn-wait-box { width: min(420px, calc(100vw - 32px)); padding: 22px 24px; border-radius: 12px; background: var(--panel); text-align: center; }
.pn-wait-box h3 { margin: 0 0 8px; font-size: 16px; }
.pn-wait-box p { margin: 0; color: var(--text2); line-height: 1.5; }
.pn-wait-box .pn-err { color: var(--red); overflow-wrap: anywhere; }
.pn-wait-box a { display: inline-block; margin-top: 14px; color: var(--text); text-decoration: none; }

@media (max-width: 1250px) {
  .pn-grid { grid-template-columns: minmax(0, 1fr); }
}
