/* ============================================================
   VictoAI · COMPONENTS
   Кнопки, чипы, поля, селект, карточки, модалки, тосты,
   скелетоны, навигация, табы, сегменты.
   ============================================================ */

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap: var(--sp-2);
  padding: 10px 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--bg-card);
  color: var(--text);
  font-size: var(--fs-sm); font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              transform var(--dur-1) var(--ease),
              box-shadow var(--dur-2) var(--ease);
}
.btn:hover{ background: var(--bg-card-2); }
.btn:active{ transform: translateY(1px); }
.btn .icon{ width: 16px; height: 16px; stroke-width: 1.8; flex-shrink:0; }

.btn.ghost{ background: transparent; border-color: var(--border); }
.btn.ghost:hover{ border-color: var(--border-strong); background: var(--bg-card); }

.btn.primary{
  background: var(--accent);
  color: #fff; font-weight: 600;
  text-shadow: 0 1px 0 rgba(50,18,0,0.30);
  box-shadow:
    inset 0 1px 0 oklch(0.88 0.13 62),
    inset 0 -1px 0 oklch(0.55 0.18 40),
    var(--glow);
}
.btn.primary:hover{ background: var(--accent-hi); box-shadow: inset 0 1px 0 oklch(0.90 0.12 64), inset 0 -1px 0 oklch(0.57 0.18 40), 0 12px 38px var(--accent-soft); }
.btn.primary:active{ background: var(--accent-deep); }

.btn.danger{
  background: var(--danger); color:#fff; font-weight: 600;
  box-shadow: var(--sh-1);
}
.btn.danger:hover{ filter: brightness(1.08); }
.btn.danger.ghost{
  background: var(--danger-soft); color: var(--danger);
  border-color: color-mix(in oklab, var(--danger), transparent 60%);
  text-shadow:none; box-shadow:none;
}
.btn.danger.ghost:hover{ background: color-mix(in oklab, var(--danger), transparent 78%); }

.btn.sm{ padding: 7px 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn.lg{ padding: 14px 24px; font-size: var(--fs-base); border-radius: var(--r-lg); }
.btn.block{ width: 100%; }
.btn[disabled],.btn:disabled{ opacity: 0.5; pointer-events: none; }

/* плоский primary в шапке: без двойных inset-линий */
.btn.primary.sm{ text-shadow:none; box-shadow: 0 5px 16px var(--accent-soft); }

/* ---------- CHIPS / BADGES ---------- */
.chip{
  display:inline-flex; align-items:center; gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-xs); white-space: nowrap;
}
.chip.accent{ background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip.success{ color: var(--success); border-color: color-mix(in oklab,var(--success),transparent 66%); background: var(--success-soft); }
.chip.warn{ color: var(--warn); border-color: color-mix(in oklab,var(--warn),transparent 66%); background: var(--warn-soft); }
.chip.danger{ color: var(--danger); border-color: color-mix(in oklab,var(--danger),transparent 60%); background: var(--danger-soft); }
.chip .dot{ width:6px; height:6px; border-radius:50%; background: currentColor; flex-shrink:0; }
.chip .dot.live{ background: var(--success); animation: va-pulse-ring 2s var(--ease) infinite; }

.badge{
  display:inline-flex; align-items:center; gap: 5px;
  padding: 3px 8px; border-radius: var(--r-xs);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  background: var(--bg-card-2); border: 1px solid var(--border); color: var(--text-muted);
}
.badge.accent{ background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* ---------- INPUTS / FIELDS ---------- */
.field{ display:flex; flex-direction: column; gap: 6px; }
.field > label{
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-faint); font-weight: 500;
}
.input,
.field input,
.field textarea{
  width: 100%;
  font: inherit; font-size: var(--fs-sm); color: var(--text);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px;
  outline: none;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.input::placeholder,
.field input::placeholder,
.field textarea::placeholder{ color: var(--text-faint); }
.input:focus,
.field input:focus,
.field textarea:focus{
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--bg-card);
}
.field textarea{ resize: none; min-height: 110px; line-height: 1.55; }
.field .hint{ font-size: var(--fs-xs); color: var(--text-faint); }
.field .err{ font-size: var(--fs-xs); color: var(--danger); }
.field.invalid input,.field.invalid textarea{ border-color: var(--danger); }

/* поле с иконкой (например пароль/поиск) */
.input-group{ position: relative; display:flex; align-items:center; }
.input-group .input{ padding-right: 42px; }
.input-group .trail{
  position:absolute; right: 6px;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display:grid; place-items:center; cursor:pointer;
  color: var(--text-faint); background: transparent; border: 0;
}
.input-group .trail:hover{ color: var(--text); background: var(--bg-card-2); }
.input-group .trail svg{ width:16px; height:16px; }

/* ---------- CUSTOM SELECT (.vsel) ---------- */
.vsel{ position: relative; }
.vsel-btn{
  width: 100%;
  display:flex; align-items:center; justify-content: space-between; gap: 10px;
  padding: 11px 13px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text); font-size: var(--fs-sm);
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.vsel-btn:hover{ border-color: var(--border-strong); }
.vsel.open .vsel-btn{ border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.vsel-btn .val{ display:flex; align-items:center; gap: 9px; min-width:0; }
.vsel-btn .val .swatch{ width:18px; height:18px; border-radius: 5px; background: var(--bg-card-2); border:1px solid var(--border); flex-shrink:0; display:grid; place-items:center; color: var(--accent); }
.vsel-btn .val .swatch svg{ width:12px; height:12px; }
.vsel-btn .caret{ width:16px; height:16px; color: var(--text-faint); transition: transform var(--dur-2) var(--ease); flex-shrink:0; }
.vsel.open .vsel-btn .caret{ transform: rotate(180deg); }
.vsel-menu{
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--sh-3);
  display: none;
  max-height: 280px; overflow-y: auto;
  transform-origin: top;
  animation: va-scale-in var(--dur-2) var(--ease-out);
}
.vsel.open .vsel-menu{ display: block; }
.vsel-opt{
  display:flex; align-items:center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--text-muted); font-size: var(--fs-sm);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.vsel-opt:hover{ background: var(--bg-card-2); color: var(--text); }
.vsel-opt[aria-selected="true"]{ color: var(--text); }
.vsel-opt[aria-selected="true"] .check{ opacity:1; }
.vsel-opt .meta{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.vsel-opt .price-tag{ font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.vsel-opt .check{ width:16px; height:16px; color: var(--accent); opacity:0; flex-shrink:0; }
.vsel-opt .ico{ width:20px;height:20px;border-radius:5px;background:var(--bg-card-2);border:1px solid var(--border);display:grid;place-items:center;color:var(--accent);flex-shrink:0; }
.vsel-opt .ico svg{ width:12px;height:12px; }

/* ---------- SEGMENTED / TABS / SWITCH ---------- */
.seg{
  display:inline-flex; gap: 3px; padding: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.seg button{
  padding: 8px 16px; border-radius: var(--r-pill);
  background: transparent; border: 0;
  color: var(--text-muted); font-size: var(--fs-sm); cursor: pointer;
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.seg button:hover{ color: var(--text); }
.seg button[aria-selected="true"],
.seg button.active{
  background: var(--bg-card-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.toggle{
  position: relative; width: 42px; height: 24px; flex-shrink:0;
  border-radius: var(--r-pill);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  cursor: pointer; padding: 0;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.toggle::after{
  content:""; position:absolute; top:2px; left:2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--dur-2) var(--ease-spring), background var(--dur-2) var(--ease);
}
.toggle[aria-pressed="true"]{ background: var(--accent); border-color: var(--accent); }
.toggle[aria-pressed="true"]::after{ transform: translateX(18px); background:#fff; }

/* ---------- CARDS ---------- */
.card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}
.card.hover{ transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.card.hover:hover{ transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--sh-2); }

/* tool/feature card with icon */
.feature{
  position: relative;
  display:flex; flex-direction: column;
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  min-height: 220px;
  text-decoration:none; color: var(--text);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.feature::before{
  content:""; position:absolute; inset:0;
  background: radial-gradient(420px 180px at 80% -10%, var(--accent-soft), transparent 70%);
  opacity:0; transition: opacity var(--dur-3) var(--ease);
  pointer-events:none;
}
.feature:hover{ transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--sh-2); }
.feature:hover::before{ opacity:1; }
.feature .ic{
  width: 46px; height: 46px; border-radius: var(--r-md);
  display:grid; place-items:center;
  background: var(--bg-card-2); border:1px solid var(--border);
  color: var(--accent); margin-bottom: auto;
  transition: transform var(--dur-3) var(--ease-spring);
}
.feature:hover .ic{ transform: translateY(-2px) rotate(-3deg); }
.feature .ic svg{ width: 21px; height:21px; stroke-width:1.6; }
.feature h3{ font-size: var(--fs-h3); font-weight: 500; margin: 18px 0 5px; letter-spacing:-0.015em; }
.feature p{ font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.feature .arrow{
  position:absolute; top: 22px; right: 22px;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display:grid; place-items:center; color: var(--text-faint);
  border: 1px solid transparent;
  transition: color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.feature:hover .arrow{ color: var(--accent); transform: translate(2px,-2px); border-color: var(--accent-line); }

/* metric / stat tile */
.metric{
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
}
.metric .k{ font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.metric .v{ font-family: var(--font-mono); font-size: 30px; margin-top: 6px; letter-spacing: -0.02em; }
.metric .delta{ font-size: var(--fs-xs); margin-top: 4px; color: var(--text-muted); }
.metric .delta.up{ color: var(--success); }
.metric .delta.down{ color: var(--danger); }

/* ---------- SKELETON / SPINNER / PROGRESS ---------- */
.skeleton{
  background: linear-gradient(90deg,
    var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: va-shimmer 1.5s linear infinite;
  border-radius: var(--r-sm);
}
.spinner{
  width: 18px; height: 18px; flex-shrink:0;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: va-spin 0.8s linear infinite;
}
.progress{ height: 6px; border-radius: var(--r-pill); background: var(--bg-card-2); overflow:hidden; }
.progress > i{ display:block; height:100%; background: var(--grad-warm); border-radius:inherit; transform-origin:left; }

/* ---------- TOAST ---------- */
.toast-stack{
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display:flex; flex-direction: column; gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.toast{
  pointer-events: auto;
  display:flex; align-items:flex-start; gap: 11px;
  padding: 13px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  animation: va-fade-up var(--dur-3) var(--ease-out);
}
.toast .ti{ width:20px; height:20px; flex-shrink:0; margin-top:1px; color: var(--accent); }
.toast.success .ti{ color: var(--success); }
.toast.danger .ti{ color: var(--danger); }
.toast .body{ min-width:0; }
.toast .body b{ display:block; font-weight: 600; font-size: var(--fs-sm); }
.toast .body span{ font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- MODAL (dialog) ---------- */
dialog.vmodal{
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  background: var(--bg-card);
  color: var(--text);
  padding: 0;
  max-width: 560px; width: calc(100% - 32px);
  box-shadow: var(--sh-4);
}
dialog.vmodal::backdrop{
  background: color-mix(in oklab, var(--bg) 50%, rgba(0,0,0,0.7));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
dialog.vmodal[open]{ animation: va-scale-in var(--dur-3) var(--ease-out); }
.vmodal-head{
  display:flex; justify-content:space-between; align-items:flex-start; gap:16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.vmodal-head h3{ margin:0; font-size: var(--fs-h3); font-weight: 600; letter-spacing:-0.015em; }
.vmodal-head .sub{ color: var(--text-muted); font-size: var(--fs-sm); margin-top: 4px; }
.vmodal-close{
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--bg-elev); border:1px solid var(--border);
  color: var(--text-muted); cursor:pointer; display:grid; place-items:center;
  flex-shrink:0;
}
.vmodal-close:hover{ color: var(--text); border-color: var(--border-strong); }
.vmodal-body{ padding: 20px 24px; max-height: 60vh; overflow-y:auto; }
.vmodal-foot{
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display:flex; justify-content:flex-end; gap: 10px;
}

/* ---------- TABLE / LEDGER ---------- */
.vtable{ width:100%; border-collapse: collapse; font-size: var(--fs-sm); }
.vtable th{
  text-align:left; padding: 11px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.vtable td{ padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.vtable tr:last-child td{ border-bottom: 0; }
.vtable tbody tr{ transition: background var(--dur-1) var(--ease); }
.vtable tbody tr:hover td{ background: var(--bg-elev); }
.vtable .num{ font-family: var(--font-mono); text-align:right; }
.vtable .num.pos{ color: var(--success); }
.vtable .num.neg{ color: var(--danger); }

/* ---------- FAQ ---------- */
.faq-item{ border-top: 1px solid var(--border); }
.faq-item:last-child{ border-bottom: 1px solid var(--border); }
.faq-q{
  display:flex; justify-content:space-between; align-items:center; gap: 16px;
  padding: 18px 0; cursor:pointer; user-select:none;
  font-size: var(--fs-lg); font-weight: 500; letter-spacing:-0.01em;
}
.faq-q .pls{
  width: 26px; height: 26px; border-radius: 50%; flex-shrink:0;
  background: var(--bg-card-2); border:1px solid var(--border);
  display:grid; place-items:center; color: var(--text-muted); font-size: 15px;
  transition: transform var(--dur-3) var(--ease-spring), color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.faq-item.open .faq-q .pls{ transform: rotate(135deg); color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.faq-a{
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-3) var(--ease);
}
.faq-item.open .faq-a{ grid-template-rows: 1fr; }
.faq-a > div{ overflow: hidden; }
.faq-a p{ margin: 0 0 18px; color: var(--text-muted); font-size: var(--fs-sm); max-width: 62ch; }

/* ---------- ФИРМЕННЫЙ ЛОГОТИП (va-mono): оранжевая V + светлая A на тёмной плашке ---------- */
.va-mono{ display: block; width: 64%; height: 64%; }
.mark:has(.va-mono){
  background: var(--bg-card-2) !important;
  background-image: none !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

/* ---------- LEDGER (история списаний кредитов) ---------- */
.ledger-filters{ display:flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ledger-summary{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.ledger-summary:empty{ display: none; }
.lt-card{ padding: 12px 14px; border:1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); min-width: 0; }
.lt-card .k{ font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.lt-card .v{ font-family: var(--font-mono); font-size: 18px; margin-top: 4px; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.lt-card .v.pos{ color: var(--success); }
.lt-card .v.neg{ color: var(--danger); }
.lt-card .v small{ font-size: 11px; color: var(--text-faint); font-weight: 400; }

.ledger-list{ list-style: none; padding: 0; margin: 0; max-height: 52vh; overflow-y: auto; }
.ledger-item{
  display:flex; align-items:center; justify-content:space-between; gap: 14px;
  padding: 12px 2px; border-top: 1px solid var(--border);
}
.ledger-item:first-child{ border-top: 0; }
.ledger-main{ min-width: 0; }
.ledger-label{ font-size: var(--fs-sm); color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.ledger-when{ font-size: var(--fs-xs); color: var(--text-faint); font-family: var(--font-mono); margin-top: 2px; }
.ledger-amount{ font-family: var(--font-mono); font-size: var(--fs-sm); flex-shrink: 0; }
@media (max-width: 480px){ .ledger-summary{ grid-template-columns: 1fr; } }

/* ---------- VICTO-MODAL (модалки app-страниц: переименовать/удалить и т.д.) ---------- */
.victo-modal-backdrop{
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in oklab, var(--bg) 55%, rgba(0,0,0,.55));
  backdrop-filter: blur(8px) saturate(140%); -webkit-backdrop-filter: blur(8px) saturate(140%);
  display:flex; align-items:center; justify-content:center; padding: 18px;
}
.victo-modal{
  background: var(--bg-card); border:1px solid var(--border); border-radius: var(--r-xl);
  padding: 22px 24px; width: min(440px, 100%);
  max-height: calc(100dvh - 36px); overflow-y:auto;
  box-shadow: var(--sh-3); animation: va-fade var(--dur-2) var(--ease);
}
.victo-modal h3{ margin: 0 0 6px; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.01em; }
.victo-modal .desc{ color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 14px; }
.victo-modal input[type="text"], .victo-modal input:not([type]){
  width: 100%; box-sizing: border-box;
  background: var(--bg-elev); border:1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: var(--r-md); font: inherit; font-size: var(--fs-md); outline: none;
}
.victo-modal input:focus{ border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.victo-modal .count{ font-size: 11px; color: var(--text-faint); text-align: right; margin: 6px 0 16px; font-family: var(--font-mono); }
.victo-modal .actions{ display:flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- image lightbox: карточка промпта ---- */
.victo-modal.img-modal{ width: min(640px, 100%); }
.img-prompt-card{
  background: var(--bg-inset); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px;
}
.img-prompt-head{
  display:flex; align-items:center; justify-content:space-between; gap: 10px; margin-bottom: 8px;
}
.img-prompt-head > span{
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-faint); font-weight: 500;
}
.img-prompt-copy{
  display:inline-flex; align-items:center; gap: 6px; flex-shrink: 0;
  padding: 5px 10px; border-radius: var(--r-sm);
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.img-prompt-copy:hover{ color: var(--text); border-color: var(--border-strong); }
.img-prompt-copy.ok{ color: var(--success); border-color: var(--success); }
.img-prompt-copy svg{ flex-shrink: 0; }
.img-prompt-body{
  font-size: 13px; line-height: 1.55; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  max-height: 124px; overflow-y: auto;
}

/* ---------- ДИНАМИЧЕСКИЙ .vsel (из нативного select[data-vsel]) ---------- */
.vsel .vsel-native{ display: none !important; }
.vsel-dyn{ display: inline-block; }
.vsel-dyn .vsel-btn{ width: 100%; }
.vsel-dyn .vsel-btn .val{ overflow: hidden; }
.vsel-dyn .vsel-btn .cur{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsel-dyn .vsel-opt .vlbl{ flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsel-dyn .vsel-opt .check{ width: 15px; height: 15px; color: var(--accent); opacity: 0; flex-shrink: 0; }
.vsel-dyn .vsel-opt[aria-selected="true"]{ color: var(--text); background: var(--accent-soft); }
.vsel-dyn .vsel-opt[aria-selected="true"] .check{ opacity: 1; }
.vsel-dyn .vsel-opt.is-disabled{ opacity: .5; cursor: default; }
.vsel-dyn .vsel-opt.is-disabled:hover{ background: transparent; }
.vsel-dyn .vsel-opt .lock{ font-size: 12px; line-height: 1; opacity: .8; }
/* цена в свёрнутой кнопке (вместо значка модели) */
.vsel-dyn .vsel-btn .val{ flex: 1 1 auto; }
.vsel-dyn .vsel-btn .cur-price{
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  flex-shrink: 0; white-space: nowrap;
}
/* мобилка: меню модели подгоняется под содержимое (а не под узкую кнопку),
   чтобы названия не схлопывались в «G», «Gr»… Привязано к правому краю — остаётся на экране. */
@media (max-width: 720px){
  .vsel-dyn .vsel-menu{
    left: auto; right: 0;
    width: max-content;
    min-width: 100%;
    max-width: 80vw;
  }
  .vsel-dyn .vsel-opt{ gap: 14px; }
  .vsel-dyn .vsel-opt .vlbl{ flex: 0 0 auto; overflow: visible; text-overflow: clip; }
}

/* ---------- ВЛОЖЕНИЯ ЧАТА (миниатюры + зум) ---------- */
.att-thumb{
  position: relative; width: 56px; height: 56px; flex-shrink: 0;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border); cursor: zoom-in;
}
.att-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb .file-ico{ width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:4px; text-align:center; cursor:default; }
.att-thumb .file-ico .ext{ font-family: var(--font-mono); font-size: 11px; font-weight:600; color: var(--accent); }
.att-thumb .file-ico .nm{ font-size: 8px; color: var(--text-faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.att-thumb .num{ position:absolute; bottom:2px; left:2px; background: rgba(0,0,0,.6); color:#fff; font-size:9px; font-weight:600; padding:0 5px; border-radius:5px; font-family: var(--font-mono); }
.att-thumb .rm{
  position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%;
  background: rgba(0,0,0,.7); color:#fff; border:0; cursor:pointer;
  font-size:12px; line-height:1; padding:0; display:flex; align-items:center; justify-content:center;
}
.att-thumb .rm:hover{ background: var(--danger); }

.att-zoom-back{
  position: fixed; inset: 0; z-index: 210;
  background: rgba(0,0,0,.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items:center; justify-content:center; padding: 24px;
}
.att-zoom-back.open{ display: flex; }
.att-zoom{ position: relative; max-width: min(92vw, 1000px); max-height: 88vh; display:flex; flex-direction:column; gap: 10px; }
.att-zoom img{ max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--r-md); border:1px solid var(--border); background: var(--bg); }
.att-zoom .name{ text-align:center; color: var(--text-muted); font-size: var(--fs-sm); }
.att-zoom-close{
  position:absolute; top:-8px; right:-8px; width:34px; height:34px; border-radius:50%;
  background: var(--bg-card); border:1px solid var(--border); color: var(--text); cursor:pointer;
  font-size:18px; line-height:1; display:grid; place-items:center; z-index:1;
}
.att-zoom-close:hover{ background: var(--bg-card-2); }
