/* ============================================================
   DELCHI — дизайн-система кабинета по гайдбуку
   Палитра: #EB0045 · #2D2B2C · #FFFFFF · #000000, шрифт Montserrat
   ============================================================ */
:root {
  --brand: #EB0045;
  --brand-deep: #C4003A;
  --brand-soft: #FDE9EF;
  --brand-line: #F3B8C8;
  --dark: #2D2B2C;
  --black: #000000;
  --text: #1d1d1f;
  --muted: #8b8b8f;
  --line: #e9e9ea;
  --bg: #f4f4f5;
  --card: #ffffff;
  --green: #1f9d55;
  --green-soft: #e6f6ec;
  --blue: #2f6fed;
  --blue-soft: #e9f0fe;
  --orange: #e8890c;
  --orange-soft: #fdf0dd;
  --red: #d40035;
  --red-soft: #fdeaea;
  --violet: #7a4fd6;
  --violet-soft: #f1ebfc;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 4px 16px rgba(20, 20, 20, .05);
  --shadow-lg: 0 8px 40px rgba(20, 20, 20, .18);
  --font: "Montserrat", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
b, strong { font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }

/* ---------------- boot / login ---------------- */
.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
}
.boot-brand { display: flex; align-items: center; gap: 12px; }
.boot-brand img { height: 56px; width: auto; display: block; }
.boot-brand span { font-size: 36px; font-weight: 600; letter-spacing: .02em; color: var(--brand); }

.login-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.ltab {
  flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 8px;
  padding: 9px; font-size: 13px; font-weight: 500; cursor: pointer; color: #555;
}
.ltab.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.boot-brand img { height: 56px; width: auto; display: block; }
.boot-brand span { font-size: 36px; font-weight: 600; letter-spacing: .02em; color: var(--brand); }

/* экран входа: баннер сверху, карточка входа под ним */
.login-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px; gap: 18px;
}
.login-hero-wrap { width: min(760px, 94vw); }
.login-hero {
  width: 100%; height: auto;
  border-radius: 22px; display: block; box-shadow: var(--shadow-lg);
}
.login-card {
  width: 340px; height: fit-content;
  margin: 18px auto 0;
  box-shadow: var(--shadow-lg);
}
.boot-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- layout ---------------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-in {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-sign-img { height: 44px; width: auto; display: block; }
.logo-name { font-size: 22px; font-weight: 600; letter-spacing: .02em; color: var(--brand); }

.header-spacer { flex: 1; }

/* выпадающие меню шапки */
.hdr-dd { position: relative; }
.hdr-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); min-width: 230px; padding: 6px; z-index: 70;
}
.hdr-menu button, .hdr-menu a {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; padding: 11px 13px; border: none; background: none;
  border-radius: 8px; font-size: 13.5px; cursor: pointer; color: var(--text);
  font-family: inherit;
}
.hdr-menu button:hover, .hdr-menu a:hover { background: var(--brand-soft); color: var(--brand-deep); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  border: none; background: none; cursor: pointer; padding: 4px 6px;
  border-radius: 10px; font-family: inherit;
}
.user-chip:hover { background: var(--brand-soft); }
.user-chip .caret, .balance-chip .caret { font-size: 10px; color: var(--muted); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-soft); border: 1.5px solid var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--brand-deep); flex-shrink: 0;
}
.user-chip .u-name { font-weight: 500; font-size: 13.5px; }
.user-chip .u-id { font-size: 11.5px; color: var(--muted); }

.balance-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--dark); border-radius: 8px;
  padding: 9px 14px; font-weight: 600; font-size: 14px;
  background: var(--card); cursor: pointer; white-space: nowrap;
}
.balance-chip:hover { background: var(--brand-soft); border-color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 8px; padding: 10px 18px; font-size: 13px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s ease; white-space: nowrap;
}
.btn .arr { font-size: 15px; line-height: 1; transform: translateY(-1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-outline { background: var(--card); border-color: var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); text-transform: none; letter-spacing: 0; }
.btn-ghost:hover { border-color: var(--dark); }
.btn-danger { background: var(--red-soft); border-color: transparent; color: var(--red); text-transform: none; letter-spacing: 0; }
.btn-danger:hover { background: #fbd9d9; }
.btn-sm { padding: 7px 13px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.wrap { display: flex; gap: 22px; padding: 22px 0 60px; align-items: flex-start; }

/* ---------------- sidebar ---------------- */
.sidebar { width: 252px; flex-shrink: 0; position: sticky; top: 86px; }
.menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 15px 18px; font-size: 12.5px; font-weight: 500; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text); border-bottom: 1px solid var(--line);
  position: relative; transition: background .12s;
}
.menu a:last-child { border-bottom: none; }
.menu a:hover { background: #fafafa; }
.menu a.active { background: var(--brand-soft); box-shadow: inset 4px 0 0 var(--brand); }
.menu a.accent { background: #f7f7f8; }
.menu a.accent:hover, .menu a.accent.active { background: var(--brand-soft); }
.menu .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }

/* ---------------- main ---------------- */
.main { flex: 1; min-width: 0; }
.page-title {
  font-size: 19px; font-weight: 500; letter-spacing: .05em;
  text-transform: uppercase; margin: 0 0 18px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 500; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; margin-bottom: 14px; cursor: pointer;
  background: none; border: none; padding: 0;
}
.back-link:hover { color: var(--dark); }

/* grid: основная колонка + правая панель */
.cols { display: grid; grid-template-columns: 1fr 296px; gap: 22px; align-items: start; }
@media (max-width: 1020px) { .cols { grid-template-columns: 1fr; } }

/* ---------------- chips / badges ---------------- */
.chip {
  display: inline-block; background: #f1f1f2; color: #555;
  border-radius: 5px; padding: 3px 8px; font-size: 10.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
}
.chip-yellow { background: var(--brand-soft); color: var(--brand-deep); }
.chip-beta { background: #ececec; color: #777; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-gray   { background: #f0f0f1; color: #6b6b6e; }
.b-yellow { background: var(--brand-soft); color: var(--brand-deep); }
.b-orange { background: var(--orange-soft); color: #b5650a; }
.b-green  { background: var(--green-soft); color: #157a42; }
.b-blue   { background: var(--blue-soft); color: #2456c4; }
.b-violet { background: var(--violet-soft); color: #6438bd; }
.b-red    { background: var(--red-soft); color: var(--red); }

/* ---------------- forms ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: #555; margin-bottom: 6px; letter-spacing: .03em; }
.field .req { color: var(--brand); }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid #dcdcdf; border-radius: 8px;
  padding: 10px 12px; background: #fff; outline: none; transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--brand); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { background: var(--red-soft); color: var(--red); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.form-info { background: var(--brand-soft); color: var(--brand-deep); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }

/* ---------------- tables ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1.5px solid var(--line);
}
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafafa; }
.tbl .num { white-space: nowrap; }
.amount-pos { color: var(--green); font-weight: 600; white-space: nowrap; }
.amount-neg { color: var(--text); font-weight: 500; white-space: nowrap; }

/* ---------------- методы оформления ---------------- */
.method-card {
  display: grid; grid-template-columns: 210px 1fr; gap: 20px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.method-card:hover { border-color: #cfcfcf; box-shadow: var(--shadow); }
.method-card.recommended { border-color: var(--brand); box-shadow: 0 4px 18px rgba(235, 0, 69, .22); }
.method-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.method-name { font-size: 16.5px; font-weight: 600; }
.method-desc { color: #444; margin: 0 0 14px; }
.method-meta {
  display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 12px;
}
.method-meta b { color: var(--text); }
.method-illus { display: flex; align-items: center; justify-content: center; }
.method-illus svg { width: 100%; max-width: 190px; height: auto; }

/* правая панель тарифов */
.rate-panel { position: sticky; top: 86px; }
.rate-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 9px;
}
.rate-row .pct { width: 44px; font-weight: 600; font-size: 16px; color: var(--brand); flex-shrink: 0; }
.rate-row .range {
  flex: 1; background: #f1f1f2; border-radius: 6px; padding: 8px 12px;
  font-size: 12.5px; font-weight: 500; color: #444;
}
.rate-note { background: var(--brand-soft); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--brand-deep); margin-top: 14px; }

/* ---------------- заказы ---------------- */
.order-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.order-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.order-num { font-weight: 600; font-size: 15px; }
.order-sum { margin-left: auto; text-align: right; }
.order-sum b { font-size: 15px; }
.order-items { margin: 12px 0 0; border-top: 1px dashed var(--line); padding-top: 12px; }
.order-item { display: flex; gap: 12px; padding: 7px 0; align-items: flex-start; font-size: 13px; }
.order-item .thumb {
  width: 44px; height: 44px; border-radius: 8px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; overflow: hidden;
}
.order-item .t { font-weight: 500; }
.order-item .v { color: var(--muted); font-size: 12px; }
.order-item .p { margin-left: auto; white-space: nowrap; font-weight: 500; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fchip {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 20px;
  padding: 7px 15px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: #555;
}
.fchip:hover { border-color: #bbb; }
.fchip.active { background: var(--dark); border-color: var(--dark); color: #fff; }

.item-editor { border: 1px dashed #d5d5d8; border-radius: 10px; padding: 16px; margin-bottom: 14px; background: #fcfcfc; }
.item-row { display: grid; grid-template-columns: 1.5fr 1fr .9fr 68px 100px 34px; gap: 10px; margin-bottom: 10px; align-items: center; }
.item-row input { width: 100%; border: 1.5px solid #dcdcdf; border-radius: 7px; padding: 8px 10px; }
.item-row .del {
  width: 32px; height: 32px; border-radius: 7px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-size: 15px; color: var(--muted);
}
.item-row .del:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 860px) { .item-row { grid-template-columns: 1fr 1fr; } }

.totals-box { background: #fbfbfb; border: 1.5px solid var(--brand); border-radius: 10px; padding: 16px 18px; }
.totals-box .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }
.totals-box .row.total { border-top: 1.5px dashed var(--brand-line); margin-top: 8px; padding-top: 10px; font-size: 16px; font-weight: 600; }

/* ---------------- флоу выкупа: продавцы и позиции ---------------- */
.seller-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.seller-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--brand-soft);
}
.seller-head .shop-ico { font-size: 17px; }
.seller-head input {
  flex: 1; border: 1.5px solid var(--brand-line); border-radius: 8px; padding: 8px 12px;
  background: #fff; font-weight: 600; outline: none; min-width: 0;
}
.seller-head input:focus { border-color: var(--brand); }
.seller-head .s-del {
  width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent;
  cursor: pointer; font-size: 16px; color: #b56a80;
}
.seller-head .s-del:hover { background: #f9d7e0; color: var(--red); }
.seller-body { padding: 16px; }

.link-block { margin-bottom: 16px; }
.link-label { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.link-row { display: flex; gap: 10px; align-items: stretch; }
.link-row .pf-chip {
  display: flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--brand);
  border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--brand-deep);
  background: var(--brand-soft); min-width: 64px; justify-content: center;
}
.link-row input {
  flex: 1; border: 1.5px solid var(--brand); border-radius: 8px;
  padding: 10px 12px; outline: none; min-width: 0;
}
.link-row input:focus { box-shadow: 0 0 0 3px rgba(235, 0, 69, .15); }
.cart-btn {
  width: 52px; border: none; border-radius: 8px; background: var(--brand);
  font-size: 20px; cursor: pointer; transition: background .15s;
}
.cart-btn:hover { background: var(--brand-deep); }

/* карточка позиции в заказе */
.item-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; background: #fcfcfc; }
.item-card-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.item-card-head .acts { margin-left: auto; display: flex; gap: 4px; }
.item-card-head .acts button {
  border: none; background: transparent; cursor: pointer; font-size: 14px; color: var(--muted);
  width: 30px; height: 30px; border-radius: 7px;
}
.item-card-head .acts button:hover { background: #f0f0f1; color: var(--dark); }
.item-main { display: flex; gap: 14px; align-items: flex-start; }
.item-main .img {
  width: 74px; height: 74px; border-radius: 10px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; font-size: 38px; flex-shrink: 0; overflow: hidden;
}
.item-main .img img { width: 100%; height: 100%; object-fit: cover; }
.item-main .info { flex: 1; min-width: 0; }
.item-main .t { font-weight: 500; font-size: 13.5px; }
.item-main .t a { color: var(--brand-deep); }
.item-main .v { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.item-main .p { text-align: right; white-space: nowrap; }
.item-main .p .price { font-weight: 600; font-size: 15px; }
.item-main .p .per { color: var(--muted); font-size: 11.5px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-stepper button {
  width: 30px; height: 32px; border: none; background: #f6f6f7; cursor: pointer;
  font-size: 16px; color: #444;
}
.qty-stepper button:hover { background: var(--brand-soft); }
.qty-stepper input {
  width: 52px; height: 32px; border: none; text-align: center; outline: none;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.svc-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-top: 1px dashed var(--line); font-size: 13px;
}
.svc-row:first-of-type { margin-top: 12px; border-top: 1px solid var(--line); }
.svc-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }
.svc-row .svc-name { flex: 1; }
.svc-row .svc-note { color: var(--muted); font-size: 12px; }
.svc-row .svc-fee { font-weight: 500; white-space: nowrap; }
.svc-row.off { opacity: .55; }
.item-comment { margin-top: 10px; }
.item-comment input {
  width: 100%; border: 1.5px solid #e2e2e5; border-radius: 8px; padding: 9px 12px;
  outline: none; font-size: 13px;
}
.item-comment input:focus { border-color: var(--brand); }

/* корзина справа */
.cart-panel { position: sticky; top: 86px; }
.cart-panel .card-title { display: flex; justify-content: space-between; align-items: center; }
.cart-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13.5px; gap: 8px; }
.cart-row .lbl { color: #555; display: flex; align-items: center; gap: 6px; }
.cart-row .rate-chip {
  background: #f1f1f2; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; color: #666;
}
.cart-row b { white-space: nowrap; }
.cart-row.total { border-top: 1.5px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 15px; font-weight: 600; }
.cashback-box {
  background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; margin: 12px 0;
  font-size: 12.5px; color: var(--brand-deep);
}
.cashback-box .row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.cashback-box .row b { color: var(--brand-deep); }
.save-btn { width: 100%; justify-content: center; }
.cancel-line { text-align: center; margin-top: 10px; }
.cancel-line button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.cancel-line button:hover { color: var(--dark); }

/* модалка товара */
.pd-layout { display: flex; gap: 16px; }
.pd-gallery { width: 240px; flex-shrink: 0; }
.pd-gallery .main-img {
  width: 240px; height: 240px; border-radius: 12px; overflow: hidden; background: var(--brand-soft);
}
.pd-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumbs img {
  width: 48px; height: 48px; border-radius: 8px; cursor: pointer; object-fit: cover;
  border: 2px solid transparent;
}
.pd-thumbs img.active { border-color: var(--brand); }
.pd-info { flex: 1; min-width: 0; }
.pd-title { font-weight: 600; font-size: 15px; line-height: 1.4; }
.pd-meta { color: var(--brand); font-size: 12.5px; margin-top: 6px; }
.pd-tiers { display: flex; gap: 14px; margin: 14px 0 4px; }
.pd-tier .tp { color: var(--brand); font-weight: 600; font-size: 19px; white-space: nowrap; }
.pd-tier .tq { color: var(--muted); font-size: 12px; }
.pd-tier.active .tp { color: var(--brand-deep); }
.pd-tier.active { background: var(--brand-soft); border-radius: 8px; padding: 4px 8px; margin: -4px -8px; }
.pd-variant-row { display: flex; gap: 12px; align-items: center; border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; flex-wrap: wrap; }
.pd-variant-row .img { width: 54px; height: 54px; border-radius: 9px; overflow: hidden; flex-shrink: 0; }
.pd-variant-row .img img { width: 100%; height: 100%; object-fit: cover; }
.pd-variant-row .nm { font-size: 12.5px; width: 140px; }
.pd-variant-row .pr { color: var(--brand); font-weight: 600; white-space: nowrap; }
.pd-variant-row .avail { color: var(--muted); font-size: 12px; }
.pd-colors { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.pd-color {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line);
  border-radius: 20px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; background: #fff;
}
.pd-color .dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.pd-color.active { border-color: var(--dark); font-weight: 500; }
.pd-size-select { margin-top: 10px; }
.pd-size-select select { border: 1.5px solid #dcdcdf; border-radius: 8px; padding: 7px 10px; outline: none; }
.pd-foot {
  display: flex; align-items: center; gap: 14px; margin-top: 16px;
  background: #f7f7f8; border-radius: 10px; padding: 12px 16px; flex-wrap: wrap;
}
.pd-foot .sum { margin-left: auto; font-size: 15px; }
.pd-foot .sum b { color: var(--brand); font-size: 18px; }
.pd-warn {
  background: var(--red-soft); color: var(--red); border-radius: 8px;
  padding: 10px 14px; font-size: 12.5px; margin-top: 12px; max-width: 240px;
}
.pd-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------------- отправки: степпер ---------------- */
.steps { display: flex; align-items: flex-start; margin: 14px 0 4px; }
.step { flex: 1; text-align: center; position: relative; }
.step .pt {
  width: 18px; height: 18px; border-radius: 50%; background: #e5e5e7; margin: 0 auto 6px;
  position: relative; z-index: 2; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #e5e5e7;
}
.step .lb { font-size: 11px; color: var(--muted); line-height: 1.3; }
.step.done .pt { background: var(--brand); box-shadow: 0 0 0 1.5px var(--brand-deep); }
.step.done .lb { color: var(--text); font-weight: 500; }
.step::before {
  content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px;
  background: #e5e5e7; z-index: 1;
}
.step:first-child::before { display: none; }
.step.done::before { background: var(--brand); }

/* ---------------- чат ---------------- */
.chat-box { display: flex; flex-direction: column; height: 56vh; min-height: 420px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 6px 4px; }
.msg { max-width: 72%; margin-bottom: 12px; display: flex; }
.msg.user { margin-left: auto; }
.msg .bubble {
  padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45;
  background: #f1f1f2; border-bottom-left-radius: 4px;
}
.msg.user .bubble { background: var(--dark); color: #fff; border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.msg .when { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.msg.user .when { text-align: right; }
.chat-input { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.chat-input textarea { flex: 1; border: 1.5px solid #dcdcdf; border-radius: 10px; padding: 10px 12px; resize: none; height: 46px; outline: none; }
.chat-input textarea:focus { border-color: var(--brand); }

/* ---------------- баннеры ---------------- */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.banner {
  border-radius: 14px; padding: 24px; color: #fff; min-height: 168px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.banner .tag {
  align-self: flex-start; background: rgba(255,255,255,.22); border-radius: 20px;
  padding: 4px 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.banner h3 { margin: 12px 0 6px; font-size: 17px; line-height: 1.3; }
.banner p { margin: 0; font-size: 13px; opacity: .92; }
.banner .big { position: absolute; right: 10px; bottom: -18px; font-size: 110px; opacity: .16; line-height: 1; }
.grad-a { background: linear-gradient(120deg, var(--dark) 20%, #111); }
.grad-b { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); }
.grad-c { background: linear-gradient(120deg, #4b4a4b, #6e6c6d); }
.grad-d { background: linear-gradient(120deg, #8a0030, var(--brand-deep)); }
.promo-hero { width: 100%; border-radius: 14px; display: block; margin-bottom: 16px; }
.ext-card { border: 1.5px solid var(--dark); margin-bottom: 18px; }
.ext-grid { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ext-text { flex: 1; min-width: 240px; }
.ext-title { font-weight: 600; font-size: 14.5px; }
.order-card.sample { border: 1.5px dashed #b9b9be; background: #fbfbfb; box-shadow: none; }

/* ---------------- прочее ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat .v { font-size: 21px; font-weight: 600; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.hl { background: var(--dark); border-color: var(--dark); color: #fff; }
.stat.hl .l { color: #aaa; }

.balance-hero {
  background: var(--dark); color: #fff; border-radius: 14px; padding: 26px 28px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.balance-hero .sum { font-size: 34px; font-weight: 600; }
.balance-hero .sum small { font-size: 20px; color: var(--brand); }
.balance-hero .lbl { color: #9a9a9a; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.balance-hero .sub { color: #bdbdbd; font-size: 12.5px; margin-top: 4px; }
.balance-hero .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.progress { height: 10px; background: #ececee; border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); border-radius: 6px; transition: width .4s; }

.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: none; }
.acc-q {
  width: 100%; text-align: left; background: none; border: none; padding: 16px 4px;
  font-size: 14px; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.acc-q::after { content: "+"; font-size: 18px; color: var(--muted); font-weight: 400; }
.acc-item.open .acc-q::after { content: "–"; }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.acc-a p { margin: 0 4px 16px; color: #555; font-size: 13.5px; }
.acc-item.open .acc-a { max-height: 400px; }

.addr-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px;
  display: flex; gap: 14px; align-items: flex-start; background: var(--card);
}
.addr-card .pin { font-size: 20px; }
.addr-card .name { font-weight: 600; }
.addr-card .def { background: var(--brand-soft); color: var(--brand-deep); font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 7px; margin-left: 8px; text-transform: uppercase; letter-spacing: .05em; }
.addr-card .acts { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

/* ---------------- modal / toast ---------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 15, 15, .5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadein .15s ease;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: pop .18s ease;
}
.modal.wide { max-width: 640px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 500; }
.modal-x {
  background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted);
  line-height: 1; padding: 4px;
}
.modal-x:hover { color: var(--dark); }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 22px; }

#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--dark); color: #fff; border-radius: 10px; padding: 12px 20px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: pop .2s ease; max-width: 90vw;
}
.toast.ok::before { content: "✓ "; color: var(--brand); font-weight: 600; }
.toast.err { background: var(--red); }
.toast.warn { background: var(--orange); }

.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 40px auto; }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .ico { font-size: 40px; margin-bottom: 10px; }

.copy-line {
  display: flex; gap: 10px; align-items: center; background: #fbfbfb;
  border: 1.5px dashed #cfcfd2; border-radius: 10px; padding: 12px 14px; font-size: 13.5px;
}
.copy-line code { flex: 1; overflow-x: auto; white-space: nowrap; }

/* строки услуг в заявке фулфилмента */
.tarr-group {
  background: var(--brand-soft); color: var(--brand-deep); font-weight: 600;
  font-size: 12px; padding: 5px 10px; border-radius: 6px; margin: 10px 0 4px;
}
.tarr-group:first-child { margin-top: 0; }
.tarr-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 2px; font-size: 12.5px; border-bottom: 1px dashed var(--line);
}
.tarr-row:last-child { border-bottom: none; }
.tarr-row b { white-space: nowrap; font-weight: 500; color: var(--brand-deep); }
.svc-line { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.svc-line .photo-btn {
  width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 17px; flex-shrink: 0; background: #fff;
}
.svc-line .photo-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.svc-line .del {
  width: 32px; height: 32px; border-radius: 7px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-size: 15px; color: var(--muted); flex-shrink: 0;
}
.svc-line .del:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 860px) { .svc-line { flex-wrap: wrap; } }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .wrap { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
  .menu { display: flex; overflow-x: auto; }
  .menu a { border-bottom: none; border-right: 1px solid var(--line); white-space: nowrap; }
  .method-card { grid-template-columns: 1fr; }
  .method-illus { order: -1; }
  .header-in { flex-wrap: wrap; gap: 10px; }
  .header-spacer { display: none; }
  .user-chip .u-name { display: none; }
}

/* ---------------- карточки товара нового флоу ---------------- */
.prod-card.invalid { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.status-dot {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.status-dot.ok { background: #e6f6ea; color: #1d7a36; }
.status-dot.warn { background: var(--red-soft); color: var(--red); }
.prod-title {
  width: 100%; border: 1.5px solid transparent; border-radius: 8px; padding: 5px 8px;
  font: inherit; font-weight: 600; font-size: 13.5px; outline: none; background: transparent;
}
.prod-title:hover, .prod-title:focus { border-color: var(--line); background: #fff; }
.prod-url { font-size: 12px; margin: 2px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-url a { color: var(--muted); }
.prod-url input {
  width: 100%; border: 1.5px solid #e2e2e5; border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; outline: none;
}
.prod-url input:focus { border-color: var(--brand); }
.price-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: #555; }
.price-line input {
  width: 92px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 9px;
  outline: none; font-weight: 600;
}
.price-line input:focus { border-color: var(--brand); }
.price-line input.err { border-color: var(--red); background: var(--red-soft); }
.price-reset { border: none; background: transparent; font-size: 14px; color: var(--muted); cursor: pointer; }
.price-reset:hover { color: var(--brand); }
.tier-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tchip {
  border: 1px solid var(--line); border-radius: 14px; padding: 2px 9px; font-size: 11.5px;
  color: #777; background: #fff; white-space: nowrap;
}
.tchip.active { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); font-weight: 600; }
.err-hint { color: var(--red); font-size: 12px; margin-top: 5px; display: none; }
.item-card.invalid .err-hint { display: block; }
.pos-block { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.pos-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pos-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; flex-wrap: wrap; }
.pos-row select {
  border: 1.5px solid #dcdcdf; border-radius: 8px; padding: 6px 8px; outline: none;
  font-size: 13px; max-width: 200px; background: #fff;
}
.pos-row input[data-variant] {
  flex: 1; min-width: 150px; border: 1.5px solid #e2e2e5; border-radius: 8px;
  padding: 6px 10px; font-size: 13px; outline: none;
}
.pos-row input[data-variant]:focus { border-color: var(--brand); }
.pos-row .pos-fee { color: var(--muted); font-size: 12px; min-width: 92px; text-align: right; }
.pos-del {
  border: none; background: transparent; color: #c9c9cc; cursor: pointer;
  font-size: 15px; width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
}
.pos-del:hover { background: var(--red-soft); color: var(--red); }
.pos-add {
  border: 1.5px dashed var(--line); background: none; border-radius: 8px; padding: 6px 12px;
  font-size: 12.5px; color: #666; cursor: pointer; margin-top: 6px;
}
.pos-add:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.photo-slot {
  position: relative; width: 74px; height: 74px; border-radius: 10px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  overflow: hidden; border: 1.5px dashed var(--brand-line);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .plus { font-size: 26px; color: var(--brand); line-height: 1; }
.photo-slot input[type=file] { display: none; }
.card-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.detail-thumb {
  width: 42px; height: 42px; border-radius: 8px; object-fit: cover;
  vertical-align: middle; margin-right: 8px; flex-shrink: 0;
}

.ext-hide-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 3px 11px; font-size: 12px; color: #777; cursor: pointer; white-space: nowrap;
}
.ext-hide-btn:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }

.cart-row.rub-row { color: #555; font-size: 12.5px; padding-top: 9px; }
.cart-row.rub-row b { color: var(--brand-deep); }

/* ---------------- чат-виджет ---------------- */
.chat-widget { position: fixed; right: 22px; bottom: 22px; z-index: 90; }
.chat-bubble {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  border: none; background: var(--brand); color: #fff; font-size: 24px;
  cursor: pointer; box-shadow: 0 6px 20px rgba(235, 0, 69, .35);
  transition: transform .15s, background .15s;
}
.chat-bubble:hover { transform: scale(1.07); background: var(--brand-deep); }
.chat-dot {
  position: absolute; top: 2px; right: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #2ecc40; border: 2.5px solid #fff;
}
.chat-panel {
  position: absolute; right: 0; bottom: 66px; width: 380px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 110px);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.chat-panel-head button {
  border: none; background: transparent; color: #fff; font-size: 18px;
  cursor: pointer; width: 30px; height: 30px; border-radius: 7px; line-height: 1;
}
.chat-panel-head button:hover { background: rgba(255, 255, 255, .18); }
.chat-panel-body { flex: 1; overflow-y: auto; padding: 14px; }
/* внутри виджета заголовок вью не нужен */
.chat-panel-body .page-title { display: none; }
@media (max-width: 640px) {
  .chat-widget { right: 14px; bottom: 14px; }
  .chat-panel { width: calc(100vw - 28px); height: calc(100vh - 90px); }
}

/* фикс: hidden-атрибут должен побеждать display:flex у панели */
.chat-panel[hidden] { display: none !important; }
.chat-panel-head .chat-panel-hours {
  font-weight: 400; font-size: 11.5px; opacity: .85; margin-top: 1px;
}

/* ---------------- поле ввода чата: + фото, большое поле, стрелка ---------------- */
.chat-input { align-items: flex-end; }
.chat-input textarea {
  flex: 1; min-height: 64px; max-height: 140px; resize: none;
  border: 1.5px solid #e2e2e5; border-radius: 12px; padding: 9px 12px;
  font: inherit; font-size: 13.5px; outline: none; line-height: 1.4;
}
.chat-input textarea:focus { border-color: var(--brand); }
.chat-add, .chat-send {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 19px; flex-shrink: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.chat-add {
  background: #f1f1f2; color: #666;
}
.chat-add:hover { background: var(--brand-soft); color: var(--brand-deep); }
.chat-send {
  background: var(--brand); color: #fff; font-size: 17px;
}
.chat-send:hover { background: var(--brand-deep); transform: scale(1.06); }
.chat-send:disabled { opacity: .5; transform: none; }
.chat-attach {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px dashed var(--line); padding: 10px 0 0;
}
.chat-attach img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 9px;
  border: 1px solid var(--line);
}
.chat-attach button {
  border: none; background: var(--red-soft); color: var(--red);
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 12px;
}
.bubble img { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; }

/* фикс двойного скролла в чат-виджете: скролл только у ленты сообщений */
.chat-panel-body { overflow: hidden; padding: 10px 12px; }
.chat-panel-body .card {
  border: none; background: transparent; box-shadow: none; padding: 0; margin: 0;
}
.chat-panel-body .chat-box { height: 100%; min-height: 0; }
.chat-panel-body::-webkit-scrollbar { display: none; }

/* чат-бокс занимает всю панель: лента сверху, ввод прижат к низу */
.chat-panel-body .card { height: 100%; }
.chat-panel-body .chat-box { height: 100%; min-height: 0; }
