:root {
  /* Violet Night */
  --bg: #f4f2fa;
  --surface: #ffffff;
  --surface-2: #f8f6fd;
  --line: #e6e1f3;
  --line-strong: #d8d1ec;
  --text: #17142b;
  --text-2: #534d70;
  --text-3: #736d90;
  --label: #6a6488;
  --side: #17142b;
  --side-2: #2a2548;
  --side-text: #eeeaff;
  --side-muted: #9a94bb;
  --lime: #8b5cf6;          /* акцент (історична назва змінної) */
  --lime-strong: #7c4dff;
  --lilac: #e9defe;
  --lilac-text: #c9b3ff;
  --green: #5b2fd6;         /* посилання й активні елементи */
  --ok-bg: #e3f4ea;
  --ok: #1c6e42;
  --warn-bg: #fbf0d9;
  --warn: #9a6a0b;
  --bad-bg: #fbe5e0;
  --bad: #b2452f;
  --info-bg: #ede4ff;
  --info: #5b2fd6;
  --muted-bg: #efedf5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 20, 43, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- каркас ---------- */
.layout { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 300px, var(--bg) 300px); }
.sidebar {
  background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; padding: 28px 18px 22px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 14px; padding: 0 18px 34px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 13px; background: var(--lime);
  display: grid; place-items: center; color: #ffffff; flex: none;
}
.brand-name { font-family: "Sora", "Manrope", sans-serif; font-weight: 800; letter-spacing: .02em; font-size: 17px; }
.brand-sub { font-size: 11px; letter-spacing: .14em; color: var(--side-muted); text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; position: relative; }
/* підкладка, що плавно переїжджає за курсором */
.nav-pill { position: absolute; left: 0; right: 0; top: 0; height: 0; border-radius: 12px; background: rgba(255,255,255,.06);
  opacity: 0; pointer-events: none; z-index: 0;
  transition: top .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.nav:hover .nav-pill.ready { opacity: 1; }
.nav a {
  display: flex; align-items: center; gap: 16px; padding: 11px 20px; border-radius: 12px; z-index: 1;
  color: var(--side-text); font-size: 18px; font-weight: 600; position: relative;
  border: 1px solid transparent; transition: background .15s;
}
.nav a svg { width: 22px; height: 22px; color: #8d87ae; transition: color .15s; }
.nav a { transition: background .3s, border-color .3s; }
.nav a:hover svg, .nav a.active svg { color: var(--lilac-text); }
.nav a.active { background: var(--side-2); border-color: rgba(255,255,255,.75); }
.nav a.active::before {
  content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--lime);
}
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 22px 18px 0; }
.side-foot .ws { font-size: 13px; font-weight: 800; letter-spacing: .1em; display: flex; align-items: center; gap: 10px; }
.side-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.side-foot .dot.off { background: #e0a243; }
.side-foot .meta { font-size: 11.5px; color: var(--side-muted); margin-top: 6px; }

.main-wrap { position: relative; min-width: 0; }
.main { padding: 40px 56px 64px; min-width: 0; }
.top-bar { position: absolute; top: 30px; right: 56px; z-index: 5; display: flex; align-items: center; gap: 10px; }
.bal-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 16px; border-radius: 999px;
  background: var(--side); color: #fff; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; transition: background .15s; }
.bal-chip:hover { background: #2a2548; }
.bal-chip-lbl { font-size: 12px; font-weight: 600; color: var(--side-muted); }
.bal-chip b { font-size: 15px; font-weight: 800; color: var(--lilac-text); font-variant-numeric: tabular-nums; }
.bal-chip.low b { color: #ffb38a; }
.bal-chip-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(201,179,255,.18); color: var(--lilac-text); }
.bal-chip:focus-visible { outline: 2px solid var(--lime-strong); outline-offset: 2px; }
.cur-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow);
}
.cur-toggle button {
  border: 0; background: none; padding: 6px 13px; border-radius: 999px; font-weight: 700; font-size: 13px;
  color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; white-space: nowrap;
}
.cur-toggle button:hover:not(:disabled):not(.on) { color: var(--text); background: var(--surface-2); }
.cur-toggle button.on { background: var(--side); color: #fff; }
.cur-toggle button:disabled { opacity: .45; cursor: not-allowed; }
.cur-toggle button:focus-visible { outline: 2px solid var(--lime-strong); outline-offset: 1px; }
.crumbs { font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--label); text-transform: uppercase; }
.crumbs a:hover { color: var(--green); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 14px 0 34px; flex-wrap: wrap; }
.page-head h1 { font-size: 38px; line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.page-head .sub { color: var(--text-2); margin-top: 12px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(23,20,43,.12); }
.btn:not(.btn-primary):not(.btn-danger-solid):hover:not(:disabled) { border-color: #cfc6ea; background: #fcfbff; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 20px rgba(139,92,246,.35); }
.btn:active:not(:disabled) { transform: translateY(0); box-shadow: 0 2px 6px rgba(23,20,43,.1); }
@media (prefers-reduced-motion: reduce) { .btn, .nav-pill, .nav a { transition: none; } .btn:hover:not(:disabled) { transform: none; } }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--lime); border-color: var(--lime); color: #ffffff; }
.btn-primary:hover { background: var(--lime-strong); border-color: var(--lime-strong); }
.btn-danger { color: var(--bad); }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--green); font-weight: 700; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- картки і статистика ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 32px; }
.stat { padding: 14px 16px 15px; min-height: 0; border-radius: 14px; }
.stat .k { font-size: 12.5px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.stat .v { font-size: 23px; font-weight: 800; margin-top: 6px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .v.ok { color: var(--ok); }
.stat .v .uah { display: block; font-size: 16px; font-weight: 700; color: var(--text-2); margin-top: 4px; letter-spacing: 0; }
.stat .v.bad { color: #c46c3f; }
.stat .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.panel { padding: 30px 30px 26px; margin-bottom: 30px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.panel-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.panel-head .sub { color: var(--text-2); margin-top: 6px; font-size: 14px; }

/* ---------- таблиці ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
thead th {
  background: var(--surface-2); text-align: left; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2); font-weight: 800; padding: 16px 18px; white-space: nowrap;
}
tbody td { padding: 20px 18px; border-top: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: #fbfbf9; }
td.name { font-weight: 700; white-space: normal; min-width: 200px; }
td.num { font-variant-numeric: tabular-nums; }
.empty { padding: 48px 20px; text-align: center; color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- статуси ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; background: var(--muted-bg); color: var(--text-2); white-space: nowrap;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill .spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { padding: 14px 18px; border-radius: 12px; margin-bottom: 24px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.info { background: var(--info-bg); color: var(--info); }

/* ---------- галерея ---------- */
.product-block { padding: 26px 28px 28px; margin-bottom: 26px; }
.product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.product-head h3 { margin: 0; font-size: 20px; font-weight: 700; }
.product-head .sub { color: var(--text-3); margin-top: 4px; font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.shot.original { background: var(--surface-2); }
.shot .img {
  aspect-ratio: var(--ar, 1/1); background: #f1f2ee center/cover no-repeat; position: relative; display: grid; place-items: center;
}
.shot .img img { width: 100%; height: 100%; object-fit: cover; }
.shot.original .img img { object-fit: contain; }
.shot .img .placeholder { color: var(--text-3); font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.shot .img .placeholder .spin { width: 22px; height: 22px; border: 3px solid #cfd5c9; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; }
.shot .review-badge { position: absolute; top: 10px; left: 10px; }
.shot .body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.shot .title { font-weight: 800; font-size: 15.5px; }
.shot .title .seq { color: var(--text-3); font-weight: 700; }
.shot .shot-name { color: var(--text-3); font-size: 13.5px; margin-top: -6px; }
.shot details summary { cursor: pointer; font-size: 17px; list-style: none; display: flex; gap: 8px; align-items: center; }
.shot details summary::-webkit-details-marker { display: none; }
.shot details summary::before { content: "▶"; font-size: 12px; transition: transform .15s; }
.shot details[open] summary::before { transform: rotate(90deg); }
.shot details pre {
  white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--surface-2); padding: 10px; border-radius: 8px;
  margin: 10px 0 0; max-height: 260px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.shot .meta { font-size: 13px; color: var(--text-3); }
.shot .err { font-size: 13px; color: var(--bad); }
.shot .actions { border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.act { background: none; border: 0; padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left; white-space: nowrap; }
.act:hover { color: var(--text); }
.act svg { width: 15px; height: 15px; }
.act.on-ok { color: var(--ok); }
.act.on-bad { color: var(--bad); }
.act:disabled { opacity: .4; cursor: default; }

/* ---------- товари ---------- */
.toolbar { display: flex; gap: 12px; margin-bottom: 24px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.pcard { overflow: hidden; cursor: pointer; transition: transform .15s; }
.pcard:hover { transform: translateY(-2px); }
.pcard .img { aspect-ratio: 1/1; background: var(--surface-2); }
.pcard .img img { width: 100%; height: 100%; object-fit: contain; }
.pcard .body { padding: 14px 16px 16px; }
.pcard .name { font-weight: 800; }
.pcard .meta { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ---------- форми ---------- */
.field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 16px;
  background: var(--surface); font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 84px; padding: 12px 16px; resize: vertical; font-weight: 500; }
select.input {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231a1f1c' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
.input.sm { height: 38px; border-radius: 10px; padding: 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 22px; }
.form-grid .full { grid-column: 1 / -1; }
.help { font-size: 12.5px; color: var(--text-3); margin-top: 8px; }

.dropzone {
  border: 1.5px dashed #c5d1bc; border-radius: 14px; background: var(--surface-2); padding: 30px 20px 28px; text-align: center;
  transition: background .15s, border-color .15s;
}
.dropzone.drag { background: #eef5dc; border-color: #9fb88f; }
.dropzone svg { width: 34px; height: 34px; color: #4f6d58; }
.dropzone .t { font-weight: 800; margin-top: 10px; }
.dropzone .s { font-size: 13px; color: var(--text-3); margin: 6px 0 16px; }
.file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin-top: 16px; text-align: left; }
.file-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.file-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.file-item .n { font-size: 11px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.estimate { background: var(--surface-2); border-radius: 12px; padding: 14px 18px; font-size: 14px; color: var(--text-2); }
.estimate b { color: var(--text); }

/* ---------- модалка ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(28, 38, 32, .55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--surface); border-radius: 18px; width: min(1060px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-head { padding: 22px 36px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head .eyebrow { font-size: 13px; letter-spacing: .1em; font-weight: 800; color: var(--label); text-transform: uppercase; }
.modal-head h2 { margin: 8px 0 0; font-size: 26px; font-weight: 700; }
.modal-x { border: 0; background: none; font-size: 26px; color: var(--text-3); cursor: pointer; line-height: 1; padding: 6px; }
.modal-body { padding: 30px 36px; overflow-y: auto; }
.modal-foot { padding: 22px 36px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- інше ---------- */
.models-table td { white-space: normal; vertical-align: top; }
.models-table tbody tr { cursor: default; }
.models-table code { font-size: 12.5px; background: var(--surface-2); padding: 3px 6px; border-radius: 6px; }
.switch { position: relative; width: 44px; height: 26px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d5d9d0; border-radius: 26px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(18px); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 12px 16px; font-size: 14px; margin: 6px 0 20px; }
.kv dt { color: var(--text-3); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; word-break: break-all; }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--side); padding: 20px; }
.login .card { width: min(420px, 100%); padding: 36px; }
.login .brand { padding: 0 0 26px; color: var(--text); }
.login .brand-sub { color: var(--text-3); }

#toast-root { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: var(--side); color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: 420px; animation: up .2s ease-out; }
.toast.bad { background: #8f3424; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }


@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: static; height: auto; padding: 14px 16px; flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; }
  .brand { padding: 0 10px 0 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-text, .side-foot { display: none; }
  .nav { flex-direction: row; }
  .nav a { padding: 10px 14px; font-size: 15px; }
  .nav a.active::before { display: none; }
  .nav-pill { display: none; }
  .main { padding: 26px 16px 48px; }
  .main-wrap { display: flex; flex-direction: column; }
  .top-bar { position: static; align-self: flex-end; margin: 14px 16px -12px 0; flex-wrap: wrap; justify-content: flex-end; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .settings-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .product-head { flex-wrap: wrap; }
  .product-head > div:first-child { min-width: 0; flex: 1 1 200px; }
  .product-head h3 { overflow-wrap: anywhere; }
  .page-head h1 { font-size: 30px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 20px; padding-right: 20px; }
}

/* ---------- діалоги ---------- */
.dialog-back { z-index: 60; }
.modal.dialog { width: min(520px, 100%); }
.modal.dialog .modal-head { padding: 22px 28px 18px; }
.modal.dialog .modal-head h2 { font-size: 22px; margin-top: 4px; }
.modal.dialog .modal-body { padding: 22px 28px; }
.modal.dialog .modal-foot { padding: 16px 28px; }
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-solid:hover { background: #9a3a26; border-color: #9a3a26; }

/* ---------- згортання пресетів ---------- */
.preset-tools { display: flex; gap: 18px; align-items: center; justify-content: flex-end; margin: -10px 0 14px; font-size: 14px; color: var(--text-3); }
.preset-tools span { margin-right: auto; }
.preset-card { margin-bottom: 14px; overflow: hidden; }
.preset-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; user-select: none; }
.preset-head:hover { background: #fbfbf9; }
.preset-head:focus-visible { outline: 2px solid var(--lime-strong); outline-offset: -2px; }
.preset-head .chev { width: 18px; height: 18px; flex: none; color: var(--text-3); transition: transform .18s; }
.preset-card.open .preset-head .chev { transform: rotate(90deg); }
.preset-title { min-width: 160px; }
.preset-title h3 { margin: 0; font-size: 18px; font-weight: 700; }
.preset-title .sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.preset-strip { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; overflow: hidden; }
.preset-strip img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.preset-strip .more { font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 12px 10px; flex: none; }
.preset-strip .empty-strip { font-size: 13px; color: var(--text-3); }
.preset-card .head-actions { margin-left: auto; flex: none; }
.preset-body { padding: 0 22px 22px; border-top: 1px solid var(--line); padding-top: 18px; }
@media (max-width: 1100px) {
  .preset-head { flex-wrap: wrap; }
  .preset-strip { order: 3; flex-basis: 100%; }
  .preset-card .head-actions { margin-left: 0; }
}

/* ---------- період статистики ---------- */
.range-wrap { position: relative; }
.range-btn svg { width: 17px; height: 17px; color: var(--green); }
.range-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: flex; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px;
  box-shadow: 0 20px 50px rgba(20, 30, 25, .18);
}
.range-pop[hidden] { display: none; }
.range-presets { display: flex; flex-direction: column; gap: 2px; padding-right: 10px; border-right: 1px solid var(--line); min-width: 150px; }
.range-presets button { text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2); white-space: nowrap; }
.range-presets button:hover { background: var(--surface-2); color: var(--text); }
.range-presets button.on { background: var(--side); color: #fff; }
.range-cal { padding: 2px 6px; width: 284px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { text-transform: capitalize; font-size: 15px; }
.cal-nav { border: 1px solid var(--line); background: var(--surface); width: 32px; height: 32px; border-radius: 9px; font-size: 18px; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-align: center; padding: 4px 0 6px; }
.cal-day { height: 36px; border: 0; background: none; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text); }
.cal-day:hover:not(:disabled) { background: var(--surface-2); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--lime-strong); }
.cal-day.in { background: #eef5dc; border-radius: 0; }
.cal-day.edge { background: var(--side); color: #fff; border-radius: 9px; }
.cal-day:disabled { color: #c5c9c2; cursor: default; }
.cal-hint { font-size: 12.5px; color: var(--text-3); margin-top: 8px; text-align: center; }
@media (max-width: 1100px) {
  .range-pop { right: auto; left: 0; flex-direction: column; }
  .range-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; min-width: 0; }
  .range-cal { width: min(284px, calc(100vw - 64px)); }
}

/* ---------- блоки пресетів ---------- */
.preset-section { margin-bottom: 8px; }
.section-head { display: flex; align-items: center; gap: 12px; padding: 10px 4px; margin-bottom: 12px; cursor: pointer; user-select: none; border-radius: 12px; }
.section-head:hover h2 { color: var(--green); }
.section-head:focus-visible { outline: 2px solid var(--lime-strong); }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.section-head .sub { color: var(--text-3); font-size: 13.5px; margin-top: 2px; }
.section-head .chev { width: 20px; height: 20px; flex: none; color: var(--text-3); transform: rotate(90deg); transition: transform .18s; }
.preset-section.closed .section-head .chev { transform: rotate(0deg); }
.preset-section.closed .section-head { border-bottom: 1px solid var(--line); border-radius: 0; padding-bottom: 16px; }

/* Формат: підказка з прямокутником пропорцій */
.ratio-help { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.ratio-help .ratio-box { flex: none; border: 2px solid var(--green); background: var(--lilac); border-radius: 4px; }
.ratio-help b { color: inherit; font-weight: 700; }

/* ---------- розмір карток галереї ---------- */
.size-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; }
.size-toggle > span { font-size: 13px; color: var(--text-3); font-weight: 600; padding: 0 8px 0 10px; }
.size-toggle button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--text-2); cursor: pointer; }
.size-toggle button:hover:not(.on) { background: var(--surface-2); color: var(--text); }
.size-toggle button.on { background: var(--side); color: #fff; }
.shot .status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }

/* Середні */
.product-block.size-m { padding: 20px 22px 22px; margin-bottom: 18px; }
.size-m .product-head { margin-bottom: 14px; }
.size-m .product-head h3 { font-size: 17px; }
.size-m .gallery { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.size-m .shot .body { padding: 12px 12px 10px; gap: 8px; }
.size-m .shot .title { font-size: 14px; }
.size-m .shot details summary { font-size: 14px; }
.size-m .act { font-size: 12.5px; }
.size-m .shot .actions { gap: 4px 12px; padding-top: 8px; }

/* Малі (компактно) */
.product-block.size-s { padding: 14px 16px 16px; margin-bottom: 14px; }
.size-s .product-head { margin-bottom: 10px; align-items: center; }
.size-s .product-head h3 { font-size: 15px; }
.size-s .product-head .sub { font-size: 12.5px; margin-top: 2px; }
.size-s .product-head .btn-sm { padding: 6px 11px; font-size: 12.5px; }
.size-s .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.size-s .shot { border-radius: 10px; }
.size-s .shot .body { padding: 8px 9px 7px; gap: 5px; }
.size-s .shot .title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-s .shot .shot-name { font-size: 11.5px; margin-top: -3px; }
.size-s .shot .shot-name img { width: 20px !important; height: 20px !important; }
.size-s .shot details summary { font-size: 12px; }
.size-s .shot details summary::before { font-size: 9px; }
.size-s .shot .pill { padding: 3px 8px; font-size: 11px; }
.size-s .shot .meta { font-size: 11px; }
.size-s .shot .err { font-size: 11.5px; }
.size-s .shot .img .placeholder { font-size: 11.5px; gap: 6px; }
.size-s .shot .img .placeholder .spin { width: 16px; height: 16px; border-width: 2px; }
.size-s .shot .review-badge { top: 6px; left: 6px; }
.size-s .shot .actions { padding-top: 6px; gap: 2px; justify-content: space-between; flex-wrap: nowrap; }
.size-s .act .lbl { display: none; }
.size-s .act { padding: 5px; border-radius: 6px; }
.size-s .act:hover:not(:disabled) { background: var(--surface-2); }
.size-s .act svg { width: 16px; height: 16px; }
.size-s .shot.original .body .shot-name { display: none; }

/* ---------- активна нейромережа ---------- */
.prov-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prov-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 16px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, background .15s; }
.prov-opt:hover:not(.on) { border-color: var(--text-3); }
.prov-opt.on { border-color: var(--green); background: #f6f1ff; box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
.prov-opt .radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: 2px; position: relative; }
.prov-opt.on .radio { border-color: var(--green); }
.prov-opt.on .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--green); }
.prov-opt .txt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.prov-opt .txt b { font-size: 16px; }
.prov-opt .txt small { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.prov-opt .pill { padding: 3px 9px; font-size: 11.5px; }
.side-foot .active-prov b { color: var(--lilac-text); }
@media (max-width: 900px) { .prov-choice { grid-template-columns: 1fr; } }

/* ---------- дії в рядку таблиці партій ---------- */
.row-acts { display: flex; gap: 6px; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover:not(.disabled) { color: var(--text); border-color: var(--text-3); background: var(--surface-2); }
.icon-btn.disabled { opacity: .35; cursor: default; }
button.icon-btn { cursor: pointer; padding: 0; font: inherit; }
.icon-btn.danger:hover { color: var(--bad); border-color: var(--bad); background: rgba(220, 60, 60, .07); }
/* таблиця партій — компактна, щоб уміщалася без прокрутки */
.batches-table { min-width: 0; }
.batches-table thead th { padding: 13px 10px; font-size: 11.5px; letter-spacing: .05em; }
.batches-table tbody td { padding: 14px 10px; }
.batches-table th:first-child, .batches-table td:first-child { padding-left: 16px; }
.batches-table th:last-child, .batches-table td:last-child { padding-right: 14px; }
.batches-table td.name { min-width: 150px; white-space: normal; }
.batches-table .num { text-align: right; }
.batches-table td.name .when { font-weight: 500; font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.batches-table .pill { padding: 5px 10px; font-size: 12px; }
@media (max-width: 1400px) {
  .batches-table thead th { padding: 12px 6px; font-size: 10.5px; letter-spacing: .02em; }
  .batches-table tbody td { padding: 12px 6px; font-size: 14px; }
  .batches-table td.name { min-width: 128px; }
  .batches-table .row-acts { gap: 4px; }
  .batches-table .icon-btn { width: 30px; height: 30px; }
}
@media (max-width: 1100px) { .batches-table { min-width: 820px; } }

/* артикул під фото товару */
.file-item .art { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 7px 8px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text); background: #fff; outline: none; }
.file-item .art:focus { background: #f6f1ff; box-shadow: inset 0 -2px 0 var(--lime-strong); }
.file-item .art::placeholder { color: var(--bad); font-weight: 600; }
.names-help { margin-top: 12px; font-size: 13px; color: var(--text-2); text-align: left; line-height: 1.5; }
.names-help #names-preview { margin-top: 4px; color: var(--text-3); font-size: 12.5px; word-break: break-word; }

/* ---------- сторінки ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 4px 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.pager-info { color: var(--text-3); font-size: 13.5px; font-weight: 600; min-width: 90px; }
.pager-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pg { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-weight: 700; font-size: 14px; color: var(--text-2); cursor: pointer; }
.pg:hover:not(:disabled):not(.on) { border-color: var(--text-3); color: var(--text); }
.pg.on { background: var(--side); border-color: var(--side); color: #fff; }
.pg:disabled { opacity: .35; cursor: default; }
.pg-gap { padding: 0 4px; color: var(--text-3); }
.pager-size { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.pager-size select { width: auto; padding: 7px 30px 7px 12px; min-height: 0; height: 36px; }
@media (max-width: 700px) { .pager { justify-content: center; } }

/* ---------- головна для гостей: вхід / реєстрація ---------- */
.landing { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.landing.single { grid-template-columns: 1fr; place-items: center; padding: 20px; background: var(--side); }
.landing-hero { background: var(--side); color: var(--side-text); padding: 56px clamp(28px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.landing-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.28), transparent 65%); pointer-events: none; }
.landing-hero .brand { padding: 0; position: absolute; top: 40px; left: clamp(28px, 6vw, 88px); }
.landing-hero h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; margin: 40px 0 0; letter-spacing: -.02em; font-weight: 800; }
.landing-hero p { font-size: 18px; line-height: 1.55; color: #c9c3e3; max-width: 520px; margin: 0; }
.landing-hero ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 12px; }
.landing-hero li { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 16px; }
.landing-hero li svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--lime); color: #ffffff; flex: none; }
.landing-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.landing.single .auth-card { color: var(--text); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 20px; }
.auth-tabs button { border: 0; background: none; padding: 10px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--text-2); cursor: pointer; }
.auth-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.btn-google { width: 100%; justify-content: center; gap: 10px; background: #fff; border: 1px solid var(--line-strong); }
.btn-google:hover { background: var(--surface-2); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 18px 0 6px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#auth-form .field { margin-top: 12px; }
.auth-err { color: var(--bad); font-weight: 600; font-size: 14px; min-height: 20px; margin: 12px 0 4px; }
.auth-submit { width: 100%; justify-content: center; }
@media (max-width: 860px) {
  .landing { grid-template-columns: 1fr; }
  .landing-hero { padding: 96px 24px 36px; }
  .landing-hero .brand { top: 28px; left: 24px; }
  .landing-hero h1 { margin-top: 0; }
}

/* ---------- користувач у боковій панелі ---------- */
.me-box { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: var(--side); display: grid; place-items: center; font-weight: 800; flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.me-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt span { font-size: 11.5px; color: var(--side-muted); }
.me-out { margin-left: auto; background: none; border: 0; color: var(--side-muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.me-out:hover { color: #fff; background: rgba(255,255,255,.06); }
.me-out svg { width: 18px; height: 18px; display: block; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #e0a243; color: #17142b; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }

/* ---------- сторінка користувачів ---------- */
.users-list { display: grid; gap: 14px; }
.user-card { padding: 20px 22px; }
.user-card.pending { border-color: #ecc77d; box-shadow: 0 0 0 3px rgba(224,162,67,.15); }
.user-card.blocked { opacity: .75; }
.user-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.user-id { flex: 1; min-width: 200px; }
.user-name { font-weight: 800; font-size: 16px; }
.user-mail { color: var(--text-2); font-size: 14px; margin-top: 2px; word-break: break-all; }
.user-meta { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.user-state { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.user-state select { width: auto; }
.perm-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.perm-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-right: 4px; }
.perm { display: inline-flex; gap: 7px; align-items: center; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--surface); }
.perm:has(input:checked) { background: #f1eaff; border-color: var(--green); }
.perm.sensitive:has(input:checked) { background: var(--warn-bg); border-color: #e0a243; }
.user-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
code.copy { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 12.5px; cursor: pointer; word-break: break-all; }
code.copy:hover { border-color: var(--text-3); }

/* компактна зона завантаження фото */
.dropzone.compact { padding: 14px 18px; text-align: left; }
.dropzone.compact .dz-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dropzone.compact .dz-row > svg { width: 28px; height: 28px; flex: none; }
.dropzone.compact .dz-txt { flex: 1; min-width: 180px; }
.dropzone.compact .t { margin: 0; font-size: 14.5px; }
.dropzone.compact .s { margin: 2px 0 0; font-size: 12.5px; }
.dropzone.compact .file-list { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin-top: 12px; }
.dropzone.compact .file-list:empty { display: none; }
select.input.placeholder { color: var(--text-3); }
select.input.placeholder option { color: var(--text); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(200, 60, 40, .12); }

/* ---------- мій профіль ---------- */
.me-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; text-decoration: none; padding: 6px; margin: -6px; border-radius: 10px; }
.me-link:hover, .me-link.active { background: rgba(255,255,255,.07); }
.me-link:focus-visible { outline: 2px solid var(--lilac-text); outline-offset: 1px; }
.avatar.xl { width: 56px; height: 56px; font-size: 22px; }
.profile-form { display: grid; gap: 14px; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; }
.kv-list { display: grid; gap: 10px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; }
.perm.on { background: #f1eaff; border-color: var(--green); cursor: default; }
.perm.off { color: var(--text-3); cursor: default; }
.perm svg { width: 15px; height: 15px; }

/* ---------- тип акаунта: постачальник / дропшипер ---------- */
.atype-choice { display: grid; grid-template-columns: 1fr; gap: 8px; }
.atype-choice .atype-opt { display: flex; align-items: center; padding: 10px 12px; margin: 0; font-weight: 400; }
.atype-opt { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; background: var(--surface); }
.atype-opt input { position: absolute; opacity: 0; pointer-events: none; }
.atype-opt:hover { border-color: var(--text-3); }
.atype-opt:has(input:checked) { border-color: var(--lime); background: #f6f1ff; box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.atype-opt:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.atype-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--muted-bg); color: var(--text-2); display: grid; place-items: center; }
.atype-ic svg { width: 20px; height: 20px; }
.atype-opt:has(input:checked) .atype-ic { background: var(--lime); color: #fff; }
.atype-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.atype-txt b { font-size: 14.5px; }
.atype-txt small { font-size: 12px; line-height: 1.35; color: var(--text-3); }
.atype-pill.supplier { background: #e5eefa; color: #2e5f9e; }
.atype-pill.dropshipper { background: #ede4ff; color: #5b2fd6; }
.atype-pill.shop { background: #fdeaf3; color: #a3266a; }


/* ---- баланс клієнта ---- */
.bal-box { display: block; margin: 14px 0 4px; padding: 11px 13px; border-radius: 12px; background: rgba(139, 92, 246, .16);
  border: 1px solid rgba(201, 179, 255, .25); color: #fff; text-decoration: none; }
.bal-box:hover { background: rgba(139, 92, 246, .24); }
.bal-box .bal-lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); }
.bal-box .bal-val { display: block; font-size: 20px; font-weight: 800; margin-top: 2px; color: var(--lilac-text); }
.bal-box.low .bal-val { color: #ffb38a; }
.bal-box .bal-tag { display: block; font-size: 11px; color: var(--side-muted); margin-top: 3px; }
.bal-big { font-size: 30px; font-weight: 800; color: var(--green); white-space: nowrap; }
.bal-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bal-num { font-size: 17px; margin-right: 6px; }
.tx-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; }
.tx-table th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tx-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tx-table .nowrap { white-space: nowrap; }
.tx-table .muted { color: var(--text-3); }
@media (max-width: 600px) { .tx-table th:nth-child(3), .tx-table td:nth-child(3) { display: none; } }

.client-prices { white-space: nowrap; }
.cp-line { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; line-height: 1.6; }
.cp-line b { color: var(--green); font-variant-numeric: tabular-nums; }
.cp-q { font-size: 11.5px; font-weight: 700; color: var(--text-3); min-width: 22px; }

/* ---- фото профілю ---- */
.avatar.has-img { background: var(--side-2); overflow: hidden; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit { all: unset; position: relative; cursor: pointer; border-radius: 50%; display: inline-grid; flex: none; }
.avatar-edit:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.avatar-cam { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--line-strong); box-shadow: 0 2px 6px rgba(23,20,43,.15);
  transition: background .15s, color .15s; }
.avatar-cam svg { width: 12px; height: 12px; }
.avatar-edit:hover .avatar-cam { background: var(--lime); color: #fff; border-color: var(--lime); }
.avatar-edit:hover .avatar { filter: brightness(.92); }
.avatar-acts { display: flex; gap: 14px; margin-top: 6px; font-size: 13.5px; }
.danger-link { color: var(--bad) !important; }

.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.author-cell { white-space: nowrap; }
.author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-2); max-width: 160px; }
.author > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.author-cell .muted { color: var(--text-3); }

/* ---- фільтр партій за авторами ---- */
.author-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 16px; }
.af-label { font-size: 13px; font-weight: 700; color: var(--text-3); margin-right: 2px; }
.af-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.af-chip:first-of-type { padding-left: 12px; }
.af-chip:hover { border-color: #cfc6ea; background: #fcfbff; }
.af-chip.on { background: var(--side); border-color: var(--side); color: #fff; }
.af-chip .af-n { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(23,20,43,.07); color: var(--text-3); }
.af-chip.on .af-n { background: rgba(255,255,255,.16); color: var(--lilac-text); }
.af-chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.af-reset { font-size: 13px; margin-left: 4px; }

/* ---------- лендинг: секції під першим екраном ---------- */
.lm-scroll { display: inline-flex; align-items: center; gap: 8px; color: var(--lilac-text); font-weight: 700; text-decoration: none; margin-top: 8px; width: fit-content; }
.lm-scroll:hover { color: #fff; }
.landing-more { background: var(--bg); color: var(--text); }
.lm-sec { max-width: 1120px; margin: 0 auto; padding: 84px 24px 0; }
.lm-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); margin-bottom: 10px; }
.lm-sec h2, .lm-final h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 26px; font-weight: 800; max-width: 980px; text-wrap: balance; }
.lm-lead { font-size: 17px; color: var(--text-2); max-width: 820px; text-wrap: pretty; margin: -12px 0 28px; line-height: 1.55; }

.aud-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.aud-tabs button { display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; font: inherit; font-weight: 700; font-size: 15px; color: var(--text-2);
  padding: 10px 16px 10px 10px; border-radius: 12px; cursor: pointer; transition: background .2s, color .2s; }
.aud-tabs button .atype-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.aud-tabs button .atype-ic svg { width: 17px; height: 17px; }
.aud-tabs button:hover { background: var(--surface-2); }
.aud-tabs button.on { background: var(--side); color: #fff; }
.aud-tabs button.on .atype-ic { background: var(--lime); color: #fff; }
.aud-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px; box-shadow: var(--shadow); }
.aud-panel[hidden] { display: none; }
.aud-copy h3 { font-size: 24px; margin: 0 0 12px; line-height: 1.2; }
.aud-pain { color: var(--text-2); font-size: 16px; line-height: 1.55; margin: 0 0 20px; padding-left: 14px; border-left: 3px solid var(--line-strong); }
.aud-points { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.aud-points li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; line-height: 1.45; }
.aud-points svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--lime); color: #fff; flex: none; margin-top: 1px; }
.aud-tip { background: var(--lilac); color: var(--green); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin: -6px 0 22px; line-height: 1.45; }

.aud-visual { background: var(--side); border-radius: 20px; padding: 26px; display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: center; min-height: 260px; position: relative; overflow: hidden; }
.aud-visual::after { content: ""; position: absolute; width: 300px; height: 300px; right: -120px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.35), transparent 65%); }
.lv-src { display: grid; justify-items: center; gap: 8px; color: #b9b2da; font-size: 12px; font-weight: 600; text-align: center; }
.lv-box { width: 74px; height: 74px; border-radius: 16px; background: #fff; display: grid; place-items: center; color: var(--side); }
.lv-box svg { width: 34px; height: 34px; }
.lv-box.sm { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.92); }
.lv-box.sm svg { width: 20px; height: 20px; }
.lv-arrow { color: var(--lime); }
.lv-arrow svg { width: 34px; height: 34px; }
.lv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.lv-tile { aspect-ratio: 1 / 1; border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 8px; color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 6px; }
.lv-tile.t0 { background: linear-gradient(135deg, #8b5cf6, #5b2fd6); }
.lv-tile.t1 { background: linear-gradient(135deg, #3f3a5c, #26223f); }
.lv-tile.t2 { background: linear-gradient(135deg, #c9b3ff, #8b5cf6); color: var(--side); }
.lv-tile.t3 { background: linear-gradient(135deg, #e9defe, #c9b3ff); color: var(--side); }

.lm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lm-step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; position: relative; }
.lm-step-n { position: absolute; top: 22px; right: 24px; font-size: 44px; font-weight: 800; color: var(--lilac); line-height: 1; }
.lm-step-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--side); color: var(--lilac-text); display: grid; place-items: center; margin-bottom: 18px; }
.lm-step-ic svg { width: 24px; height: 24px; }
.lm-step h3 { font-size: 18px; margin: 0 0 8px; }
.lm-step p { margin: 0; color: var(--text-2); line-height: 1.55; }
.lm-uses { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 24px; }
.lm-uses span { font-weight: 700; color: var(--text-3); margin-right: 4px; }
.lm-uses b { font-weight: 600; font-size: 14px; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

.lm-offer { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 16px; }
.lm-offer-item { border-radius: 20px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); }
.lm-offer-hl { background: linear-gradient(135deg, #7c4dff, #5b2fd6); border-color: transparent; color: #fff; }
.lm-offer-k { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.lm-offer-hl .lm-offer-k { color: #e3d6ff; }
.lm-offer-v { font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--text-2); }
.lm-offer-v b { font-size: clamp(34px, 4.2vw, 48px); font-weight: 800; letter-spacing: -.02em; color: var(--green); white-space: nowrap; }
.lm-offer-v span { white-space: nowrap; }
.lm-offer-hl .lm-offer-v { color: #e3d6ff; }
.lm-offer-hl .lm-offer-v b { color: #fff; }
.lm-offer-item p { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.lm-offer-hl p { color: #ece4ff; }
@media (max-width: 700px) { .lm-offer { grid-template-columns: 1fr; } .lm-offer-item { padding: 22px; } }
.lm-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.lm-card h3 { font-size: 16.5px; margin: 0 0 8px; }
.lm-card p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.lm-price .lm-cards .lm-card:first-child { background: var(--side); color: #fff; border-color: var(--side); }
.lm-price .lm-cards .lm-card:first-child p { color: #c9c3e3; }
.lm-bonus { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--lilac); color: var(--green); font-size: 15.5px; }
.lm-bonus svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--lime); color: #fff; flex: none; }

.lm-faq { display: grid; gap: 10px; }
.lm-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.lm-faq summary { cursor: pointer; font-weight: 700; padding: 18px 28px 18px 0; list-style: none; position: relative; }
.lm-faq summary::-webkit-details-marker { display: none; }
.lm-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--lime); transition: transform .2s; }
.lm-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.lm-faq p { margin: 0 0 18px; color: var(--text-2); line-height: 1.6; }

.lm-final { margin: 84px auto 0; max-width: 1120px; background: var(--side); color: #fff; border-radius: 28px 28px 0 0; padding: 64px 24px; text-align: center;
  display: grid; justify-items: center; gap: 6px; position: relative; overflow: hidden; }
.lm-final::after { content: ""; position: absolute; width: 520px; height: 520px; left: 50%; bottom: -320px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.4), transparent 65%); }
.lm-final .brand-mark { margin-bottom: 10px; }
.lm-final h2 { margin: 0; }
.lm-final p { color: #c9c3e3; font-size: 17px; margin: 6px 0 20px; }
.lm-final .btn { position: relative; z-index: 1; padding: 14px 26px; font-size: 16px; }
.lm-foot { text-align: center; color: #9a94bb; font-size: 13px; padding: 18px; background: var(--side); max-width: 1120px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.08); }

@media (max-width: 960px) {
  .aud-panel { grid-template-columns: 1fr; padding: 24px; }
  .lm-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .lm-sec { padding-top: 60px; }
  .lm-steps, .lm-cards { grid-template-columns: 1fr; }
  .aud-tabs { display: grid; width: 100%; }
  .aud-visual { grid-template-columns: 1fr; justify-items: center; padding: 20px; }
  .lv-arrow { transform: rotate(0deg); }
  .lv-grid { width: 100%; }
  .lm-final { border-radius: 0; }
}

/* ---- залишок на рахунках нейромереж (власник і співробітники) ---- */
.prov-bal { display: inline-flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text-2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
a.prov-bal:hover { border-color: #cfc6ea; }
.pb-item { display: inline-flex; align-items: center; gap: 6px; }
.pb-item b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.pb-item b.low { color: var(--bad); }
.pb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.pb-item.active .pb-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,160,90,.15); }
.pb-sep { width: 1px; height: 16px; background: var(--line); }
.pb-err { color: var(--text-3); }
#prov-bal:empty { display: none; }
@media (max-width: 680px) { .prov-bal { font-size: 12px; gap: 8px; padding: 0 10px; } }

/* ---- разовий фото-приклад ---- */
.scene-pick { margin-top: 10px; }
.scene-drop { display: block; cursor: pointer; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); padding: 12px 14px; transition: border-color .15s, background .15s; }
.scene-drop:hover { border-color: var(--lime); background: #fbf9ff; }
.scene-drop.invalid { border-color: var(--bad); }
.scene-empty, .scene-prev { display: flex; align-items: center; gap: 12px; }
.scene-empty svg { width: 26px; height: 26px; color: var(--lime); flex: none; }
.scene-empty b, .scene-prev b { display: block; font-size: 14px; }
.scene-empty small, .scene-prev small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; word-break: break-all; }
.scene-drop.has .scene-empty { display: none; }
.scene-prev img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.scene-prev > span { flex: 1; min-width: 0; }
.scene-x { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 16px; color: var(--text-2); flex: none; }
.scene-x:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- власні випадаючі списки ---------- */
.dd { position: relative; width: 100%; }
.pager-size .dd, .user-state .dd { width: auto; display: inline-block; }
.dd > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.dd-btn { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; color: var(--text); font: inherit; font-weight: 600; padding-right: 14px; }
.dd-btn:disabled { cursor: default; opacity: .6; }
.dd-btn .dd-val { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.dd-btn .dd-main { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn .dd-sub { color: var(--text-3); font-weight: 600; font-size: .9em; white-space: nowrap; flex: none; }
.dd-btn.placeholder .dd-main { color: var(--text-3); }
.dd-chev { width: 16px; height: 16px; flex: none; color: var(--text-2); transition: transform .18s; }
.dd-btn.open { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
.dd-btn.open .dd-chev { transform: rotate(180deg); color: var(--green); }
.dd-btn:hover:not(:disabled):not(.open) { border-color: #bfb3e6; }
.input.sm.dd-btn { padding-right: 10px; gap: 6px; }

.dd-panel {
  position: fixed; z-index: 1000; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(23, 20, 43, .18), 0 2px 6px rgba(23, 20, 43, .06);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top center;
  transition: opacity .14s ease, transform .14s ease;
}
.dd-panel.up { transform-origin: bottom center; transform: translateY(4px) scale(.98); }
.dd-panel.show { opacity: 1; transform: none; }
.dd-search { padding: 8px 8px 4px; border-bottom: 1px solid var(--line); }
.dd-search input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; outline: none; background: var(--surface-2); }
.dd-search input:focus { border-color: #a78bfa; background: var(--surface); }
.dd-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.dd-group { padding: 12px 12px 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--label); }
.dd-group:first-child { padding-top: 6px; }
.dd-opt { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 8px; border-radius: 9px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--text); }
.dd-opt .dd-tick { width: 18px; height: 18px; flex: none; color: var(--green); display: grid; place-items: center; }
.dd-opt .dd-tick svg { width: 16px; height: 16px; }
.dd-opt .dd-main { flex: 1; min-width: 0; }
.dd-opt .dd-sub { color: var(--text-3); font-size: 13px; font-weight: 600; white-space: nowrap; }
.dd-opt.act { background: var(--surface-2); background: #f3effd; }
.dd-opt.sel { color: var(--green); background: var(--lilac); }
.dd-opt.sel .dd-sub { color: #7a5fd0; }
.dd-opt.dis { opacity: .45; cursor: default; }
.dd-empty { padding: 14px; color: var(--text-3); font-size: 14px; text-align: center; }

/* пробний тариф: термін зберігання партії */
.exp-tag { display: inline-block; margin-top: 5px; line-height: 1.5; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--muted-bg); color: var(--text-2); white-space: nowrap; }
.exp-tag.soon { background: var(--warn-bg); color: var(--warn); }

/* ---------- Telegram-канал ---------- */
.lm-tg { display: inline-flex; align-items: center; gap: 12px; width: fit-content; margin-top: 6px; padding: 10px 18px 10px 10px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--side-text); text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.lm-tg:hover { background: rgba(255,255,255,.1); border-color: rgba(196,168,255,.5); transform: translateY(-1px); }
.lm-tg-ic, .side-tg-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--lime); color: #fff; display: grid; place-items: center; flex: none; }
.lm-tg-ic svg, .side-tg-ic svg { width: 20px; height: 20px; margin: 1px 0 0 -2px; }
.lm-tg-txt { display: flex; flex-direction: column; line-height: 1.3; }
.lm-tg-txt b { font-size: 15px; }
.lm-tg-txt span { font-size: 13px; color: #a9a3c9; font-weight: 500; }
.lm-foot a { color: var(--lilac-text); text-decoration: none; font-weight: 600; }
.lm-foot a:hover { color: #fff; }
.side-tg { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--side-text);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); transition: background .2s, border-color .2s; }
.side-tg:hover { background: rgba(255,255,255,.09); border-color: rgba(196,168,255,.4); }
.side-tg .side-tg-ic { width: 32px; height: 32px; border-radius: 9px; }
.side-tg .side-tg-ic svg { width: 19px; height: 19px; margin: 1px 0 0 -2px; }
.side-tg > span:not(.side-tg-ic) { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-tg .side-tg-ic { display: grid; place-items: center; }
.side-tg b { font-size: 13.5px; }
.side-tg small { font-size: 11.5px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-top { display: none; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--green); place-items: center; flex: none; }
.tg-top svg { width: 18px; height: 18px; margin: 1px 0 0 -2px; }
@media (max-width: 1100px) { .tg-top { display: inline-grid; } }

/* ---------- приклади «було → стало» ---------- */
.show-wrap { display: flex; flex-direction: column; gap: 14px; }
.ba { position: relative; aspect-ratio: 21 / 9; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow);
  user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(23,20,43,.12), 0 0 18px rgba(23,20,43,.25); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--lime);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(23,20,43,.3); }
.ba-knob svg { width: 20px; height: 20px; }
.ba:not(.touched) .ba-knob { animation: ba-hint 2.4s ease-in-out 1s 2; }
@keyframes ba-hint { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.ba-tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .04em; pointer-events: none;
  background: rgba(23,20,43,.66); color: #fff; backdrop-filter: blur(6px); }
.ba-tag.l { left: 14px; } .ba-tag.r { right: 14px; background: var(--lime); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible ~ .ba-line .ba-knob, .ba:focus-within .ba-knob { outline: 3px solid rgba(139,92,246,.45); outline-offset: 3px; }
.ba-cap { margin-top: 8px; font-weight: 700; color: var(--text-2); font-size: 14px; }
.show-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.show-thumbs:empty { display: none; }
.show-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; width: 64px; height: 64px; flex: none; cursor: pointer; background: var(--surface-2); transition: border-color .2s, transform .2s; }
.show-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.show-thumbs button:hover { transform: translateY(-2px); }
.show-thumbs button.on { border-color: var(--lime); }
@media (max-width: 680px) {
  .ba { aspect-ratio: 16 / 9; }
  .show-thumbs button { width: 56px; height: 56px; }
}
.show-btn { margin-top: 10px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border-radius: 10px;
  border: 1px dashed var(--line-strong); background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.show-btn svg { width: 16px; height: 16px; }
.show-btn:hover { border-color: var(--lime); color: var(--green); }
.show-btn.on { border-style: solid; border-color: var(--lime); background: var(--lilac); color: var(--green); }
.show-btn.on svg { fill: currentColor; }

/* ---------- режим новачка (компактна картка) ---------- */
.onb { padding: 14px 16px; margin-bottom: 18px; border: 1px solid #ddd0fb; background: linear-gradient(90deg, #f8f4ff, var(--surface) 60%); }
.onb-row { display: flex; align-items: center; gap: 14px; }
.onb-ring { --p: 0%; width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--lime) var(--p), #e9e2fb 0); position: relative; color: var(--green); font-weight: 800; font-size: 12.5px; }
.onb-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.onb-ring > * { position: relative; }
.onb-done .onb-ring { color: var(--lime); }
.onb-ring svg { width: 18px; height: 18px; position: relative; }
.onb-cur { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.onb-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
.onb-cur b { font-size: 15px; }
.onb-cur small { color: var(--text-3); font-size: 12.5px; }
.onb-acts { display: flex; align-items: center; gap: 12px; flex: none; }
.onb-more { font-size: 13px; white-space: nowrap; }
.onb-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; color: var(--text-3); font-size: 20px; line-height: 1; cursor: pointer; }
.onb-x:hover { background: var(--surface-2); color: var(--text); }
.onb-steps[hidden] { display: none; }
.onb-steps { list-style: none; margin: 12px 0 0 60px; padding: 0; display: grid; gap: 6px; }
.onb-steps li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.onb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.onb-t b { font-size: 13.5px; } .onb-t small { color: var(--text-3); font-size: 12px; }
@media (max-width: 640px) {
  .onb-row { flex-wrap: wrap; } .onb-acts { width: 100%; padding-left: 60px; } .onb-steps { margin-left: 0; }
}
.onb-pulse { animation: onb-pulse 1.8s ease-in-out infinite; }
@keyframes onb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .45); } 50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); } }
.onb-tip { position: absolute; right: 0; top: calc(100% + 10px); z-index: 6; background: var(--side); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 7px 12px; border-radius: 10px; white-space: nowrap; pointer-events: none; }
.onb-tip::before { content: ""; position: absolute; right: 26px; top: -5px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .onb-pulse { animation: none; } }

/* статистика режиму новачка для власника */
.onb-kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.onb-kpis div { display: flex; flex-direction: column; }
.onb-kpis b { font-size: 24px; font-variant-numeric: tabular-nums; }
.onb-kpis span { font-size: 12.5px; color: var(--text-3); }
.table-wrap { overflow-x: auto; }
.onb-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 13.5px; }
.onb-table thead th { background: none; text-transform: none; letter-spacing: 0; }
.onb-table th, .onb-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.onb-table thead th { font-size: 12px; color: var(--text-3); font-weight: 700; }
.onb-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.onb-table tbody th { font-weight: 700; white-space: nowrap; }
.onb-table small { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.onb-verdict { margin: 12px 0 0; font-weight: 600; }
.onb-verdict.muted { color: var(--text-3); font-weight: 500; }
.onb-h3 { font-size: 15px; margin: 22px 0 6px; }

.tour-hole { position: fixed; z-index: 2000; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 3px #a78bfa, 0 0 0 9999px rgba(17, 13, 32, .55); transition: left .2s, top .2s, width .2s, height .2s; }
.tour-pop { position: fixed; z-index: 2001; width: min(340px, calc(100vw - 20px)); background: var(--surface); color: var(--text); border-radius: 16px;
  padding: 16px 18px 14px; box-shadow: 0 24px 60px rgba(17, 13, 32, .35); }
.tour-pop b { display: block; font-size: 16px; margin-bottom: 4px; }
.tour-pop p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tour-count { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 6px; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-btns .link { font-size: 13px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

.onb-pref-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.onb-pref h2 { margin: 0 0 4px; font-size: 17px; }
.switch { position: relative; width: 50px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d8d3e6; transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--lime); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid rgba(139,92,246,.4); outline-offset: 2px; }

/* ---------- тариф клієнта ---------- */
.plan-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.plan-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.plan-list li svg { width: 17px; height: 17px; flex: none; }
.plan-list li.on { background: var(--lilac); border-color: #d6c8fb; color: var(--text); }
.plan-list li.on svg { color: var(--lime); }
.plan-list li.lock { color: var(--text-3); background: var(--surface-2); }
.plan-list li em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--lime); white-space: nowrap; }

/* ---------- створити з нуля ---------- */
.cr-sub { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.cr-tpl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.cr-tpl > span { font-size: 13px; font-weight: 700; color: var(--text-3); margin-right: 2px; }
.cr-tpl .chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.cr-tpl .chip:hover { border-color: var(--lime); color: var(--green); }
.cr-prompt { min-height: 120px; font-size: 15.5px; line-height: 1.5; resize: vertical; }
.cr-refs { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.cr-ref { position: relative; width: 84px; display: flex; flex-direction: column; gap: 4px; }
.cr-ref img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.cr-ref small { font-size: 11px; color: var(--text-3); text-align: center; }
.cr-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--side); color: #fff; cursor: pointer; line-height: 1; }
.cr-add { display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 84px; border: 1.5px dashed var(--line-strong); border-radius: 12px; cursor: pointer; color: var(--text-2); font-weight: 700; font-size: 14px; }
.cr-add svg { width: 18px; height: 18px; color: var(--lime); }
.cr-add span { display: flex; flex-direction: column; }
.cr-add small { font-weight: 500; font-size: 12px; color: var(--text-3); }
.cr-add:hover { border-color: var(--lime); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text); }
.seg button.on { border-color: var(--lime); background: var(--lilac); color: var(--green); }
.seg button:disabled { opacity: .4; cursor: not-allowed; background: var(--surface-2); }
.seg .ar { display: inline-block; height: 14px; aspect-ratio: var(--ar); border: 1.6px solid currentColor; border-radius: 3px; }
.modal-foot.cr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.cr-btns { display: flex; gap: 10px; margin-left: auto; }
.cr-foot .estimate { margin: 0; padding: 8px 12px; font-size: 13.5px; }
.btn-lg { padding: 13px 22px; font-size: 15.5px; }
.cr-text { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; max-width: 80ch; white-space: pre-wrap; }
.kind-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.kind-tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.kind-tabs button span { font-size: 11.5px; color: var(--text-3); font-weight: 700; }
.kind-tabs button.on { background: var(--side); color: #fff; }
.kind-tabs button.on span { color: #c9bdf0; }

/* поповнення балансу */
.notice .notice-act { margin-left: auto; flex: none; }
.topup-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 14px;
  background: var(--lilac); border: 1px solid #d6c8fb; margin-bottom: 14px; flex-wrap: wrap; }
.topup-box > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 320px; }
.topup-box span { color: var(--text-2); font-size: 14px; }
.topup-box .btn svg { width: 17px; height: 17px; }
#balance.flash { animation: bal-flash 1.6s ease-out 1; }
@keyframes bal-flash { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); } 100% { box-shadow: 0 0 0 14px rgba(139, 92, 246, 0); } }
@media (max-width: 640px) { .notice { flex-wrap: wrap; } .notice .notice-act { margin-left: 0; } }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 46px; }
.switch-row .switch { flex: none; }
.switch-row .help { font-weight: 500; }

/* фірмові пресети DROPIX */
.brand-pill { background: linear-gradient(135deg, #7c4dff, #5b2fd6); color: #fff; font-size: 12px; vertical-align: middle; margin-left: 6px; }
.brand-box { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--lilac); }
.brand-box .switch-row { flex: 1 1 280px; }
.brand-box .switch-row b { display: block; font-size: 14.5px; }
.brand-box .switch-row small { display: block; color: var(--text-2); font-size: 13px; font-weight: 500; margin-top: 2px; }
.brand-sec { margin-bottom: 34px; }
.brand-sec-head h2 { margin: 0 0 6px; font-size: 21px; }
.brand-sec-head .sub { color: var(--text-2); max-width: 760px; margin-bottom: 16px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.brand-card { padding: 0; overflow: hidden; }
.brand-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); aspect-ratio: 4 / 1.25; }
.brand-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-body { padding: 16px 18px 18px; }
.brand-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-top h3 { margin: 0; font-size: 16.5px; }
.brand-top .brand-pill { margin: 0; white-space: nowrap; }
.brand-body p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.scene-mode { gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: nowrap; }
.scene-mode button { flex: 1; justify-content: center; border-color: transparent; background: transparent; padding: 9px 8px; white-space: nowrap; }
.scene-mode button.on { background: var(--surface); border-color: var(--line-strong); color: var(--green); box-shadow: 0 1px 3px rgba(23,20,43,.08); }
@media (max-width: 520px) { .scene-mode { flex-wrap: wrap; } .scene-mode button { flex: 1 1 45%; } }

/* «Свій опис»: кілька описів */
.variant-row { margin-top: 12px; }
.variant-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.variant-num { font-size: 13.5px; color: var(--text-2); }
.variant-x { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 16px; line-height: 1; }
.variant-x:hover { color: var(--bad); border-color: var(--bad); }
.variants-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.variants-bar .help { margin: 0; }
#variants-order { margin-top: 14px; }
.variants-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.variants-seg button { border-color: transparent; background: transparent; padding: 7px 14px; }
.variants-seg button.on { background: var(--surface); border-color: var(--line-strong); color: var(--green); }
#variants-help { margin-top: 8px; }
.row-link { color: inherit; text-decoration: none; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--lime); flex: none; }
.check-row small { display: block; font-weight: 500; color: var(--text-2); font-size: 13px; margin-top: 2px; }
.share-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.share-toggle .switch { width: 40px; height: 24px; }
.share-toggle .switch span::after { width: 18px; height: 18px; }
.share-toggle .switch input:checked + span::after { transform: translateX(16px); }
.shared-pill { font-size: 11.5px; padding: 2px 8px; background: var(--lilac); color: var(--green); vertical-align: middle; margin-left: 6px; }

/* мови */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.lang-switch a { padding: 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-2); text-decoration: none; line-height: 1; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.on { background: var(--side); color: #fff; }
.hero-top { display: contents; }
.lang-hero { position: absolute; top: 42px; right: clamp(28px, 6vw, 88px); z-index: 2; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.lang-hero a { color: rgba(255,255,255,.75); }
.lang-hero a:hover { color: #fff; }
.lang-hero a.on { background: #fff; color: var(--side); }
@media (max-width: 860px) { .lang-hero { top: 30px; right: 24px; } }

/* ---------- довгі переклади (RU/EN): нічого не вилазить за край ---------- */
.panel, .card { min-width: 0; overflow-wrap: break-word; }
.btn { max-width: 100%; }
h1, h2, h3 { overflow-wrap: break-word; }
:lang(ru) .landing-hero h1, :lang(en) .landing-hero h1 { text-wrap: balance; }
.lm-sec p, .aud-copy, .lm-final p { text-wrap: pretty; }
.panel-head > :first-child, .preset-title { min-width: 0; }
.panel-head .sub, .preset-title .sub { overflow-wrap: anywhere; }
.preset-title { flex: 1 1 160px; }
.preset-title h3 { overflow-wrap: anywhere; }
@media (max-width: 640px) { .panel-head { flex-wrap: wrap; } .brand-pill { white-space: nowrap; display: inline-block; margin-top: 4px; } }
@media (max-width: 640px) { .preset-card .head-actions { flex: 1 1 100%; flex-wrap: wrap; } .preset-head { padding: 16px; gap: 10px 12px; } }

/* ---------- аналітика ---------- */
.an-top { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; margin-bottom: 22px; }
.an-top .stats { margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.an-online { background: var(--side); color: #fff; border: 0; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; }
.an-online-head { display: flex; gap: 14px; align-items: center; }
.an-online .k { font-size: 13px; font-weight: 600; color: #c9c3e3; }
.an-online .v { font-size: 38px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.an-online-sub { font-size: 12px; color: #a49ec4; margin-top: 10px; }
.an-live { width: 14px; height: 14px; border-radius: 50%; background: #3ddc84; flex: none; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: an-pulse 1.8s infinite; }
@keyframes an-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 70% { box-shadow: 0 0 0 12px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.an-tile.cur { outline: 2px solid var(--lime); outline-offset: -2px; }
.an-tile .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.an-chart { width: 100%; height: 200px; display: block; }
.an-chart text { font-size: 10.5px; fill: var(--text-3); font-family: inherit; }
.an-c-bar { fill: #c7b8fb; } .an-c-bar:hover { fill: var(--lime); }
.an-c-line { fill: none; stroke: #e0791f; stroke-width: 2; vector-effect: non-scaling-stroke; }
.an-c-dot { fill: #e0791f; }
.an-c-axis { stroke: var(--line); }
.an-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-2); margin-top: 6px; flex-wrap: wrap; }
.an-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.an-legend .lg-bar { background: #c7b8fb; } .an-legend .lg-line { background: #e0791f; height: 3px; vertical-align: 2px; }
.an-period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; font-weight: 600; color: var(--text-2); font-size: 14px; }
.an-range { color: var(--text-3); font-weight: 500; }
.an-table { min-width: 0; }
.an-table td { vertical-align: middle; }
.an-table .when { font-size: 12px; color: var(--text-3); font-weight: 500; }
.an-src td:nth-child(2) { width: 30%; }
.an-bar { display: block; height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; min-width: 40px; }
.an-bar i { display: block; height: 100%; background: var(--lime); border-radius: 6px; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.an-bars { display: grid; gap: 10px; }
.an-bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto 42px; gap: 12px; align-items: center; font-size: 14px; }
.an-bar-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar-row b { font-variant-numeric: tabular-nums; }
.an-pct { color: var(--text-3); font-size: 12.5px; text-align: right; }
.an-empty { color: var(--text-3); padding: 8px 0; }
.an-note { color: var(--text-3); font-size: 13px; line-height: 1.5; max-width: 820px; }
.an-top + .panel, .an-grid .panel { margin-bottom: 22px; }
@media (max-width: 1000px) { .an-top { grid-template-columns: 1fr; } .an-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .an-top .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-bar-row { grid-template-columns: minmax(0, 1fr) 70px auto 36px; } }
.an-table th, .an-table td { padding-left: 10px; padding-right: 10px; white-space: normal; }
.an-table th { white-space: nowrap; }
.an-table tbody td { padding-top: 13px; padding-bottom: 13px; }
.an-table tbody tr { cursor: default; }
.an-period { margin: 0 0 22px; }
.an-dates { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text-2); }
.an-dates.on { border-color: var(--lime); background: var(--lilac); }
.an-dates svg { width: 18px; height: 18px; flex: none; }
.an-dates input { width: 150px; padding: 6px 8px; font: inherit; font-size: 13.5px; }
.an-dates span { color: var(--text-3); }
@media (max-width: 640px) { .an-dates { width: 100%; } .an-dates input { flex: 1; min-width: 0; width: auto; } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
#verify-msg { line-height: 1.5; max-width: 420px; margin: 10px auto 0; }

/* ---------- файли команди ---------- */
.fs-usage { display: flex; align-items: center; gap: 12px; margin: -6px 0 22px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.fs-usage i { flex: 1 1 160px; max-width: 320px; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.fs-usage b { display: block; height: 100%; background: var(--lime); }
.fs-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 22px; }
.fs-folder { display: flex; gap: 14px; align-items: flex-start; padding: 18px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.fs-folder:hover { border-color: var(--lime); transform: translateY(-1px); }
.fs-folder-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--lilac); color: var(--lime); display: grid; place-items: center; flex: none; }
.fs-folder-ic svg { width: 24px; height: 24px; }
.fs-folder-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fs-folder-body b { font-size: 16px; overflow-wrap: anywhere; }
.fs-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.fs-tags .pill { display: inline-flex; align-items: center; gap: 5px; }
.fs-tags .pill svg { width: 13px; height: 13px; }
.fs-drop { border: 2px dashed var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); font-size: 13.5px; background: var(--surface); }
.fs-drop b { color: var(--text); font-size: 15px; }
body.fs-dragging .fs-drop { border-color: var(--lime); background: var(--lilac); }
body.fs-dragging .fs-drop b::after { content: " — відпустіть, щоб завантажити"; }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.fs-file { padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fs-file:hover, .fs-file:focus-visible { border-color: var(--lime); outline: none; }
.fs-file.uploading { opacity: .7; }
.fs-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; margin-bottom: 6px; color: var(--text-3); }
.fs-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fs-kind { position: relative; z-index: 1; display: grid; place-items: center; }
.fs-kind svg { width: 30px; height: 30px; }
.fs-thumb.kind-video .fs-kind { width: 42px; height: 42px; border-radius: 50%; background: rgba(13, 11, 24, .55); color: #fff; }
.fs-thumb.kind-video .fs-kind svg { width: 18px; height: 18px; margin-left: 2px; }
.fs-partial { position: absolute; left: 8px; bottom: 8px; z-index: 2; background: #e0791f; color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.fs-shared { position: absolute; right: 8px; top: 8px; z-index: 2; font-size: 13px; background: #fff; border-radius: 8px; padding: 2px 5px; }
.fs-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-modal { width: min(980px, 100%); }
.fs-title { font-size: 18px; overflow-wrap: anywhere; margin: 0; }
.fs-media { width: 100%; max-height: 66vh; object-fit: contain; background: #0d0b18; border-radius: 12px; display: block; }
.fs-none { display: grid; place-items: center; gap: 10px; padding: 50px 0; color: #a49ec4; }
.fs-none svg { width: 40px; height: 40px; }
.fs-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fs-actions select { width: auto; flex: 0 1 200px; }
.upload-box { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(23, 20, 43, .22); overflow: hidden; }
.ub-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--side); color: #fff; font-size: 13px; }
.ub-head span { flex: 1; color: #c9c3e3; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-btn { background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; padding: 2px 6px; }
.ub-list { max-height: 320px; overflow-y: auto; }
.upload-box.min .ub-list { display: none; }
.ub-row { padding: 10px 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.ub-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 1 / -1; }
.ub-meta { font-size: 12px; color: var(--text-3); grid-column: 1 / -1; }
.ub-row.err .ub-meta { color: var(--danger, #d64545); }
.ub-bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.ub-bar i { display: block; height: 100%; background: var(--lime); transition: width .3s; }
.ub-row.done .ub-bar i { background: #3ddc84; }
.ub-act { background: none; border: 0; color: var(--lime); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 2px 0; justify-self: start; }
.go-card { max-width: 420px; }
@media (max-width: 640px) { .fs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .upload-box { right: 16px; bottom: 16px; } }
.fs-folder { position: relative; padding: 0; display: block; }
.fs-folder-link { display: flex; gap: 14px; align-items: flex-start; padding: 18px 18px 18px 18px; text-decoration: none; color: inherit; min-width: 0; }
.fs-check { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 4px; cursor: pointer; }
.fs-check input { width: 18px; height: 18px; accent-color: var(--lime); cursor: pointer; }
.fs-folder.sel { border-color: var(--lime); box-shadow: 0 0 0 2px var(--lilac); }
.fs-folder.drop { border-color: var(--lime); background: var(--lilac); }
.fs-folders.sub { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.fs-folder-body b { padding-right: 22px; }
.fs-selbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin: 0 0 12px; min-height: 36px; }
.fs-selbar.on { color: var(--text); background: var(--lilac); border-radius: 12px; padding: 8px 12px; }
.fs-ai { display: flex; gap: 16px; align-items: center; padding: 16px 18px; margin-bottom: 16px; border-color: var(--lime); }
.fs-ai-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--lime); color: #fff; display: grid; place-items: center; flex: none; font-size: 20px; }
.fs-ai-ic svg { width: 22px; height: 22px; }
.fs-ai-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13.5px; color: var(--text-2); }
.fs-ai-body b { color: var(--text); font-size: 15px; }
.fs-ai-bar { display: block; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.fs-ai-bar b { display: block; height: 100%; background: var(--lime); transition: width .4s; }
.fs-ai.busy .fs-ai-ic { animation: an-pulse 1.8s infinite; }
.fs-job { margin-bottom: 16px; }
@media (max-width: 640px) { .fs-ai { flex-wrap: wrap; } .fs-ai .btn { width: 100%; } }
