/* ДИСС — дизайн-система: токены и общие компоненты (витрина + кабинеты + админка). */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@500;600;700;800&display=swap');

:root {
  --ink: #14213D; --ink-2: #22315C; --ink-3: #3A4870; --muted: #5E6A87; --muted-2: #8B94AD;
  --line: #E4E6EE; --line-2: #EEF0F5; --bg: #F5F4EF; --bg-2: #FBFAF7; --card: #FFFFFF;
  --yellow: #FFD21F; --yellow-2: #FFE26B; --yellow-soft: #FFF5CC; --yellow-ink: #6B5200;
  --mint: #DFF4EA; --sky: #E3EDFF; --lilac: #EFE8FF; --peach: #FFE9E0; --cream: #FFF7DA; --rose: #FFE4EC;
  --green: #138A5B; --green-soft: #DDF5EA; --red: #D93B41; --red-soft: #FFE5E6; --amber: #B86E00; --amber-soft: #FFF1D6;
  --blue: #2B5BD7; --blue-soft: #E3EBFF; --violet: #6B45D9; --violet-soft: #EEE7FF; --teal: #0E8A8A; --teal-soft: #DBF4F3; --gray-soft: #EEF0F4;
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px; --r-xs: 7px;
  --sh-1: 0 1px 2px rgba(20,33,61,.06), 0 1px 1px rgba(20,33,61,.04);
  --sh-2: 0 8px 24px -10px rgba(20,33,61,.18), 0 2px 6px rgba(20,33,61,.05);
  --sh-3: 0 24px 60px -20px rgba(20,33,61,.35), 0 6px 18px rgba(20,33,61,.08);
  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --wrap: 1360px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 500 15px/1.5 var(--f-body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(43,91,215,.45); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hl { background: linear-gradient(180deg, transparent 55%, var(--yellow) 55%, var(--yellow) 92%, transparent 92%); padding: 0 .08em; }
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- Иконки (SVG-спрайт) ---------- */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; } .i-lg { width: 24px; height: 24px; }

/* ---------- Кнопки ---------- */
.btn { --b: var(--ink); --c: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 13px; border: 0; background: var(--b); color: var(--c); font-weight: 700; font-size: 15px; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s; position: relative; user-select: none; }
.btn:hover { box-shadow: 0 8px 20px -8px rgba(20,33,61,.45); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-yellow { --b: var(--yellow); --c: var(--ink); }
.btn-yellow:hover { --b: #FFC800; box-shadow: 0 10px 24px -10px rgba(230,170,0,.75); }
.btn-ghost { --b: transparent; --c: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: #fff; }
.btn-soft { --b: var(--line-2); --c: var(--ink); }
.btn-soft:hover { --b: #E6E9F1; box-shadow: none; }
.btn-white { --b: #fff; --c: var(--ink); }
.btn-danger { --b: var(--red-soft); --c: var(--red); }
.btn-danger:hover { --b: var(--red); --c: #fff; }
.btn-green { --b: var(--green); --c: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 46px; padding: 0; }
.btn-icon.btn-sm { width: 36px; } .btn-icon.btn-xs { width: 30px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--c) var(--c) var(--c) transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--blue); font-weight: 600; } .link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--red); font-weight: 600; }
.input, .select, .textarea { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 38px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2314213D' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.input:hover, .select:hover, .textarea:hover { border-color: #CDD2DE; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20,33,61,.08); }
.input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(217,59,65,.1); }
.input-sm, .select-sm { height: 36px; font-size: 14px; border-radius: 10px; padding: 0 10px; }
.select-sm { padding-right: 30px; background-position: right 10px center; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); font-weight: 500; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.check input { appearance: none; width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid #C7CCDA; background: #fff; display: grid; place-items: center; transition: .15s; margin: 0; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2.2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.check input[type=radio] { border-radius: 50%; }
.check input[type=radio]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: #D5D9E4; transition: .2s; margin: 0; position: relative; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s var(--ease); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- Бейджи, чипы ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; background: var(--gray-soft); color: var(--ink-3); }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-ink { background: var(--ink); color: #fff; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: .15s; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .x { opacity: .6; }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--line-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 800; color: var(--muted); }

/* ---------- Карточки ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1); border: 1px solid var(--line-2); }
.card-pad { padding: 24px; }

/* ---------- Таблицы ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #FAFAF6; }
.table .r { text-align: right; } .table .c { text-align: center; }
.table-wrap { overflow: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }

/* ---------- Модалки, тосты ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(13,22,44,.5); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-box { background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-3); width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; transform: translateY(16px) scale(.98); transition: transform .3s var(--ease); position: relative; }
.modal.is-open .modal-box { transform: none; }
.modal-box.wide { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 0; }
.modal-head h3 { font-family: var(--f-display); font-size: 20px; }
.modal-body { padding: 18px 26px 26px; }
.modal-close { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--line-2); display: grid; place-items: center; flex: none; }
.modal-close:hover { background: var(--line); }
.toasts { position: fixed; z-index: 300; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 12px 14px 12px 12px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--sh-3); font-weight: 600; font-size: 14px; animation: toastIn .35s var(--ease); }
.toast img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; flex: none; }
.toast .t-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); flex: none; }
.toast.err .t-ico { background: var(--red); color: #fff; }
.toast a { color: var(--yellow); font-weight: 800; margin-left: auto; white-space: nowrap; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Прочее ---------- */
.empty { text-align: center; padding: 48px 20px; }
.empty img { width: 180px; margin: 0 auto 16px; }
.empty h3 { font-family: var(--f-display); font-size: 20px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }
.skeleton { background: linear-gradient(90deg, #EEF0F4 0%, #F7F8FA 50%, #EEF0F4 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--blue-soft); color: #1C3F99; font-weight: 600; font-size: 14px; }
.alert-yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.alert-red { background: var(--red-soft); color: #A2262B; }
.alert-green { background: var(--green-soft); color: #0E6E48; }
.stock { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.stock .bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.stock .bars i { width: 3px; border-radius: 2px; background: #D3D8E3; }
.stock .bars i:nth-child(1) { height: 6px; } .stock .bars i:nth-child(2) { height: 9px; } .stock .bars i:nth-child(3) { height: 12px; }
.stock.many, .stock.ok { color: var(--green); } .stock.many .bars i, .stock.ok .bars i:nth-child(-n+2) { background: var(--green); }
.stock.low { color: var(--amber); } .stock.low .bars i:nth-child(1) { background: var(--amber); }
.stock.out { color: var(--muted); }
.copy { cursor: copy; border-bottom: 1px dashed transparent; } .copy:hover { border-bottom-color: currentColor; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 14px; width: max-content; max-width: 100%; overflow: auto; }
.tabs > * { height: 38px; padding: 0 16px; border-radius: 10px; border: 0; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs > .is-active { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.qty { display: inline-flex; align-items: center; height: 46px; border-radius: 13px; background: var(--line-2); padding: 3px; }
.qty button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; font-size: 20px; font-weight: 600; color: var(--ink); transition: background .12s; }
.qty button:hover { background: #fff; }
.qty input { width: 52px; height: 40px; border: 0; background: transparent; text-align: center; font-weight: 800; font-size: 15px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty input:focus { outline: none; background: #fff; border-radius: 8px; }
.qty-sm { height: 36px; border-radius: 10px; } .qty-sm button { width: 30px; height: 30px; font-size: 17px; border-radius: 8px; } .qty-sm input { width: 44px; height: 30px; font-size: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink); background: var(--yellow); flex: none; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
