﻿:root {
    --layer-base: 0;
    --layer-dialog: 100;
    --layer-confirm: 200;
    --layer-notification: 2147483647;
    --page: #F5F6F8;
    --surface: #FFFFFF;
    --surface-subtle: #F7F8FA;
    --surface-active: #EEF0F4;
    --surface-disabled: #F1F3F6;
    --primary: #5D5BD6;
    --primary-hover: #4D4BBB;
    --primary-active: #4442A8;
    --primary-soft: #F0EFFF;
    --focus: #5D5BD6;
    --focus-soft: #E7E6FF;
    --text: #202637;
    --text-secondary: #4E596B;
    --text-muted: #667085;
    --text-placeholder: #667085;
    --text-disabled: #8C95A5;
    --text-soft: var(--text-muted);
    --text-tertiary: var(--text-muted);
    --muted: var(--text-muted);
    --border: #DDE2E8;
    --border-strong: #C7CED8;
    --priority: #4E596B;
    --priority-soft: #E7EBF0;
    --priority-border: #AAB4C1;
    --priority-glow: rgb(211 159 53 / 22%);
    --priority-film: rgb(235 191 95 / 16%);
    --border-active: var(--border-strong);
    --row-hover: var(--surface-subtle);
    --success: #177A50;
    --success-soft: #EAF7F0;
    --success-text: var(--success);
    --warning: #9A5B0A;
    --warning-soft: #FFF4DF;
    --pending: var(--warning);
    --pending-soft: var(--warning-soft);
    --pending-bg: var(--warning-soft);
    --pending-text: var(--warning);
    --danger: #B93246;
    --danger-soft: #FDECEF;
    --info: #3568A8;
    --info-soft: #EAF2FC;
    --radius-sm: 8px;
    --radius-control: 10px;
    --radius-panel: 14px;
    --radius: var(--radius-panel);
    --radius-small: var(--radius-control);
    --radius-dialog: 16px;
    --sidebar: 250px;
    --header: 64px;
    --sidebar-width: var(--sidebar);
    --content-max: 1280px;
    --font-heading: "Montserrat", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", Arial, sans-serif;
    --font-metric: "Roboto Mono", "Cascadia Mono", monospace;
    --control-height: 44px;
    --control-height-compact: 36px;
    --control-radius: var(--radius-control);
    --shadow-sm: none;
    --shadow-md: 0 8px 24px rgb(32 38 55 / 10%);
    --shadow-popover: 0 8px 24px rgb(32 38 55 / 10%);
    --shadow-dialog: 0 18px 48px rgb(32 38 55 / 16%);
    --motion-fast: 120ms;
    --motion-base: 180ms;
    --ease-out: cubic-bezier(.23, 1, .32, 1);
    --ease-drawer: cubic-bezier(.32, .72, 0, 1);
}

/* Generator — selected Operator Workbench */
.generator-studio {
    display: grid;
    min-height: min(600px, calc(100dvh - 176px));
    grid-template-columns: minmax(420px, 460px) minmax(520px, 1fr);
    align-items: start;
    overflow: clip;
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.generator-composer {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 20px;
    align-self: stretch;
    border-right: 1px solid var(--border);
    padding: 24px;
}

.generator-field-group,
.generator-dialog__fields {
    display: grid;
    gap: 8px;
}

.generator-input-shell {
    display: contents;
}

.generator-prompt-label,
.generator-parameter > span {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.generator-prompt-shell {
    position: relative;
}

.ui-textarea.generator-prompt {
    width: 100%;
    min-height: 240px;
    max-height: 420px;
    padding: 16px 16px 40px;
    resize: vertical;
}

.generator-prompt-count {
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: var(--text-muted);
    font-family: var(--font-metric);
    font-size: 12px;
    line-height: 16px;
    pointer-events: none;
}

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

.generator-parameter {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.generator-parameter > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.generator-parameter > span .ui-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.generator-parameter .ui-select,
.generator-parameter .ui-select-control {
    width: 100%;
}

.generator-mobile-toolbar {
    display: none;
}

.generator-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.generator-section-heading h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.generator-section-heading span {
    color: var(--text-muted);
    font-size: 12px;
}

.generator-reference-list {
    display: flex;
    min-width: 0;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    border-radius: var(--radius-control);
    scrollbar-width: thin;
}

.generator-reference-list.is-dragover {
    outline: 3px solid var(--focus-soft);
    outline-offset: 2px;
}

.generator-reference-empty {
    display: flex;
    width: 100%;
    min-height: 72px;
    align-items: center;
    gap: 12px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    padding: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.generator-reference-empty:hover {
    border-color: var(--border-active);
    background: var(--surface-subtle);
}

.generator-reference-empty:focus-visible,
.generator-result__menu summary:focus-visible,
.generator-pack-card > button:focus-visible,
.generator-library__switch button:focus-visible {
    outline: 3px solid var(--focus-soft);
    outline-offset: 2px;
}

.generator-reference-empty > .ui-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--primary);
}

.generator-reference-empty span,
.generator-reference-empty strong,
.generator-reference-empty small {
    display: block;
    min-width: 0;
}

.generator-reference-empty strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.generator-reference-empty small,
.generator-reference > div small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.generator-reference-empty--compact {
    width: 88px;
    min-width: 88px;
    justify-content: center;
    text-align: center;
}

.generator-reference-empty--compact small {
    display: none;
}

.generator-reference {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 56px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    padding: 8px;
}

.generator-reference__preview {
    display: block;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
}

.generator-reference__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.generator-reference > div {
    min-width: 0;
}

.generator-reference > div strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generator-reference__remove {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.generator-reference__remove:hover {
    background: var(--surface-subtle);
    color: var(--danger);
}

.generator-reference__remove .ui-icon {
    width: 18px;
    height: 18px;
}

.generator-reference--error {
    border-color: var(--danger);
    color: var(--danger);
}

.generator-reference--error small {
    display: block;
    margin-top: 4px;
}

.generator-composer__action {
    display: grid;
    gap: 8px;
}

.generator-submit {
    width: 100%;
    justify-content: center;
}

.generator-composer__action p {
    min-height: 18px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 18px;
}

.generator-composer__action p:empty {
    display: none;
    min-height: 0;
}

.generator-request-error {
    margin: -4px 0 0;
}

.generator-result {
    position: sticky;
    top: 16px;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    align-self: start;
    padding: 24px;
}

.generator-result-empty {
    display: grid;
    min-height: min(520px, calc(100dvh - 224px));
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px dashed var(--border-active);
    border-radius: var(--radius-panel);
    background:
        radial-gradient(circle at 50% 38%, var(--primary-soft), transparent 34%),
        var(--surface-subtle);
    padding: 32px 24px;
    text-align: center;
}

.generator-result-empty__icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid var(--border-active);
    border-radius: 16px;
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.generator-result-empty__icon .ui-icon { width: 24px; height: 24px; }

.generator-result-empty h3 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 650;
    line-height: 24px;
}

.generator-result-empty p,
.generator-result-empty span {
    max-width: 300px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 19px;
}

.generator-result-empty span { color: var(--text-muted); font-size: 12px; }

.generator-result-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.generator-result-state::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--warning);
    content: "";
}

.generator-result-state.is-saved::before {
    background: var(--success);
}

.generator-progress {
    display: grid;
    min-height: min(520px, calc(100dvh - 224px));
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    padding: 20px;
    text-align: center;
}

.generator-progress__visual {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
}

.generator-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: generator-spin 700ms linear infinite;
}

.generator-progress h3 {
    margin: 0;
    font-size: 15px;
}

.generator-progress p,
.generator-progress time {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.generator-progress time {
    font-family: var(--font-metric);
}

.generator-progress__track {
    position: relative;
    width: min(280px, 80%);
    height: 3px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--surface-active);
}

.generator-progress__track span {
    position: absolute;
    inset-block: 0;
    left: -36%;
    width: 36%;
    background: var(--primary);
    animation: generator-progress 1400ms var(--ease-out) infinite;
}

.generator-result-content {
    display: grid;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    background: var(--surface);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), border-color 160ms ease;

    @starting-style {
        opacity: 0;
        transform: translateY(8px);
    }
}

.generator-result__media {
    position: relative;
    display: grid;
    min-height: 0;
    max-height: 600px;
    place-items: center;
    overflow: hidden;
    background: var(--surface-subtle);
}

.generator-result__media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

.generator-result__footer {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
}

.generator-result__metadata {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 18px;
}

.generator-result-error {
    display: flex;
    min-height: 96px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--danger);
    border-radius: var(--radius-control);
    background: var(--danger-soft);
    padding: 16px;
    color: var(--danger);
}

.generator-result-error > .ui-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.generator-result-error p {
    margin: 0;
    font-size: 13px;
    line-height: 19px;
}

.generator-dialog__danger {
    color: var(--danger);
}

.generator-dialog__danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.generator-library {
    display: grid;
    gap: 16px;
}

.generator-library__toolbar {
    display: grid;
    grid-template-columns: auto minmax(240px, 420px) auto;
    align-items: center;
    gap: 12px;
}

.generator-library__switch {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    padding: 3px;
}

.generator-library__switch button {
    min-height: 32px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    padding: 0 14px;
    color: var(--text-secondary);
    cursor: pointer;
    font: 600 13px/18px var(--font-body);
    transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}

.generator-library__switch button:hover {
    background: var(--surface-subtle);
    color: var(--text);
}

.generator-library__switch button.is-active {
    background: var(--surface-active);
    color: var(--text);
}

.generator-library__search {
    width: 100%;
    max-width: none;
}

.generator-library__toolbar > .ui-button {
    justify-self: end;
}

.generator-library__surface {
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    background: var(--surface);
    padding: 16px;
}

.generator-loading {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.generator-loading.is-error {
    color: var(--danger);
}

.generator-grid,
.generator-pack-items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.generator-card {
    position: relative;
    min-width: 0;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out),
        border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;

    @starting-style {
        opacity: 0;
        transform: translateY(8px);
    }
}

.generator-card:hover,
.generator-card:focus-within {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
}

.generator-card__body {
    display: grid;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: inherit;
    color: var(--text);
    text-align: left;
}

.generator-card__media {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-control) var(--radius-control) 0 0;
    background: var(--surface-subtle);
}

.generator-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.generator-card__content {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 10px 44px 10px 10px;
}

.generator-card__content strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generator-card__content small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generator-card__menu,
.generator-result__menu {
    position: absolute;
    z-index: 60;
}

.generator-card__menu {
    right: 6px;
    bottom: 6px;
}

.generator-result__menu {
    top: 10px;
    right: 10px;
}

.generator-card__menu summary,
.generator-result__menu summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: rgb(255 255 255 / 92%);
    color: var(--text-secondary);
    cursor: pointer;
    list-style: none;
    transition: background-color 150ms ease, color 150ms ease, transform 140ms var(--ease-out);
}

.generator-card__menu summary {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
}

.generator-card__menu summary::-webkit-details-marker,
.generator-result__menu summary::-webkit-details-marker {
    display: none;
}

.generator-card__menu summary:hover,
.generator-result__menu summary:hover,
.generator-result__menu[open] summary {
    background: var(--surface-active);
    color: var(--text);
}

.generator-card__menu summary .ui-icon,
.generator-result__menu summary .ui-icon {
    width: 18px;
    height: 18px;
}

.generator-card__menu > div,
.generator-result__menu > div {
    position: absolute;
    right: 0;
    display: grid;
    width: 190px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    box-shadow: var(--shadow-popover);
    padding: 4px;
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: right bottom;
    transition: opacity 170ms var(--ease-out), transform 170ms var(--ease-out);

    @starting-style {
        opacity: 0;
        transform: translateY(4px) scale(.97);
    }
}

.generator-card__menu > div {
    bottom: calc(100% + 6px);
}

.generator-result__menu > div {
    top: calc(100% + 6px);
    transform-origin: right top;
}

.generator-card__menu button,
.generator-card__menu a,
.generator-result__menu button {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    padding: 0 10px;
    color: var(--text);
    cursor: pointer;
    font: 500 13px/18px var(--font-body);
    text-align: left;
    text-decoration: none;
    transition: background-color 140ms ease, color 140ms ease, transform 120ms var(--ease-out);
}

.generator-card__menu button:hover,
.generator-card__menu a:hover,
.generator-card__menu button:focus-visible,
.generator-card__menu a:focus-visible,
.generator-result__menu button:hover,
.generator-result__menu button:focus-visible {
    background: var(--surface-subtle);
    outline: 0;
}

.generator-card__menu button.is-danger,
.generator-result__menu button.is-danger {
    color: var(--danger);
}

.generator-card__menu button .ui-icon,
.generator-card__menu a .ui-icon,
.generator-result__menu button .ui-icon {
    width: 18px;
    height: 18px;
}

.generator-pack-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.generator-pack-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out),
        border-color 160ms ease, background-color 160ms ease;

    @starting-style {
        opacity: 0;
        transform: translateY(8px);
    }
}

.generator-pack-card:hover,
.generator-pack-card:focus-within {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
}

.generator-pack-card > button {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    padding: 10px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform 140ms var(--ease-out);
}

.generator-pack-card__covers {
    display: grid;
    width: 96px;
    height: 72px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    overflow: hidden;
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
}

.generator-pack-card__covers > .ui-icon {
    width: 28px;
    height: 28px;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    place-self: center;
    color: var(--text-muted);
}

.generator-pack-card strong,
.generator-pack-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generator-pack-card strong {
    font-size: 14px;
}

.generator-pack-card small {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.generator-empty {
    display: grid;
    min-height: 300px;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--text-secondary);
    text-align: center;
}

.generator-empty > .ui-icon {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
}

.generator-empty h2,
.generator-empty p {
    margin: 0;
}

.generator-empty h2 {
    color: var(--text);
    font-size: 16px;
}

.generator-empty p {
    max-width: 460px;
    font-size: 13px;
}

.generator-empty .ui-button {
    margin-top: 8px;
}

.generator-pack-view {
    display: grid;
    gap: 16px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);

    @starting-style {
        opacity: 0;
        transform: translateY(8px);
    }
}

.generator-submit,
.generator-mobile-tool,
.generator-mobile-submit,
.generator-reference-empty,
.generator-reference__remove,
.generator-card__menu summary,
.generator-card__menu button,
.generator-card__menu a,
.generator-result__menu summary,
.generator-result__menu button,
.generator-pack-card > button,
.generator-library__switch button,
.generator-pack-view__actions .ui-button {
    transition-property: transform, background-color, border-color, color, box-shadow;
    transition-duration: 140ms;
    transition-timing-function: var(--ease-out);
}

.generator-submit:active,
.generator-mobile-tool:active,
.generator-mobile-submit:active,
.generator-reference-empty:active,
.generator-reference__remove:active,
.generator-card__menu summary:active,
.generator-card__menu button:active,
.generator-card__menu a:active,
.generator-result__menu summary:active,
.generator-result__menu button:active,
.generator-pack-card > button:active,
.generator-library__switch button:active,
.generator-pack-view__actions .ui-button:active {
    transform: scale(.97);
}

.generator-pack-view__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.generator-pack-view__header h2,
.generator-pack-view__header p {
    margin: 0;
}

.generator-pack-view__header h2 {
    font-size: 18px;
}

.generator-pack-view__header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.generator-pack-view__actions {
    display: flex;
    gap: 8px;
}

.generator-pack-items {
    min-height: 320px;
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    background: var(--surface);
    padding: 16px;
}

.generator-dialog {
    width: min(calc(100% - 32px), 600px);
}

.generator-dialog .ui-dialog__panel {
    max-height: calc(100dvh - 32px);
}

.generator-dialog__title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.generator-dialog__title .ui-icon {
    width: 20px;
    height: 20px;
}

.generator-option-sheet {
    width: min(calc(100% - 32px), 440px);
}

.generator-option-sheet__list {
    display: grid;
    gap: 8px;
}

.generator-option-choice {
    display: grid;
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    padding: 8px 12px;
    cursor: pointer;
}

.generator-option-choice:hover {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
}

.generator-option-choice.is-selected {
    border-color: var(--border-active);
    background: var(--primary-soft);
}

.generator-option-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.generator-option-choice span,
.generator-option-choice strong,
.generator-option-choice small {
    display: block;
}

.generator-option-choice strong {
    font-size: 13px;
}

.generator-option-choice small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.generator-option-choice > .ui-icon {
    width: 18px;
    height: 18px;
    color: transparent;
}

.generator-option-choice.is-selected > .ui-icon {
    color: var(--primary);
}

.generator-option-choice:has(input:focus-visible) {
    outline: 3px solid var(--focus-soft);
    outline-offset: 2px;
}

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

@keyframes generator-progress {
    from { left: -36%; }
    to { left: 100%; }
}

@media (max-width: 1279px) {
    .generator-grid,
    .generator-pack-items {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .generator-pack-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .generator-studio {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    .generator-composer {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .generator-result {
        position: static;
    }

    .generator-grid,
    .generator-pack-items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .generator-library__toolbar {
        grid-template-columns: auto minmax(220px, 1fr);
    }

    .generator-library__toolbar > .ui-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 767px) {
    .generator-studio {
        --generator-mobile-composer-height: 150px;
        min-height: calc(100dvh - 162px);
        margin-inline: -16px;
        overflow: visible;
        border-inline: 0;
        border-radius: 0;
        padding-bottom: calc(var(--generator-mobile-composer-height) + 12px);
    }

    .generator-result,
    .generator-composer {
        padding: 16px;
    }

    .generator-result {
        order: 1;
    }

    .generator-progress {
        min-height: 144px;
    }

    .generator-result__media {
        max-height: none;
    }

    .generator-result__media img {
        max-height: none;
    }

    .generator-result-empty {
        min-height: clamp(260px, 42dvh, 360px);
        padding: 24px 18px;
    }

    .generator-result__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .generator-composer {
        position: fixed;
        z-index: calc(var(--layer-dialog) - 1);
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        width: 100%;
        max-width: 100vw;
        order: 2;
        gap: 12px;
        border-bottom: 0;
        border-top: 1px solid var(--border);
        background: var(--surface);
        padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
        box-shadow: 0 -8px 24px rgb(32 38 55 / 8%);
    }

    .generator-input-shell {
        display: grid;
        order: 2;
        gap: 4px;
        border: 1px solid var(--border-strong);
        border-radius: 24px;
        background: var(--surface);
        padding: 8px;
        transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
    }

    .generator-input-shell:focus-within {
        border-color: var(--focus);
        box-shadow: 0 0 0 3px var(--focus-soft);
    }

    .generator-input-shell.is-invalid {
        border-color: var(--danger);
    }

    .generator-prompt-label,
    .generator-prompt-count {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .generator-input-shell .ui-textarea.generator-prompt {
        height: 56px;
        min-height: 56px;
        max-height: 160px;
        border: 0;
        border-radius: 18px;
        background: transparent;
        padding: 10px 12px 6px;
        font-size: 16px;
        line-height: 22px;
        resize: none;
        overflow-y: auto;
    }

    .generator-input-shell .ui-textarea.generator-prompt:hover,
    .generator-input-shell .ui-textarea.generator-prompt:focus,
    .generator-input-shell .ui-textarea.generator-prompt[aria-invalid="true"] {
        border: 0;
        background: transparent;
        outline: 0;
        box-shadow: none;
    }

    .generator-parameters {
        display: none;
    }

    .generator-mobile-toolbar {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 4px;
    }

    .generator-mobile-tool,
    .generator-mobile-submit {
        display: flex;
        min-width: 0;
        height: 44px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 0;
        border-radius: 22px;
        background: transparent;
        padding: 0 10px;
        color: var(--text);
        cursor: pointer;
        font: 600 12px/16px var(--font-body);
    }

    .generator-mobile-tool:hover,
    .generator-mobile-tool:active {
        background: var(--surface-subtle);
    }

    .generator-mobile-tool:focus-visible,
    .generator-mobile-submit:focus-visible {
        outline: 3px solid var(--focus-soft);
        outline-offset: 1px;
    }

    .generator-mobile-tool--add {
        width: 44px;
        flex: 0 0 44px;
        border: 1px solid var(--border-strong);
        padding: 0;
    }

    .generator-mobile-tool .ui-icon,
    .generator-mobile-submit .ui-icon {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        color: var(--text-secondary);
    }

    .generator-mobile-tool span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .generator-mobile-submit {
        width: 44px;
        flex: 0 0 44px;
        margin-left: auto;
        background: var(--primary);
        padding: 0;
        color: var(--surface);
    }

    .generator-mobile-submit:hover,
    .generator-mobile-submit:active {
        background: var(--primary-hover);
    }

    .generator-mobile-submit:disabled {
        background: var(--surface-disabled);
        color: var(--text-disabled);
        cursor: not-allowed;
    }

    .generator-mobile-submit .ui-icon {
        color: currentColor;
    }

    .generator-references {
        min-width: 0;
        order: 1;
    }

    .generator-references.is-empty,
    .generator-section-heading,
    .generator-reference-empty--compact {
        display: none;
    }

    .generator-reference-list {
        gap: 8px;
        padding: 2px 0;
        border-radius: 0;
        scrollbar-width: none;
    }

    .generator-reference-list::-webkit-scrollbar {
        display: none;
    }

    .generator-reference {
        position: relative;
        display: block;
        width: 72px;
        min-width: 72px;
        height: 72px;
        overflow: visible;
        border-radius: 12px;
        padding: 0;
    }

    .generator-reference__preview {
        width: 70px;
        height: 70px;
        border-radius: 11px;
    }

    .generator-reference > div {
        display: none;
    }

    .generator-reference__remove {
        position: absolute;
        top: -6px;
        right: -6px;
        width: 28px;
        height: 28px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface);
        color: var(--text-secondary);
        box-shadow: var(--shadow-sm);
    }

    .generator-reference__remove .ui-icon {
        width: 15px;
        height: 15px;
    }

    .generator-reference--error {
        width: min(240px, 80vw);
        min-width: min(240px, 80vw);
        height: auto;
        min-height: 72px;
        padding: 10px;
    }

    .generator-reference--error > strong,
    .generator-reference--error > small {
        display: block;
    }

    .generator-request-error {
        order: 3;
        margin: 0 8px;
    }

    .generator-composer__action {
        order: 4;
        margin: 0 8px;
    }

    .generator-composer__action > .generator-submit {
        display: none;
    }

    .generator-library__toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .generator-library__switch,
    .generator-library__search,
    .generator-library__toolbar > .ui-button {
        width: 100%;
        grid-column: 1;
    }

    .generator-library__switch button {
        flex: 1 1 50%;
    }

    .generator-library__toolbar > .ui-button {
        justify-self: stretch;
    }

    .generator-library__surface,
    .generator-pack-items {
        padding: 12px;
    }

    .generator-grid,
    .generator-pack-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .generator-pack-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .generator-pack-view__header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .generator-pack-view__header > .ui-button {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .generator-pack-view__actions {
        align-self: start;
    }

    .generator-pack-view__actions .ui-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
    }

    .generator-pack-view__actions .ui-button span:last-child {
        display: none;
    }

    body.generator-pack-modal-open {
        overflow: hidden;
    }

    .generator-pack-view.is-mobile-modal {
        position: fixed;
        z-index: 950;
        inset: 0;
        display: grid;
        min-height: 100dvh;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 12px;
        overflow-y: auto;
        background: var(--surface);
        padding: max(12px, env(safe-area-inset-top, 0px)) 12px
            max(12px, env(safe-area-inset-bottom, 0px));
        opacity: 0;
        transform: translateY(12px);
        pointer-events: none;
        transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
    }

    .generator-pack-view.is-mobile-modal.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .generator-pack-view.is-mobile-modal.is-closing {
        opacity: 0;
        transform: translateY(8px);
        pointer-events: none;
    }

    .generator-pack-view.is-mobile-modal .generator-pack-view__header {
        position: sticky;
        z-index: 2;
        top: 0;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        background: var(--surface);
        padding-bottom: 10px;
    }

    .generator-pack-view.is-mobile-modal .generator-pack-view__header > .ui-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        grid-column: auto;
        padding: 0;
    }

    .generator-pack-view.is-mobile-modal .generator-pack-view__header > .ui-button span:last-child {
        display: none;
    }

    .generator-pack-view.is-mobile-modal .generator-pack-items {
        min-height: 0;
        align-content: start;
        overflow-y: auto;
    }

    .generator-card__menu > div,
    .generator-result__menu > div {
        width: 52px;
    }

    .generator-card__menu button,
    .generator-card__menu a,
    .generator-result__menu button {
        width: 44px;
        min-width: 44px;
        justify-content: center;
        padding: 0;
    }

    .generator-card__menu button > span:last-child,
    .generator-card__menu a > span:last-child,
    .generator-result__menu button > span:last-child {
        display: none;
    }

    .ui-dialog.generator-option-sheet {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        max-height: min(70dvh, 560px);
        border-radius: var(--radius-dialog) var(--radius-dialog) 0 0;
        transform: translateY(100%);
    }

    .ui-dialog.generator-option-sheet[open] {
        transform: translateY(0);
    }

    .ui-dialog.generator-option-sheet[open].is-closing {
        transform: translateY(100%);
    }

    .ui-dialog.generator-option-sheet .ui-dialog__panel {
        height: auto;
        min-height: 0;
        max-height: min(70dvh, 560px);
        border: 1px solid var(--border);
        border-radius: var(--radius-dialog) var(--radius-dialog) 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .generator-option-choice {
        min-height: 44px;
    }
}

@media (max-width: 359px) {
    .generator-grid,
    .generator-pack-items {
        grid-template-columns: minmax(0, 1fr);
    }

    .generator-card__content {
        padding-right: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .generator-spinner,
    .generator-progress__track span {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }

    .generator-result-content,
    .generator-card,
    .generator-pack-card,
    .generator-card__menu > div,
    .generator-result__menu > div,
    .generator-pack-view.is-mobile-modal {
        transform: none;
        transition-duration: 0.01ms;
    }
}
/* Owner workflow additions */
[data-order-row],
[data-production-task-open] { cursor: pointer; }
[data-order-row]:focus-visible,
[data-production-task-open]:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.ui-input[readonly],
.ui-textarea[readonly] { border-color: var(--border); background: var(--surface-subtle); color: var(--text); cursor: default; }
.empty-state { display: grid; min-height: 144px; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-panel); background: var(--surface); padding: 24px; color: var(--text-secondary); text-align: center; }
.empty-state h2 { color: var(--text); font-size: 18px; }
.empty-state p { max-width: 520px; line-height: 1.55; }
.ui-spinner { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid var(--surface-active); border-top-color: var(--primary); border-radius: 50%; animation: ui-spinner-rotate 700ms linear infinite; }
@keyframes ui-spinner-rotate { to { transform: rotate(360deg); } }
.admin-norms-form { display: grid; width: 100%; gap: 18px; }
.admin-norms-form__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); padding: 2px 2px 16px; }
.admin-norms-form__header h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.admin-norms-form__header p { max-width: 680px; margin: 6px 0 0; color: var(--text-secondary); line-height: 1.55; }
.admin-norms-section { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.admin-norms-section__header { display: flex; min-height: 72px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.admin-norms-section__header h3 { margin: 0; font-size: 15px; font-weight: 700; }
.admin-norms-section__header p { max-width: 760px; margin: 4px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.45; }
.admin-norms-section .data-table-scroll { border: 0; border-radius: 0; }
.admin-norms-table { min-width: 760px; table-layout: fixed; }
.admin-norms-table th:nth-child(1) { width: 27%; }
.admin-norms-table th:nth-child(2) { width: 37%; }
.admin-norms-table th:nth-child(3) { width: 20%; }
.admin-norms-table th:nth-child(4) { width: 16%; }
.admin-norms-table--stages th:nth-child(1) { width: 24%; }
.admin-norms-table--stages th:nth-child(2) { width: 18%; }
.admin-norms-table--stages th:nth-child(3) { width: 26%; }
.admin-norms-table--stages th:nth-child(4) { width: 18%; }
.admin-norms-table--stages th:nth-child(5) { width: 14%; }
.admin-norms-table th { background: var(--surface); color: var(--text-secondary); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
.admin-norms-table td { height: 62px; vertical-align: middle; color: var(--text-secondary); line-height: 1.4; }
.admin-norms-table td:first-child { color: var(--text); }
.admin-norms-table label { cursor: pointer; }
.admin-norms-table code { font-family: var(--font-metric); font-size: 11px; }
.admin-norms-table__input { width: min(100%, 150px); height: 38px; margin: 0; padding-inline: 11px; font-family: var(--font-metric); font-size: 13px; font-weight: 600; text-align: right; }
.admin-norms-form__error { margin: -6px 2px 0; color: var(--danger); }
.catalog-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); align-items: end; gap: 12px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 16px; }
.catalog-filters .search-control { min-width: 220px; align-self: end; grid-column: span 2; }
.catalog-filter-check { display: flex; min-height: 42px; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); padding: 0 12px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.catalog-filter-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.pagination__link { display: inline-grid; min-width: 38px; min-height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-secondary); font-family: var(--font-metric); font-size: 12px; font-weight: 600; box-shadow: none; transition: transform 150ms var(--ease-out), border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.pagination__link:active { transform: scale(.97); }
.pagination__link.is-active { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: none; }
.data-table tr.is-muted { color: var(--text-secondary); background: var(--surface-subtle); }
#materials-table tbody tr { transition: background-color 150ms ease, box-shadow 150ms ease; }
#materials-table tbody tr:has([data-material-edit]) { cursor: pointer; }
#materials-table .data-table__actions { width: 190px; white-space: nowrap; }
#materials-table .data-table__actions .ui-button { min-height: 34px; padding-inline: 11px; }
#materials-table .data-table__actions .icon-button { display: inline-grid; margin-left: 3px; }
.ui-dialog.material-dialog { width: min(calc(100% - 24px), 720px); }
.material-dialog .ui-dialog__panel { box-shadow: var(--shadow-dialog); }
.material-dialog .ui-dialog__body { background: var(--surface-subtle); padding: 18px; }
.material-dialog .form-grid { gap: 14px; }
.material-dialog .ui-field { align-content: start; }
.material-dialog .ui-input,
.material-dialog .ui-textarea,
.material-dialog .ui-select-trigger { background: var(--surface); }
.inventory-cancel-receipt-dialog__warning { border: 1px solid #f1cbd1; border-left: 3px solid var(--danger); border-radius: 11px; background: var(--danger-soft); padding: 12px 13px; color: #7f3340; line-height: 1.5; }
.inventory-delete-receipt-dialog__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--border); }
.inventory-delete-receipt-dialog__details > div { min-width: 0; background: var(--surface); padding: 11px 13px; }
.inventory-delete-receipt-dialog__details dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.inventory-delete-receipt-dialog__details dd { overflow-wrap: anywhere; margin: 0; color: var(--text); font-weight: 600; }
.inventory-delete-receipt-dialog__warning { margin: 14px 0 0; border: 1px solid #f1cbd1; border-left: 3px solid var(--danger); border-radius: 11px; background: var(--danger-soft); padding: 12px 13px; color: #7f3340; line-height: 1.5; }
.ui-dialog.production-task-dialog { width: min(calc(100% - 32px), 860px); max-width: none; max-height: none; }
.production-task-dialog .ui-dialog__panel { width: 100%; max-height: min(760px, calc(100dvh - 32px)); border-radius: var(--radius-dialog); box-shadow: var(--shadow-dialog); }
.production-task-dialog .ui-dialog__header { min-height: 72px; align-items: center; padding: 17px 20px; }
.production-task-dialog .ui-dialog__header > div { min-width: 0; }
.production-task-dialog .ui-dialog__header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-task-dialog .ui-dialog__header .muted { margin-top: 3px; }
.production-task-dialog .icon-button { width: 38px; height: 38px; flex: 0 0 38px; border-color: var(--border); background: var(--surface); }
.production-task-dialog .icon-button:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.production-task-dialog__body { display: block; background: var(--surface-subtle); padding: 18px 20px 22px; }
.production-task-dialog__footer { min-height: 58px; align-items: center; background: var(--surface); padding: 10px 20px; }
.ui-dialog.layout-preview-dialog { width: min(calc(100% - 32px), 1100px); max-width: none; }
.layout-preview-dialog .ui-dialog__panel { width: 100%; max-height: min(860px, calc(100dvh - 32px)); }
.layout-preview-dialog__body { min-height: 0; padding: 0; background: #F4F5F8; }
.layout-preview-dialog__frame { display: block; width: 100%; height: min(680px, calc(100dvh - 180px)); border: 0; background: #FFF; }
.layout-download-link { display: inline-block; margin-left: 10px; font-size: 13px; }
.layout-preview-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    color: var(--primary);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}
.layout-preview-link:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.layout-preview-link:focus-visible { border-radius: 4px; outline: 2px solid var(--primary); outline-offset: 2px; }
.production-task-dialog__loading { display: flex; min-height: 220px; align-items: center; justify-content: center; gap: 12px; color: var(--text-secondary); text-align: left; }
.production-task-dialog__loading p { display: grid; gap: 3px; }
.production-task-dialog__loading strong { color: var(--text); font-size: 14px; }
.production-task-dialog__loading small { font-size: 12px; }
.production-task-detail { min-width: 0; }
.production-task-detail__headline { display: flex; justify-content: flex-start; margin-bottom: 12px; }
.production-task-detail__section { margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 16px; box-shadow: none; }
.production-task-detail__section:first-of-type { margin-top: 0; }
.production-task-detail__section h3 { margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.production-task-detail__facts { display: grid; overflow: hidden; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--border); }
.production-task-detail__facts div { display: grid; min-width: 0; gap: 5px; background: var(--surface); padding: 12px 14px; }
.production-task-detail__facts dt { color: var(--text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.production-task-detail__facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--text); font-weight: 600; line-height: 1.4; }
.production-task-detail__comment { margin: 12px 0 0; border: 1px solid #deddf8; border-left: 3px solid var(--primary); border-radius: 11px; background: var(--primary-soft); padding: 12px 14px; color: #454382; line-height: 1.5; }
.production-task-detail__route { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: route-step; }
.production-task-detail__route li { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-subtle); padding: 38px 12px 11px; counter-increment: route-step; }
.production-task-detail__route li::before { content: counter(route-step); position: absolute; top: 10px; left: 12px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-family: var(--font-metric); font-size: 11px; font-weight: 700; }
.production-task-detail__route li strong { display: block; overflow-wrap: anywhere; }
.production-task-detail__route li span { display: block; margin-top: 5px; color: var(--text-secondary); font-family: var(--font-metric); font-size: 11px; }
.production-task-detail__materials { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; }
.production-task-detail__materials-table { min-width: 620px; }
.production-task-history { margin: 0; }
.costing-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.costing-summary article { display: grid; min-width: 0; min-height: 88px; align-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 15px; box-shadow: none; transition: border-color 180ms ease; }
.costing-summary span { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.costing-summary strong { overflow: hidden; text-overflow: ellipsis; color: var(--text); font-family: var(--font-metric); font-size: clamp(18px, 2vw, 23px); font-weight: 650; }
.ui-dialog.costing-filter-dialog { width: min(880px, calc(100% - 24px)); }
.costing-filter-dialog .ui-dialog__panel { width: 100%; }
.costing-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; }
.costing-filters .ui-field { min-width: 0; }
.costing-filters__actions { display: flex; justify-content: flex-end; gap: 8px; }
.costing-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.costing-chart { min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 16px; box-shadow: none; }
.costing-chart--wide { grid-column: 1 / -1; }
.costing-chart h2 { margin-bottom: 14px; font-size: 14px; font-weight: 650; }
.costing-bars { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.costing-bars li { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(100px, 2fr) auto; align-items: center; gap: 10px; }
.costing-bars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.costing-bars li > div { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-active); }
.costing-bars i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transform-origin: left center; transition: transform 220ms var(--ease-out); }
.costing-bars strong { font-family: var(--font-metric); font-size: 12px; }
.costing-more { margin: 0 0 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.costing-more > summary { cursor: pointer; padding: 14px 16px; color: var(--text); font-size: 13px; font-weight: 650; list-style-position: inside; }
.costing-more[open] > summary { border-bottom: 1px solid var(--border); }
.costing-more__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.costing-more .costing-chart { box-shadow: none; }

@media (max-width: 900px) {
    .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .costing-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .costing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .costing-dashboard, .costing-more__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .catalog-filters { grid-template-columns: minmax(0, 1fr); }
    .catalog-filters .search-control { min-width: 0; grid-column: auto; }
    .catalog-filters .search-control, .catalog-filters .ui-button { width: 100%; }
    .responsive-card-table thead { display: none; }
    .data-table.responsive-card-table { min-width: 0; }
    .responsive-card-table tbody, .responsive-card-table tr, .responsive-card-table td { display: block; width: 100%; }
    .responsive-card-table tbody { display: grid; gap: 10px; }
    .responsive-card-table tr { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
    .responsive-card-table td { display: grid; grid-template-columns: minmax(95px, 38%) minmax(0, 1fr); gap: 10px; padding: 7px 0; border: 0; }
    .responsive-card-table td::before { content: attr(data-label); color: var(--text-secondary); font-size: 12px; }
    .responsive-card-table td.data-table__actions { display: flex; flex-wrap: wrap; grid-template-columns: none; padding-top: 10px; border-top: 1px solid var(--border); }
    .responsive-card-table td.data-table__actions::before { display: none; }
    #materials-table .data-table__actions { width: 100%; white-space: normal; }
    #materials-table .data-table__actions .ui-button { flex: 1 1 auto; }
    .costing-filters, .costing-dashboard { grid-template-columns: minmax(0, 1fr); }
    .costing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .costing-chart--wide { grid-column: auto; }
    .costing-filters__actions, .costing-filters__actions .ui-button { width: 100%; }
    .costing-filter-dialog .ui-dialog__panel { max-height: calc(100dvh - 12px); }
    .costing-filter-dialog .ui-dialog__body { padding: 12px; }
    .costing-summary article { min-height: 78px; padding: 12px; }
    .costing-summary strong { font-size: 18px; }
    .costing-more__grid { grid-template-columns: minmax(0, 1fr); padding: 8px; }
    .costing-bars li { grid-template-columns: minmax(0, 1fr) auto; }
    .costing-bars li > div { grid-column: 1 / -1; grid-row: 2; }
    .ui-dialog.production-task-dialog { width: calc(100% - 12px); height: calc(100dvh - 12px); }
    .ui-dialog.layout-preview-dialog { width: calc(100% - 12px); }
    .layout-preview-dialog .ui-dialog__panel { max-height: calc(100dvh - 12px); }
    .layout-preview-dialog__frame { height: calc(100dvh - 150px); }
    .ui-dialog.material-dialog { width: calc(100% - 12px); }
    .material-dialog .ui-dialog__body { padding: 12px; }
    .production-task-dialog .ui-dialog__panel { width: 100%; height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); border-radius: 16px; }
    .production-task-dialog .ui-dialog__header { min-height: 62px; padding: 12px 14px; }
    .production-task-dialog .ui-dialog__header h2 { font-size: 17px; }
    .production-task-dialog .ui-dialog__header .muted { display: block; font-size: 12px; }
    .production-task-dialog__body { padding: 12px; }
    .production-task-dialog__footer { min-height: 58px; padding: 9px 12px; }
    .production-task-dialog__footer .ui-button { width: 100%; }
    .production-task-detail__headline { margin-bottom: 10px; }
    .production-task-detail__section { margin-top: 10px; border-radius: 12px; padding: 13px; }
    .production-task-detail__facts { grid-template-columns: minmax(0, 1fr); }
    .production-task-detail__facts div { padding: 11px 12px; }
    .production-task-detail__route { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .production-task-detail__route li { min-height: 58px; border: 0; border-radius: 0; background: transparent; padding: 6px 8px 12px 42px; }
    .production-task-detail__route li:not(:last-child)::after { content: ''; position: absolute; top: 32px; bottom: 0; left: 18px; width: 1px; background: var(--border); }
    .production-task-detail__route li::before { top: 3px; left: 5px; width: 27px; height: 27px; border: 1px solid var(--border); background: var(--surface); }
    .production-task-detail__route li.is-current::before { border-color: var(--primary); background: var(--primary); color: #fff; }
    .production-task-detail__route li.is-completed::before { border-color: #d8d7f7; background: var(--primary-soft); color: var(--primary); }
    .production-task-detail__materials { overflow: visible; border: 0; }
    .data-table.production-task-detail__materials-table { min-width: 0; }
    .production-task-detail__materials-table tbody { gap: 8px; }
    .production-task-detail__materials-table tr { background: var(--surface-subtle); padding: 10px 12px; }
    .production-task-detail__materials-table td { grid-template-columns: minmax(92px, 36%) minmax(0, 1fr); }
    .production-task-detail__materials-table td:not(:first-child) { border-top: 1px solid var(--border); }
    .production-task-detail__materials-table td::before { font-weight: 600; }
    .production-task-detail__materials-table td:first-child { display: block; }
    .production-task-detail__materials-table td:first-child::before { display: none; }
    .admin-norms-form { gap: 12px; }
    .admin-norms-form__header { padding-inline: 2px; }
    .admin-norms-form__header h2 { font-size: 18px; }
    .admin-norms-section { border-radius: 12px; }
    .admin-norms-section__header { min-height: 64px; padding: 13px 14px; }
    .admin-norms-section .data-table-scroll { overflow: visible; }
    .data-table.admin-norms-table, .admin-norms-table tbody { display: block; width: 100%; min-width: 0; }
    .admin-norms-table thead { display: none; }
    .admin-norms-table tr { display: grid; width: 100%; align-items: center; gap: 5px 12px; border-bottom: 1px solid var(--border); padding: 13px 14px; }
    .admin-norms-table tbody tr:last-child { border-bottom: 0; }
    .admin-norms-section .admin-norms-table td { width: auto; height: auto; border: 0; padding: 0; }
    .admin-norms-table:not(.admin-norms-table--stages) tr { grid-template-columns: minmax(0, 1fr) minmax(112px, auto); grid-template-areas: "norm value" "scope unit"; }
    .admin-norms-table:not(.admin-norms-table--stages) td:nth-child(1) { grid-area: norm; }
    .admin-norms-table:not(.admin-norms-table--stages) td:nth-child(2) { grid-area: scope; color: var(--text-secondary); font-size: 11px; }
    .admin-norms-table:not(.admin-norms-table--stages) td:nth-child(3) { grid-area: value; justify-self: end; }
    .admin-norms-table:not(.admin-norms-table--stages) td:nth-child(4) { grid-area: unit; justify-self: end; color: var(--text-soft); font-size: 11px; }
    .admin-norms-table--stages tr { grid-template-columns: minmax(0, 1fr) minmax(112px, auto); grid-template-areas: "stage duration" "meta duration-unit" "owner owner"; }
    .admin-norms-table--stages td:nth-child(1) { grid-area: stage; }
    .admin-norms-table--stages td:nth-child(2) { grid-area: meta; color: var(--text-soft); font-size: 11px; }
    .admin-norms-table--stages td:nth-child(3) { grid-area: owner; color: var(--text-secondary); font-size: 11px; }
    .admin-norms-table--stages td:nth-child(4) { grid-area: duration; justify-self: end; }
    .admin-norms-table--stages td:nth-child(5) { grid-area: duration-unit; justify-self: end; color: var(--text-soft); font-size: 11px; }
    .admin-norms-table__input { width: 112px; }
}

* {
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
[hidden] { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

html {
    min-width: 320px;
    background: var(--page);
    overscroll-behavior-x: none;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

html.has-open-dialog,
body.has-open-dialog {
    overflow: clip;
    overscroll-behavior: none;
}

body.has-open-dialog {
    padding-inline-end: var(--dialog-scrollbar-compensation, 0px);
}

html.has-open-sidebar,
body.has-open-sidebar {
    overflow: hidden;
    overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--text);
}
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 32px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.018em; line-height: 28px; }
p { margin: 0; }
.muted { color: var(--text-secondary); line-height: 1.55; }
code {
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface-subtle);
    padding: 2px 6px;
    color: #4d5568;
    font-family: var(--font-metric);
    font-weight: 500;
    font-size: 12px;
}

.ui-icon {
    display: inline-block;
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: var(--icon-mask) center / contain no-repeat;
    mask: var(--icon-mask) center / contain no-repeat;
}

.ui-button {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--control-radius);
    padding: 0 14px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out);
}

.ui-button:hover { box-shadow: none; }
.ui-button:active { transform: translateY(0) scale(.98); }
.ui-button:disabled { cursor: not-allowed; opacity: 0.62; transform: none; }
.ui-button:focus-visible,
.icon-button:focus-visible,
.app-nav__link:focus-visible,
.workspace-tabs__link:focus-visible {
    outline: 2px solid var(--focus-soft);
    outline-offset: 1px;
}

.ui-button--primary { background: var(--primary); color: #fff; }
.ui-button--primary:hover { background: var(--primary-hover); }
.ui-button--secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.ui-button--secondary:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.ui-button--danger { background: var(--danger); color: #fff; }
.ui-button--danger:hover { background: #a62f40; }
.ui-button__icon { width: 17px; height: 17px; }

.icon-button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms var(--ease-out);
}

.icon-button:hover { border-color: var(--border); background: var(--surface-subtle); color: var(--text); }
.icon-button:active { transform: scale(.96); }
.icon-button .ui-icon { width: 18px; height: 18px; }

.ui-form { display: grid; gap: 16px; }
.ui-field { display: grid; min-width: 0; gap: 7px; color: var(--text-secondary); font-size: 12px; font-weight: 600; line-height: 18px; }
.ui-field > span:first-child small { color: var(--text-secondary); font-weight: 500; }
.ui-form-error {
    border-left: 3px solid var(--danger);
    background: var(--danger-soft);
    padding: 9px 11px;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.4;
}

.ui-input-wrap { position: relative; display: block; }
.ui-input-wrap__icon {
    position: absolute;
    top: 11px;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--text-soft);
    pointer-events: none;
}

.ui-input,
.ui-textarea {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: 0;
    transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, outline-color var(--motion-fast) ease;
}

.ui-input { min-height: var(--control-height); padding: 0 14px 0 42px; }
.ui-input--plain { padding-left: 14px; }
.ui-textarea {
    min-height: 104px;
    max-height: 220px;
    resize: vertical;
    overflow-y: auto;
    padding: 12px 14px;
    line-height: 1.5;
}
.ui-input::placeholder,
.ui-textarea::placeholder { color: var(--text-placeholder); }
.ui-input:hover,
.ui-textarea:hover { border-color: var(--border-strong); background: var(--surface); }
.ui-input:focus,
.ui-textarea:focus { border-color: var(--focus); outline: 2px solid var(--focus-soft); outline-offset: 1px; }
.ui-input:disabled,
.ui-textarea:disabled { border-color: var(--border); background: var(--surface-disabled); color: var(--text-disabled); cursor: not-allowed; }
.ui-input[readonly],
.ui-textarea[readonly] { border-color: var(--border); background: var(--surface-subtle); color: var(--text); cursor: default; }
.ui-input[aria-invalid="true"],
.ui-textarea[aria-invalid="true"] { border-color: var(--danger); }

.ui-date-control { position: relative; display: block; }
.ui-date-control .ui-input { padding-right: 42px; }
.ui-date-control__icon {
    position: absolute;
    top: 12px;
    right: 13px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}
.ui-input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 10px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0;
}

.ui-select:not([data-ui-select-enhanced="true"]) {
    width: 100%;
    min-height: var(--control-height);
    appearance: none;
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    background-color: var(--surface);
    background-image: url("../src/24/outline/chevron-down.svg");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 17px 17px;
    padding: 0 42px 0 14px;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}
.ui-select:not([data-ui-select-enhanced="true"]):hover { border-color: var(--border-strong); }
.ui-select:not([data-ui-select-enhanced="true"]):focus { border-color: var(--primary); outline: 3px solid var(--primary-soft); }

.ui-select[data-ui-select-enhanced="true"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.ui-select-control { position: relative; display: block; min-width: 0; }
.ui-select-control.is-open { z-index: 81; }
.ui-select-trigger {
    display: flex;
    width: 100%;
    min-height: var(--control-height);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    padding: 0 12px 0 14px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
    transition: transform 140ms var(--ease-out), border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.ui-select-trigger:active { transform: scale(.985); }
.ui-select-trigger:focus-visible,
.ui-select-control.is-open .ui-select-trigger {
    border-color: var(--focus);
    outline: 2px solid var(--focus-soft);
    outline-offset: 1px;
    box-shadow: none;
}
.ui-select-trigger.is-placeholder .ui-select-trigger__label { color: var(--text-soft); }
.ui-select-trigger__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-select-trigger__chevron {
    width: 17px;
    height: 17px;
    color: var(--text-secondary);
    flex: 0 0 auto;
    transition: transform 180ms var(--ease-out), color 150ms ease;
}
.ui-select-control.is-open .ui-select-trigger__chevron { color: var(--primary); transform: rotate(180deg); }
.ui-select-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    display: grid;
    max-height: min(280px, 42vh);
    overflow-y: auto;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    padding: 6px;
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: top center;
    box-shadow: var(--shadow-popover);
    transition: opacity 160ms ease, transform 180ms var(--ease-out), overlay 180ms allow-discrete, display 180ms allow-discrete;
}
.ui-select-menu[hidden] { display: none; }
.ui-select-control.is-upward .ui-select-menu { top: auto; bottom: calc(100% + 7px); transform-origin: bottom center; }
@starting-style {
    .ui-select-menu:not([hidden]) { opacity: 0; transform: translateY(-5px) scale(.985); }
    .ui-select-control.is-upward .ui-select-menu:not([hidden]) { transform: translateY(5px) scale(.985); }
}
.ui-select-option {
    display: grid;
    min-height: 40px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    padding: 0 10px;
    color: #465064;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: transform 130ms var(--ease-out), background-color 140ms ease, color 140ms ease;
}
.ui-select-option:focus-visible { background: var(--surface-subtle); color: var(--text); outline: 0; }
.ui-select-option__check { width: 16px; height: 16px; color: transparent; }
.ui-select-option.is-selected { background: var(--primary-soft); color: var(--text); }
.ui-select-option.is-selected .ui-select-option__check { color: var(--primary); }
.ui-select-option:active { transform: scale(.985); }
.ui-select-control[aria-invalid="true"] .ui-select-trigger { border-color: var(--danger); outline: 3px solid var(--danger-soft); }

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    flex-direction: column;
    box-sizing: border-box;
    border-right: 1px solid var(--border);
    background: var(--surface);
    box-shadow: none;
    padding: 20px 10px 16px;
}

.app-sidebar__toggle,
.app-sidebar__scrim { display: none; }

.app-nav {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    align-content: start;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 4px 2px 0;
    scrollbar-color: var(--border-strong) transparent;
    scrollbar-width: thin;
}
.app-nav::-webkit-scrollbar { width: 6px; }
.app-nav::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--border-strong); }
.app-nav__link {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 0 14px;
    color: #4f5769;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}

.app-nav__icon { width: 20px; height: 20px; color: #5f687a; }
.app-nav__link::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: transparent;
    content: "";
    transition: background-color 160ms ease;
}
.app-nav__link:hover { background: var(--surface-subtle); color: var(--text); transform: translateX(2px); }
.app-nav__link.is-active { background: var(--primary-soft); color: var(--text); }
.app-nav__link.is-active::before { background: var(--primary); }
.app-nav__link.is-active .app-nav__icon { color: #303748; }
.app-nav__task-indicator {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    margin-left: auto;
    border: 2px solid var(--surface-subtle);
    border-radius: 999px;
    background: var(--danger);
}
.app-nav__link.is-active .app-nav__task-indicator { border-color: var(--primary-soft); }

.app-sidebar__footer {
    display: grid;
    flex: 0 0 auto;
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding: 14px 4px 0;
}

.app-sidebar__utility {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding: 0 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}
.app-sidebar__utility:hover,
.app-sidebar__utility:focus-visible { background: var(--surface-subtle); color: var(--text); }
.app-sidebar__utility:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; }
.app-sidebar__utility .ui-icon { width: 18px; height: 18px; }
.app-sidebar__utility + .app-sidebar__account { margin-top: 8px; }

.network-status {
    position: fixed;
    z-index: 400;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    display: flex;
    max-width: calc(100vw - 24px);
    min-height: 46px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    padding: 7px 8px 7px 12px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}
.network-status .ui-icon { width: 17px; height: 17px; color: var(--danger); }
.network-status button {
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-subtle);
    padding: 0 10px;
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}
.network-status button:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; }

.app-sidebar__account {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
    padding: 7px;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out);
}

.app-sidebar__account:hover { border-color: var(--border-strong); background: var(--surface); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.app-sidebar__avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-subtle);
    color: var(--text-secondary);
}

.app-sidebar__avatar .ui-icon { width: 19px; height: 19px; }
.app-sidebar__identity { display: grid; min-width: 0; gap: 2px; }
.app-sidebar__identity strong,
.app-sidebar__identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-sidebar__identity strong { font-family: var(--font-heading); font-size: 13px; font-weight: 600; }
.app-sidebar__identity small { color: var(--text-secondary); font-size: 12px; }

.app-sidebar__account-actions { display: flex; align-items: center; gap: 2px; }
.app-sidebar__account-action,
.app-sidebar__logout {
    position: relative;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.app-sidebar__account-action:hover,
.app-sidebar__logout:hover { border-color: var(--border); background: var(--surface-active); color: var(--text); }
.app-sidebar__account-action:focus-visible,
.app-sidebar__logout:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; }
.app-sidebar__account-action:active,
.app-sidebar__logout:active { transform: scale(.96); }
.app-sidebar__account-action .ui-icon,
.app-sidebar__logout .ui-icon { width: 19px; height: 19px; }
.app-sidebar__notification-badge {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 16px;
    height: 16px;
    border: 2px solid var(--surface-subtle);
    border-radius: 999px;
    background: var(--danger);
    padding: 0 3px;
    color: #fff;
    font: 700 9px/12px var(--font-body);
    text-align: center;
}

.pwa-update-status {
    position: fixed;
    z-index: 401;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    padding: 7px 8px 7px 13px;
    font-size: 12px;
    font-weight: 600;
}
.pwa-update-status button {
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    padding: 0 11px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.is-offline .pwa-update-status { bottom: 72px; }

.app-content {
    width: 100%;
    min-width: 0;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 24px 24px 40px;
    animation: app-content-enter 280ms var(--ease-out) both;
}

.workspace-header {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.workspace-header > div:first-child { min-width: 0; }
.workspace-header__action { min-width: 0; flex: 0 0 auto; }
.workspace-tabs {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar { display: none; }
.workspace-tabs__link {
    position: relative;
    flex: 0 0 auto;
    padding: 0 1px 12px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: color 150ms ease, transform 150ms var(--ease-out);
}

.workspace-tabs__link::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
    content: "";
}

.workspace-tabs__link:hover { color: var(--text); transform: translateY(-1px); }
.workspace-tabs__link.is-active { color: var(--primary); }
.workspace-tabs__link.is-active::after { background: var(--primary); }
.workspace-tabs__link > .app-nav__task-indicator {
    display: inline-block;
    margin-left: 6px;
    border-color: var(--surface);
    vertical-align: 1px;
}
.workspace-view {
    min-width: 0;
    padding-top: 22px;
    transition: opacity 160ms ease;
}

.workspace-view.is-entering { animation: workspace-view-enter 220ms var(--ease-out) both; }
.workspace-view.is-entering > :not([hidden]):not(.ui-dialog):not(.order-remove-confirm-dialog) {
    animation: workspace-block-enter 260ms var(--ease-out) both;
}
.workspace-view.is-entering > :not([hidden]):not(.ui-dialog):not(.order-remove-confirm-dialog):nth-child(2) { animation-delay: 45ms; }
.workspace-view.is-entering > :not([hidden]):not(.ui-dialog):not(.order-remove-confirm-dialog):nth-child(3) { animation-delay: 90ms; }

.workspace-view.is-loading {
    opacity: .58;
    pointer-events: none;
}

.workspace-header__action:empty {
    display: none;
}

.content-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.search-control {
    position: relative;
    display: block;
    width: min(100%, 380px);
}

.search-control .ui-icon {
    position: absolute;
    top: 11px;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--text-soft);
    pointer-events: none;
}

.search-control input {
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    background: var(--surface);
    padding: 0 13px 0 41px;
    color: var(--text);
    outline: none;
}

.search-control input:hover { border-color: var(--border-strong); }
.search-control input:focus { border-color: var(--focus); outline: 2px solid var(--focus-soft); outline-offset: 1px; }
.toolbar-note { margin-left: auto; color: var(--text-secondary); font-size: 13px; }

.section-caption { margin-bottom: 18px; }
.section-caption .muted { margin-top: 5px; }

.data-surface {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: none;
    transition: border-color var(--motion-base) ease;
}

.data-surface:hover { border-color: var(--border-strong); box-shadow: none; }

.data-table-scroll { overflow-x: auto; }
.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    border-bottom: 1px solid var(--border);
    background: var(--surface-subtle);
    padding: 11px 14px;
    color: var(--text-secondary);
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.data-table td {
    border-bottom: 1px solid var(--border);
    padding: 11px 14px;
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color 140ms ease, color 140ms ease; }
.data-table tbody tr:hover { background: var(--surface-subtle); }
.data-table td strong { display: block; color: var(--text); font-family: var(--font-heading); font-weight: 600; }
.data-table td small {display: block;margin-top: 6px;color: var(--text-secondary);font-size: 12px;}
.data-table th.data-table__actions,
.data-table td.data-table__actions {
    width: 72px;
    background: inherit;
    text-align: center;
}
.data-table th.data-table__actions:has(.icon-button + .icon-button),
.data-table td.data-table__actions:has(.icon-button + .icon-button) { width: 88px; }
.data-table__actions .icon-button {
    width: 36px;
    height: 36px;
    margin-inline: auto;
    border-color: var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: #596276;
}
.data-table__actions .icon-button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}
.data-table__empty { height: 140px; color: var(--text-secondary); text-align: center; }
.orders-responsive-table__open { display: none; }
.technology-responsive-table__open { display: none; }
.data-surface__footer {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 12px;
}

.inventory-toolbar__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.inventory-toolbar__meta .toolbar-note { margin-left: 0; }
.inventory-dialog { width: min(100% - 20px, 680px); }
.inventory-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.inventory-form-grid__wide { grid-column: 1 / -1; }
.inventory-operation-preview {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    padding: 12px 14px;
    color: #41495b;
    font-size: 13px;
    line-height: 1.5;
}
.inventory-operation-preview.is-warning {
    border-color: #F0C7A5;
    background: var(--pending-bg);
    color: var(--pending-text);
}
.inventory-operation-note {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.inventory-quantity--positive { color: var(--success-text); }
.inventory-quantity--negative { color: var(--danger); }

.person-cell { display: inline-flex; align-items: center; gap: 11px; }
.person-cell__avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: var(--font-metric);
    font-weight: 600;
    font-size: 13px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 24px;
    border-radius: 8px;
    background: var(--surface-active);
    padding: 3px 8px;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

.status-indicator__dot { width: 7px; height: 7px; border-radius: 50%; background: #a9b0bd; }
.status-indicator--success .status-indicator__dot { background: var(--success); }
.status-indicator--pending .status-indicator__dot { background: var(--pending); }
.status-indicator--danger .status-indicator__dot { background: var(--danger); }
.status-indicator--success { background: var(--success-soft); color: var(--success); }
.status-indicator--pending { background: var(--warning-soft); color: var(--warning); }
.status-indicator--danger { background: var(--danger-soft); color: var(--danger); }

.priority-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    width: fit-content;
    min-height: 20px;
    padding: 3px 6px;
    border: 1px solid var(--priority-border);
    border-radius: 6px;
    background: var(--priority-soft);
    color: var(--priority);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .01em;
    line-height: 1;
    white-space: nowrap;
}

.priority-badge::before {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    background: var(--priority);
    content: "";
    -webkit-mask: url("/assets/src/16/solid/star.svg") center / contain no-repeat;
    mask: url("/assets/src/16/solid/star.svg") center / contain no-repeat;
}

.form-surface {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 160ms ease;
}

.form-surface__header { border-bottom: 1px solid var(--border); padding: 20px 22px; }
.form-surface__header .muted { margin-top: 5px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 22px;
}

.form-grid__wide { grid-column: 1 / -1; }
.form-surface__footer { display: flex; justify-content: flex-end; border-top: 1px solid var(--border); padding: 14px 22px; }

.order-create-dialog {
    --order-dialog-space: 18px;
    width: min(100% - 20px, 1120px);
}
.order-create-dialog__panel {
    display: grid;
    max-height: calc(100dvh - 20px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.order-create-dialog__body {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    background: var(--surface-subtle);
    scrollbar-gutter: auto;
}
.order-create-dialog__header {
    min-height: 64px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 10px var(--order-dialog-space);
}

.order-create-dialog__heading,
.order-create-dialog__actions {
    display: flex;
    align-items: center;
}

.order-create-dialog__heading { min-width: 0; gap: 13px; }
.order-create-dialog__heading > div { min-width: 0; }
.order-create-dialog__heading h2 { font-size: 21px; }
.order-create-dialog__heading .muted { margin-top: 2px; }
.order-create-dialog__back { flex: 0 0 auto; }
.order-create-dialog__actions { gap: 4px; }
.order-create-dialog__actions [data-order-active-remove] { color: var(--danger); }
.order-create-dialog__state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-left: 1px solid var(--border);
    margin-left: 3px;
    padding-left: 13px;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.order-create-dialog__state > span:first-child {
    width: 8px;
    height: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
}

.order-create-dialog__state.is-complete { color: var(--success); }
.order-create-dialog__state.is-complete > span:first-child { border-color: var(--success); background: var(--success); }
.order-create-dialog__footer {
    min-height: 60px;
    align-items: center;
    border-top: 1px solid var(--border);
    padding: 9px var(--order-dialog-space);
}

.order-create-dialog__footer[data-order-footer="overview"] { justify-content: flex-end; }
.order-create-dialog__footer[data-order-footer="position"] { justify-content: flex-end; }
.order-create-dialog .ui-input,
.order-create-dialog .ui-select-trigger {
    min-height: 40px;
    border-radius: 8px;
    background: var(--surface);
}
.order-create-dialog .ui-textarea {
    min-height: 86px;
    border-radius: 8px;
    background: var(--surface);
    resize: none;
}

.order-create-section {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}
.order-create-section__title { padding: 16px var(--order-dialog-space) 0; }
.order-create-section__title h3 { font-size: 17px; font-weight: 650; }
.order-create-section__grid {
    gap: 14px;
    padding: 14px var(--order-dialog-space) var(--order-dialog-space);
}

.order-priority-control {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 8px 12px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.order-priority-control:hover {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
}

.order-priority-control:has(input:checked) {
    border-color: #cbc9f7;
    background: #fafaff;
}

.order-priority-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.order-priority-control__icon {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    color: var(--text-tertiary);
    transition: color 160ms ease;
}

.order-priority-control__icon .ui-icon { width: 16px; height: 16px; }
.order-priority-control:has(input:checked) .order-priority-control__icon {
    color: var(--primary);
}

.order-priority-control__copy { min-width: 0; flex: 1 1 auto; }
.order-priority-control__copy strong {
    font-size: 13px;
    font-weight: 650;
}

.order-priority-control__switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: #d9dee8;
    transition: background-color 180ms ease;
}

.order-priority-control__switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgb(23 32 51 / .2);
    content: "";
    transition: transform 200ms var(--ease-out);
}

.order-priority-control input:checked ~ .order-priority-control__switch {
    background: var(--primary);
}
.order-priority-control input:checked ~ .order-priority-control__switch::after { transform: translateX(18px); }
.order-priority-control input:focus-visible ~ .order-priority-control__switch {
    outline: 3px solid var(--primary-soft);
    outline-offset: 3px;
}

.order-view-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.data-table__order-link + .priority-badge {
    margin: 0 0 0 7px;
    vertical-align: middle;
}

.order-builder {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    padding: 0;
}
.order-builder__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px var(--order-dialog-space) 10px;
}
.order-builder__header h3 { font-size: 17px; font-weight: 650; }
.order-builder__header .muted { margin-top: 2px; font-size: 12px; }
.order-flow-view {
    display: grid;
    gap: 8px;
    padding: 8px;
    animation: order-view-enter 190ms cubic-bezier(.22, 1, .36, 1) both;
}

.order-overview-layout { grid-template-columns: minmax(0, 1fr); }
.order-overview-layout__rail { border-top: 0; }
.order-position-table {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    margin: 0 var(--order-dialog-space) var(--order-dialog-space);
    background: var(--surface);
}

.order-position-table__head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 110px 54px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding: 8px 0 8px 12px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.order-position-list {
    display: grid;
    overflow: hidden;
    background: var(--surface);
}

.order-position-list__item {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 38px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    animation: order-view-enter 180ms cubic-bezier(.22, 1, .36, 1) both;
}

.order-position-list__item:last-child { border-bottom: 0; }

.order-position-list__open {
    display: grid;
    min-width: 0;
    min-height: 66px;
    grid-template-columns: 42px minmax(0, 1fr) 110px 16px;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 10px 8px 10px 12px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.order-position-list__open:hover { background: var(--surface-subtle); }
.order-position-list__open:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: -3px; }
.order-position-list__number {
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-metric);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.order-position-list__copy { display: grid; min-width: 0; gap: 2px; }
.order-position-list__copy strong,
.order-position-list__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-position-list__copy strong { font-family: var(--font-heading); font-size: 12px; font-weight: 600; }
.order-position-list__copy small { color: var(--text-secondary); font-size: 10px; }
.order-position-list__status {
    display: flex;
    gap: 5px;
    min-width: 0;
    align-items: center;
}
.order-position-list__file {
    overflow: hidden;
    width: 100%;
    color: var(--pending);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-position-list__item.is-complete .order-position-list__file { color: var(--success); }
.order-position-list__state {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pending);
}

.order-position-list__item.is-complete .order-position-list__state { background: var(--success); }
.order-position-list__chevron { width: 16px; height: 16px; color: var(--text-secondary); transition: transform 150ms ease; }
.order-position-list__open:hover .order-position-list__chevron { transform: translateX(2px); }
.order-position-list__remove {
    width: 38px;
    height: 100%;
    border-left: 1px solid var(--border);
    border-radius: 0;
}

.order-position-editor {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    background: var(--surface-subtle);
    animation: order-view-enter 190ms cubic-bezier(.22, 1, .36, 1) both;
}
.order-position-editor__items { width: 100%; max-width: 100%; min-width: 0; min-height: 0; }
.order-position-page {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-height: 430px;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    animation: order-view-enter 190ms cubic-bezier(.22, 1, .36, 1) both;
}

.order-position-page__main { min-width: 0; padding: var(--order-dialog-space); }
.order-position-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px 12px;
}

.order-position-page__product { grid-column: 1 / -1; }
.order-position-page__wide { grid-column: 1 / -1; }
.order-item-card__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 14px;
}
.order-item-card__details > .ui-field:first-child { grid-column: 1 / -1; }
.order-item-card__details > .order-item__note { grid-column: 1 / -1; }
.order-position-page__aside {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
    border-left: 1px solid var(--border);
    background: var(--surface-subtle);
    padding: var(--order-dialog-space);
}

.order-position-page__aside-title h3 { font-size: 17px; font-weight: 650; }
.order-position-page__comment { margin-top: 2px; }
.order-position-page__comment .ui-textarea { min-height: 92px; }
.order-layout-field { display: grid; gap: 7px; }
.order-layout-upload {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px dashed var(--border-strong);
    border-radius: 9px;
    background: var(--surface);
    transition: border-color 150ms ease, background-color 150ms ease;
}

.order-layout-upload:hover,
.order-layout-upload:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.order-layout-upload.has-file { border-style: solid; border-color: #b9dccb; background: #f4fbf7; }
.order-layout-upload.is-disabled,
.order-layout-field.is-disabled { opacity: .52; }
.order-layout-upload.is-disabled { pointer-events: none; background: var(--surface-subtle); }
.order-layout-field.is-disabled .ui-input { cursor: not-allowed; background: var(--surface-subtle); }
.order-layout-upload__picker {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 126px;
    place-items: center;
    align-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 14px;
    cursor: pointer;
    text-align: center;
}

.order-layout-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    inset: 50% auto auto 28px;
}

.order-layout-upload__icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--text);
}

.order-layout-upload.has-file .order-layout-upload__icon { color: var(--success); }
.order-layout-upload__icon .ui-icon { width: 19px; height: 19px; }
.order-layout-upload__copy { display: grid; min-width: 0; gap: 3px; }
.order-layout-upload__copy strong,
.order-layout-upload__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-layout-upload__copy strong { color: var(--primary); font-size: 14px; font-weight: 650; }
.order-layout-upload__copy small { color: var(--text-secondary); font-size: 12px; }
.order-layout-upload__remove { align-self: start; margin: 8px 8px 0 0; }
.order-layout-upload.has-file .order-layout-upload__picker {
    min-height: 64px;
    grid-template-columns: auto minmax(0, 1fr);
    place-items: center start;
    align-content: center;
    padding: 10px 12px;
    text-align: left;
    cursor: default;
    pointer-events: none;
}

.order-item__options {
    grid-column: 1 / -1;
    display: grid;
    gap: 9px;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.order-item__options legend { margin: 8px 0; color: #394052; font-size: 13px; font-weight: 600; }
.order-position-page .role-choice-group__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.order-position-page .role-choice {
    min-width: 0;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 9px 11px;
}

.order-position-page .role-choice:hover {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
}
.order-position-page .role-choice:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.order-position-page .role-choice__label {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.3;
}
.order-item__lamination-type {
    grid-column: 1 / -1;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 12px;
}
.order-item__note { margin: 0; color: var(--pending); font-size: 12px; line-height: 1.45; }

.order-choice-field { position: relative; min-width: 0; }
.order-choice-trigger {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 9px 11px 9px 13px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.order-choice-trigger:hover {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
    transform: translateY(-1px);
}
.order-choice-trigger:disabled {
    border-color: var(--border);
    background: var(--surface-subtle);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.order-choice-trigger:focus-visible {
    outline: 3px solid var(--primary-soft);
    outline-offset: 1px;
}

.order-choice-trigger.is-invalid { border-color: var(--danger); }
.order-choice-trigger__copy { display: grid; min-width: 0; gap: 3px; }
.order-choice-trigger__copy strong,
.order-choice-trigger__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-choice-trigger__copy strong { font-size: 13px; font-weight: 650; }
.order-choice-trigger__copy small { color: var(--text-secondary); font-size: 11px; }
.order-choice-trigger > .ui-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--text-secondary);
    transition: transform 160ms ease;
}
.order-choice-trigger.has-value { border-color: var(--border-strong); }
.order-choice-field.is-open .order-choice-trigger { border-color: var(--primary); border-radius: 8px 8px 0 0; }
.order-choice-field.is-open .order-choice-trigger > .ui-icon { transform: rotate(180deg); }
.order-choice-menu {
    display: grid;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--surface);
    padding: 8px;
    animation: order-choice-enter 150ms cubic-bezier(.22, 1, .36, 1) both;
}
.order-choice-menu__search { position: relative; display: block; }
.order-choice-menu__search .ui-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 15px;
    height: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transform: translateY(-50%);
}
.order-choice-menu__search input {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-subtle);
    padding: 0 10px 0 31px;
    color: var(--text);
    font: inherit;
    font-size: 12px;
}
.order-choice-menu__search input:focus { border-color: var(--primary); outline: 2px solid var(--primary-soft); }
.order-choice-menu__list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.order-choice-option {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 8px 10px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background-color 150ms ease, color 150ms ease;
}
.order-choice-option:last-child { border-bottom: 0; }
.order-choice-option:hover,
.order-choice-option:focus-visible { background: var(--surface-subtle); outline: 0; }
.order-choice-option__copy { display: grid; min-width: 0; gap: 3px; }
.order-choice-option__copy strong { font-size: 12px; font-weight: 650; }
.order-choice-option__copy small { color: var(--text-secondary); font-size: 10px; line-height: 1.35; }
.order-choice-option__mark {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: transparent;
}
.order-choice-option__mark .ui-icon { width: 14px; height: 14px; }
.order-choice-option.is-selected .order-choice-option__mark {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

@keyframes order-choice-enter {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes order-view-enter {
    from { opacity: 0; transform: translate3d(0, 5px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.kanban {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 14px;
    overflow-x: auto;
}

.production-state-filter {
    display: flex;
    width: fit-content;
    max-width: 100%;
    gap: 4px;
    margin-bottom: 14px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 4px;
}

.production-state-filter__item {
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.production-state-filter__item:hover { color: var(--text); }
.production-state-filter__item.is-active { background: var(--primary); color: #fff; }

.kanban__column {
    min-width: 260px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-subtle);
    transition: border-color 180ms ease;
}

.kanban__column:hover { border-color: var(--border-strong); box-shadow: none; transform: none; }

.kanban__column > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 13px 14px;
}

.kanban__column > header h2 { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.kanban__column > header h2 a { color: inherit; text-decoration: none; }
.kanban__column > header h2 a:hover { color: var(--primary); }
.kanban__column > header h2 > .app-nav__task-indicator { margin-left: 0; }
.kanban__column > header > span { color: var(--text-secondary); font-size: 12px; }
.kanban__items { display: grid; gap: 9px; padding: 10px; }
.task-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
    padding: 13px;
    box-shadow: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.task-card:hover { border-color: var(--border-strong); box-shadow: none; transform: none; }

.task-card--priority,
.task-card:has(.priority-badge) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: var(--priority-border);
    border-left-width: 1px;
    background: var(--priority-film);
    box-shadow: 0 0 16px var(--priority-glow);
    transition: none;
}

.task-card--priority::after,
.task-card:has(.priority-badge)::after {
    position: absolute;
    z-index: 0;
    top: -45%;
    left: -38%;
    width: 22%;
    height: 190%;
    transform: rotate(17deg) translateX(0);
    background: transparent;
    content: '';
    pointer-events: none;
    opacity: 0;
}

.task-card--priority > *,
.task-card:has(.priority-badge) > * { position: relative; z-index: 1; }

.task-card--priority:hover,
.task-card:has(.priority-badge):hover {
    border-color: var(--priority-border);
    box-shadow: 0 0 16px var(--priority-glow);
}

.task-card--priority .priority-badge,
.task-card:has(.priority-badge) .priority-badge { display: inline-flex; }

.task-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-card__top strong {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 600;
}
.task-card__top > .status-indicator { flex: 0 0 auto; }
.task-card > p { margin-top: 10px; color: var(--text); }
.task-card dl { display: grid; gap: 7px; margin: 12px 0 0; }
.task-card dl div { display: flex; min-width: 0; justify-content: space-between; gap: 12px; }
.task-card dt { color: var(--text-secondary); }
.task-card dd { min-width: 0; margin: 0; overflow-wrap: anywhere; text-align: right; }
.kanban__empty { padding: 26px 8px; color: var(--text-secondary); text-align: center; }
.production-kanban--stages {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
}
.task-card__action-link { width: 100%; margin-top: 14px; }

.production-task-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.production-task-list__empty {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 42px 20px;
    color: var(--text-secondary);
    text-align: center;
}

.production-task-card {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: none;
    padding: 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease-out);
}

.production-task-card:hover { border-color: var(--border-strong); box-shadow: none; transform: none; }
.production-task-card.is-notification-target { outline: 3px solid var(--primary-soft); outline-offset: 4px; }

.production-task-card--priority,
.production-task-card[data-order-priority="1"] {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: var(--priority-border);
    border-left-width: 1px;
    background: var(--priority-film);
    box-shadow: 0 0 16px var(--priority-glow);
    transition: none;
}

.production-task-card--priority::after,
.production-task-card[data-order-priority="1"]::after {
    position: absolute;
    z-index: 0;
    top: -45%;
    left: -38%;
    width: 22%;
    height: 190%;
    transform: rotate(17deg) translateX(0);
    background: transparent;
    content: '';
    pointer-events: none;
    opacity: 0;
}

.production-task-card--priority > *,
.production-task-card[data-order-priority="1"] > * { position: relative; z-index: 1; }

.production-task-card--priority:hover,
.production-task-card[data-order-priority="1"]:hover {
    border-color: var(--priority-border);
    box-shadow: 0 0 16px var(--priority-glow);
}

.production-task-detail--priority .production-task-detail__section:first-of-type {
    border-color: var(--priority-border);
    border-left-width: 1px;
    background: var(--priority-film);
    box-shadow: 0 0 16px var(--priority-glow);
}

.production-task-detail--priority .production-task-detail__facts > div:nth-child(8) { display: none; }

.production-task-card__header {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.production-task-card__header > div { min-width: 0; }
.production-task-card__header h2 { margin-top: 5px; font-size: 18px; }
.production-task-card__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: 12px;
}

.production-task-card__eyebrow .priority-badge,
.task-card__top .priority-badge {
    margin: 0;
}

.production-task-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.production-task-card__facts > div {
    min-width: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
}

.production-task-card__facts > div:nth-child(2n) { border-right: 0; }
.production-task-card__facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
.production-task-card__facts dt {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.production-task-card__facts dd {
    min-width: 0;
    margin: 5px 0 0;
    overflow-wrap: anywhere;
}
.production-task-card__facts dd.is-overdue { color: var(--danger); font-weight: 650; }

.production-task-card__comment {
    border-left: 3px solid var(--border-strong);
    background: #fafbfc;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.production-progress { display: grid; min-width: 0; gap: 7px; }
.production-progress__label {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 12px;
}
.production-progress__label strong {
    color: var(--text);
    font-family: var(--font-metric);
    font-weight: 600;
}
.production-progress progress {
    display: block;
    width: 100%;
    height: 7px;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: var(--surface-active);
    color: var(--primary);
}
.production-progress progress::-webkit-progress-bar { background: var(--surface-active); }
.production-progress progress::-webkit-progress-value { background: var(--primary); }
.production-progress progress::-moz-progress-bar { background: var(--primary); }
.production-progress__available { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.production-progress__available strong { color: var(--text); font-family: var(--font-metric); }

.production-task-card__action {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.production-task-card__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}
.production-task-card__fields > .ui-field { min-width: 0; }
.production-task-card__fields .ui-input,
.production-task-card__fields .ui-textarea {
    width: 100%;
    height: var(--control-height);
    min-height: var(--control-height);
}
.production-task-card__fields .ui-textarea {
    padding-block: 8px;
    line-height: 22px;
}
.production-task-card__fields [data-production-comment] {
    height: var(--control-height);
}
.production-task-card__action > .ui-button {
    width: 100%;
    min-width: 0;
    justify-self: end;
}

.production-task-history {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.production-task-history summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
}
.production-task-history ul {
    display: grid;
    gap: 0;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}
.production-task-history li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    font-size: 12px;
}
.production-task-history li:last-child { border-bottom: 0; }
.production-task-history li > span { color: var(--text-secondary); }
.production-task-history li > strong { font-family: var(--font-metric); }
.production-task-history li > small {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
}

.production-kanban .production-progress { margin-top: 12px; }
.data-table .production-progress { min-width: 130px; }

.technology-order-row:hover,
.order-row:hover { background: var(--surface-subtle); }
.orders-responsive-table th:first-child,
.orders-responsive-table td:first-child { min-width: 205px; }
.order-row__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    row-gap: 5px;
    white-space: normal;
}
.order-row__identity .data-table__order-link {
    flex: 0 0 auto;
    margin-block: -5px;
    margin-inline: -8px 0;
}
.order-row__identity .priority-badge {
    flex: 0 0 auto;
    margin: 0;
}
.order-row__created-at {
    display: block;
    margin-top: 5px;
    white-space: nowrap;
}
.order-select {
    display: inline-flex;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.order-select__input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}
.order-row__identity .order-select + .data-table__order-link { margin-inline-start: 0; }
.order-row.is-selected { background: var(--primary-soft); }
.orders-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.orders-bulk-bar__count {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.orders-bulk-bar .ui-button { min-height: 38px; }
.orders-bulk-bar .ui-button .ui-icon { width: 18px; height: 18px; }
.data-table__order-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: -5px -8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #635BFF;
    font-family: var(--font-heading);
    font-size: inherit;
    font-weight: 650;
    line-height: 1.2;
    padding: 5px 8px;
    text-decoration: none;
    cursor: pointer;
}
.data-table__order-link:hover { background: #EEF0F5; color: #534ACF; }
.data-table__order-link:focus-visible { outline: 2px solid #635BFF; outline-offset: 2px; }
.data-table__actions .order-list-delete,
.task-card__meta-actions .order-list-delete {
    border-color: var(--border);
    background: var(--surface);
    color: var(--danger);
}
.data-table__actions .order-list-delete:hover,
.task-card__meta-actions .order-list-delete:hover {
    border-color: var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
}
.task-card__meta-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}
.task-card__meta-actions .status-indicator { flex: 0 1 auto; }
.task-card__meta-actions .order-list-delete {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-color: transparent;
    background: transparent;
    color: var(--text-secondary);
    opacity: .72;
}
.task-card__meta-actions .order-list-delete:hover {
    border-color: transparent;
    background: var(--surface-subtle);
    color: var(--danger);
    opacity: 1;
}
.ui-dialog.technology-dialog {
    width: min(100% - 20px, 900px);
    border-radius: 16px;
    overscroll-behavior: none;
}
.technology-dialog,
.technology-dialog * {
    box-shadow: none;
}
.technology-dialog .technology-dialog__panel {
    contain: layout paint;
    height: min(calc(100dvh - 20px), 900px);
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-color: #E2E6ED;
    border-radius: 16px;
    background: #FFFFFF;
}
.technology-dialog .ui-dialog__header {
    min-height: 0;
    align-items: center;
    border-bottom-color: #EEF0F5;
    padding: 28px 16px 12px;
}
.technology-dialog .ui-dialog__header h2 {
    overflow: hidden;
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.technology-dialog .ui-dialog__header > div { min-width: 0; }
.technology-dialog .ui-dialog__header .muted {
    max-width: none;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.4;
}
.technology-dialog__close {
    min-height: 38px;
    flex: 0 0 auto;
    border-color: #E8EBF1;
    border-radius: 10px;
    background: #F8F9FB;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
}
.technology-dialog__close-mobile { display: none; }
.technology-dialog__close:hover { border-color: #D6DBE4; background: #F3F5F8; }
.technology-dialog .technology-dialog__body {
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    padding: 12px 16px;
    background: var(--surface-subtle);
}
.technology-dialog__loading {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: var(--text-secondary);
}
.technology-workspace {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: 228px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #FFFFFF;
}
.technology-position-nav {
    display: grid;
    min-height: 0;
    min-width: 0;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0;
    border-right: 1px solid #E8EBF1;
    background: #F8F9FB;
}
.technology-position-nav__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
    padding: 12px 16px;
    border-bottom: 1px solid #E8EBF1;
    color: #727A8D;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.technology-position-nav__summary strong {
    color: #202637;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.technology-position-nav__items {
    display: grid;
    align-content: start;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.technology-position-nav__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-height: 70px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #EEF0F5;
    border-radius: 0;
    background: transparent;
    color: #202637;
    text-align: left;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}
.technology-position-nav__item:hover { background: #F5F6F9; }
.technology-position-nav__item:focus-visible { outline: 2px solid #635BFF; outline-offset: -2px; }
.technology-position-nav__item.is-active {
    border-left: 3px solid #D6DBE4;
    background: #F1F3F6;
}
.technology-position-nav__item > span:first-child { display: grid; gap: 3px; }
.technology-position-nav__item strong { font-size: 13px; font-weight: 600; }
.technology-position-nav__item small {
    overflow: hidden;
    color: #727A8D;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.technology-position-nav__item .status-indicator { justify-self: start; }
.technology-editor {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 20px 24px 28px;
    background: #FDFDFE;
}
.technology-editor__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-height: 54px;
    border: 0;
    border-bottom: 1px solid #EEF0F5;
    border-radius: 0;
    background: #FFFFFF;
    padding: 0 0 16px;
}
.technology-editor__eyebrow {
    color: #727A8D;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.technology-editor__header h3 {
    margin-top: 4px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.015em;
}
.technology-editor__setup {
    display: grid;
    grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr);
    margin-top: 20px;
    overflow: visible;
    border: 1px solid #E8EBF1;
    border-radius: 16px;
    background: #FFFFFF;
}
.technology-editor__section {
    margin-top: 20px;
    border-radius: 16px;
    background: #FFFFFF;
    padding: 18px 20px 20px;
}
.technology-editor__setup .technology-editor__section {
    margin: 0;
    border: 0;
    border-radius: 0;
}
.technology-editor__section--source {
    border-right: 1px solid #E8EBF1;
}
.technology-editor__section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.technology-editor__section-heading h4 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.technology-editor__section-heading p {
    margin-top: 3px;
    color: #727A8D;
    font-size: 12px;
    line-height: 1.45;
}
.technology-source-facts {
    display: grid;
    margin: 0;
}
.technology-source-facts > div {
    display: grid;
    grid-template-columns: minmax(88px, .8fr) minmax(0, 1.2fr);
    align-items: baseline;
    gap: 12px;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid #EEF0F5;
}
.technology-source-facts > div:first-child { padding-top: 0; }
.technology-source-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.technology-source-facts dt,
.technology-calculation-grid dt {
    color: #727A8D;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.technology-source-facts dd,
.technology-calculation-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #202637;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.technology-form-grid {
    gap: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.technology-weeding-choice {
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
}
.technology-weeding-choice > .muted {
    margin: -2px 0 10px;
    font-size: 12px;
}
.technology-weeding-choice__note {
    margin: 9px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.technology-launch-route__note {
    margin: 10px 0 0;
    padding-top: 9px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.technology-dialog .ui-field { color: #394052; font-size: 12px; font-weight: 600; }
.technology-dialog .ui-input,
.technology-dialog .ui-textarea,
.technology-dialog .ui-select-trigger {
    border-color: #E8EBF1;
    border-radius: 12px;
    background: #F8F9FB;
}
.technology-dialog .ui-input:hover,
.technology-dialog .ui-textarea:hover,
.technology-dialog .ui-select-trigger:hover {
    border-color: #D6DBE4;
    background: #F5F6F9;
}
.technology-dialog .ui-input:focus,
.technology-dialog .ui-textarea:focus,
.technology-dialog .ui-select-control.is-open .ui-select-trigger {
    border-color: #635BFF;
    outline: 2px solid #E8E7FF;
    outline-offset: 1px;
}
.technology-calculation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 14px;
    background: #FFFFFF;
}
.technology-calculation-grid > div {
    min-width: 0;
    min-height: 74px;
    padding: 14px;
    border-right: 1px solid #EEF0F5;
    border-bottom: 1px solid #EEF0F5;
    background: #FFFFFF;
}
.technology-calculation-grid dd {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
}
.technology-layout { min-width: 0; }
.technology-layout__heading { align-items: center; }
.technology-layout__nav {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}
.technology-layout__nav .icon-button {
    width: 44px;
    height: 44px;
    font-size: 22px;
}
.technology-layout__nav > span {
    min-width: 54px;
    color: var(--text-secondary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    text-align: center;
}
.technology-layout-preview {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 14px;
    background: #F7F8FB;
}
.technology-layout-pass { min-width: 0; padding: 14px; }
.technology-layout-pass > header,
.technology-layout-pass > footer {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.technology-layout-pass > header { margin-bottom: 12px; }
.technology-layout-pass > header strong { color: var(--text); font-size: 13px; }
.technology-layout-pass > header span,
.technology-layout-pass > footer {
    color: var(--text-secondary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.technology-layout-pass canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 1px solid #DDE2EA;
    border-radius: 10px;
    background: #FFFFFF;
}
.technology-layout-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 11px;
}
.technology-layout-legend span { display: inline-flex; align-items: center; gap: 6px; }
.technology-layout-legend i {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border: 1px solid #9CA5B4;
    border-radius: 3px;
    background: #E5E7EB;
}
.technology-layout-legend i[data-zone="work"] { background: #FFFFFF; }
.technology-layout-legend i[data-zone="zero"] { border-color: #8B9BC8; background: #D9E1FF; }
.technology-layout-legend i[data-zone="rotated"] { border-color: #78A790; background: #D9F0E5; }
.technology-layout-pass > footer { margin-top: 10px; }
.technology-materials {
    display: grid;
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 14px;
    background: #FFFFFF;
}
.technology-materials:has(.ui-select-control.is-open) { overflow: visible; }
.technology-materials__notice {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e3e7ee;
    background: #f7f8fb;
    padding: 10px 14px;
    color: #555f73;
    font-size: 12px;
    line-height: 1.4;
}
.technology-materials__notice .ui-icon { width: 15px; height: 15px; flex: 0 0 auto; color: #635bff; }
.technology-materials__notice--required { display: block; color: var(--text); }
.technology-materials__notice--required strong { display: block; margin-bottom: 3px; }
.technology-print-film {
    padding: 14px;
    border-bottom: 1px solid #EEF0F5;
}
.technology-print-film[aria-invalid="true"] {
    border-left: 3px solid #D6273C;
    background: #FFEDF0;
}
.technology-print-film .ui-field { max-width: 100%; }
.technology-material-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: center;
    gap: 20px;
    min-height: 56px;
    padding: 10px 14px;
    border-bottom: 1px solid #EEF0F5;
}
.technology-material-row:last-child { border-bottom: 0; }
.technology-material-row:hover { background: #F7F8FB; }
.technology-material-row__choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    cursor: pointer;
}
.technology-material-row__choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    opacity: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
.technology-material-row__check {
    flex: 0 0 auto;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid #D6DBE4;
    border-radius: 7px;
    background: #FFFFFF;
}
.technology-material-row__check svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: scale(.7);
    transition: opacity 140ms ease, transform 140ms ease;
}
.technology-material-row__check path {
    fill: none;
    stroke: #FFFFFF;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}
.technology-material-row__choice input:checked + .technology-material-row__check {
    border-color: #635BFF;
    background: #635BFF;
}
.technology-material-row__choice input:checked + .technology-material-row__check svg { opacity: 1; transform: scale(1); }
.technology-material-row__choice input:focus-visible + .technology-material-row__check {
    outline: 2px solid #635BFF;
    outline-offset: 2px;
}
.technology-material-row__copy { display: grid; min-width: 0; gap: 3px; }
.technology-material-row__copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technology-material-row__copy small { color: #727A8D; font-size: 11px; }
.technology-material-row__required {
    display: inline-flex;
    margin-left: 7px;
    border-radius: 4px;
    padding: 2px 6px;
    background: #FFF0E5;
    color: #B35500;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}
.technology-material-row__mismatch {
    display: inline-flex;
    margin-left: 7px;
    border-radius: 4px;
    padding: 2px 6px;
    background: #ffedf0;
    color: #b42336;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}
.technology-material-row[data-technology-material-mismatch="true"] {
    border-left: 3px solid #d6273c;
    background: #fff8f8;
}
.technology-material-row[aria-invalid="true"] {
    border-left: 3px solid #D6273C;
    background: #FFEDF0;
}
.technology-material-row__quantity { position: relative; display: flex; align-items: center; }
.technology-material-row__quantity-wrap { display: grid; min-width: 0; gap: 5px; }
.technology-material-row__hint { color: #a34f08; font-size: 10px; line-height: 1.35; }
.technology-material-row__quantity .ui-input { width: 100%; padding-right: 50px; }
.technology-material-row__quantity > span:last-child {
    position: absolute;
    right: 12px;
    color: #727A8D;
    font-size: 11px;
    pointer-events: none;
}
.technology-material-row__quantity .ui-input:disabled {
    border-color: #E2E6ED;
    background: #F5F6F9;
    color: #969DAF;
    cursor: not-allowed;
}
.technology-materials__empty { padding: 24px; color: #727A8D; text-align: center; }
.technology-issues {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #F2C38B;
    border-radius: 12px;
    background: #FFF0E5;
    color: #B35500;
}
.technology-issues strong { font-size: 12px; }
.technology-issues ul { margin: 7px 0 0; padding-left: 18px; }
.technology-issues li + li { margin-top: 4px; }
.technology-form-error { margin: 16px 0 0; }
.technology-launch-overview {
    border: 1px solid #E8EBF1;
}
.technology-launch-confirm__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 12px;
}
.technology-launch-confirm__facts > div {
    min-width: 0;
    padding: 11px 13px;
    border-right: 1px solid #EEF0F5;
    border-bottom: 1px solid #EEF0F5;
}
.technology-launch-confirm__facts > div:nth-child(2n) { border-right: 0; }
.technology-launch-confirm__facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
.technology-launch-confirm__facts dt {
    color: #727A8D;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.technology-launch-confirm__facts dd {
    margin: 5px 0 0;
    color: #202637;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.technology-launch-routes {
    display: grid;
    gap: 10px;
}
.technology-launch-route {
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 12px;
    background: #FFFFFF;
}
.technology-launch-route > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #EEF0F5;
}
.technology-launch-route > header strong { font-size: 12px; }
.technology-launch-route > header span {
    overflow: hidden;
    color: #727A8D;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.technology-launch-route ol {
    display: flex;
    gap: 0;
    margin: 0;
    overflow-x: auto;
    padding: 0;
    list-style: none;
}
.technology-launch-route li {
    display: flex;
    min-width: 128px;
    flex: 1 0 128px;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-right: 1px solid #EEF0F5;
}
.technology-launch-route li:last-child { border-right: 0; }
.technology-launch-route li > span:last-child { display: grid; min-width: 0; gap: 2px; }
.technology-launch-route li strong { font-size: 11px; font-weight: 600; }
.technology-launch-route li small { color: #727A8D; font-size: 10px; white-space: nowrap; }
.technology-launch-route__index {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border: 1px solid #D6DBE4;
    border-radius: 7px;
    color: #727A8D;
    font-size: 10px;
    font-weight: 650;
}
.technology-launch-materials { margin-top: 10px; }
.technology-launch-materials__table {
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 12px;
}
.technology-launch-materials__head,
.technology-launch-materials__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 120px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid #EEF0F5;
}
.technology-launch-materials__head {
    background: #F8F9FB;
    color: #727A8D;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.technology-launch-materials__row:last-child { border-bottom: 0; }
.technology-launch-materials__row strong {
    overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.technology-launch-materials__row span {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.technology-launch-empty {
    padding: 14px;
    border: 1px solid #E8EBF1;
    border-radius: 12px;
    color: #727A8D;
    font-size: 12px;
    text-align: center;
}
.technology-launch-issues { margin-top: 12px; }
.technology-dialog .technology-dialog__footer {
    flex: 0 0 auto;
    min-height: 0;
    align-items: center;
    border-top: 1px solid #EEF0F5;
    background: #FFFFFF;
    padding: 11px 16px;
    position: relative;
    z-index: 2;
}
.technology-dialog__footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.technology-dialog__footer .ui-button {
    min-height: 44px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.technology-dialog__footer .ui-button--primary { background: #635BFF; }
.technology-dialog__footer .ui-button--primary:hover { background: #534ACF; }
.technology-dialog__footer .ui-button--secondary {
    border-color: #E3E8EE;
    background: #FFFFFF;
}
.technology-dialog__footer .ui-button--secondary:hover {
    border-color: #C1C9D2;
    background: #F3F5F9;
}
.order-remove-confirm-dialog__panel.technology-launch-confirm__panel {
    width: min(100%, 720px);
    min-width: 0;
    max-height: min(820px, calc(100dvh - 32px));
}
.technology-launch-confirm__body {
    display: grid;
    gap: 18px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 28px 22px;
}
.technology-launch-confirm__body section {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.technology-launch-confirm__body .technology-launch-confirm__facts,
.technology-launch-confirm__body .technology-launch-routes,
.technology-launch-confirm__body .technology-launch-route,
.technology-launch-confirm__body .technology-launch-materials,
.technology-launch-confirm__body .technology-launch-materials__table,
.technology-launch-confirm__body .technology-launch-route ol {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.technology-launch-confirm__body h3 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
}
.technology-launch-confirm__error {
    margin: 0 28px 16px;
}

.ui-dialog {
    overflow: hidden;
    position: fixed;
    z-index: var(--layer-dialog);
    inset: 50% auto auto 50%;
    width: min(calc(100% - 32px), 720px);
    margin: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    opacity: 0;
    padding: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(.985);
    transition: opacity 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1), overlay 180ms allow-discrete, display 180ms allow-discrete;
}

.ui-dialog[open] { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ui-dialog[open].is-closing { opacity: 0; transform: translate(-50%, calc(-50% + 6px)) scale(.99); }
.ui-dialog::backdrop { background: #313746; opacity: 0; transition: opacity 180ms ease, overlay 180ms allow-discrete, display 180ms allow-discrete; }
.ui-dialog[open]::backdrop { opacity: .34; }
.ui-dialog[open].is-closing::backdrop { opacity: 0; }
.ui-dialog__panel {
    display: grid;
    max-height: calc(100dvh - 32px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-dialog);
}

@starting-style {
    .ui-dialog[open] { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.985); }
    .ui-dialog[open]::backdrop { opacity: 0; }
}
.ui-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
}

.ui-dialog__header h2 { font-size: 20px; font-weight: 650; }
.ui-dialog__header .muted { max-width: 440px; margin-top: 5px; font-size: 13px; }
.order-view-dialog__actions { display: flex; align-items: center; gap: 6px; }
.order-view-dialog__actions .order-view-dialog__delete { color: var(--danger); }
.order-view-dialog__actions .icon-button {
    width: 34px;
    height: 34px;
    border-color: var(--border);
    background: var(--surface);
}
.order-view-dialog__actions .icon-button:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.ui-dialog__body {
    display: grid;
    overflow-y: auto;
    gap: 16px;
    padding: 24px;
    scrollbar-gutter: auto;
}
.ui-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}
.ui-dialog.order-create-dialog { width: min(100% - 20px, 1120px); }
.ui-dialog.order-view-dialog { width: min(100% - 20px, 900px); }

.ui-dialog.app-settings-dialog { width: min(calc(100% - 32px), 720px); }
.ui-dialog.notification-center-dialog { width: min(calc(100% - 32px), 680px); }
.app-settings-dialog__panel { height: min(660px, calc(100dvh - 80px)); min-height: 0; box-shadow: var(--shadow-dialog); }
.app-settings__layout {
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}
.app-settings__nav {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 0 24px;
}
.app-settings__nav button {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 2px;
    color: var(--text-secondary);
    cursor: pointer;
    font: 600 12px/1.25 var(--font-body);
    white-space: nowrap;
    transition: color 160ms ease;
}
.app-settings__nav button::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.app-settings__nav button:hover { color: var(--text); }
.app-settings__nav button.is-active { color: var(--primary); }
.app-settings__nav button.is-active::after { background: var(--primary); }
.app-settings__nav button:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; }
.app-settings__nav .ui-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.app-settings__content { min-width: 0; overflow: hidden auto; padding: 24px 28px 30px; }
.app-settings__content > section { min-width: 0; }
.settings-section-heading h3 { font-size: 18px; }
.settings-section-heading .muted { margin-top: 6px; font-size: 13px; }
.settings-section-heading--sub { margin-top: 22px; }
.settings-section-heading--sub h3 { font-size: 14px; }
.settings-toggle-list {
    display: grid;
    gap: 0;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}
.settings-toggle {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 13px;
    cursor: pointer;
    transition: background-color 160ms ease;
}
.settings-toggle:hover { background: var(--surface-subtle); }
.settings-toggle + .settings-toggle { border-top: 1px solid var(--border); }
.settings-toggle > span { display: grid; min-width: 0; gap: 3px; }
.settings-toggle strong { color: var(--text); font-size: 13px; font-weight: 650; }
.settings-toggle small { color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.settings-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.settings-toggle i {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: #D9DEE8;
    transition: background-color 180ms ease;
}
.settings-toggle i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgb(32 38 55 / 22%);
    transition: transform 180ms var(--ease-out);
}
.settings-toggle input:checked + i { background: var(--primary); }
.settings-toggle input:checked + i::after { transform: translateX(18px); }
.settings-toggle input:focus-visible + i { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.pwa-install-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
    padding: 14px;
}
.pwa-install-card__icon img { display: block; width: 58px; height: 58px; border-radius: 13px; }
.pwa-install-card strong { font-family: var(--font-heading); font-size: 14px; }
.pwa-install-card p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.pwa-install-card__action .ui-icon { width: 17px; height: 17px; }
.pwa-install-instructions { display: grid; gap: 10px; margin-top: 16px; }
.pwa-install-instructions > div { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.pwa-install-instructions .ui-icon { width: 24px; height: 24px; flex: 0 0 24px; color: var(--primary); }
.pwa-install-instructions p { color: var(--text-secondary); font-size: 12px; line-height: 1.45; }
.pwa-install-instructions strong { display: block; color: var(--text); }
.pwa-install-instructions small { display: block; margin-top: 2px; }
.settings-profile { display: grid; gap: 0; margin-top: 18px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.settings-profile > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; padding: 13px 14px; }
.settings-profile > div + div { border-top: 1px solid var(--border); }
.settings-profile dt { color: var(--text-secondary); font-size: 12px; }
.settings-profile dd { min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.notification-center-dialog__panel { height: min(600px, calc(100dvh - 110px)); min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); box-shadow: var(--shadow-dialog); }
.notification-center__toolbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 8px 18px; }
.notification-center__summary { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.notification-center__toolbar-actions { display: flex; align-items: center; gap: 14px; }
.notification-center__toolbar button { border: 0; background: transparent; padding: 6px 0; color: var(--primary); cursor: pointer; font: 650 11px/1.2 var(--font-body); }
.notification-center__toolbar button:hover { color: var(--primary-hover); }
.notification-center__toolbar button:disabled { color: var(--text-soft); cursor: default; }
.notification-center__status { display: grid; min-height: 240px; place-items: center; align-content: center; gap: 8px; padding: 28px; color: var(--text-secondary); font-size: 12px; text-align: center; }
.notification-center__status strong { color: var(--text); font-family: var(--font-heading); font-size: 15px; }
.notification-center__empty-icon { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: 4px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.notification-center__empty-icon .ui-icon { width: 22px; height: 22px; }
.notification-center__list { display: grid; min-height: 0; align-content: start; gap: 0; overflow: hidden auto; padding: 0; }
.notification-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 14px 18px; transition: background-color 160ms ease; }
.notification-item:hover { background: var(--surface-subtle); }
.notification-item.is-unread { background: #FAFAFF; }
.notification-item__icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.notification-item__icon .ui-icon { width: 20px; height: 20px; }
.notification-item--success .notification-item__icon { background: #eaf8f0; color: var(--success); }
.notification-item--warning .notification-item__icon { background: #fff5df; color: var(--pending); }
.notification-item--danger .notification-item__icon { background: #fff0f1; color: var(--danger); }
.notification-item__content { min-width: 0; color: inherit; text-decoration: none; }
.notification-item__title { display: flex; min-width: 0; align-items: center; gap: 8px; }
.notification-item__content strong { display: block; min-width: 0; font-size: 13px; line-height: 1.35; }
.notification-item__unread { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--primary); }
.notification-item__content p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.notification-item__meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 8px; color: var(--text-soft); font-size: 10px; }
.notification-item__actions { display: flex; align-items: flex-start; gap: 2px; }
.notification-item__actions button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.notification-item__actions button:hover { background: var(--surface-active); color: var(--text); }
.notification-item__actions .ui-icon { width: 16px; height: 16px; }
.notification-item__chevron { display: none; }
.account-standalone-page { overflow: hidden; background: var(--surface); }
.account-standalone-shell { display: block; min-height: 100dvh; }
.account-standalone-page .app-sidebar,
.account-standalone-page .account-standalone-placeholder { display: none; }
.logout-dialog { width: min(100% - 20px, 500px); }
.logout-dialog__panel { grid-template-rows: auto minmax(0, 1fr) auto; }
.logout-dialog__body p { color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.logout-dialog__warning { border-left: 3px solid var(--pending); border-radius: 8px; background: var(--warning-soft); padding: 10px 12px; color: var(--text); }
.order-view-dialog__body { background: var(--surface-subtle); }
.order-view-dialog__loading {
    display: grid;
    min-height: 180px;
    place-items: center;
    color: var(--text-secondary);
}

.order-view-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}
.order-view-summary > div {
    min-width: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
}
.order-view-summary > div:nth-child(3n) { border-right: 0; }
.order-view-summary > div:nth-last-child(-n + 3) { border-bottom: 0; }
.order-view-summary dt,
.order-view-item dt {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.order-view-summary dd,
.order-view-item dd { margin: 5px 0 0; color: var(--text); }
.order-view-section {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    padding: 12px;
}
.order-view-section > h3,
.order-view-section__heading h3 { font-size: 15px; }
.order-view-section > p { margin-top: 8px; color: var(--text-secondary); white-space: pre-wrap; }
.order-view-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.order-view-section__heading > span { color: var(--text-secondary); font-size: 12px; }
.order-view-items { display: grid; gap: 8px; margin-top: 10px; }
.order-view-item {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    padding: 12px;
}
.order-view-item__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.order-view-item__header span:first-child { color: var(--text-secondary); font-size: 12px; }
.order-view-item__header h4 { margin-top: 3px; font-size: 15px; }
.order-view-item__facts,
.order-view-item__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 12px;
}
.order-view-item__options {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.order-view-item__empty { margin-top: 14px; font-size: 12px; }
.order-view-item__comment {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    color: var(--text-secondary);
    white-space: pre-wrap;
}
.order-view-item__route-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.order-view-item__route-note strong { color: var(--text); }

.order-remove-confirm-dialog {
    position: fixed;
    z-index: var(--layer-confirm);
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    overscroll-behavior: contain;
    background: rgb(49 55 70 / .34);
    opacity: 0;
    padding: 16px;
    transition: opacity 180ms ease;
}
.production-progress-confirm {
    border: 0;
    margin: 0;
}
.production-progress-confirm::backdrop {
    background: rgb(49 55 70 / .34);
}
.order-remove-confirm-dialog[hidden] { display: none; }
.order-remove-confirm-dialog.is-open { opacity: 1; }
.order-remove-confirm-dialog.is-closing { opacity: 0; }
.order-remove-confirm-dialog__panel {
    width: min(100%, 440px);
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(.985);
    transition: opacity 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1);
}
.order-remove-confirm-dialog.is-open .order-remove-confirm-dialog__panel {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}
.order-remove-confirm-dialog__header h2 { font-weight: 500; }
.order-remove-confirm-dialog__content {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 18px 28px 22px;
}
.order-remove-confirm-dialog__icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #efd2a6;
    border-radius: 11px;
    background: var(--pending-soft);
    color: var(--pending);
}
.order-remove-confirm-dialog__icon.ui-icon {
    -webkit-mask: none;
    mask: none;
}
.order-remove-confirm-dialog__icon::before {
    width: 19px;
    height: 19px;
    background: currentColor;
    content: "";
    -webkit-mask: var(--icon-mask) center / contain no-repeat;
    mask: var(--icon-mask) center / contain no-repeat;
}
.order-remove-confirm-dialog__content .muted { padding-top: 7px; }

.production-progress-confirm__panel { width: min(100%, 520px); }
.production-progress-confirm {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    margin: 0;
    isolation: isolate;
}
.production-progress-confirm__panel {
    max-height: calc(100dvh - 32px);
    margin: auto;
    overflow: hidden;
}
.production-progress-confirm__body {
    display: grid;
    gap: 14px;
    padding: 16px;
}
.production-progress-confirm__body dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}
.production-progress-confirm__body dl > div {
    min-width: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
}
.production-progress-confirm__body dl > div:nth-child(2n) { border-right: 0; }
.production-progress-confirm__body dl > div:nth-last-child(-n + 2) { border-bottom: 0; }
.production-progress-confirm__body dt {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.production-progress-confirm__body dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    font-family: var(--font-metric);
    font-weight: 600;
}
.production-progress-confirm__notice {
    border: 1px solid #efd2a6;
    border-radius: var(--radius-small);
    background: var(--pending-soft);
    padding: 10px 12px;
    color: var(--pending);
    font-size: 13px;
    line-height: 1.45;
}

.role-choice-group {
    display: grid;
    gap: 9px;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.role-choice-group legend {
    color: #394052;
    font-size: 13px;
    font-weight: 600;
}

.role-choice-group__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.user-section-choice-group {
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.user-section-choice-group > .muted {
    margin: -2px 0 10px;
    font-size: 12px;
}
.user-section-choice-group__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.user-section-choice-group__hint {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.user-access-unavailable {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
}
.user-access-unavailable strong { display: block; font-size: 13px; }
.user-access-unavailable p { margin: 4px 0 0; font-size: 12px; }
.user-section-choice input:disabled ~ .role-choice__label,
.user-section-choice input:disabled ~ .role-choice__icon {
    opacity: .7;
}
.role-choice {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-subtle);
    padding: 0 12px;
    color: #465064;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.role-choice:hover { border-color: var(--border-strong); background: var(--surface); }
.role-choice:has(input:checked) { border-color: #bcb8ff; background: var(--primary-soft); }
.role-choice:active { transform: scale(.98); }

.role-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.role-choice__control {
    position: relative;
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--surface);
}
.role-choice input[type="radio"] + .role-choice__control { border-radius: 50%; }
.role-choice input:checked + .role-choice__control { border-color: var(--primary); background: var(--primary); }
.role-choice input:checked + .role-choice__control::after {
    width: 12px;
    height: 12px;
    background: #fff;
    content: "";
    -webkit-mask: url("/assets/src/16/solid/check.svg") center / contain no-repeat;
    mask: url("/assets/src/16/solid/check.svg") center / contain no-repeat;
}
.role-choice input:focus-visible + .role-choice__control { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.role-choice__icon { width: 17px; height: 17px; color: var(--text-secondary); }
.role-choice__label { min-width: 0; color: #465064; }
.role-choice input:checked ~ .role-choice__label { color: var(--text); }
.role-choice input:checked ~ .role-choice__icon { color: var(--primary); }
.role-choice--switch { width: fit-content; }
.role-choice-group[aria-invalid="true"] { outline: 3px solid var(--danger-soft); outline-offset: 3px; }

.reference-stack { display: grid; gap: 34px; }
.reference-stack--scrollable > section { min-width: 0; }
.reference-stack--scrollable .data-table-scroll {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.reference-stack--scrollable .data-table-scroll::-webkit-scrollbar { display: none; }


.notification-region {
    position: fixed;
    z-index: var(--layer-notification);
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    display: grid;
    width: min(368px, calc(100vw - 32px));
    pointer-events: none;
    isolation: isolate;
}

.ui-notification {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 11px;
    overflow: hidden;
    border: 1px solid rgb(24 35 57 / 10%);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: 0 16px 44px rgb(24 35 57 / 17%), 0 2px 6px rgb(24 35 57 / 6%);
    padding: 11px;
    pointer-events: auto;
    opacity: 0;
    transform: translate3d(12px, -8px, 0) scale(.985);
    transition: opacity 180ms ease-out, transform 220ms cubic-bezier(.22, 1, .36, 1), border-color 160ms ease;
    will-change: opacity, transform;
}

.ui-notification.is-visible { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.ui-notification--success { border-color: rgb(29 142 88 / 19%); }
.ui-notification--error { border-color: rgb(209 64 80 / 22%); }
.ui-notification--warning { border-color: rgb(210 139 25 / 25%); }
.ui-notification__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: #edf9f2;
    color: #168657;
}
.ui-notification__icon .ui-icon { width: 17px; height: 17px; }
.ui-notification--error .ui-notification__icon { background: #fff0f2; color: #cf4050; }
.ui-notification--warning .ui-notification__icon { background: #fff6e5; color: #b87911; }
.ui-notification__message { color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.4; letter-spacing: -.01em; }
.ui-notification__close {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.ui-notification__close .ui-icon { width: 15px; height: 15px; }
.ui-notification__close:hover { background: var(--surface-active); color: var(--text); }
.ui-notification__close:active { transform: scale(.94); }
.ui-notification__close:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.ui-notification.is-leaving { opacity: 0; transform: translate3d(8px, -4px, 0) scale(.985); }

@keyframes app-content-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes workspace-view-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes workspace-block-enter {
    from { opacity: 0; transform: translate3d(0, 8px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.auth-layout {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(100%, 408px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.auth-panel { padding: 32px; }
.auth-panel__header { margin-bottom: 24px; }
.auth-panel__header h1 { font-size: 26px; }
.auth-panel__header .muted { margin-top: 7px; font-size: 14px; }
.auth-submit { width: 100%; margin-top: 2px; }

@media (max-width: 980px) {
    .app-content { padding-inline: 24px; }
    .workspace-header { align-items: center; }
    .production-task-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .order-overview-layout,
    .order-position-page { grid-template-columns: 1fr; }
    .order-position-page__aside { border-top: 1px solid var(--border); border-left: 0; }
    .order-position-page__aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .order-position-page__aside-title { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .app-shell { display: block; }
    .app-sidebar {
        position: sticky;
        z-index: 50;
        top: 0;
        display: grid;
        height: 64px;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
        padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
    }

    .app-sidebar__toggle {
        position: relative;
        z-index: 2;
        display: grid;
        width: 42px;
        height: 42px;
        border-color: var(--border);
        border-radius: 12px;
        background: var(--surface);
        color: var(--text);
    }
    .app-sidebar__toggle-icon { position: absolute; transition: opacity 150ms ease, transform 180ms var(--ease-out); }
    .app-sidebar__toggle-icon--close { opacity: 0; transform: rotate(-45deg) scale(.9); }
    .app-sidebar.is-menu-open .app-sidebar__toggle-icon--menu { opacity: 0; transform: rotate(45deg) scale(.9); }
    .app-sidebar.is-menu-open .app-sidebar__toggle-icon--close { opacity: 1; transform: rotate(0) scale(1); }
    .app-sidebar__scrim {
        position: fixed;
        z-index: 0;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgb(23 32 51 / .36);
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
    }
    .app-sidebar.is-menu-open .app-sidebar__scrim { opacity: 1; pointer-events: auto; }
    .app-nav {
        position: fixed;
        z-index: 1;
        top: 0;
        bottom: 0;
        left: 0;
        display: grid;
        width: min(320px, calc(100vw - 48px));
        min-height: 100dvh;
        align-content: start;
        gap: 6px;
        overflow-x: hidden;
        overflow-y: auto;
        border-right: 1px solid var(--border);
        background: var(--surface);
        box-shadow: none;
        padding: calc(82px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px));
        pointer-events: none;
        transform: translateX(-104%);
        transition: transform 260ms var(--ease-drawer);
    }

    .app-sidebar.is-menu-open .app-nav { pointer-events: auto; transform: translateX(0); }

    .app-nav__link {
        min-height: 48px;
        width: 100%;
        justify-content: flex-start;
        padding: 0 14px;
    }

    .app-nav__link span:last-child { display: inline; }
    .app-nav__link:hover { transform: none; }
    .app-sidebar__footer { display: flex; grid-column: 3; flex: 0 0 auto; margin: 0; border: 0; padding: 0; }
    .app-sidebar .app-sidebar__utility { display: none; }
    .app-sidebar__account { display: grid; width: 114px; min-height: 42px; grid-template-columns: 1fr; gap: 0; padding: 2px; }
    .app-sidebar__avatar { display: none; }
    .app-sidebar__identity { display: none; }
    .app-sidebar__account-actions { justify-content: flex-end; }
    .app-sidebar__account-action,
    .app-sidebar__logout { width: 34px; height: 34px; min-height: 34px; padding: 0; }

    .app-content { padding: 24px max(16px, env(safe-area-inset-right, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
    .workspace-header {
        display: grid;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: flex-start;
        gap: 12px;
    }
    .workspace-header .ui-button {
        width: 42px;
        min-width: 42px;
        flex: 0 0 42px;
        padding-inline: 0;
    }
    .workspace-header .ui-button span:last-child { display: none; }
    .workspace-tabs {
        flex-wrap: nowrap;
        gap: 20px;
        overflow-x: auto;
        margin-top: 16px;
        border-bottom: 1px solid var(--border);
    }
    .workspace-tabs__link {
        flex: 0 0 auto;
        min-height: 40px;
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 9px 1px 11px;
        font-size: 13px;
        line-height: 20px;
        text-align: center;
    }
    .workspace-tabs__link::after { display: block; }
    .workspace-tabs__link:hover { background: transparent; color: var(--text); transform: none; }
    .workspace-tabs__link.is-active {
        background: transparent;
        color: var(--primary);
    }
    .workspace-view { padding-top: 20px; }
    .content-toolbar { align-items: stretch; flex-wrap: wrap; }
    .orders-bulk-bar { flex: 1 1 100%; margin-left: 0; }
    .orders-bulk-bar .ui-button { flex: 1 1 auto; }
    .search-control { flex: 1 1 auto; }
    .toolbar-note { display: none; }
    .inventory-toolbar__meta { margin-left: 0; }
    .inventory-toolbar__meta .ui-button { min-width: 42px; padding-inline: 11px; }
    .inventory-toolbar__meta .ui-button span:last-child { display: none; }
    .data-surface { margin-inline: 0; border-radius: var(--radius-panel); }
    .data-table th, .data-table td { padding: 12px 14px; }
    .kanban {
        grid-template-columns: minmax(0, 1fr);
        overflow-x: visible;
        margin-inline: 0;
        padding-inline: 0;
    }
    .production-kanban--stages { grid-auto-flow: row; grid-auto-columns: auto; }
    .kanban__column { min-width: 0; }
.production-task-card { padding: 16px; }

    .ui-dialog,
    .ui-dialog.order-create-dialog,
    .ui-dialog.order-view-dialog,
    .ui-dialog.material-dialog,
    .ui-dialog.production-task-dialog,
    .ui-dialog.layout-preview-dialog {
        inset: 0;
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border-radius: 0;
        transform: translateY(8px);
    }
    .ui-dialog[open],
    .ui-dialog.order-create-dialog[open],
    .ui-dialog.order-view-dialog[open] { transform: translateY(0); }
    .order-create-dialog { --order-dialog-space: 12px; }
    .ui-dialog__panel,
    .order-create-dialog__panel {
        width: 100%;
        height: 100%;
        min-height: 100%;
        max-height: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .ui-dialog__header { min-height: 64px; align-items: center; padding: 14px 16px; }
    .order-create-dialog__header { min-height: 56px; padding: 8px var(--order-dialog-space); }
    .ui-dialog__header h2 { font-size: 19px; }
    .ui-dialog__body { padding: 16px; }
    .ui-dialog__footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }

    /* Short forms and confirmations stay compact modal cards on phones. */
    .ui-dialog.generator-dialog--form,
    .ui-dialog.ui-dialog--compact-mobile {
        inset: 50% auto auto 50%;
        width: min(calc(100% - 24px), 520px);
        height: auto;
        max-height: calc(100dvh - 24px);
        border-radius: var(--radius-dialog);
        transform: translate(-50%, calc(-50% + 10px)) scale(.985);
    }

    .ui-dialog.generator-dialog--form[open],
    .ui-dialog.ui-dialog--compact-mobile[open] {
        transform: translate(-50%, -50%) scale(1);
    }

    .ui-dialog.generator-dialog--form[open].is-closing,
    .ui-dialog.ui-dialog--compact-mobile[open].is-closing {
        transform: translate(-50%, calc(-50% + 6px)) scale(.99);
    }

    .generator-dialog--form .ui-dialog__panel,
    .ui-dialog--compact-mobile .ui-dialog__panel {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: calc(100dvh - 24px);
        border: 1px solid var(--border);
        border-radius: var(--radius-dialog);
        box-shadow: var(--shadow-dialog);
    }

    .generator-dialog--form .ui-dialog__header,
    .ui-dialog--compact-mobile .ui-dialog__header {
        min-height: 0;
        padding: 16px;
    }

    .generator-dialog--form .ui-dialog__body,
    .ui-dialog--compact-mobile .ui-dialog__body {
        padding: 16px;
    }

    .generator-dialog--form .ui-dialog__footer,
    .ui-dialog--compact-mobile .ui-dialog__footer {
        justify-content: flex-end;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .generator-dialog--form .ui-dialog__footer .ui-button,
    .ui-dialog--compact-mobile .ui-dialog__footer .ui-button {
        flex: 0 1 auto;
    }

    .ui-dialog.app-settings-dialog,
    .ui-dialog.notification-center-dialog {
        inset: 0;
        width: 100%;
        max-width: none;
        height: 100dvh;
        border-radius: 0;
        transform: translateY(10px);
    }
    .ui-dialog.app-settings-dialog[open],
    .ui-dialog.notification-center-dialog[open] { transform: translateY(0); }
    .app-settings-dialog__panel,
    .notification-center-dialog__panel { width: 100%; height: 100dvh; min-height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
    .app-settings-dialog .ui-dialog__header,
    .notification-center-dialog .ui-dialog__header {
        position: relative;
        min-height: 66px;
        align-items: center;
        justify-content: center;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    }
    .account-standalone-page .ui-dialog__header > div { width: 100%; padding-inline: 46px; text-align: center; }
    .account-standalone-page .ui-dialog__header [data-account-page-back] { position: absolute; left: max(8px, env(safe-area-inset-left, 0px)); border-color: transparent; background: transparent; }
    .app-settings-dialog .ui-dialog__header .muted,
    .notification-center-dialog .ui-dialog__header .muted { display: none; }
    .app-settings-dialog .ui-dialog__header .icon-button,
    .notification-center-dialog .ui-dialog__header .icon-button { width: 38px; height: 38px; flex: 0 0 38px; }
    .app-settings__layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .app-settings__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 10px; }
    .app-settings__nav button { min-width: 0; min-height: 48px; justify-content: center; gap: 6px; padding: 0 6px; font-size: 11px; text-align: center; }
    .app-settings__nav button span:last-child { display: inline; overflow: hidden; text-overflow: ellipsis; }
    .app-settings__nav .ui-icon { width: 16px; height: 16px; flex-basis: 16px; }
    .app-settings__content { padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
    .settings-section-heading h3 { font-size: 19px; }
    .settings-toggle { min-height: 62px; padding-inline: 12px; }
    .settings-toggle:hover { background: transparent; }
    .pwa-install-card { grid-template-columns: 50px minmax(0, 1fr); }
    .pwa-install-card__icon img { width: 50px; height: 50px; }
    .pwa-install-card .ui-button { grid-column: 1 / -1; width: 100%; }
    .notification-center__toolbar { min-height: 50px; align-items: center; gap: 4px; padding: 7px 16px; }
    .notification-center__toolbar-actions { align-items: center; gap: 12px; }
    .notification-center__toolbar-actions button { white-space: nowrap; text-align: right; }
    .notification-center__list { padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px)); }
    .notification-item { grid-template-columns: 38px minmax(0, 1fr) 20px; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); border-radius: 0; padding: 14px 16px; }
    .notification-item:hover,
    .notification-item.is-unread { border-color: var(--border); background: var(--surface); }
    .notification-item__icon { width: 36px; height: 36px; border-radius: 11px; }
    .notification-item__actions { display: grid; place-items: center; }
    .notification-item__actions button { display: none; }
    .notification-item__chevron { display: block; width: 17px; height: 17px; color: var(--text-soft); }
    .notification-item__content p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .notification-item__meta { margin-top: 6px; }
    .inventory-form-grid { grid-template-columns: 1fr; gap: 10px; }
    .inventory-form-grid__wide { grid-column: auto; }
    .inventory-delete-receipt-dialog__details { grid-template-columns: 1fr; }
    .inventory-dialog .ui-dialog__footer .ui-button { flex: 1 1 0; padding-inline: 10px; }
    .order-create-dialog__body { padding: 0; }
    .order-create-dialog__footer { min-height: 56px; padding: 8px var(--order-dialog-space); }
    .order-create-dialog__heading { gap: 8px; }
    .order-create-dialog__heading .muted { display: none; }
    .order-create-dialog__state { margin-left: 0; padding-left: 9px; font-size: 12px; }
    .order-create-section__title { padding: var(--order-dialog-space) var(--order-dialog-space) 0; }
    .order-create-section__grid { padding: 12px var(--order-dialog-space) var(--order-dialog-space); }
    .order-builder { padding: 0; }
    .order-position-page__main,
    .order-position-page__aside { padding: var(--order-dialog-space); }
    .order-position-page__aside { grid-template-columns: 1fr; }
    .order-position-page__aside-title { grid-column: auto; }
    .order-layout-upload__picker { min-height: 118px; }

    .auth-layout { padding: 18px; }
    .auth-panel { padding: 30px 28px; }
    .notification-region { top: 12px; right: 12px; width: calc(100vw - 24px); }
}

@media (max-width: 520px) {
    .network-status {
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom, 0px));
        left: 8px;
        max-width: none;
        justify-content: center;
    }
}

@media (hover: hover) and (pointer: fine) {
    .catalog-filter-check:hover { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
    .pagination__link:hover { border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
    .costing-summary article:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
    .ui-select-trigger:hover { border-color: var(--border-strong); background: var(--surface); box-shadow: none; }
    .ui-select-option:hover { background: var(--surface-subtle); color: var(--text); outline: 0; }
    .ui-button:hover,
    .app-sidebar__account:hover,
    .data-surface:hover,
    .kanban__column:hover,
    .task-card:hover,
    .production-task-card:hover { will-change: transform; }
}

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

@media (max-width: 620px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid__wide { grid-column: auto; }
    .order-position-page__grid,
    .order-item-card__details { grid-template-columns: 1fr; }
    .order-position-page__product,
    .order-position-page__wide,
    .order-item__options,
    .order-item__lamination-type { grid-column: auto; }
    .order-position-page .role-choice-group__options { grid-template-columns: 1fr; }
    .order-layout-upload__copy small { white-space: normal; }
    .order-view-summary { grid-template-columns: 1fr 1fr; }
    .order-view-summary > div,
    .order-view-summary > div:nth-child(3n),
    .order-view-summary > div:nth-last-child(-n + 3) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .order-view-summary > div:nth-child(2n) { border-right: 0; }
    .order-view-summary > div:nth-last-child(-n + 2) { border-bottom: 0; }
    .order-view-item__facts,
    .order-view-item__options { grid-template-columns: 1fr; }

    .technology-responsive-table,
    .orders-responsive-table {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .technology-responsive-table thead,
    .orders-responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .technology-responsive-table tbody,
    .orders-responsive-table tbody {
        display: grid;
        gap: 10px;
        padding: 10px;
    }
    .technology-responsive-table tr,
    .orders-responsive-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
    }
    .technology-responsive-table td,
    .orders-responsive-table td {
        display: block;
        min-width: 0;
        border: 0;
        padding: 10px 12px;
        overflow-wrap: anywhere;
    }
    .technology-responsive-table td::before,
    .orders-responsive-table td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--text-secondary);
        font-family: var(--font-heading);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
    }
    .technology-responsive-table td:first-child,
    .technology-responsive-table .data-table__empty,
    .orders-responsive-table td:first-child,
    .orders-responsive-table .data-table__empty {
        grid-column: 1 / -1;
        border-bottom: 1px solid var(--border);
    }
    .technology-responsive-table .data-table__empty,
    .orders-responsive-table .data-table__empty {
        display: grid;
        min-height: 120px;
        place-items: center;
    }
    .technology-responsive-table .data-table__empty::before,
    .orders-responsive-table .data-table__empty::before { display: none; }
    .technology-responsive-table td strong,
    .orders-responsive-table td strong { white-space: normal; }
    .technology-responsive-table .status-indicator,
    .orders-responsive-table .status-indicator { white-space: normal; }

    .technology-orders-table td:nth-child(1)::before { content: "Заказ"; }
    .technology-orders-table td:nth-child(2)::before { content: "Клиент"; }
    .technology-orders-table td:nth-child(3)::before { content: "Позиций"; }
    .technology-orders-table td:nth-child(4)::before { content: "Менеджер"; }
    .technology-orders-table td:nth-child(5)::before { content: "Технолог"; }
    .technology-orders-table td:nth-child(6)::before { content: "Отгрузка"; }
    .technology-orders-table td:nth-child(7)::before { content: "Статус"; }

    .technology-calculations-table td:nth-child(1)::before { content: "Заказ / позиция"; }
    .technology-calculations-table td:nth-child(2)::before { content: "Продукция"; }
    .technology-calculations-table td:nth-child(3)::before { content: "Тираж"; }
    .technology-calculations-table td:nth-child(4)::before { content: "Производство"; }
    .technology-calculations-table td:nth-child(5)::before { content: "Единица"; }
    .technology-calculations-table td:nth-child(6)::before { content: "Стенды / проходки"; }
    .technology-calculations-table td:nth-child(7)::before { content: "Площадь"; }
    .technology-orders-table .technology-responsive-table__open {
        display: block;
        grid-column: 1 / -1;
        border-top: 1px solid var(--border);
        padding: 10px 12px 12px;
    }
    .technology-orders-table .technology-responsive-table__open::before { display: none; }
    .technology-responsive-table__open .ui-button { width: 100%; }

    .orders-responsive-table td:nth-child(1)::before { content: "Заказ"; }
    .orders-responsive-table td:nth-child(2)::before { content: "Клиент"; }
    .orders-responsive-table td:nth-child(3)::before { content: "Позиций"; }
    .orders-responsive-table td:nth-child(4)::before { content: "Менеджер"; }
    .orders-responsive-table td:nth-child(5)::before { content: "Отгрузка"; }
    .orders-responsive-table td:nth-child(6)::before { content: "Статус"; }
    .orders-responsive-table td.data-table__actions {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        justify-content: flex-end;
        border-top: 1px solid var(--border);
    }
    .orders-responsive-table td.data-table__actions::before {
        display: block;
        margin-right: auto;
        margin-bottom: 0;
        content: "Действия";
    }
    .orders-responsive-table .data-table__actions .icon-button { margin-inline: 0; }
    .orders-responsive-table .orders-responsive-table__open {
        display: block;
        grid-column: 1 / -1;
        border-top: 1px solid var(--border);
        padding: 10px 12px 12px;
    }
    .orders-responsive-table .orders-responsive-table__open::before { display: none; }
    .orders-responsive-table__open .ui-button { width: 100%; }
}

@media (max-width: 440px) {
    h1 { font-size: 22px; line-height: 28px; overflow-wrap: normal; word-break: normal; hyphens: none; }
    .workspace-header { gap: 10px; }
    .workspace-header .muted { margin-top: 6px; font-size: 13px; }
    .content-toolbar .ui-button span:last-child { display: none; }
    .form-grid { padding: 16px; }
    .form-surface__header, .form-surface__footer { padding-inline: 18px; }
    .role-choice-group__options { grid-template-columns: 1fr; }
    .user-section-choice-group__options { grid-template-columns: 1fr; }
    .order-create-dialog__footer .ui-button { flex: 0 0 auto; padding-inline: 16px; }
    .auth-layout { padding: 12px; }
    .auth-panel { padding: 28px 22px; }
    .auth-panel__header h1 { font-size: 24px; }
    .production-task-card { margin-inline: -10px; padding: 14px; }
    .production-task-card__header { display: grid; }
    .production-task-card__facts,
    .production-task-card__fields,
    .production-progress-confirm__body dl { grid-template-columns: 1fr; }
    .production-task-card__facts > div,
    .production-task-card__facts > div:nth-child(2n),
    .production-task-card__facts > div:nth-last-child(-n + 2),
    .production-progress-confirm__body dl > div,
    .production-progress-confirm__body dl > div:nth-child(2n),
    .production-progress-confirm__body dl > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .production-task-card__facts > div:last-child,
    .production-progress-confirm__body dl > div:last-child { border-bottom: 0; }
    .production-task-card__action > .ui-button { width: 100%; justify-self: stretch; }
    .production-progress-confirm { padding: 6px; }
    .production-progress-confirm__panel { max-height: calc(100dvh - 12px); }
    .production-progress-confirm__body { overflow-y: auto; padding: 12px; }
    .production-progress-confirm .ui-dialog__footer .ui-button { flex: 1 1 0; padding-inline: 10px; }
    .order-priority-control {
        min-height: 48px;
        padding-inline: 12px;
    }
    .order-priority-control__icon { width: 20px; height: 20px; }
}

@media (max-width: 640px) {
    #users-table td:first-child { display: block; }
    #users-table td:first-child::before { display: none; }
    #users-table .person-cell { min-width: 0; align-items: flex-start; }
    #users-table .person-cell > span:last-child { min-width: 0; }
    #users-table .person-cell strong,
    #users-table .person-cell small { overflow-wrap: anywhere; white-space: normal; }
    #users-table td.data-table__actions { width: 100%; align-items: center; justify-content: flex-end; gap: 8px; }
    #users-table td.data-table__actions::before { display: block; margin-right: auto; }
    #users-table .data-table__actions .icon-button { margin-inline: 0; }
}

@media (max-width: 900px) {
    .ui-dialog.technology-dialog { width: calc(100% - 12px); }
    .technology-dialog__panel { height: calc(100dvh - 12px); }
    .technology-dialog .technology-dialog__body { padding: 8px 10px 10px; }
    .technology-dialog .technology-dialog__footer {padding: 8px 12px 28px;}
    .technology-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
    }
    .technology-position-nav {
        grid-template-rows: auto auto;
        border-right: 0;
        border-bottom: 1px solid #E8EBF1;
    }
    .technology-position-nav__summary { min-height: 44px; padding: 9px 14px; }
    .technology-position-nav__items {
        display: flex;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        padding: 0;
    }
    .technology-position-nav__item {
        min-width: 176px;
        border-right: 1px solid #EEF0F5;
        border-bottom: 0;
    }
    .technology-position-nav__item.is-active {
        border-left: 0;
        border-bottom: 3px solid #D6DBE4;
    }
    .technology-editor { padding: 18px 20px 24px; }
    .technology-editor__setup { grid-template-columns: 1fr; }
    .technology-editor__section--source {
        border-right: 0;
        border-bottom: 1px solid #E8EBF1;
    }
    .technology-calculation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .ui-dialog.technology-dialog {
        inset: 50% auto auto 50%;
        width: calc(100% - 12px);
        height: auto;
        max-height: calc(100dvh - 12px);
        border-radius: 16px;
        opacity: 0;
        transform: translate(-50%, calc(-50% + 10px)) scale(.985);
        transition: opacity 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1), overlay 180ms allow-discrete, display 180ms allow-discrete;
    }
    .ui-dialog.technology-dialog[open] { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    .ui-dialog.technology-dialog[open].is-closing { opacity: 0; transform: translate(-50%, calc(-50% + 6px)) scale(.99); }
    .ui-dialog.technology-dialog::backdrop { background: #313746; opacity: 0; }
    .ui-dialog.technology-dialog[open]::backdrop { opacity: .34; }
    .ui-dialog.technology-dialog[open].is-closing::backdrop { opacity: 0; }
    .technology-dialog .technology-dialog__panel {
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        border: 1px solid var(--border);
        border-radius: 16px;
    }
    .technology-dialog .ui-dialog__header {
        display: flex;
        min-height: 0;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        border-bottom-color: var(--border);
        padding: 12px 12px 9px;
        background: #FFFFFF;
    }
    .technology-dialog .ui-dialog__header h2 { font-size: 17px; }
    .technology-dialog .ui-dialog__header .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .technology-dialog__close {
        min-height: 34px;
    }
    .technology-dialog__close:hover { border-color: var(--border-strong); background: var(--surface-subtle); color: var(--text); }
    .technology-dialog__close-desktop { display: inline; }
    .technology-dialog__close-mobile { display: none; }
    .technology-position-nav { background: #FFFFFF; }
    .technology-position-nav__summary { min-height: 42px; padding-inline: 14px; }
    .technology-position-nav__items { scrollbar-width: none; }
    .technology-position-nav__items::-webkit-scrollbar { display: none; }
    .technology-position-nav__item { min-width: 150px; min-height: 60px; padding: 9px 14px; }
    .technology-position-nav__item.is-active { border-bottom-color: #D6DBE4; background: #F7F8FA; }
    .technology-editor { padding: 12px 0 20px; background: #F7F8FB; }
    .technology-editor__header { padding: 2px 16px 8px; }
    .technology-editor__setup,
    .technology-editor__section,
    .technology-editor__setup .technology-editor__section,
    .technology-calculation-grid,
    .technology-materials {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
    .technology-editor__setup {
        gap: 8px;
        margin-top: 8px;
        border: 0;
        background: #F7F8FB;
    }
    .technology-editor__section,
    .technology-editor__setup .technology-editor__section {
        margin-top: 8px;
        border-top: 1px solid #EEF0F5;
        border-bottom: 1px solid #EEF0F5;
        background: #FFFFFF;
        padding: 16px;
    }
    .technology-editor__setup .technology-editor__section { margin-top: 0; }
    .technology-editor__section--source { border-bottom: 1px solid #EEF0F5; }
    .technology-editor__header { align-items: flex-start; flex-direction: column; gap: 10px; }
    .technology-editor__header h3 { font-size: 17px; }
    .technology-editor__section-heading { margin-bottom: 12px; }
    .technology-source-facts > div { grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); }
    .technology-calculation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .technology-calculation-grid > div { min-height: 70px; padding: 12px; }
    .technology-calculation-grid dd { font-size: 14px; }
    .technology-layout__heading { align-items: flex-start; }
    .technology-layout-pass { padding: 10px; }
    .technology-layout-pass > header,
    .technology-layout-pass > footer { align-items: flex-start; flex-direction: column; gap: 3px; }
    .technology-materials { border-top: 1px solid #EEF0F5; border-bottom: 1px solid #EEF0F5; }
    .technology-material-row { grid-template-columns: 1fr; gap: 10px; }
    .technology-material-row__copy strong { overflow: visible; white-space: normal; }
    .technology-dialog .technology-dialog__footer {
        display: grid;
        min-height: 0;
        justify-content: stretch;
        border-top-color: var(--border);
        padding: 8px 10px 10px;
    }
    .technology-dialog__footer-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .technology-dialog__footer-actions .ui-button { width: 100%; margin-bottom: 0; }
    .technology-dialog__footer-actions [data-technology-launch] { grid-column: 1 / -1; }
    .technology-dialog__footer-actions:has([data-technology-reset][hidden]) [data-technology-submit] {
        grid-column: 1 / -1;
    }
    .technology-launch-materials__head,
    .technology-launch-materials__row {
        grid-template-columns: minmax(0, 1fr) 92px 92px;
        padding-inline: 10px;
    }
    .technology-launch-route > header { align-items: flex-start; flex-direction: column; gap: 3px; }
    .order-remove-confirm-dialog[data-technology-launch-confirm-dialog] {
        padding: 8px;
    }
    .technology-launch-confirm__panel {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }
    .technology-launch-confirm__panel .ui-dialog__header {
        align-items: flex-start;
        padding: 12px;
    }
    .technology-launch-confirm__panel .ui-dialog__header > div { min-width: 0; }
    .technology-launch-confirm__panel .ui-dialog__header h2 {
        overflow: visible;
        font-size: 17px;
        line-height: 1.25;
        text-overflow: clip;
        white-space: normal;
    }
    .technology-launch-confirm__panel .ui-dialog__header .muted {
        overflow: visible;
        font-size: 12px;
        line-height: 1.4;
        text-overflow: clip;
        white-space: normal;
    }
    .technology-launch-confirm__body {
        gap: 14px;
        padding: 8px 12px 14px;
    }
    .technology-launch-confirm__facts { grid-template-columns: 1fr; }
    .technology-launch-confirm__facts > div,
    .technology-launch-confirm__facts > div:nth-child(2n),
    .technology-launch-confirm__facts > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid #EEF0F5;
    }
    .technology-launch-confirm__facts > div:last-child { border-bottom: 0; }
    .technology-launch-confirm__facts dd { overflow-wrap: anywhere; }
    .technology-launch-confirm__body .technology-launch-route ol {
        display: grid;
        overflow-x: visible;
    }
    .technology-launch-confirm__body .technology-launch-route li {
        width: auto;
        min-width: 0;
        flex: none;
        border-right: 0;
        border-bottom: 1px solid #EEF0F5;
    }
    .technology-launch-confirm__body .technology-launch-route li:last-child { border-bottom: 0; }
    .technology-launch-confirm__body .technology-launch-materials__head { display: none; }
    .technology-launch-confirm__body .technology-launch-materials__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        padding: 11px 12px;
    }
    .technology-launch-confirm__body .technology-launch-materials__row strong {
        grid-column: 1 / -1;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }
    .technology-launch-confirm__body .technology-launch-materials__row span {
        min-width: 0;
        text-align: left;
    }
    .technology-launch-confirm__body .technology-launch-materials__row span:last-child {
        text-align: right;
    }
    .technology-launch-confirm__body .technology-launch-materials__row span::before {
        display: block;
        margin-bottom: 2px;
        color: #727A8D;
        font-size: 9px;
        font-weight: 650;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .technology-launch-confirm__body .technology-launch-materials__row span:nth-child(2)::before {
        content: "Требуется";
    }
    .technology-launch-confirm__body .technology-launch-materials__row span:nth-child(3)::before {
        content: "Доступно";
    }
    .technology-launch-confirm__panel .order-remove-confirm-dialog__footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px 12px 12px;
    }
    .technology-launch-confirm__panel .order-remove-confirm-dialog__footer .ui-button {
        width: 100%;
        min-width: 0;
    }
    .technology-launch-confirm__error { margin: 0 12px 12px; }

    @starting-style {
        .ui-dialog.technology-dialog[open] { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.985); }
    }
}

@media (max-width: 380px) {
    .technology-dialog__footer-actions .ui-button {
        padding-inline: 10px;
        font-size: 12px;
    }
}

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

/* Order layout source and library refresh */
.order-layout-source {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.order-layout-source__tabs {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 4px;
}

.order-layout-source__tab {
    display: inline-flex;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.order-layout-source__tab .ui-icon {
    width: 16px;
    height: 16px;
}

.order-layout-source__tab:hover {
    background: var(--surface-subtle);
    color: var(--text);
}

.order-layout-source__tab:active {
    transform: scale(.98);
}

.order-layout-source__tab.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--border-active);
}

.order-layout-source__tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.order-layout-source__panel {
    min-width: 0;
    animation: order-layout-panel-enter 170ms var(--ease-out) both;
}

.order-layout-source__panel[hidden] {
    display: none;
}

@keyframes order-layout-panel-enter {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-layout-source .order-layout-upload {
    border-radius: 12px;
}

.order-layout-source .order-layout-upload__picker {
    min-height: 108px;
}

.order-layout-source .order-layout-field {
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 13px;
}

.order-layout-source .order-layout-field small {
    color: var(--text-secondary);
    font-size: 11px;
}

.order-library-source {
    display: grid;
    gap: 8px;
}

.order-library-source__open {
    display: grid;
    width: 100%;
    min-height: 72px;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 11px 13px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.order-library-source__open:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}

.order-library-source__open:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.order-library-source__icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary);
}

.order-library-source__icon .ui-icon {
    width: 19px;
    height: 19px;
}

.order-library-source__copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.order-library-source__copy strong,
.order-library-source__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-library-source__copy strong {
    font-size: 13px;
    font-weight: 650;
}

.order-library-source__copy small {
    color: var(--text-secondary);
    font-size: 11px;
}

.order-library-source__chevron {
    width: 16px;
    height: 16px;
    color: var(--text-soft);
}

.order-library-source__selected {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.order-library-source__selected img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--surface-subtle);
}

.order-library-source__selected.is-pack img {
    padding: 12px;
    background: var(--primary-soft);
}

.order-library-source__selected > div {
    min-width: 0;
}

.order-library-source__selected strong,
.order-library-source__selected small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-library-source__selected small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 11px;
}

.ui-dialog.order-library-dialog {
    width: min(900px, calc(100vw - 32px));
}

.order-library-dialog .ui-dialog__panel {
    width: 100%;
    max-height: min(760px, calc(100dvh - 32px));
}

.order-library-dialog__heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.order-library-dialog__heading-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary);
}

.order-library-dialog__heading-icon .ui-icon {
    width: 19px;
    height: 19px;
}

.order-library-dialog__body {
    display: grid;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
}

.order-library-dialog__toolbar {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr);
    align-items: center;
    gap: 12px;
}

.order-library-dialog__toolbar[hidden] {
    display: none;
}

.order-library-dialog__tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: start;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    padding: 4px;
}

.order-library-dialog__tabs button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
}

.order-library-dialog__tabs button.is-active {
    background: var(--surface-active);
    color: var(--primary);
}

.order-library-dialog__search {
    width: 100%;
}

.order-library-dialog__state {
    display: grid;
    min-height: 330px;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1px dashed var(--border-strong);
    border-radius: 14px;
    background: var(--surface-subtle);
    padding: 28px;
    color: var(--text);
    text-align: center;
}

.order-library-dialog__state[hidden] {
    display: none;
}

.order-library-dialog__state strong {
    font-size: 14px;
    font-weight: 650;
}

.order-library-dialog__state small {
    max-width: 320px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.order-library-dialog__state-icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-bottom: 3px;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
}

.order-library-dialog__state-icon .ui-icon {
    width: 22px;
    height: 22px;
}

.order-library-dialog__state-icon.is-loading .ui-icon {
    animation: order-library-spin 850ms linear infinite;
}

.order-library-dialog__state-icon.is-error {
    background: var(--danger-soft);
    color: var(--danger);
}

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

.order-library-dialog__grid {
    display: grid;
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: 56vh;
    overflow: auto;
    padding: 1px;
}

.order-library-option {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    padding: 8px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 170ms var(--ease-out), background-color 170ms var(--ease-out), transform 170ms var(--ease-out);
}

.order-library-option:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-2px);
}

.order-library-option:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.order-library-option__preview {
    display: grid;
    width: 100%;
    grid-column: 1 / -1;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 9px;
    background: var(--surface-subtle);
}

.order-library-option__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.order-library-option--pack .order-library-option__preview {
    background: var(--primary-soft);
    color: var(--primary);
}

.order-library-option--pack .order-library-option__preview .ui-icon {
    width: 40px;
    height: 40px;
    margin: 0;
}

.order-library-option__copy {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 2px 3px 3px;
}

.order-library-option__copy strong,
.order-library-option__copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-library-option__copy strong {
    font-size: 13px;
    font-weight: 650;
}

.order-library-option__copy small {
    color: var(--text-secondary);
    font-size: 11px;
}

.order-library-option__arrow {
    width: 15px;
    height: 15px;
    color: var(--text-soft);
}

@media (max-width: 720px) {
    .order-layout-source__tabs {
        gap: 3px;
        padding: 3px;
    }

    .order-layout-source__tab {
        gap: 5px;
        min-height: 44px;
        padding-inline: 6px;
        font-size: 11px;
    }

    .ui-dialog.order-library-dialog {
        width: calc(100% - 16px);
    }

    .order-library-dialog .ui-dialog__panel {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }

    .order-library-dialog__toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-library-dialog__tabs {
        width: 100%;
    }

    .order-library-dialog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-library-dialog__state {
        min-height: 260px;
    }
}

@media (max-width: 460px) {
    .order-library-dialog__heading .muted {
        display: none;
    }

    .order-library-dialog__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-library-option {
        grid-template-columns: 70px minmax(0, 1fr) 16px;
        min-height: 86px;
    }

    .order-library-option__preview {
        width: 70px;
        grid-column: auto;
        aspect-ratio: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-layout-source__panel,
    .order-library-dialog__state-icon.is-loading .ui-icon {
        animation: none;
    }
}
