
:root {
    color-scheme: dark;
    font-family: "Bahnschrift", "Segoe UI", Arial, sans-serif;
    --surface-0: #090a0d;
    --surface-1: #101217;
    --surface-2: #171a20;
    --surface-3: #20242c;
    --line: rgba(208, 214, 226, 0.16);
    --line-strong: rgba(208, 214, 226, 0.28);
    --text: #f4f5f8;
    --muted: #8e96a6;
    --accent: #a778f5;
    --accent-soft: rgba(167, 120, 245, 0.16);
    --cyan: #55d8df;
    --green: #6be4a5;
    --amber: #f4c76b;
    --red: #ff6f7d;
    --type-color: var(--accent);
    --type-soft: var(--accent-soft);
    --type-border: rgba(167, 120, 245, 0.46);
    --type-strong: rgba(167, 120, 245, 0.68);
    --type-button: #2b203c;
    --type-button-hover: #38284d;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: transparent;
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

button,
input,
[role="button"] {
    outline: none;
}

button:focus-visible,
input:focus-visible {
    box-shadow: 0 0 0 2px rgba(85, 216, 223, 0.55);
}

.svg-sprite {
    position: fixed;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.icon-lg {
    width: 27px;
    height: 27px;
}

.icon-xl {
    width: 38px;
    height: 38px;
}

.icon-xxl {
    width: 54px;
    height: 54px;
}

.is-hidden {
    display: none !important;
}

.business-root {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    opacity: 0;
    pointer-events: none;
}

.business-root.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.screen-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 6, 9, 0.74), rgba(5, 6, 9, 0.42)),
        rgba(4, 5, 8, 0.28);
    backdrop-filter: blur(2px);
}

.business-shell {
    position: relative;
    width: min(90vw, 1540px);
    height: min(84vh, 900px);
    min-width: 980px;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-1);
    box-shadow: var(--shadow);
    transform: translateY(12px) scale(0.985);
    opacity: 0;
}

.business-root.visible .business-shell {
    animation: shell-in 260ms cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.business-root.closing .business-shell {
    animation: shell-out 140ms ease-in forwards;
}

@keyframes shell-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shell-out {
    to {
        opacity: 0;
        transform: translateY(7px) scale(0.992);
    }
}

.business-shell::before {
    content: "";
    position: absolute;
    z-index: 5;
    top: 0;
    left: 0;
    width: 34%;
    height: 2px;
    background: linear-gradient(90deg, var(--type-color), var(--cyan), transparent);
    pointer-events: none;
}

.business-shell[data-business-type="ammo"] {
    --type-color: #ef7d87;
    --type-soft: rgba(239, 125, 135, 0.14);
    --type-border: rgba(239, 125, 135, 0.46);
    --type-strong: rgba(239, 125, 135, 0.68);
    --type-button: #352027;
    --type-button-hover: #48272f;
}

.business-shell[data-business-type="shop_247"] {
    --type-color: #a778f5;
    --type-soft: rgba(167, 120, 245, 0.16);
    --type-border: rgba(167, 120, 245, 0.46);
    --type-strong: rgba(167, 120, 245, 0.68);
    --type-button: #2b203c;
    --type-button-hover: #38284d;
}

.business-shell[data-business-type="gas"] {
    --type-color: #55d8df;
    --type-soft: rgba(85, 216, 223, 0.14);
    --type-border: rgba(85, 216, 223, 0.46);
    --type-strong: rgba(85, 216, 223, 0.68);
    --type-button: #153035;
    --type-button-hover: #1a4248;
}

.business-shell[data-business-type="rent"] {
    --type-color: #7ca6ff;
    --type-soft: rgba(124, 166, 255, 0.15);
    --type-border: rgba(124, 166, 255, 0.46);
    --type-strong: rgba(124, 166, 255, 0.68);
    --type-button: #1d2a42;
    --type-button-hover: #253756;
}

.business-shell[data-business-type="food"] {
    --type-color: #f4c76b;
    --type-soft: rgba(244, 199, 107, 0.14);
    --type-border: rgba(244, 199, 107, 0.46);
    --type-strong: rgba(244, 199, 107, 0.68);
    --type-button: #362f1d;
    --type-button-hover: #493f23;
}

.business-shell[data-business-type="parking"],
.business-shell[data-business-type="underground_parking"] {
    --type-color: #6be4a5;
    --type-soft: rgba(107, 228, 165, 0.14);
    --type-border: rgba(107, 228, 165, 0.46);
    --type-strong: rgba(107, 228, 165, 0.68);
    --type-button: #183429;
    --type-button-hover: #204537;
}

.business-shell[data-business-type="clothes"] {
    --type-color: #e58fd3;
    --type-soft: rgba(229, 143, 211, 0.14);
    --type-border: rgba(229, 143, 211, 0.46);
    --type-strong: rgba(229, 143, 211, 0.68);
    --type-button: #362238;
    --type-button-hover: #492d4c;
}

.business-shell[data-business-type="carshop"] {
    --type-color: #ff9d68;
    --type-soft: rgba(255, 157, 104, 0.14);
    --type-border: rgba(255, 157, 104, 0.46);
    --type-strong: rgba(255, 157, 104, 0.68);
    --type-button: #3a281f;
    --type-button-hover: #4c3427;
}

.topbar {
    position: relative;
    z-index: 2;
    height: 92px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 20px;
    padding: 0 26px 0 24px;
    border-bottom: 1px solid var(--line);
    background: #111319;
}

.brand-mark {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--type-color);
    border: 1px solid var(--line-strong);
    background: var(--type-soft);
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-color: var(--type-color);
    opacity: 0.8;
}

.brand-mark::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.brand-mark::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

.brand-pulse {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.business-heading {
    min-width: 0;
}

.eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.title-line {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.title-line h1 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 24px;
    font-weight: 650;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-label {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid var(--type-border);
    border-radius: 3px;
    color: var(--type-color);
    background: var(--type-soft);
    font-size: 11px;
    font-weight: 700;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-id,
.status-chip {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    font-weight: 700;
}

.status-chip {
    gap: 8px;
    color: var(--green);
}

.status-chip i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.status-chip[data-status="warning"] {
    color: var(--amber);
}

.status-chip[data-status="offline"] {
    color: var(--red);
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.icon-button:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
}

.close-button:hover {
    color: var(--red);
    border-color: rgba(255, 111, 125, 0.42);
    background: rgba(255, 111, 125, 0.1);
}

.app-layout {
    height: calc(100% - 92px);
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
}

.side-rail {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 14px 16px;
    border-right: 1px solid var(--line);
    background: #0d0f13;
}

.business-navigation {
    display: grid;
    gap: 7px;
}

.nav-button {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
}

.nav-button.active {
    color: var(--text);
    border-color: var(--type-border);
    background: var(--type-soft);
}

.nav-button.active .icon {
    color: var(--type-color);
}

.rail-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 9px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.rail-footer > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.rail-footer strong,
.rail-footer small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-footer strong {
    color: #c8ced8;
    font-size: 11px;
    font-weight: 650;
}

.rail-footer small {
    font-size: 9px;
}

.connection-light {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 9px rgba(85, 216, 223, 0.72);
}

.workspace {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: 112px minmax(0, 1fr);
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--surface-1);
    background-size: 42px 42px;
}

.workspace-summary {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(16, 18, 23, 0.94);
}

.summary-copy {
    min-width: 0;
}

.summary-copy h2 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 22px;
    font-weight: 650;
}

.summary-copy p {
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-metrics {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.metric {
    min-width: 154px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    border-left: 2px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.025);
}

.metric:first-child {
    border-left-color: var(--type-color);
}

.metric .icon {
    color: var(--type-color);
}

.metric span {
    display: grid;
    gap: 3px;
}

.metric small {
    color: var(--muted);
    font-size: 10px;
}

.metric strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.business-content,
.view {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: view-in 180ms ease both;
}

@keyframes view-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#catalog-view {
    padding: 20px 22px 22px;
}

.module-toolbar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.rental-status {
    width: 100%;
    height: 44px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 5px 0 10px;
    border-left: 2px solid var(--type-color);
    background: linear-gradient(90deg, var(--type-soft), rgba(255, 255, 255, 0.015));
}

.rental-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rental-status-icon {
    width: 30px;
    height: 30px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--type-color);
}

.rental-status-icon .icon {
    width: 25px;
    height: 25px;
}

.rental-identity > span:last-child {
    min-width: 0;
}

.rental-identity small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
}

.rental-identity strong {
    display: block;
    max-width: 260px;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rental-deadline {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    color: var(--type-color);
    font-size: 12px;
    font-weight: 750;
}

.rental-deadline .icon {
    width: 16px;
    height: 16px;
}

.rental-return-button {
    height: 34px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--type-border);
    border-radius: 3px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease;
}

.rental-return-button:hover:not(:disabled) {
    border-color: var(--type-color);
    background: var(--type-soft);
}

.rental-return-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.rental-return-button .icon {
    width: 16px;
    height: 16px;
}

.module-toolbar.has-active-service .category-filter,
.module-toolbar.has-active-service .search-field {
    display: none;
}

.category-filter {
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow: hidden;
}

.category-button {
    height: 36px;
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.category-button:hover,
.category-button.active {
    color: var(--text);
    border-color: var(--type-border);
    background: var(--type-soft);
}

.search-field {
    width: 260px;
    height: 38px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--muted);
    background: rgba(7, 8, 11, 0.6);
}

.search-field .icon {
    width: 17px;
    height: 17px;
}

.search-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 12px;
}

.search-field input::placeholder {
    color: #697180;
}

.catalog-layout {
    height: calc(100% - 62px);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 298px;
    gap: 16px;
}

.product-grid {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 176px;
    gap: 10px;
    align-content: start;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.product-grid::-webkit-scrollbar {
    width: 5px;
}

.product-grid::-webkit-scrollbar-thumb {
    background: var(--line-strong);
}

.product-card {
    position: relative;
    min-width: 0;
    min-height: 176px;
    display: grid;
    grid-template-rows: 1fr auto;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    background: rgba(18, 21, 27, 0.94);
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--type-color);
    opacity: 0.72;
}

.product-card:hover {
    border-color: var(--line-strong);
    background: #1a1e25;
    transform: translateY(-1px);
}

.product-card.active {
    border-color: var(--type-strong);
    background: var(--type-soft);
}

.product-card.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.product-visual {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    color: var(--type-color);
}

.product-visual .icon {
    width: 39px;
    height: 39px;
}

.product-stock {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.18);
    font-size: 9px;
    font-weight: 700;
}

.product-card-copy {
    min-width: 0;
}

.product-card-copy small {
    display: block;
    margin-bottom: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-card-copy strong {
    display: block;
    margin-bottom: 9px;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-card-footer span {
    color: var(--type-color);
    font-size: 15px;
    font-weight: 750;
}

.product-card-footer .icon {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.empty-catalog {
    grid-column: 1 / -1;
    min-height: 320px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    text-align: center;
}

.empty-catalog .icon {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    color: var(--type-color);
}

.empty-catalog strong {
    color: var(--text);
    font-size: 15px;
}

.empty-catalog p {
    max-width: 330px;
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
}

.order-panel {
    min-width: 0;
    min-height: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(10, 12, 16, 0.86);
}

.order-idle {
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    color: var(--muted);
    text-align: center;
}

.idle-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 7px;
    border: 1px solid var(--line);
    color: var(--type-color);
    background: var(--type-soft);
}

.order-idle strong {
    color: var(--text);
    font-size: 15px;
}

.order-idle p {
    max-width: 210px;
    margin: 0;
    font-size: 11px;
    line-height: 1.55;
}

.order-active {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.order-visual {
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border: 1px solid var(--line);
    color: var(--type-color);
    background: var(--type-soft);
}

.order-visual span {
    align-self: flex-start;
    margin-top: 13px;
    padding: 4px 7px;
    border: 1px solid var(--type-border);
    border-radius: 2px;
    color: var(--type-color);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.order-copy {
    padding: 18px 0 14px;
    border-bottom: 1px solid var(--line);
}

.order-copy small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.order-copy h3 {
    margin: 4px 0 7px;
    overflow-wrap: anywhere;
    font-size: 18px;
    font-weight: 650;
}

.order-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.order-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px 0;
}

.order-price-row > span {
    display: grid;
    gap: 4px;
}

.order-price-row small {
    color: var(--muted);
    font-size: 9px;
}

.order-price-row strong {
    color: var(--text);
    font-size: 14px;
}

.quantity-control {
    height: 48px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: stretch;
    gap: 6px;
}

.business-shell[data-business-type="rent"] .quantity-control,
.business-shell[data-business-type="parking"] .quantity-control,
.business-shell[data-business-type="underground_parking"] .quantity-control,
.business-shell[data-business-type="clothes"] .quantity-control,
.business-shell[data-business-type="carshop"] .quantity-control {
    display: none;
}

.quantity-control .icon-button {
    width: 42px;
    height: 48px;
}

.quantity-control label {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

.quantity-control input {
    width: 48px;
    padding: 0;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.quantity-control input::-webkit-inner-spin-button {
    display: none;
}

.product-preview-button {
    min-height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: auto;
    padding: 0 14px;
    border: 1px solid var(--type-border);
    border-radius: 4px;
    color: var(--text);
    background: var(--type-soft);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease;
}

.business-shell[data-business-type="clothes"] .product-preview-button,
.business-shell[data-business-type="carshop"] .product-preview-button {
    display: flex;
}

.business-shell[data-business-type="clothes"] .primary-button,
.business-shell[data-business-type="carshop"] .primary-button {
    margin-top: 8px;
}

.product-preview-button:hover:not(:disabled) {
    border-color: var(--type-color);
    background: rgba(255, 255, 255, 0.07);
}

.product-preview-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.product-preview-button .icon {
    width: 17px;
    height: 17px;
}

.order-vehicle-image {
    position: absolute;
    inset: 10px 12px;
    width: calc(100% - 24px);
    height: calc(100% - 20px);
    display: none;
    object-fit: contain;
    pointer-events: none;
}

.business-shell[data-business-type="carshop"] .order-visual {
    position: relative;
    min-height: 136px;
    overflow: hidden;
}

.business-shell[data-business-type="carshop"] .order-visual.has-vehicle-image .order-vehicle-image {
    display: block;
}

.business-shell[data-business-type="carshop"] .order-visual.has-vehicle-image #order-icon {
    opacity: 0;
}

.business-shell[data-business-type="carshop"] .order-visual.preview-confirmed {
    animation: carshop-preview-confirm 520ms ease;
}

.carshop-specs {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: var(--line);
}

.business-shell[data-business-type="carshop"] .carshop-specs {
    display: grid;
}

.carshop-specs > span {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 54px;
    padding: 8px;
    background: rgba(12, 14, 18, 0.96);
}

.carshop-specs small {
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carshop-specs strong {
    overflow: hidden;
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes carshop-preview-confirm {
    0% {
        border-color: var(--line);
        filter: brightness(1);
    }
    45% {
        border-color: var(--type-color);
        filter: brightness(1.18);
    }
    100% {
        border-color: var(--line);
        filter: brightness(1);
    }
}

.primary-button {
    min-height: 50px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 0 16px;
    border: 1px solid var(--type-strong);
    border-radius: 4px;
    color: #fff;
    background: var(--type-button);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.primary-button:hover {
    border-color: var(--type-color);
    background: var(--type-button-hover);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.primary-button strong {
    color: var(--type-color);
    font-size: 13px;
}

#details-view,
#management-view {
    padding: 28px;
}

.details-layout {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
    grid-template-rows: 1fr auto;
    gap: 18px 42px;
    align-items: center;
}

.identity-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}

.identity-icon {
    width: 108px;
    height: 108px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--type-border);
    color: var(--type-color);
    background: var(--type-soft);
}

.identity-panel h3 {
    margin: 5px 0 8px;
    overflow-wrap: anywhere;
    font-size: 27px;
    font-weight: 650;
}

.identity-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.details-table {
    margin: 0;
    border-top: 1px solid var(--line);
}

.details-table div {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}

.details-table dt {
    color: var(--muted);
    font-size: 11px;
}

.details-table dd {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    text-align: right;
}

.level-progress {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.level-progress > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
}

.level-progress > div strong {
    color: var(--type-color);
}

.level-progress > span {
    height: 5px;
    display: block;
    overflow: hidden;
    background: var(--surface-3);
}

.level-progress i {
    width: 0;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--type-color), var(--cyan));
    transition: width 360ms ease;
}

.management-layout {
    height: 100%;
    overflow-y: auto;
}

.management-layout > header {
    margin-bottom: 26px;
}

.management-layout > header h3 {
    margin: 5px 0 7px;
    font-size: 24px;
    font-weight: 650;
}

.management-layout > header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.management-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.management-metric {
    min-width: 0;
    min-height: 126px;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 18px 22px;
    border-right: 1px solid var(--line);
}

.management-metric:last-child {
    border-right: 0;
}

.management-metric small,
.management-metric span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.management-metric strong {
    overflow: hidden;
    color: var(--green);
    font-size: 21px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.management-metric[data-tone="warning"] strong {
    color: var(--amber);
}

.management-metric[data-tone="accent"] strong {
    color: var(--type-color);
}

.management-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.management-action {
    min-height: 110px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    background: rgba(18, 21, 27, 0.84);
    text-align: left;
}

.management-action.enabled {
    cursor: pointer;
}

.management-action.enabled:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.management-action .icon {
    color: var(--type-color);
}

.management-action strong {
    align-self: end;
    color: var(--text);
    font-size: 12px;
}

.management-action small {
    font-size: 9px;
}

.management-action.active {
    color: var(--text);
    border-color: var(--type-border);
    background: var(--type-soft);
}

.management-panel {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line-strong);
}

.management-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.management-panel-header h4 {
    margin: 5px 0 6px;
    font-size: 19px;
    font-weight: 650;
}

.management-panel-header p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.management-panel-header .icon-button {
    flex: 0 0 auto;
}

.management-panel-content {
    min-height: 150px;
}

.management-form-grid,
.management-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.management-field,
.management-readout {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: rgba(18, 21, 27, 0.66);
}

.management-field > span,
.management-readout small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.management-field input,
.management-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    outline: 0;
    color: var(--text);
    background: #0c0f13;
    font: inherit;
    font-size: 13px;
}

.management-field input:focus,
.management-field select:focus {
    border-color: var(--type-color);
}

.management-field input:disabled,
.management-field select:disabled {
    color: var(--muted);
    opacity: 0.72;
}

.management-field em {
    color: var(--muted);
    font-size: 9px;
    font-style: normal;
    line-height: 1.45;
}

.management-readout strong {
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 16px;
}

.management-readout[data-tone="money"] strong {
    color: var(--green);
}

.management-command-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 2px;
}

.management-command {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    color: var(--text);
    background: rgba(22, 25, 32, 0.9);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.management-command:hover {
    border-color: var(--type-color);
    background: var(--type-soft);
}

.management-command.primary {
    border-color: var(--type-border);
    color: var(--type-color);
    background: var(--type-soft);
}

.management-command.danger {
    color: var(--red);
}

.management-command:disabled {
    cursor: default;
    opacity: 0.42;
}

.management-command .icon {
    width: 15px;
    height: 15px;
}

.management-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
}

.management-switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--type-color);
}

.management-switch span {
    color: var(--text);
    font-size: 11px;
}

.management-log-list,
.management-deputy-list {
    display: grid;
    gap: 8px;
}

.management-log-entry {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 64px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
}

.management-log-entry time,
.management-log-entry small {
    color: var(--muted);
    font-size: 9px;
}

.management-log-entry strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 11px;
}

.management-log-entry p {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 9px;
}

.management-log-entry > b {
    color: var(--type-color);
    font-size: 12px;
}

.management-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.management-deputy {
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: rgba(18, 21, 27, 0.66);
}

.management-deputy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.management-deputy-header span {
    display: grid;
    gap: 3px;
}

.management-deputy-header small {
    color: var(--muted);
    font-size: 9px;
}

.management-deputy-header strong {
    color: var(--text);
    font-size: 13px;
}

.management-permission-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 12px;
}

.management-permission {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
}

.management-permission input {
    width: 15px;
    height: 15px;
    accent-color: var(--type-color);
}

.management-deputy-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.management-deputy-add input {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    outline: 0;
    color: var(--text);
    background: #0c0f13;
    font: inherit;
}

.busy-layer {
    position: absolute;
    z-index: 8;
    inset: 92px 0 0 176px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    background: rgba(9, 10, 13, 0.84);
    backdrop-filter: blur(3px);
}

.busy-spinner {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    border: 2px solid var(--line);
    border-top-color: var(--type-color);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.busy-layer strong {
    font-size: 14px;
}

.busy-layer small {
    color: var(--muted);
    font-size: 10px;
}

.toast-stack {
    position: fixed;
    z-index: 20;
    right: 28px;
    bottom: 28px;
    width: min(360px, calc(100vw - 56px));
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.toast {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border: 1px solid rgba(107, 228, 165, 0.32);
    border-left: 3px solid var(--green);
    border-radius: 4px;
    color: var(--text);
    background: #12151a;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    font-size: 11px;
    animation: toast-in 180ms ease both;
}

.toast.error {
    border-color: rgba(255, 111, 125, 0.32);
    border-left-color: var(--red);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
}

.preview-tools {
    position: fixed;
    z-index: 40;
    top: 12px;
    left: 12px;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    color: #fff;
    background: rgba(8, 9, 12, 0.92);
    font-family: "Segoe UI", Arial, sans-serif;
}

.preview-tools.visible {
    display: flex;
}

.preview-tools strong {
    font-size: 10px;
}

.preview-tools > div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 620px;
}

.preview-tools button {
    height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 3px;
    color: #cfd5df;
    background: transparent;
    font-size: 9px;
    cursor: pointer;
}

.preview-tools button:hover,
.preview-tools button.active {
    color: #fff;
    border-color: var(--accent);
    background: rgba(167, 120, 245, 0.16);
}

@media (max-width: 1240px), (max-height: 820px) {
    .business-root {
        padding: 3vh 3vw;
    }

    .business-shell {
        width: 94vw;
        height: 92vh;
        min-width: 900px;
        min-height: 590px;
    }

    .topbar {
        height: 82px;
    }

    .app-layout {
        height: calc(100% - 82px);
        grid-template-columns: 154px minmax(0, 1fr);
    }

    .workspace {
        grid-template-rows: 98px minmax(0, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 160px;
    }

    .catalog-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
    }

    .business-shell[data-business-type="carshop"] .order-panel {
        padding: 12px;
    }

    .business-shell[data-business-type="carshop"] .order-visual {
        min-height: 92px;
    }

    .business-shell[data-business-type="carshop"] .order-copy {
        padding: 10px 0 8px;
    }

    .business-shell[data-business-type="carshop"] .order-copy h3 {
        margin: 2px 0 4px;
        font-size: 16px;
    }

    .business-shell[data-business-type="carshop"] .order-copy p {
        max-height: 28px;
        overflow: hidden;
        line-height: 1.4;
    }

    .business-shell[data-business-type="carshop"] .carshop-specs {
        margin-bottom: 8px;
    }

    .business-shell[data-business-type="carshop"] .carshop-specs > span {
        min-height: 44px;
        padding: 6px;
    }

    .business-shell[data-business-type="carshop"] .order-price-row {
        padding: 8px 0;
    }

    .business-shell[data-business-type="carshop"] .product-preview-button {
        min-height: 36px;
    }

    .business-shell[data-business-type="carshop"] .primary-button {
        min-height: 42px;
        margin-top: 6px;
    }

    .busy-layer {
        inset: 82px 0 0 154px;
    }

    .management-action {
        min-height: 92px;
        padding: 12px;
    }

    .management-permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .business-shell {
        min-width: 760px;
    }

    .app-layout {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .nav-button {
        justify-content: center;
        padding: 0;
    }

    .nav-button span,
    .rail-footer span:last-child {
        display: none;
    }

    .rail-footer {
        justify-content: center;
    }

    .summary-metrics .metric {
        min-width: 120px;
    }

    .catalog-layout {
        grid-template-columns: minmax(0, 1fr) 240px;
    }

    .busy-layer {
        left: 76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
    