/*!
 * Safingo Shop – ordering portal UI.
 * Builds on the tokens of EXT:safingo_sitepackage (falls back to its values when used standalone).
 * Dense, calm, app-like: one primary action per row, numbers right-aligned in tabular figures.
 */
.shop {
    --s-brand: var(--brand, #68bfac);
    --s-brand-700: var(--brand-700, #1f6e5d);
    --s-brand-50: var(--brand-50, #f0f9f6);
    --s-brand-100: var(--brand-100, #dcf1eb);
    --s-ink: var(--ink, #1b2332);
    --s-ink-2: var(--ink-2, #3d4657);
    --s-ink-3: var(--ink-3, #626b7b);
    --s-bg: var(--bg, #fbfbfd);
    --s-surface: var(--surface, #fff);
    --s-surface-2: var(--surface-2, #f3f5f7);
    --s-surface-3: var(--surface-3, #e9edf1);
    --s-line: var(--line, rgba(27, 35, 50, .09));
    --s-line-2: var(--line-2, rgba(27, 35, 50, .16));
    --s-danger: var(--danger, #c0392b);
    --s-warn-bg: #fff6e5;
    --s-warn-ink: #8a5300;
    --s-radius: var(--radius, 18px);
    --s-radius-s: var(--radius-s, 12px);
    --s-shadow: var(--shadow-1, 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06));
    --s-shadow-2: var(--shadow-2, 0 18px 40px -12px rgba(16, 24, 40, .14));
    --s-ease: var(--ease-out, cubic-bezier(.22, 1, .36, 1));
    --s-gutter: var(--gutter, clamp(16px, 4.5vw, 44px));
    color: var(--s-ink);
    font-variant-numeric: tabular-nums;
    padding: 24px 0 clamp(48px, 8vw, 96px);
}
.page-content--shop .shop { padding-top: calc(var(--header-h, 64px) + 24px); }
.page-content > .ce[class*="ce--safingoshop_"] { max-width: none; padding: 0; }
.page-content--narrow > .ce--safingoshop_registration { max-width: calc(var(--maxw-text, 760px) + 2 * var(--s-gutter, 24px)); }
@media (prefers-color-scheme: dark) {
    .shop { --s-warn-bg: #2d2412; --s-warn-ink: #f4c46b; }
}
.shop__inner { max-width: var(--maxw, 1200px); margin-inline: auto; padding-inline: var(--s-gutter); }
.page-content--shop { padding: 0; }
.shop .visually-hidden-form { display: contents; }
.shop .num { text-align: right; font-variant-numeric: tabular-nums; }
.shop .muted { color: var(--s-ink-3); }
.shop small { font-size: .82em; }
.shop .stack { display: grid; gap: 10px; }
.shop .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------ nav */
.shop-nav { position: sticky; top: calc(var(--header-h, 64px) + 8px); z-index: 20; margin-bottom: 20px; }
.shop-nav__track {
    display: flex; gap: 4px; padding: 4px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
    background: var(--glass-strong, rgba(255, 255, 255, .84)); border: 1px solid var(--s-line); border-radius: 999px;
    box-shadow: var(--s-shadow); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.shop-nav__track::-webkit-scrollbar { display: none; }
.shop-nav__link {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
    color: var(--s-ink-2); font-size: 15px; font-weight: 500; text-decoration: none; transition: background .2s, color .2s;
}
.shop-nav__link:hover { color: var(--s-ink); background: var(--s-surface-2); }
.shop-nav__link[aria-current="page"] { color: var(--s-bg); background: var(--s-ink); }
.cart-badge {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--s-brand); color: #0b2a24; font-size: 12px; font-weight: 700; line-height: 1;
}
.cart-badge--empty { display: none; }
.cart-badge.is-bump { animation: badge-bump .5s var(--s-ease); }
@keyframes badge-bump { 30% { transform: scale(1.35); } }

/* ------------------------------------------------------------ banner, flash, notices */
.shop-banner {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--s-radius);
    background: var(--s-brand-50); border: 1px solid var(--s-brand-100);
}
.shop-banner--rejected { background: var(--s-warn-bg); border-color: transparent; }
.shop-banner__icon { flex: none; width: 28px; height: 28px; color: var(--s-brand-700); }
.shop-banner__text { flex: 1; font-size: 15px; color: var(--s-ink-2); }
.shop-banner__text p { margin: 0; }
.shop-banner__title { font-weight: 600; color: var(--s-ink) !important; }
@media (max-width: 640px) { .shop-banner { flex-wrap: wrap; } }
.shop-flash { display: grid; gap: 8px; margin-bottom: 16px; }
.shop-flash--live { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(92vw, 460px); margin: 0; }
.shop-flash__item {
    margin: 0; padding: 12px 16px; border-radius: var(--s-radius-s); font-size: 15px; font-weight: 500;
    background: var(--s-brand-50); color: var(--s-brand-700); border: 1px solid var(--s-brand-100);
    animation: flash-in .4s var(--s-ease);
}
.shop-flash--live .shop-flash__item { background: var(--s-ink); color: var(--s-bg); border: 0; box-shadow: var(--s-shadow-2); }
.shop-flash__item--danger, .shop-flash__item--error { background: #fdecea; color: #9b2c20; border-color: #f7cfc9; }
.shop-flash__item--warning { background: var(--s-warn-bg); color: var(--s-warn-ink); border-color: transparent; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
.shop .notice { padding: 12px 16px; border-radius: var(--s-radius-s); background: var(--s-surface-2); font-size: 15px; }
.shop .notice--warn { background: var(--s-warn-bg); color: var(--s-warn-ink); }
.hint { margin: 8px 0 0; font-size: 14px; color: var(--s-brand-700); }
.hint--warn { color: var(--s-warn-ink); }
.hint--muted { color: var(--s-ink-3); }
.fineprint { font-size: 13px; color: var(--s-ink-3); margin: 12px 0 0; }

/* ------------------------------------------------------------ headings */
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
.shop-head__title { margin: 0; font-family: var(--font-display, inherit); font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.shop-head__meta { margin: 6px 0 0; color: var(--s-ink-3); font-size: 15px; }
.section-label { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--s-ink-3); }
.crumbs { margin: 0 0 8px; }
.link { color: var(--s-brand-700); text-decoration: none; font-weight: 500; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link--back::before { content: "‹ "; }
.lead-text { color: var(--s-ink-2); max-width: 70ch; }

/* ------------------------------------------------------------ cards, chips, status */
.shop .card { background: var(--s-surface); border: 1px solid var(--s-line); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: clamp(16px, 2.4vw, 24px); }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--s-surface-2); color: var(--s-ink-2); white-space: nowrap; }
.tag--brand { background: var(--s-brand-50); color: var(--s-brand-700); }
.tag--warn { background: var(--s-warn-bg); color: var(--s-warn-ink); }
.tag--muted { color: var(--s-ink-3); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--s-ink-3); }
.status--sent::before, .status--new::before, .status--pending::before { background: #3b82f6; }
.status--confirmed::before { background: #a855f7; }
.status--shipped::before, .status--verified::before { background: var(--s-brand); }
.status--cancelled::before, .status--rejected::before { background: var(--s-danger); }
.mono {
    flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(145deg, var(--s-brand-50), var(--s-brand-100)); color: var(--s-brand-700);
    font-size: 15px; font-weight: 700; letter-spacing: -.02em;
}
.mono--s { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.icon-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--s-line);
    background: var(--s-surface); color: var(--s-ink-2); cursor: pointer; transition: background .2s, color .2s, transform .1s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--s-surface-2); color: var(--s-ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn--danger:hover { color: var(--s-danger); }
.btn--danger { background: transparent; color: var(--s-danger); border: 1px solid currentColor; }

/* ------------------------------------------------------------ search */
.search { display: grid; gap: 12px; margin-bottom: 20px; }
.search__main { display: flex; gap: 8px; flex-wrap: wrap; }
.search__field { position: relative; flex: 1 1 320px; display: flex; }
.search__field--sm { flex: 0 1 280px; }
.search__icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--s-ink-3); pointer-events: none; }
.search__input, .search__select, .filter__select, .field__input {
    width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--s-radius-s); border: 1px solid var(--s-line-2);
    background: var(--s-surface); color: var(--s-ink); font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.search__icon + .search__input { padding-left: 42px; }
.search__select { width: auto; flex: 0 1 220px; }
.search__input:focus, .search__select:focus, .filter__select:focus, .field__input:focus, .stepper__input:focus, .myprice__input:focus {
    outline: none; border-color: var(--s-brand); box-shadow: 0 0 0 4px var(--brand-glow, rgba(104, 191, 172, .35));
}
.search__submit { flex: none; }
@media (max-width: 640px) {
    .search__select { flex: 1 1 calc(50% - 4px); min-width: 0; }
    .search__submit { flex: 1 1 100%; }
    .filter { flex: 1 1 calc(50% - 8px); }
    .filter__select { flex: 1; max-width: none; }
    .shop-nav { margin-inline: calc(var(--s-gutter) * -1); padding-inline: var(--s-gutter); }
}
.search__filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.filter { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--s-ink-3); }
.filter__select { min-height: 36px; padding: 6px 10px; font-size: 14px; width: auto; max-width: 260px; }
.az { display: flex; flex-wrap: wrap; gap: 2px; }
.az__letter {
    display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--s-ink-2); text-decoration: none;
}
.az__letter:hover { background: var(--s-surface-2); }
.az__letter[aria-current="true"] { background: var(--s-ink); color: var(--s-bg); }

/* ------------------------------------------------------------ results */
.results { list-style: none; margin: 0; padding: 0; background: var(--s-surface); border: 1px solid var(--s-line); border-radius: var(--s-radius); box-shadow: var(--s-shadow); }
.result {
    display: grid; grid-template-columns: 44px minmax(12rem, 1fr) minmax(9rem, 15rem) auto; gap: 8px 16px; align-items: center;
    padding: 14px clamp(14px, 2vw, 20px); border-top: 1px solid var(--s-line);
}
.result:first-child { border-top: 0; }
.result__title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.result__title a { color: inherit; text-decoration: none; }
.result__title a:hover { color: var(--s-brand-700); }
.result__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; font-size: 13px; color: var(--s-ink-3); }
.result__offer { text-align: right; min-width: 0; }
.result__price { margin: 0; font-size: 17px; font-weight: 700; }
.result__list { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--s-ink-3); }
.result__dealer { margin: 2px 0 0; font-size: 13px; color: var(--s-ink-3); }
.result__dealer a { color: var(--s-brand-700); }
@media (max-width: 860px) {
    .result { grid-template-columns: 44px minmax(0, 1fr); }
    .result__offer { grid-column: 2; text-align: left; }
    .result .atc { grid-column: 2; }
}

/* add to cart + stepper */
.atc { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--s-line-2); border-radius: 10px; background: var(--s-surface); overflow: hidden; }
.stepper__btn { width: 30px; height: 36px; border: 0; background: transparent; color: var(--s-ink-2); font-size: 18px; cursor: pointer; }
.stepper__btn:hover { background: var(--s-surface-2); }
.no-js .stepper__btn, .stepper__btn[hidden] { display: none; }
.stepper__input {
    width: 54px; height: 36px; border: 0; text-align: center; font: inherit; font-size: 15px; background: transparent; color: var(--s-ink);
    -moz-appearance: textfield; appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button, .stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.atc__btn { gap: 6px; }
.atc__btn .icon-cart { width: 18px; height: 18px; }
.atc--compact .atc__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.atc__btn.is-done { background: var(--s-brand-700); }

/* pagination */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 24px 0 0; }
.pager__page, .pager__gap { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; font-weight: 600; text-decoration: none; color: var(--s-ink-2); }
.pager a.pager__page:hover { background: var(--s-surface-2); }
.pager__page[aria-current="page"] { background: var(--s-ink); color: var(--s-bg); }

/* empty / done states */
.empty, .done { display: grid; justify-items: center; gap: 12px; text-align: center; padding: clamp(40px, 8vw, 80px) 16px; }
.empty__icon, .done__icon { width: 56px; height: 56px; color: var(--s-ink-3); }
.done__icon { width: 72px; height: 72px; color: var(--s-brand); }
.done__check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .15s var(--s-ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.empty__title, .done__title { margin: 0; font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.02em; }
.empty__text, .done__text { margin: 0; max-width: 52ch; color: var(--s-ink-3); }
.done__list { list-style: none; margin: 8px 0; padding: 8px 16px; width: min(560px, 100%); text-align: left; }
.done__list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--s-line); }
.done__list li:first-child { border-top: 0; }
.done__list small, .offers__dealer small { display: block; color: var(--s-ink-3); }

/* ------------------------------------------------------------ product detail */
.product { display: grid; gap: 24px; }
.product__head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: start; }
.product__media { aspect-ratio: 1; border-radius: var(--s-radius); background: var(--s-surface-2); display: grid; place-items: center; overflow: hidden; }
.product__media img { width: 100%; height: 100%; object-fit: contain; }
.product__placeholder { width: 64px; height: 64px; color: var(--s-ink-3); }
.product__title { margin: 0 0 16px; font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
@media (max-width: 640px) { .product__head { grid-template-columns: 1fr; } .product__media { width: 120px; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 24px; margin: 0; }
.facts dt { font-size: 13px; color: var(--s-ink-3); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts__wide { grid-column: 1 / -1; }
.offers__type { margin: 20px 0 8px; font-size: 15px; font-weight: 600; }
.offers__table { background: var(--s-surface); border: 1px solid var(--s-line); border-radius: var(--s-radius); overflow: hidden; }
.offers__row { display: grid; grid-template-columns: minmax(0, 1.6fr) 150px minmax(110px, .8fr) auto; gap: 12px 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--s-line); }
.offers__row--head { border-top: 0; background: var(--s-surface-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--s-ink-3); padding-block: 8px; }
.offers__dealer { display: flex; align-items: center; gap: 10px; min-width: 0; }
.offers__price { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.offers__price strong { font-size: 17px; }
.offers__price s { color: var(--s-ink-3); font-size: 13px; }
.myprice { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.myprice__field { position: relative; display: inline-flex; }
.myprice__input { width: 96px; height: 36px; padding: 0 22px 0 10px; border-radius: 10px; border: 1px solid var(--s-line-2); background: var(--s-surface); font: inherit; text-align: right; color: var(--s-ink); }
.myprice__cur { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--s-ink-3); font-size: 14px; }
@media (max-width: 900px) {
    .offers__row { grid-template-columns: 1fr auto; }
    .offers__row--head { display: none; }
    .offers__dealer { grid-column: 1 / -1; }
}
.stats__summary { margin: 0 0 12px; font-weight: 500; }
.stats__list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.stats__list li { display: grid; grid-template-columns: 100px 1fr 60px 90px; gap: 8px; padding: 6px 0; border-top: 1px solid var(--s-line); }
.stats__list li span:nth-child(n+3) { text-align: right; }
.note summary, .dealer__delivery summary { cursor: pointer; font-weight: 600; color: var(--s-brand-700); }
.note[open] summary { margin-bottom: 12px; }

/* ------------------------------------------------------------ cart */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.cart__groups { display: grid; gap: 16px; }
.cart__summary { position: sticky; top: calc(var(--header-h, 64px) + 76px); display: grid; gap: 12px; }
@media (max-width: 960px) { .cart { grid-template-columns: 1fr; } .cart__summary { position: static; } }
.group { padding: 0 !important; overflow: hidden; }
.group__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--s-line); }
.group__title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.group__meta { margin: 2px 0 0; font-size: 13px; color: var(--s-ink-3); }
.group__meta a { color: var(--s-brand-700); }
.group--blocked { opacity: .78; }
.group > .field, .group > .totals, .group > .hint { margin-inline: 20px; }
.group > .totals { margin-block: 12px 16px; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto 100px 36px; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--s-line); }
.line:first-child { border-top: 0; }
.lines--compact .line { grid-template-columns: 1fr auto; padding-block: 8px; }
.line--unavailable { opacity: .55; }
.line__title { font-weight: 600; color: inherit; text-decoration: none; }
.line__title:hover { color: var(--s-brand-700); }
.line__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 0; font-size: 13px; color: var(--s-ink-3); }
.line__price { display: grid; justify-items: end; gap: 2px; font-size: 15px; }
.line__total { text-align: right; font-weight: 600; }
@media (max-width: 720px) {
    .line { grid-template-columns: 1fr auto; }
    .line__product { grid-column: 1 / -1; }
    .line__price { justify-items: start; }
}
.group__foot { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: 16px 24px; padding: 16px 20px; background: var(--s-surface-2); border-top: 1px solid var(--s-line); }
@media (max-width: 720px) { .group__foot { grid-template-columns: 1fr; } }
.voucher__form, .voucher__applied { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.field__input--sm { min-height: 36px; padding: 6px 10px; font-size: 14px; width: 180px; }
.totals { margin: 0; display: grid; gap: 4px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--s-ink-2); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals__discount dd { color: var(--s-brand-700); }
.totals__sum { padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--s-line-2); font-weight: 700; font-size: 17px; }
.totals__sum dt { color: var(--s-ink); }
.summary { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--s-line-2); font-size: 17px; }
.summary__total strong { font-size: 24px; letter-spacing: -.02em; }
.check { display: inline-flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--s-brand-700); flex: none; }
.check--lg input { width: 22px; height: 22px; }

/* ------------------------------------------------------------ tables, tabs */
.tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--s-line); overflow-x: auto; scrollbar-width: none; }
.tabs__tab { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--s-ink-3); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tabs__tab:hover { color: var(--s-ink); }
.tabs__tab[aria-current="page"] { color: var(--s-ink); border-bottom-color: var(--s-ink); }
.table-wrap { overflow-x: auto; }
.table-wrap.card { padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 12px 16px; text-align: left; border-top: 1px solid var(--s-line); vertical-align: top; }
.table thead th { border-top: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--s-ink-3); background: var(--s-surface-2); }
.table th.num, .table td.num { text-align: right; }
.table a { color: var(--s-brand-700); font-weight: 600; text-decoration: none; }
.table--rows tbody tr:hover { background: var(--s-surface-2); }
.table tfoot th { text-align: right; font-weight: 500; color: var(--s-ink-2); }
.table__sum th, .table__sum td { font-weight: 700; font-size: 17px; color: var(--s-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip-link { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--s-line-2); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--s-ink-2); }
.chip-link[aria-current="page"] { background: var(--s-ink); color: var(--s-bg); border-color: var(--s-ink); }
.note-box { margin-top: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: grid; gap: 4px; }
.kpi__label { font-size: 13px; color: var(--s-ink-3); }
.kpi__value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.code { margin: 0; padding: 12px; border-radius: var(--s-radius-s); background: var(--s-surface-2); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.address { font-style: normal; line-height: 1.6; margin-bottom: 12px; }

/* ------------------------------------------------------------ dealers */
.dealer-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dealer { display: grid; gap: 14px; align-content: start; }
.dealer[hidden] { display: none; }
.dealer__head { display: flex; gap: 12px; align-items: center; }
.dealer__logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; }
.dealer__name { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.dealer__meta { margin: 4px 0 0; }
.dealer__orders { margin: 0; font-size: 14px; }
.dealer__links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.terms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; padding: 12px 14px; border-radius: var(--s-radius-s); background: var(--s-surface-2); font-size: 14px; }
.terms dt { color: var(--s-ink-3); font-size: 12px; }
.terms dd { margin: 0; font-weight: 600; }
.terms--stack { grid-template-columns: 1fr; background: transparent; padding: 0; margin-bottom: 20px; }
.terms--stack div { display: flex; justify-content: space-between; }

/* ------------------------------------------------------------ forms */
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.split > form, .split > section { min-width: 0; }
.split--even { grid-template-columns: 1fr 1fr; }
.split:has(> .split__aside:last-child) { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 900px) { .split, .split--even, .split:has(> .split__aside:last-child) { grid-template-columns: 1fr; } }
.form-grid { display: grid; gap: 28px; }
.form-grid__set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-grid__set--single { grid-template-columns: 1fr 1fr; }
.form-grid__set > legend { grid-column: 1 / -1; padding: 0; }
.form-grid__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
@media (max-width: 560px) { .form-grid__set { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field__label { font-size: 14px; font-weight: 500; color: var(--s-ink-2); }
.field__req { color: var(--s-danger); }
.field__input[readonly] { background: var(--s-surface-2); color: var(--s-ink-3); }
textarea.field__input { min-height: 80px; resize: vertical; line-height: 1.5; }
.field__help { margin: 0; font-size: 13px; color: var(--s-ink-3); }
.field__error { margin: 0; font-size: 13px; font-weight: 500; color: var(--s-danger); }
.field--error .field__input { border-color: var(--s-danger); }
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: var(--s-surface-2); max-width: 420px; }
.segmented__opt { position: relative; display: grid; place-items: center; padding: 10px 16px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--s-ink-2); }
.segmented__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented__opt:has(input:checked) { background: var(--s-surface); color: var(--s-ink); box-shadow: var(--s-shadow); }
.segmented__opt:has(input:focus-visible) { outline: 2px solid var(--s-brand); }
.register[data-type="dealer"] [data-practice-only] { display: none; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.doc { display: grid; gap: 12px; align-content: start; }
.doc__head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.doc__title { margin: 0; font-size: 18px; font-weight: 700; }
.doc__current { margin: 0; font-size: 14px; }
.upload { display: grid; gap: 10px; }
.upload__drop {
    position: relative; display: grid; gap: 4px; justify-items: center; padding: 24px 16px; border: 1.5px dashed var(--s-line-2);
    border-radius: var(--s-radius-s); text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.upload__drop:hover, .upload__drop.is-drag { border-color: var(--s-brand); background: var(--s-brand-50); }
.upload__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload__label { font-weight: 600; color: var(--s-brand-700); }
.upload__hint { font-size: 13px; color: var(--s-ink-3); }
.code-box { margin: 0 0 20px; font: 600 26px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.link-box { margin: 0 0 12px; word-break: break-all; font-size: 14px; }
.link-box a { color: var(--s-brand-700); }

@media (prefers-reduced-motion: reduce) {
    .shop *, .shop *::before { animation: none !important; transition: none !important; }
    .done__check { stroke-dashoffset: 0; }
}

/* ------------------------------------------------------------ team / users */
.members { list-style: none; margin: 0; padding: 0; }
.member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--s-line); }
.member:first-child { border-top: 0; padding-top: 0; }
.member__who { display: grid; gap: 2px; min-width: 0; }
.member__who small { overflow-wrap: anywhere; }
.member__tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.member__actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.inline-form { display: inline; margin: 0; }
.link--danger, .link--remove, .link--disable { color: var(--s-danger); }
.status--invited::before, .status--unconfirmed::before { background: #f59e0b; }
.status--active::before { background: var(--s-brand); }
.status--disabled::before { background: var(--s-ink-3); }
.activate { max-width: 560px; margin-inline: auto; }
@media (max-width: 560px) { .member { grid-template-columns: auto minmax(0, 1fr); } .member__tags { grid-column: 2; justify-content: flex-start; } }

/* ------------------------------------------------------------ dashboard ("Übersicht") */
.dash-head { align-items: end; }
.dash-head__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-head__actions form { margin: 0; }
.kpis--dash { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi { position: relative; align-content: start; min-width: 0; color: inherit; text-decoration: none; }
.kpi__value { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; overflow-wrap: anywhere; }
.kpi__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--s-ink-3); min-height: 1.4em; }
.kpi--link { transition: transform .25s var(--s-ease), box-shadow .25s var(--s-ease); }
.kpi--link:hover { transform: translateY(-2px); box-shadow: var(--s-shadow-2); }
.kpi--link::after { content: "›"; position: absolute; top: 14px; right: 18px; font-size: 20px; color: var(--s-ink-3); }
.kpi--warn { box-shadow: inset 0 0 0 1px var(--s-warn-ink), var(--s-shadow); }
.kpi--warn .kpi__value { color: var(--s-warn-ink); }
.kpi--ok .kpi__value { color: var(--s-brand-700); }
.trend { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; font-weight: 600; background: var(--s-surface-2); color: var(--s-ink-2); }
.trend--up::before { content: "↑"; }
.trend--down::before { content: "↓"; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.dash-grid > .card:only-child, .dash-grid > .dash-col:only-child { grid-column: 1 / -1; }
.dash-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.dash-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } .dash-pair { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } .dash-pair { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .dash-pair { grid-template-columns: 1fr; } }
.dash-card { display: grid; gap: 12px; align-content: start; min-width: 0; }
.dash-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dash-card__head .section-label { margin: 0; }
.dash-card__sub { margin-top: 12px; }
.dash-card__foot { margin: 4px 0 0; }
.dash-empty { margin: 0; color: var(--s-ink-3); font-size: 15px; }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; }
.dash-list__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--s-line); }
.dash-list__row:first-child { border-top: 0; padding-top: 0; }
.dash-list__main { display: grid; gap: 4px; min-width: 0; }
.dash-list__title { font-weight: 600; color: var(--s-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list__title:hover { color: var(--s-brand-700); }
.dash-list__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }

/* bar chart (no JavaScript, values from the server) */
.chart { display: grid; gap: 16px; min-width: 0; }
.chart__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.chart__head .section-label { margin: 0; }
.chart__total { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.chart__total .muted { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.chart__bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(4px, 1vw, 10px); align-items: end; height: 220px; }
.chart__col { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; min-width: 0; text-align: center; }
.chart__track { position: relative; display: block; border-radius: 8px; background: var(--s-surface-2); overflow: hidden; }
.chart__bar { position: absolute; inset: auto 0 0; height: var(--h, 0%); border-radius: 8px; background: var(--s-brand-100); transition: height .6s var(--s-ease); }
.chart__col:hover .chart__bar { background: var(--s-brand); }
.chart__col--current .chart__bar { background: var(--s-brand); }
.chart__label { font-size: 12px; color: var(--s-ink-3); }
.chart__col--current .chart__label { color: var(--s-ink); font-weight: 600; }
@media (max-width: 640px) { .chart__bars { height: 170px; } .chart__label { font-size: 10px; } }

/* ranking with share bar */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 15px; }
.rank__name { min-width: 0; overflow-wrap: anywhere; }
.rank__name a { color: var(--s-ink); font-weight: 600; text-decoration: none; }
.rank__name a:hover { color: var(--s-brand-700); }
.rank__value { text-align: right; font-weight: 600; white-space: nowrap; }
.rank__bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--s-surface-2); position: relative; overflow: hidden; }
.rank__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 3px; background: var(--s-brand); }

/* goods receipt */
.receipts { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--s-line); }
.receipts__title { margin: 0; font-size: 15px; font-weight: 700; }
.receipts__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin: 0; font-size: 14px; }
.receipts__row > span { flex: 1 1 180px; min-width: 0; }
.receipts__row .btn { white-space: nowrap; flex: none; }
.receipts--banner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 32px; padding-top: 24px; border-top: 0; margin-bottom: 16px; background: var(--s-brand-50); box-shadow: inset 0 0 0 1px var(--s-brand-100); }
.receipts--banner p { margin: 4px 0 0; font-size: 14px; }
.receipts__list { display: grid; gap: 8px; }
@media (max-width: 860px) { .receipts--banner { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ stock ("Lager") */
.tag--danger { background: #fdecea; color: #9b2c20; }
@media (prefers-color-scheme: dark) { .tag--danger { background: #3a1d1a; color: #f5a097; } }
.stock-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--s-line); }
.stock-bar__tabs { margin: 0; border-bottom: 0; }
.stock-bar__search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 8px; }
.stock-bar__search .field__input--sm { width: 200px; }
.stock-table td { vertical-align: middle; }
.stock-table td small, .stock-table td:nth-child(4), .stock-table td:nth-child(5) { white-space: nowrap; }
.stock-table td:nth-child(2) { min-width: 220px; }
.stock-table__check { width: 44px; }
.stock-row__title { font-weight: 600; }
.stock-row__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 13px; }
.stock-row--out { background: color-mix(in srgb, var(--s-danger) 5%, transparent); }
.stock-qty { display: flex; align-items: center; gap: 10px; }
.stock-qty__value { font-size: 20px; min-width: 2.2ch; }
.fill { display: inline-block; position: relative; width: 72px; height: 6px; border-radius: 3px; background: var(--s-surface-3); overflow: hidden; flex: none; }
.fill__bar { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 3px; background: var(--s-brand); }
.fill--low .fill__bar { background: #e0a030; }
.fill--out .fill__bar { background: var(--s-danger); }
.quick-book { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.quick-book .icon-btn { width: auto; min-width: 36px; padding: 0 8px; font-size: 13px; font-weight: 700; }
.quick-book .icon-btn[disabled] { opacity: .35; pointer-events: none; }
.quick-book .link { margin-left: 6px; font-size: 14px; }
.stock-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.stock-foot .fineprint { margin: 0; max-width: 60ch; }
.stock-history { margin-top: 24px; }
.split--stock { grid-template-columns: 340px minmax(0, 1fr); }
@media (max-width: 900px) { .split--stock { grid-template-columns: 1fr; } }
.stock-book { display: grid; gap: 12px; position: sticky; top: calc(var(--header-h, 64px) + 72px); }
.stock-book .section-label { margin: 0; }
.stock-book__now { margin: 0; }
.stock-book__value { font-size: 44px; font-weight: 700; letter-spacing: -.03em; }
.stock-book__facts { margin: 0; font-size: 14px; }
.stock-book__reorder { margin: 0; }
.segmented--4 { max-width: none; grid-template-columns: repeat(2, 1fr); grid-auto-flow: row; }
.segmented--4 .segmented__opt { padding: 8px 10px; font-size: 14px; }
.form-grid--single { grid-template-columns: 1fr; }
.stock-delete { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--s-line); }
.movements { font-size: 14px; }
.movements td, .movements th { padding: 10px 12px; }
.mv { font-weight: 600; }
.mv--receipt { color: var(--s-brand-700); }
.mv--withdrawal { color: var(--s-ink-2); }
.mv--count, .mv--correction { color: #7c4dbd; }
@media (prefers-color-scheme: dark) { .mv--count, .mv--correction { color: #c4a5f0; } }
@media (max-width: 720px) {
    .stock-table thead { display: none; }
    .stock-table, .stock-table tbody, .stock-table tr, .stock-table td { display: block; }
    .stock-table tr { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 8px; padding: 12px; border-top: 1px solid var(--s-line); }
    .stock-table td { border: 0; padding: 0; text-align: left; }
    .stock-table td:nth-child(1) { grid-row: 1 / span 3; }
    .stock-table td:nth-child(2) { grid-column: 2 / -1; }
    .stock-table td:nth-child(4), .stock-table td:nth-child(5), .stock-table td:nth-child(6) { display: none; }
    .stock-table td:nth-child(7) { grid-column: 3; grid-row: 2; }
    .stock-table td.num { text-align: right; }
    .stock-bar__search .field__input--sm { width: 100%; }
    .stock-bar__search { width: 100%; }
}
@media (max-width: 640px) {
    .kpis--dash { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpis--dash .kpi { padding: 16px; }
    .kpis--dash .kpi__value { font-size: 22px; }
    .kpis--dash .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.receipts__row small { white-space: nowrap; }

/* stock: pick a catalogue product */
.stock-pick { display: grid; gap: 12px; margin-bottom: 16px; }
.stock-pick .section-label { margin: 0; }
.stock-pick__hint { margin: 0; font-size: 14px; }
.stock-pick__search { display: flex; gap: 8px; flex-wrap: wrap; }
.stock-pick__search .field__input { flex: 1 1 260px; }
.stock-pick__picked { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; }
.stock-pick__name { margin: 6px 0 4px; font-size: 18px; font-weight: 600; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pick-list__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--s-line); }
.pick-list__main { display: grid; gap: 2px; min-width: 0; }
.pick-list__title { font-weight: 600; }
.pick-list__meta { font-size: 13px; }
.pick-list__row .btn { flex: none; white-space: nowrap; }
.product__stock { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
.split > :only-child { grid-column: 1 / -1; }

/* shipping tiers */
.tier-next { display: grid; gap: 6px; }
.tier-next .hint { margin: 0; }
.tier-next .hint .muted { display: block; font-size: 13px; }
.tier-next__bar { display: block; height: 6px; border-radius: 3px; background: var(--s-surface-3); overflow: hidden; }
.tier-next__bar > span { display: block; height: 100%; width: var(--w, 0%); border-radius: 3px; background: var(--s-brand); transition: width .5s var(--s-ease); }
.tiers { font-size: 14px; }
.tiers > summary { cursor: pointer; color: var(--s-brand-700); font-weight: 600; list-style: none; }
.tiers > summary::-webkit-details-marker { display: none; }
.tiers > summary::after { content: " ›"; display: inline-block; transition: transform .2s; }
.tiers[open] > summary::after { transform: rotate(90deg); }
.tiers .tier-list { margin-top: 8px; }
.tier-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.tier-list__row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 10px; border-radius: 8px; color: var(--s-ink-2); }
.tier-list__row--active { background: var(--s-brand-50); color: var(--s-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--s-brand); }
.tier-edit__head, .tier-edit__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tier-edit__head { font-size: 13px; font-weight: 600; color: var(--s-ink-3); }
.split--terms { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 900px) { .split--terms { grid-template-columns: 1fr; } }
