/* Velstok message editor (controller Message app and Velstok Cloud) */
.vm { --vm-bg: var(--vm-surface, #0f1f2c); --vm-line: var(--vm-border, #2c4c66); --vm-text: var(--vm-fg, #e8eef4); --vm-muted: var(--vm-dim, #8aa0b4);
  --vm-acc: var(--vm-accent, #FF6B24); --vm-acc2: var(--vm-accent2, #FF8A4C); --vm-bad: #ff6b6b; color: var(--vm-text); font-size: 15px; }
.vm * { box-sizing: border-box; }
.vm-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.vm-add { display: flex; flex-wrap: wrap; gap: 8px; }
.vm-meta { display: flex; gap: 14px; align-items: center; color: var(--vm-muted); font-size: 13px; }
.vm-zoom { display: inline-flex; gap: 6px; align-items: center; }
.vm-btn { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--vm-line); background: transparent; color: var(--vm-text); font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.vm-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.vm-btn.primary { background: var(--vm-acc); border-color: var(--vm-acc); color: #111820; }
.vm-btn.ghost { border-style: dashed; }
.vm-btn.danger { border-color: #8d3b3b; color: #ffb3b3; }
.vm-btn:disabled { opacity: .45; cursor: default; }
.vm-zonebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 8px; }
.vm-ztab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 48px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--vm-line); background: transparent; color: var(--vm-text); font: inherit; cursor: pointer; }
.vm-ztab small { color: var(--vm-muted); font-size: 12px; }
.vm-ztab.sel { border-color: var(--vm-acc); box-shadow: inset 0 -3px 0 var(--vm-acc); }
.vm-zgap { color: var(--vm-muted); font-size: 12px; padding: 0 2px; }
.vm-zgap::before { content: "↔ "; }
.vm-scroll { overflow-x: auto; overflow-y: hidden; padding: 20px 10px 4px; background: #1a2733; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.vm-stage { position: relative; background: #fff; touch-action: none; }
.vm-zone { position: absolute; top: 0; bottom: 0; background: #fff; outline: 1px dashed #b9c6d2; cursor: pointer; }
.vm-zone.sel { outline: 2px solid var(--vm-acc2); z-index: 1; }
.vm-zone i { position: absolute; left: 0; right: 0; border-top: 1px dashed #d4dde6; }
.vm-zone em { position: absolute; left: 2px; top: -1px; transform: translateY(-100%); font-style: normal; font-size: 11px; color: var(--vm-muted); white-space: nowrap; }
.vm-zone.empty span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa8b5; font-size: 12px; text-align: center; }
.vm-gap { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #eef2f5 0 6px, #e1e7ec 6px 12px); }
.vm-gap span { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); font-size: 10px; color: #66788a; white-space: nowrap; }
.vm-end { position: absolute; top: 0; bottom: 0; border-left: 2px solid #e05252; }
.vm-slot { position: absolute; z-index: 1; box-sizing: border-box; display: flex; align-items: center; padding: 0 6px; border: 1px dashed var(--vm-acc2); border-radius: 3px; background: rgba(255, 107, 36, .07); color: #8a96a3; cursor: text; white-space: nowrap; overflow: hidden; line-height: 1; }
.vm-slot:hover, .vm-slot:active { background: rgba(255, 107, 36, .16); color: #5b6670; }
.vm-el { position: absolute; color: #000; white-space: nowrap; overflow: visible; cursor: grab; outline: 1px solid transparent; z-index: 2; }
.vm-el.sel { outline: 2px solid var(--vm-acc2); background: rgba(255, 107, 36, .08); }
.vm-el.bad { outline: 2px dashed var(--vm-bad); background: rgba(255, 107, 107, .12); }
.vm-el.vm-date { color: #1d3b8a; }
.vm-el .vm-px { width: 100%; image-rendering: pixelated; display: block; }
.vm-el.vm-logo .vm-px, .vm-el.vm-barcode .vm-px { height: 100%; }
.vm-el .vm-hri { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; color: #000; }
.vm-el .vm-bad { font-size: 11px; color: #b00020; white-space: normal; display: block; padding: 2px; }
.vm-ruler { position: relative; height: 22px; margin-top: 2px; }
.vm-ruler i { position: absolute; top: 0; height: 5px; border-left: 1px solid #6d8194; }
.vm-ruler i.big { height: 10px; }
.vm-ruler b { position: absolute; top: 9px; transform: translateX(-50%); font-size: 10px; font-weight: 400; color: var(--vm-muted); }
.vm-errors { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: rgba(255, 107, 107, .12); color: #ffb3b3; font-size: 14px; }
.vm-panels { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 2fr) minmax(220px, 1fr); gap: 10px; margin-top: 10px; }
@media (max-width: 1100px) { .vm-panels { grid-template-columns: 1fr 1fr; } .vm-insp { grid-column: 1 / -1; order: -1; } }
.vm-card { background: var(--vm-bg); border: 1px solid var(--vm-line); border-radius: 10px; padding: 12px 14px; }
.vm-card h4 { margin: 0 0 8px; font-size: 15px; }
.vm-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--vm-muted); margin-bottom: 8px; }
.vm-card input, .vm-card select { min-height: 42px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--vm-line); background: rgba(0, 0, 0, .25); color: var(--vm-text); font: inherit; font-size: 15px; }
.vm-card input[type=range] { padding: 0; }
.vm-card input:disabled, .vm-card select:disabled { opacity: .7; }
.vm-card label.vm-chk { flex-direction: row; align-items: center; gap: 8px; color: var(--vm-text); }
.vm-card label.vm-chk input { min-height: 22px; width: 22px; }
.vm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.vm-panels > *, .vm-form > * { min-width: 0; }
.vm-form input, .vm-form select { max-width: 100%; box-sizing: border-box; }
.vm-form .w2 { grid-column: 1 / -1; }
.vm-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.vm-muted { color: var(--vm-muted); margin: 0 0 8px; }
.vm .small { font-size: 12px; }
.vm-bad { color: #ffb3b3; }
.vm-gs1 { font-family: Poppins, sans-serif; font-variant-numeric: tabular-nums; font-size: 14px; background: rgba(0, 0, 0, .3); border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; word-break: break-all; }
.vm-fnc { color: var(--vm-acc); }
.vm-logoprev { background: #fff; border-radius: 6px; padding: 6px; margin-bottom: 6px; max-height: 120px; overflow: auto; }
.vm-logoprev canvas { max-width: 100%; max-height: 100px; image-rendering: pixelated; }
.vm-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; z-index: 50; }
.vm-modal[hidden] { display: none; }
.vm-modal-box { background: var(--vm-bg); border: 1px solid var(--vm-line); border-radius: 12px; padding: 18px; width: min(760px, 94vw); max-height: 86vh; overflow: auto; }
.vm-modal-box h3 { margin: 0 0 10px; }
.vm-modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.vm-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vm-logos button { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 10px; border-radius: 8px; border: 1px solid var(--vm-line); background: #fff; cursor: pointer; }
.vm-logos img { max-width: 100%; max-height: 80px; }
.vm-logos small { color: #24323f; font-size: 12px; }
.vm-ro .vm-add, .vm-ro .vm-zoom ~ * { display: none; }
.vm-ro .vm-el { cursor: default; }
/* v1.20.4: + Zone stands apart from the element buttons (orange, extra space and a divider) */
.vm-btn.vm-zone-btn { margin-left: 22px; position: relative; }
.vm-btn.vm-zone-btn::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 1px; background: var(--vm-line); }
