/* ============================================================
   VOVKER Circuit Lab — стили
   ============================================================ */
/* ============================================================
   VOVKER Circuit Lab — стили
   ============================================================ */
.vclr-mount { display: flex; flex-direction: column; min-height: 520px; }
.vclr-mount > .vc-root { flex: 1; }
.vclr-mount--full { width: 100%; }
.vclr-mount--full .vc-root { height: 100%; min-height: 460px; }
.vc-root {
  --vc-ink: #2b3440;
  --vc-bg: #f4f7fb;
  --vc-accent: #2f7df6;
  --vc-green: #16a34a;
  --vc-red: #dc2626;
  display: flex;
  gap: 10px;
  font-family: 'Segoe UI', 'Nunito', Arial, sans-serif;
  color: var(--vc-ink);
  background: var(--vc-bg);
  border: 1px solid #d7e0ec;
  border-radius: 16px;
  padding: 10px;
  position: relative;
  box-shadow: 0 6px 24px rgba(43, 74, 122, .08);
  min-height: 520px;
}
.vc-root, .vc-root * { box-sizing: border-box; }

/* ---------- палитра ---------- */
.vc-palette {
  width: 132px;
  flex: 0 0 132px;
  background: #fff;
  border: 1px solid #e2e9f2;
  border-radius: 12px;
  padding: 8px;
  max-height: 100%;
  overflow-y: auto;
}
.vc-pal-title { font-weight: 700; font-size: 13px; margin: 2px 0 8px; }
.vc-pal-group { margin-bottom: 10px; }
.vc-pal-gname { font-size: 10px; text-transform: uppercase; color: #8a97a8; letter-spacing: .5px; margin: 6px 0 4px; }
.vc-pal-items { display: flex; flex-direction: column; gap: 4px; }
.vc-pal-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #f7fafd; border: 1px solid #e2e9f2; border-radius: 10px;
  padding: 4px 2px 3px; cursor: pointer; transition: .12s; width: 100%;
}
.vc-pal-btn:hover { border-color: var(--vc-accent); background: #eef5ff; transform: translateY(-1px); }
.vc-pal-btn.act { border-color: var(--vc-accent); background: #dbeafe; box-shadow: 0 0 0 2px #bfdbfe; }
.vc-pal-icon { width: 74px; height: 46px; }
.vc-pal-label { font-size: 10px; font-weight: 600; color: #4b5866; line-height: 1.1; text-align: center; }

/* ---------- сцена ---------- */
.vc-stage { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 500px; }
.vc-toolbar {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #e2e9f2; border-radius: 12px;
  padding: 6px 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.vc-tb-sep { width: 1px; height: 22px; background: #e2e9f2; margin: 0 3px; }
.vc-tb-grow { flex: 1; }
.vc-btn {
  border: 1px solid #cdd8e4; background: #fff; border-radius: 9px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  color: #33455c; transition: .12s; font-family: inherit;
}
.vc-btn:hover { border-color: var(--vc-accent); color: var(--vc-accent); }
.vc-btn.small { padding: 3px 8px; font-size: 12px; }
.vc-btn.wide { width: 100%; margin: 4px 0; }
.vc-btn.danger:hover { border-color: var(--vc-red); color: var(--vc-red); }
.vc-btn-run { background: #e9f9ef; border-color: #b7e4c7; color: #157347; min-width: 92px; }
.vc-btn-run.on { background: #fff3e0; border-color: #ffd8a8; color: #b45309; }
.vc-btn-save { background: #eef5ff; border-color: #c3d9fb; color: #1d5bd6; }
.vc-btn-check { background: #f3e8ff; border-color: #dcc7fb; color: #7c3aed; width: 100%; margin-top: 6px; }
.vc-sel {
  border: 1px solid #cdd8e4; border-radius: 9px; padding: 5px 8px;
  font-size: 13px; background: #fff; font-family: inherit; cursor: pointer;
}
.vc-title {
  border: 1px solid #cdd8e4; border-radius: 9px; padding: 5px 8px;
  font-size: 13px; width: 150px; font-family: inherit;
}
.vc-canvas-box {
  flex: 1; background: #fff; border: 1px solid #e2e9f2; border-radius: 12px;
  overflow: hidden; position: relative; min-height: 440px;
}
.vc-canvas-wrap { position: absolute; inset: 0; }
.vc-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; user-select: none; min-height: 440px; }
.vc-status {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e2e9f2; border-radius: 10px;
  padding: 5px 10px; margin-top: 8px; font-size: 12.5px; color: #5a6675; min-height: 32px;
}
.vc-status-msg.warn { color: var(--vc-red); font-weight: 700; }
.vc-ver { font-size: 11px; color: #a5b1c2; background: #f1f5f9; border-radius: 6px; padding: 2px 6px; font-variant-numeric: tabular-nums; }
.vc-clock { font-variant-numeric: tabular-nums; color: #7c8797; }
.vc-hint {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px;
  background: #1f2937cc; color: #fff; font-size: 12.5px; padding: 6px 14px;
  border-radius: 999px; pointer-events: none; white-space: nowrap;
}
.vc-hint:empty { display: none; }

/* ---------- SVG-элементы ---------- */
.vc-wire-base { fill: none; stroke: #334155; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.vc-wire-live { fill: none; stroke: #22c55e; stroke-width: 3.2; stroke-dasharray: 7 9; stroke-linecap: round; opacity: 0; }
.vc-wire.sel .vc-wire-base { stroke: var(--vc-accent); }
.vc-wire:hover .vc-wire-base { stroke: #0ea5e9; }
.vc-wire-dot { fill: #334155; stroke: #fff; stroke-width: 1.4; opacity: .9; cursor: pointer; }
.vc-wire:hover .vc-wire-dot { fill: #0ea5e9; }
.vc-junction { fill: #334155; stroke: none; }
.vc-comp { cursor: grab; }
.vc-comp:hover { filter: drop-shadow(0 0 3px #93c5fd); }
.vc-comp.sel { filter: drop-shadow(0 0 4px #3b82f6); }
.vc-comp:active { cursor: grabbing; }
.vc-pin { fill: #fff; stroke: #8a97a8; stroke-width: 2; cursor: crosshair; transition: r .1s; }
.vc-pin:hover { fill: #fde047; stroke: #ca8a04; }
.vc-wiring .vc-pin { animation: vcpulse 1s infinite; }
@keyframes vcpulse { 0%,100% { stroke: #8a97a8; } 50% { stroke: #ca8a04; } }
.vc-ghost { pointer-events: none; }
.vc-l-ghost { pointer-events: none; }

/* ---------- боковая панель ---------- */
.vc-side {
  width: 252px; flex: 0 0 252px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e2e9f2; border-radius: 12px; overflow: hidden;
}
.vc-tabs { display: flex; border-bottom: 1px solid #e2e9f2; }
.vc-tab {
  flex: 1; border: 0; background: #f7fafd; padding: 8px 4px; font-size: 12.5px;
  font-weight: 600; color: #6b7888; cursor: pointer; font-family: inherit;
}
.vc-tab.act { background: #fff; color: var(--vc-ink); box-shadow: inset 0 -2px 0 var(--vc-accent); }
.vc-pages { flex: 1; overflow-y: auto; }
.vc-page { display: none; padding: 10px; }
.vc-page.act { display: block; }
.vc-empty { color: #8a97a8; font-size: 13px; line-height: 1.55; }
.vc-props-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.vc-prop { margin-bottom: 10px; }
.vc-prop label { display: block; font-size: 12px; color: #5a6675; margin-bottom: 3px; }
.vc-prop input[type="number"], .vc-prop select {
  width: 100%; border: 1px solid #cdd8e4; border-radius: 8px; padding: 6px 8px; font-size: 13px; font-family: inherit;
}
.vc-prop input[type="range"] { width: 100%; accent-color: var(--vc-accent); }
.vc-prop-btns { display: flex; gap: 6px; margin-top: 10px; }
.vc-prop-btns .vc-btn { flex: 1; }

/* ---------- задание ---------- */
.vc-task-desc { font-size: 13px; line-height: 1.5; background: #eef5ff; border: 1px solid #c3d9fb; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.vc-task-step { font-size: 12.5px; padding: 4px 2px 4px 6px; border-left: 3px solid #bfd6f8; margin: 4px 0; color: #3c4a5a; }
.vc-task-hint { font-size: 12px; color: #92660a; background: #fff8e1; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 8px; margin-top: 8px; }
.vc-task-hint2 { font-size: 12px; color: #92660a; background: #fff8e1; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.vc-task-res { margin-top: 8px; }
.vc-chk-row { font-size: 12.5px; padding: 4px 6px; border-radius: 7px; margin-bottom: 4px; }
.vc-chk-row.ok { background: #e9f9ef; color: #157347; }
.vc-chk-row.bad { background: #fdecec; color: #b32d2e; }
.vc-task-win {
  font-size: 14px; font-weight: 800; color: #157347; background: #d9f5e5;
  border: 1px solid #8edcb4; border-radius: 10px; padding: 10px; margin-top: 8px; text-align: center;
  animation: vcpop .35s;
}
@keyframes vcpop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- график ---------- */
.vc-chart { width: 100%; background: #fbfdff; border: 1px solid #e2e9f2; border-radius: 10px; margin-top: 6px; }
.vc-chart-sel label.vc-chk { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 4px 0; cursor: pointer; }
.vc-chart-ctl { display: flex; gap: 6px; margin-top: 6px; }
.vc-chart-legend { font-size: 11.5px; margin-top: 4px; line-height: 1.6; }

/* ---------- мои работы ---------- */
.vc-my {
  position: absolute; top: 52px; right: 270px; width: 270px; max-height: 340px; overflow-y: auto;
  background: #fff; border: 1px solid #cdd8e4; border-radius: 12px; z-index: 30;
  box-shadow: 0 10px 30px rgba(30, 50, 90, .18);
}
.vc-my.hidden { display: none; }
.vc-my-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: 8px 10px; border-bottom: 1px solid #e6edf5; }
.vc-x { border: 0; background: none; font-size: 18px; cursor: pointer; color: #8a97a8; }
.vc-my-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid #f0f4f9; font-size: 13px; }
.vc-my-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vclr-loading { padding: 30px; text-align: center; color: #7c8797; }
.vc-clear { clear: both; }

/* ---------- админка ---------- */
.vclr-cards { display: flex; gap: 10px; margin: 14px 0 20px; }
.vclr-card { background: #fff; border: 1px solid #dcdcde; border-left: 4px solid #2271b1; border-radius: 8px; padding: 12px 16px; min-width: 130px; }
.vclr-card b { display: block; font-size: 26px; line-height: 1.1; }
.vclr-card span { color: #646970; }
.vclr-card.ok { border-left-color: #0a7d32; }
.vclr-badge { background: #2271b1; color: #fff; font-size: 11px; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .vc-root { flex-wrap: wrap; }
  .vc-palette { width: 100%; flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; }
  .vc-pal-group { min-width: 120px; }
  .vc-side { width: 100%; flex: 1 1 100%; }
  .vc-my { right: 10px; }
}
