:root {
    --bs-primary: #ee741b;
    --bs-primary-rgb: 238, 116, 27;
    --app-ink: #282522;
    --app-muted: #817a73;
    --app-line: #eee8e2;
    --app-canvas: #fbfaf8;
    --app-sidebar: #fff;
    --app-primary: #ee741b;
    --app-accent: #ff9a43;
    --app-radius: 14px;
}

body {
    min-height: 100vh;
    background: var(--app-canvas);
    color: var(--app-ink);
    font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-layout > main {
    min-width: 0;
    flex: 1;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    width: 250px;
    min-width: 250px;
    height: 100vh;
    flex: 0 0 250px;
    flex-direction: column;
    padding: 22px 14px 14px;
    border-right: 1px solid var(--app-line);
    background: var(--app-sidebar);
    color: var(--app-ink);
}

.brand-lockup {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 11px;
    padding: 0 9px;
    color: var(--app-ink);
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
}

.brand-lockup strong,
.brand-lockup small,
.user-label strong,
.user-label small {
    display: block;
}

.brand-lockup strong {
    font-size: 14px;
    letter-spacing: .08em;
}

.brand-lockup small {
    color: #91877d;
    font-size: 9px;
    letter-spacing: .12em;
}

.sidebar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 2px 19px;
    padding: 10px 12px;
    border: 1px solid #f4e3d3;
    border-radius: 11px;
    background: #fff8f1;
    color: #9c5a26;
    font-size: 11px;
}

.app-nav {
    flex: 1;
}

.nav-caption {
    display: block;
    padding: 16px 12px 7px;
    color: #a69b90;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
}

.app-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0;
    padding: 10px 12px;
    border-radius: 9px;
    color: #5f5a55;
    font-size: 12px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.app-nav .nav-link i {
    width: 17px;
    font-size: 15px;
}

.app-nav .nav-link:hover,
.app-nav .nav-link.active {
    background: #fff1e5;
    color: #d65d0d;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 3px 1px;
    border-top: 1px solid var(--app-line);
}

.user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffae5c, #e96d1e);
    color: #fff;
    font-weight: 700;
}

.user-label {
    min-width: 0;
    flex: 1;
}

.user-label strong {
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-label small {
    color: var(--app-muted);
    font-size: 10px;
}

.logout-button {
    border: 0;
    background: transparent;
    color: var(--app-muted);
    font-size: 16px;
}

.app-main {
    width: 100%;
    min-width: 0;
    flex: 1;
    padding: 28px clamp(18px, 3vw, 42px);
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.page-heading h1,
.page-heading h2 {
    margin: 0;
    color: var(--app-ink);
    font-family: Manrope, sans-serif;
    font-size: clamp(22px, 2.2vw, 29px);
    font-weight: 800;
    letter-spacing: -.035em;
}

.page-eyebrow {
    margin: 0 0 5px;
    color: var(--app-muted);
    font-size: 12px;
}

.app-card,
.metric-card,
.table-card {
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    background: #fff;
    box-shadow: 0 4px 18px rgba(27, 44, 58, .035);
}

.metric-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    padding: 17px;
}

.metric-card::after {
    position: absolute;
    top: -20px;
    right: -17px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--metric-tint, #e8f5f3);
    content: "";
}

.metric-label,
.metric-value,
.metric-note {
    position: relative;
    z-index: 1;
}

.metric-label {
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 600;
}

.metric-value {
    margin-top: 12px;
    color: var(--app-ink);
    font-family: Manrope, sans-serif;
    font-size: clamp(19px, 2vw, 25px);
    font-weight: 800;
    letter-spacing: -.04em;
}

.metric-note {
    margin-top: 4px;
    color: var(--app-muted);
    font-size: 10px;
}

.metric-icon {
    position: absolute;
    z-index: 1;
    top: 16px;
    right: 16px;
    color: var(--app-primary);
    font-size: 16px;
}

.metric-action {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-top: 6px;
    color: #d65d0d;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.metric-money {
    font-size: clamp(16px, 1.8vw, 22px);
}

.section-card {
    height: 100%;
    padding: 19px;
}

.section-card h3 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    font-size: 12px;
}

.table thead th {
    border-bottom-color: var(--app-line);
    background: #f7f9fa;
    color: var(--app-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
}

.table > :not(caption) > * > * {
    padding: 11px 12px;
    vertical-align: middle;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: #d65d0d;
    --bs-btn-hover-border-color: #d65d0d;
}

.btn-outline-primary {
    --bs-btn-color: #d65d0d;
    --bs-btn-border-color: #e6a16e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
    --bs-btn-active-bg: var(--app-primary);
    --bs-btn-active-border-color: var(--app-primary);
}

.page-link {
    color: #d65d0d;
}

.page-item.active .page-link {
    border-color: var(--app-primary);
    background: var(--app-primary);
}

.alert {
    border-radius: 12px;
}

.form-control,
.form-select {
    border-color: #dfe3ed;
    border-radius: 9px;
}

.form-control:focus,
.form-select:focus {
    border-color: #f4a66f;
    box-shadow: 0 0 0 .2rem rgba(238, 116, 27, .14);
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

.section-title h2 {
    margin: 0;
    font: 800 17px Manrope, sans-serif;
}

.section-title p {
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 12px;
}

.step-number {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border-radius: 10px;
    background: #fff0e3;
    color: #d65d0d;
    font-size: 11px;
    font-weight: 800;
}

.service-form {
    max-width: 980px;
}

.inventory-form,
.service-form {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 32px);
}

.form-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.form-section-heading h2 {
    margin: 0;
    color: var(--app-ink);
    font: 800 15px Manrope, sans-serif;
}

.form-section-heading p {
    margin: 4px 0 0;
    color: var(--app-muted);
    font-size: 11px;
}

.form-section-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    background: #fff0e3;
    color: #d65d0d;
    font-size: 16px;
}

.inventory-list {
    overflow: hidden;
}

.inventory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--app-line);
    background: #fff;
}

.inventory-filters > div:not(.filter-search) {
    min-width: 155px;
}

.filter-search {
    position: relative;
    min-width: min(100%, 260px);
    flex: 1 1 300px;
}

.filter-search > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    color: #a69b90;
    transform: translateY(-50%);
}

.filter-search .form-control {
    padding-left: 35px;
}

.inventory-table thead th {
    padding-top: 13px;
    padding-bottom: 13px;
}

.inventory-table td strong {
    color: var(--app-ink);
}

.tier-editor {
    padding: 15px;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    background: #fffdfa;
}

.tier-rows .row:last-child {
    margin-bottom: 0 !important;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 25px;
    padding-top: 19px;
    border-top: 1px solid var(--app-line);
}

.code-chip {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 7px;
    background: #fff0e3;
    color: #c9550a;
    font-size: 10px;
    font-weight: 700;
}

.status-pill {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
}

.status-active,
.status-aceptada,
.status-emitida {
    background: #e5f6ec;
    color: #13744c;
}

.status-neutral,
.status-cancelada,
.status-anulada {
    background: #edf0f4;
    color: #687587;
}

.status-pendiente {
    background: #fff3da;
    color: #98601b;
}

.status-convertida {
    background: #fff0e3;
    color: #c9550a;
}

.empty-state {
    height: 210px;
    color: var(--app-muted) !important;
    text-align: center;
}

.empty-state i,
.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state i {
    margin-bottom: 8px;
    color: #9caabc;
    font-size: 27px;
}

.empty-state strong {
    color: var(--app-ink);
    font-size: 13px;
}

.empty-state span {
    margin: 5px 0 13px;
    font-size: 11px;
}

.quote-line {
    margin-top: 12px;
    padding: 17px;
    border: 1px solid var(--app-line);
    border-radius: 13px;
    background: #fbfcfd;
}

.quote-line-top {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.line-service {
    min-width: 0;
    flex: 1;
}

.quote-total-preview {
    color: var(--app-muted);
    font-size: 11px;
    text-align: right;
}

.quote-total-preview strong,
.quote-total-preview small {
    display: block;
}

.quote-total-preview strong {
    color: var(--app-ink);
    font: 800 21px Manrope, sans-serif;
}

.quote-total-preview small {
    font-size: 10px;
}

.panel-heading {
    margin: 0;
    color: var(--app-ink);
    font: 800 15px Manrope, sans-serif;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--app-muted);
    font-size: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-line);
    color: var(--app-muted);
    font-size: 11px;
}

.summary-row i {
    color: var(--app-primary);
}

.summary-row strong {
    color: var(--app-ink);
    white-space: nowrap;
}

.settings-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--app-primary);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.document-toolbar {
    display: flex;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto 15px;
}

.help-assistant {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 1050;
    font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

.assistant-launcher {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 9px;
    padding: 0 18px;
    border: 0;
    border-radius: 28px;
    background: var(--app-primary);
    box-shadow: 0 8px 26px rgba(170, 83, 21, .3);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease;
}

.assistant-launcher:hover {
    box-shadow: 0 10px 30px rgba(170, 83, 21, .4);
    transform: translateY(-2px);
}

.assistant-launcher i {
    font-size: 18px;
}

.assistant-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    display: flex;
    width: min(390px, calc(100vw - 28px));
    height: min(560px, calc(100vh - 110px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--app-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(40, 37, 34, .2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .16s ease, transform .16s ease;
}

.assistant-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.assistant-header {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--app-line);
    background: #fffaf5;
}

.assistant-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 13px;
    background: #fff0e3;
    color: #d65d0d;
    font-size: 18px;
}

.assistant-header > div {
    min-width: 0;
    flex: 1;
}

.assistant-header strong,
.assistant-header small {
    display: block;
}

.assistant-header strong {
    color: var(--app-ink);
    font-size: 13px;
}

.assistant-header small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 10px;
}

.assistant-close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--app-muted);
}

.assistant-close:hover {
    background: #fff0e3;
    color: #d65d0d;
}

.assistant-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    padding: 16px 13px;
    background: #fff;
}

.assistant-message {
    max-width: 90%;
    padding: 11px 13px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-line;
}

.assistant-message-assistant {
    align-self: flex-start;
    border: 1px solid #f1eae3;
    border-bottom-left-radius: 5px;
    background: #fbf9f6;
    color: #47413b;
}

.assistant-message-user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    background: #fff0e3;
    color: #783f17;
}

.assistant-link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.assistant-topic-link {
    padding: 7px 10px;
    border: 1px solid #f4d2b7;
    border-radius: 18px;
    color: #c9550a;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.assistant-topic-link:hover {
    background: #fff4ea;
    color: #a84508;
}

.assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 4px;
    border-top: 1px solid var(--app-line);
}

.assistant-suggestions button {
    padding: 6px 9px;
    border: 1px solid #eee5dc;
    border-radius: 18px;
    background: #fff;
    color: #665c52;
    font-size: 10px;
}

.assistant-suggestions button:hover {
    border-color: #efb78e;
    color: #c9550a;
}

.assistant-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 8px 12px;
    padding: 8px;
    border: 1px solid #e8dfd7;
    border-radius: 14px;
    background: #fff;
}

.assistant-form:focus-within {
    border-color: #efa66f;
    box-shadow: 0 0 0 3px rgba(238, 116, 27, .1);
}

.assistant-form textarea {
    width: 100%;
    max-height: 90px;
    resize: vertical;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--app-ink);
    font: inherit;
    font-size: 12px;
    line-height: 1.45;
}

.assistant-form textarea::placeholder {
    color: #a69b90;
}

.assistant-form button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: var(--app-primary);
    color: #fff;
}

.assistant-disclaimer {
    margin: 0;
    padding: 0 12px 10px;
    color: #998f85;
    font-size: 9px;
    text-align: center;
}

.document-preview {
    max-width: 1000px;
    min-height: 750px;
    margin: 0 auto;
    padding: 50px 56px;
    border: 1px solid #e3e8ec;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(27, 44, 58, .08);
    color: #253344;
}

.document-header {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--app-primary);
}

.document-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.document-logo {
    display: block;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 8px;
    object-fit: contain;
}

.document-brand h1 {
    margin: 0 0 5px;
    font: 800 19px Manrope, sans-serif;
}

.document-brand p,
.document-type p {
    margin: 2px 0;
    color: #708093;
    font-size: 11px;
}

.document-type {
    min-width: 225px;
    text-align: right;
}

.document-kicker {
    color: var(--app-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.document-type h2 {
    margin: 3px 0;
    font: 800 24px Manrope, sans-serif;
    letter-spacing: .03em;
}

.document-type > strong {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
}

.document-client {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 23px 0;
}

.document-client > div:first-child span,
.document-client strong,
.document-client small {
    display: block;
}

.document-client > div:first-child span {
    margin-bottom: 5px;
    color: #8390a0;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.document-client strong {
    font-size: 14px;
}

.document-client small {
    margin-top: 3px;
    color: #728093;
    font-size: 10px;
}

.document-note {
    display: flex;
    max-width: 310px;
    align-items: center;
    gap: 8px;
    color: #68798b;
    font-size: 10px;
}

.document-note i {
    color: var(--app-primary);
    font-size: 17px;
}

.document-table {
    margin-top: 6px;
}

.document-table .table {
    font-size: 11px;
}

.document-table .table thead th {
    padding: 12px 10px;
    background: #f4f7f8;
    color: #536578;
}

.document-table .table td {
    padding: 14px 10px;
    border-color: #edf0f2;
}

.document-summary {
    display: flex;
    justify-content: space-between;
    gap: 35px;
    padding-top: 21px;
}

.document-terms {
    max-width: 440px;
    color: #788698;
    font-size: 10px;
    line-height: 1.7;
}

.totals-box {
    width: 270px;
    flex: 0 0 270px;
}

.totals-box > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 7px 0;
    color: #677689;
    font-size: 11px;
}

.totals-box .grand-total {
    margin-top: 5px;
    padding: 12px 13px;
    border-radius: 8px;
    background: var(--app-primary);
    color: #fff;
    font-size: 13px;
}

.document-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 13px;
    border-top: 1px solid #e9edef;
    color: #8190a0;
    font-size: 9px;
}

.document-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    max-width: 1000px;
    margin: 16px auto;
    padding: 20px 22px;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: #fff;
}

.document-actions h2 {
    margin: 0;
    font: 800 15px Manrope, sans-serif;
}

.document-actions p {
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 11px;
}

.conversion-form {
    width: min(100%, 300px);
}

.internal-notice,
.cancelled-notice {
    margin-bottom: 21px;
    padding: 11px 13px;
    border: 1px solid #f1d49e;
    border-radius: 7px;
    background: #fff7e6;
    color: #825716;
    font-size: 10px;
    letter-spacing: .04em;
}

.internal-notice i {
    margin-right: 7px;
}

.cancelled-notice {
    border-color: #efb6b6;
    background: #fff0f0;
    color: #a23131;
    font-weight: 800;
    text-align: center;
}

.payment-summary {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #e9edef;
    font-size: 10px;
}

.payment-summary h3 {
    margin-bottom: 9px;
    font: 800 12px Manrope, sans-serif;
}

.payment-summary ul {
    padding-left: 17px;
    color: #68798b;
}

.payment-balance {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 7px;
    background: #f4f7f8;
}

.payment-form {
    width: min(100%, 680px);
}

@media (max-width: 760px) {
    .app-layout {
        display: block;
    }

    .app-sidebar {
        position: static;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 12px 14px;
    }

    .sidebar-search,
    .nav-caption {
        display: none;
    }

    .sidebar-user {
        display: flex;
        margin-top: 5px;
        padding: 8px 4px 0;
        border-top: 0;
    }

    .sidebar-user .user-label {
        display: none;
    }

    .sidebar-user form {
        margin-left: auto;
    }

    .brand-lockup {
        min-height: 42px;
    }

    .app-nav {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        margin-top: 9px;
        padding-bottom: 2px;
    }

    .app-nav .nav-link {
        flex: 0 0 auto;
        padding: 8px 10px;
    }

    .app-main {
        padding: 20px 14px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-preview {
        min-height: 0;
        padding: 25px 20px;
    }

    .document-header,
    .document-client,
    .document-summary,
    .document-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-type {
        text-align: left;
    }

    .totals-box {
        width: 100%;
        flex-basis: auto;
    }

    .quote-total-preview {
        text-align: left;
    }

    .inventory-filters {
        align-items: stretch;
    }

    .inventory-filters > div:not(.filter-search),
    .inventory-filters > button,
    .inventory-filters > a {
        flex: 1 1 100%;
    }

    .inventory-filters .filter-search {
        flex-basis: 100%;
    }

    .help-assistant {
        right: 14px;
        bottom: 14px;
    }

    .assistant-panel {
        right: -4px;
        bottom: 62px;
        height: min(560px, calc(100dvh - 96px));
    }
}

@media print {
    @page {
        size: auto;
        margin: 14mm;
    }
}

.quote-page-heading {
        margin-bottom: 22px;
    }

    .quote-section {
        height: auto;
        padding: 22px;
    }

    .quote-builder-heading {
        align-items: center;
    }

    .quote-builder-heading > div {
        flex: 1;
    }

    .quote-line {
        margin-top: 14px;
        padding: 17px;
        border-color: #eee8e2;
        background: #fff;
        box-shadow: 0 5px 18px rgba(58, 44, 30, .035);
    }

    .quote-line-top {
        align-items: center;
        justify-content: space-between;
        margin-bottom: 15px;
    }

    .quote-line-heading {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 12px;
    }

    .quote-line-icon,
    .catalog-item-icon {
        display: grid;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        place-items: center;
        border-radius: 12px;
        background: #fff0e3;
        color: #df6815;
        font-size: 17px;
    }

    .quote-line-heading strong,
    .quote-line-heading small {
        display: block;
    }

    .quote-line-heading strong {
        overflow: hidden;
        color: var(--app-ink);
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .quote-line-heading small {
        margin-top: 3px;
        color: var(--app-muted);
        font-size: 11px;
    }

    .quote-line-fields {
        padding-top: 15px;
        border-top: 1px solid var(--app-line);
    }

    .quote-line-footer {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-top: 13px;
        padding-top: 11px;
        border-top: 1px dashed var(--app-line);
        color: var(--app-muted);
        font-size: 11px;
    }

    .quote-line-footer strong {
        margin-left: 5px;
        color: var(--app-ink);
        font-size: 14px;
    }

    .quote-add-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 15px;
    }

    .quote-checkout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
        gap: 14px;
        margin-top: 15px;
    }

    .quote-advance-card,
    .quote-total-card {
        padding: 19px;
        border: 1px solid var(--app-line);
        border-radius: var(--app-radius);
        background: #fff;
    }

    .quote-advance-card h3 {
        margin: 3px 0 14px;
        font-size: 15px;
        font-weight: 750;
    }

    .quote-summary-caption {
        color: #ce5e11;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .quote-total-row {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        margin-top: 12px;
        color: var(--app-muted);
        font-size: 12px;
    }

    .quote-total-row strong {
        color: var(--app-ink);
    }

    .quote-total-row:last-of-type strong {
        color: #d65d0d;
        font-size: 20px;
    }

    .quote-total-tip {
        margin-top: 13px;
        padding-top: 11px;
        border-top: 1px solid var(--app-line);
        color: var(--app-muted);
        font-size: 10px;
    }

    .quote-form-actions {
        margin-bottom: 30px;
    }

    .catalog-picker-backdrop {
        position: fixed;
        z-index: 1100;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 22px;
        background: rgba(31, 26, 22, .48);
    }

    .catalog-picker-backdrop.is-open {
        display: flex;
    }

    .catalog-picker-open {
        overflow: hidden;
    }

    .catalog-picker {
        display: flex;
        width: min(940px, 100%);
        max-height: min(800px, 92vh);
        flex-direction: column;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,.7);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 24px 80px rgba(0, 0, 0, .2);
    }

    .catalog-picker-header,
    .catalog-picker-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 22px;
    }

    .catalog-picker-header {
        border-bottom: 1px solid var(--app-line);
    }

    .catalog-picker-header h2 {
        margin: 0;
        font: 800 20px Manrope, sans-serif;
    }

    .catalog-picker-header p:last-child {
        margin: 5px 0 0;
        color: var(--app-muted);
        font-size: 11px;
    }

    .catalog-picker-tools {
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 15px 22px 4px;
    }

    .catalog-search {
        position: relative;
        min-width: 0;
        flex: 1;
    }

    .catalog-search i {
        position: absolute;
        top: 50%;
        left: 12px;
        z-index: 1;
        color: var(--app-muted);
        transform: translateY(-50%);
    }

    .catalog-search input {
        padding-left: 35px;
    }

    .catalog-kind-tabs,
    .catalog-category-filters {
        display: flex;
        gap: 7px;
    }

    .catalog-kind-tabs button,
    .catalog-category-filters button {
        padding: 7px 11px;
        border: 1px solid var(--app-line);
        border-radius: 20px;
        background: #fff;
        color: #716961;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
    }

    .catalog-kind-tabs button.active,
    .catalog-category-filters button.active {
        border-color: #f5c69f;
        background: #fff2e7;
        color: #cb5a0e;
    }

    .catalog-category-filters {
        overflow-x: auto;
        padding: 11px 22px;
    }

    .catalog-picker-grid {
        display: grid;
        min-height: 120px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        overflow-y: auto;
        padding: 5px 22px 18px;
    }

    .catalog-picker-item {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 11px;
        padding: 12px;
        border: 1px solid var(--app-line);
        border-radius: 12px;
        background: #fff;
        text-align: left;
        transition: border-color .15s, background .15s, transform .15s;
    }

    .catalog-picker-item:hover,
    .catalog-picker-item:focus-visible {
        border-color: #ef9b5b;
        background: #fffaf5;
        outline: none;
        transform: translateY(-1px);
    }

    .catalog-picker-item .product {
        background: #edf5ff;
        color: #3974bd;
    }

    .catalog-item-info {
        min-width: 0;
        flex: 1;
    }

    .catalog-item-info strong,
    .catalog-item-info small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .catalog-item-info strong {
        color: var(--app-ink);
        font-size: 12px;
    }

    .catalog-item-info small {
        margin-top: 4px;
        color: var(--app-muted);
        font-size: 9px;
    }

    .catalog-item-price {
        color: #d65d0d;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }

    .catalog-empty-state {
        display: flex;
        min-height: 170px;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--app-muted);
        text-align: center;
    }

    .catalog-empty-state i {
        margin-bottom: 8px;
        color: #d65d0d;
        font-size: 22px;
    }

    .catalog-empty-state strong {
        color: var(--app-ink);
        font-size: 13px;
    }

    .catalog-empty-state span {
        margin-top: 4px;
        font-size: 11px;
    }

    .catalog-picker-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        border-top: 1px solid var(--app-line);
        color: var(--app-muted);
        font-size: 11px;
    }

    @media (max-width: 760px) {
        .quote-builder-heading {
            align-items: flex-start;
            flex-wrap: wrap;
        }

        .quote-builder-heading .btn {
            width: 100%;
        }

        .quote-checkout {
            grid-template-columns: 1fr;
        }

        .catalog-picker-backdrop {
            padding: 0;
        }

        .catalog-picker {
            width: 100%;
            max-height: 100vh;
            height: 100vh;
            border-radius: 0;
        }

        .catalog-picker-header,
        .catalog-picker-footer {
            padding-right: 15px;
            padding-left: 15px;
        }

        .catalog-picker-tools {
            align-items: stretch;
            flex-direction: column;
            padding-right: 15px;
            padding-left: 15px;
        }

        .catalog-kind-tabs button {
            flex: 1;
        }

        .catalog-category-filters {
            padding-right: 15px;
            padding-left: 15px;
        }

        .catalog-picker-grid {
            grid-template-columns: 1fr;
            padding-right: 15px;
            padding-left: 15px;
        }
    }

@media print {
    .catalog-picker-backdrop {
        display: none !important;
    }

    body {
        min-height: 0;
        background: #fff !important;
    }

    .no-print,
    .app-sidebar {
        display: none !important;
    }

    .app-layout,
    .app-main {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .document-preview {
        max-width: none;
        min-height: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .document-header,
    .document-client,
    .document-summary,
    .document-table tr {
        break-inside: avoid;
    }
}

.pos-main {
    min-height: 100vh;
}

.pos-heading {
    margin-bottom: 18px;
}

.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
    gap: 18px;
}

.pos-catalog {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    background: #fff;
}

.pos-search-wrap {
    position: relative;
}

.pos-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    color: #a69b90;
    transform: translateY(-50%);
}

.pos-search-wrap .form-control {
    height: 46px;
    padding-right: 65px;
    padding-left: 42px;
    border-color: #e9e3dd;
    background: #fdfcfb;
    font-size: 13px;
}

.pos-search-wrap kbd {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 3px 6px;
    border: 1px solid #e8e2dc;
    border-radius: 5px;
    background: #fff;
    color: #978e85;
    font-size: 9px;
    transform: translateY(-50%);
}

.pos-category-bar,
.pos-kind-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    padding: 12px 0 2px;
    scrollbar-width: thin;
}

.pos-category-bar button,
.pos-kind-bar button {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid #eee8e2;
    border-radius: 24px;
    background: #fff;
    color: #77716b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.pos-category-bar button.active,
.pos-kind-bar button.active {
    border-color: #ee741b;
    background: #ee741b;
    color: #fff;
}

.pos-kind-bar {
    padding-top: 9px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--app-line);
}

.pos-kind-bar button {
    border: 0;
    border-radius: 8px;
    background: #f8f6f3;
}

.pos-kind-bar button.active {
    background: #fff0e3;
    color: #cc5d11;
}

.pos-results-count {
    margin-left: auto;
    color: var(--app-muted);
    font-size: 10px;
    white-space: nowrap;
}

.pos-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
    padding-top: 15px;
}

.pos-item-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 170px;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #eee9e4;
    border-radius: 13px;
    background: #fff;
    color: var(--app-ink);
    text-align: left;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.pos-item-card:hover,
.pos-item-card:focus-visible {
    border-color: #eea06a;
    outline: none;
    box-shadow: 0 8px 22px rgba(100, 63, 30, .1);
    transform: translateY(-2px);
}

.pos-item-art {
    display: grid;
    width: 100%;
    height: 72px;
    flex: 0 0 72px;
    place-items: center;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 9px;
    background: #fff4ea;
    color: #e16e1c;
    font-size: 29px;
}

.pos-art-product {
    background: #edf5ff;
    color: #4a83c1;
}

.pos-item-name {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    color: #302b27;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pos-item-price {
    margin-top: 6px;
    color: #d26013;
    font-size: 12px;
    font-weight: 800;
}

.pos-item-card small {
    overflow: hidden;
    width: 100%;
    margin-top: 3px;
    color: #928a83;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-add-icon {
    position: absolute;
    right: 9px;
    bottom: 9px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #fff0e3;
    color: #d26013;
    font-size: 11px;
}

.pos-empty,
.pos-catalog-empty {
    display: flex;
    min-height: 210px;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--app-muted);
    text-align: center;
}

.pos-empty i,
.pos-catalog-empty > i {
    margin-bottom: 8px;
    color: #d26013;
    font-size: 27px;
}

.pos-empty strong,
.pos-catalog-empty h2 {
    color: var(--app-ink);
    font-size: 14px;
    font-weight: 750;
}

.pos-empty span,
.pos-catalog-empty p {
    margin-top: 5px;
    font-size: 11px;
}

.pos-catalog-empty {
    min-height: 350px;
}

.pos-cart {
    position: sticky;
    top: 16px;
    overflow: hidden;
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    background: #fff;
    box-shadow: 0 7px 25px rgba(50, 37, 26, .055);
}

.pos-cart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 17px 17px 13px;
    border-bottom: 1px solid var(--app-line);
}

.pos-cart-header h2 {
    margin: 0;
    font: 800 15px Manrope, sans-serif;
}

.pos-cart-header p {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 10px;
}

.pos-cart-open {
    color: #178552;
    font-size: 9px;
}

.pos-cart-open i {
    margin-right: 3px;
    font-size: 7px;
}

.pos-cart-client {
    padding: 13px 17px;
    border-bottom: 1px solid var(--app-line);
}

.pos-cart-client .form-label {
    margin-bottom: 5px;
    color: #6f6861;
    font-size: 10px;
    font-weight: 700;
}

.pos-cart-client .form-select {
    font-size: 11px;
}

.pos-new-client {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.pos-new-client .form-control {
    min-height: 32px;
    font-size: 10px;
}

.pos-cart-lines {
    max-height: min(45vh, 430px);
    overflow-y: auto;
    padding: 0 15px;
}

.pos-cart-empty {
    display: flex;
    min-height: 160px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--app-muted);
    text-align: center;
}

.pos-cart-empty > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #f7f5f2;
    color: #9c9187;
    font-size: 19px;
}

.pos-cart-empty strong {
    color: var(--app-ink);
    font-size: 11px;
}

.pos-cart-empty small {
    margin-top: 4px;
    font-size: 9px;
}

.pos-cart-line {
    padding: 13px 1px;
    border-bottom: 1px solid #f0ece8;
}

.pos-cart-line-head {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pos-cart-line-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 9px;
    background: #fff0e3;
    color: #d26013;
    font-size: 15px;
}

.pos-cart-line-title {
    min-width: 0;
    flex: 1;
}

.pos-cart-line-title strong,
.pos-cart-line-title small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-cart-line-title strong {
    color: #332d28;
    font-size: 10px;
}

.pos-cart-line-title small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 9px;
}

.pos-line-remove,
.pos-remove-payment {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #a39a91;
    font-size: 11px;
}

.pos-line-remove:hover,
.pos-remove-payment:hover {
    background: #fff0ef;
    color: #b63b32;
}

.pos-cart-line-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.pos-quantity-control {
    display: flex;
    height: 29px;
    align-items: center;
    border: 1px solid #eee8e2;
    border-radius: 7px;
}

.pos-quantity-control button {
    width: 27px;
    height: 27px;
    border: 0;
    background: #faf8f6;
    color: #665d54;
    font-size: 15px;
}

.pos-quantity-control button:first-child {
    border-radius: 7px 0 0 7px;
}

.pos-quantity-control button:last-child {
    border-radius: 0 7px 7px 0;
}

.pos-quantity-control input {
    width: 46px;
    height: 26px;
    padding: 0 2px;
    border: 0;
    color: #302b27;
    font-size: 10px;
    text-align: center;
}

.pos-quantity-control input:focus {
    outline: 1px solid #efa465;
}

.pos-line-total {
    color: #352e28;
    font-size: 11px;
}

.pos-unit-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--app-muted);
    font-size: 9px;
}

.pos-unit-price-row label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pos-unit-price-row label .form-control {
    width: 85px;
    min-height: 28px;
    padding: 4px 7px;
    font-size: 10px;
}

.pos-custom-fields {
    display: grid;
    gap: 7px;
    margin-top: 9px;
}

.pos-custom-measures {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
}

.pos-custom-fields .form-control,
.pos-custom-fields .form-select {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 9px;
}

.pos-custom-fields .pos-specs {
    min-height: 48px;
}

.pos-cart-summary {
    display: grid;
    gap: 9px;
    padding: 14px 17px 12px;
    border-top: 1px solid var(--app-line);
}

.pos-cart-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--app-muted);
    font-size: 10px;
}

.pos-cart-summary strong {
    color: #39322c;
}

.pos-cart-summary .pos-grand-total {
    margin-top: 3px;
    padding-top: 10px;
    border-top: 1px dashed var(--app-line);
    color: #2f2924;
    font-size: 13px;
    font-weight: 800;
}

.pos-cart-summary .pos-grand-total strong {
    color: #ce5e11;
    font-size: 18px;
}

.pos-checkout-controls {
    padding: 0 17px 12px;
}

.pos-checkout-controls .form-label {
    margin-bottom: 4px;
    color: #696159;
    font-size: 9px;
    font-weight: 750;
}

.pos-checkout-controls .form-select {
    min-height: 33px;
    font-size: 10px;
}

.pos-delivery-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 11px;
    color: #48413a;
    font-size: 10px;
    font-weight: 700;
}

.pos-delivery-option input {
    margin-top: 2px;
    accent-color: #e96d19;
}

.pos-delivery-option small {
    display: block;
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 9px;
    font-weight: 400;
}

.pos-charge-button {
    display: flex;
    width: calc(100% - 34px);
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 17px;
    font-size: 12px;
}

.pos-checkout-hint {
    display: block;
    padding: 0 17px 7px;
    color: #a45b23;
    font-size: 9px;
}

.pos-charge-button strong {
    margin-left: 5px;
    font-size: 14px;
}

.pos-quote-link {
    display: block;
    padding: 12px 8px 14px;
    color: #b85b19;
    font-size: 9px;
    text-align: center;
    text-decoration: none;
}

.pos-quote-link:hover {
    text-decoration: underline;
}

.pos-payment-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(36, 30, 25, .48);
}

.pos-payment-backdrop.is-open {
    display: flex;
}

.pos-modal-open {
    overflow: hidden;
}

.pos-payment-modal {
    width: min(500px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    padding: 19px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .23);
}

.pos-payment-modal > header,
.pos-payment-modal > header > div {
    display: flex;
    align-items: center;
}

.pos-payment-modal > header {
    justify-content: space-between;
    gap: 12px;
}

.pos-payment-modal > header > div {
    gap: 10px;
}

.pos-payment-icon {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 11px;
    background: #fff0e3;
    color: #d26013;
    font-size: 17px;
}

.pos-payment-modal h2 {
    margin: 0;
    font: 800 16px Manrope, sans-serif;
}

.pos-payment-modal header small {
    color: var(--app-muted);
    font-size: 10px;
}

.pos-payment-due {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 17px 0 14px;
    padding: 14px;
    border-radius: 11px;
    background: #242046;
    color: #fff;
}

.pos-payment-due span {
    color: #d5d2e7;
    font-size: 11px;
}

.pos-payment-due strong {
    font-size: 20px;
}

.pos-payment-row {
    display: grid;
    grid-template-columns: 1fr 1fr 28px;
    align-items: end;
    gap: 9px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--app-line);
    border-radius: 11px;
    background: #fdfcfb;
}

.pos-payment-row > label {
    min-width: 0;
    margin: 0;
    color: #777069;
    font-size: 9px;
    font-weight: 700;
}

.pos-payment-row .form-control,
.pos-payment-row .form-select {
    min-height: 35px;
    margin-top: 5px;
    font-size: 10px;
}

.pos-payment-row .pos-cash-received,
.pos-payment-row .pos-payment-reference {
    grid-column: 1 / 3;
}

.pos-add-payment {
    font-size: 10px;
}

.pos-payment-foot,
.pos-change {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
    color: var(--app-muted);
    font-size: 10px;
}

.pos-payment-foot strong {
    color: #403831;
}

.pos-change {
    margin-top: 9px;
    padding: 10px;
    border-radius: 8px;
    background: #eaf8ef;
    color: #26734b;
}

.pos-payment-modal .alert {
    margin-top: 12px;
    padding: 9px 11px;
    font-size: 10px;
}

.pos-payment-modal > footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 17px;
    padding-top: 13px;
    border-top: 1px solid var(--app-line);
}

@media (max-width: 1100px) {
    .pos-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 12px;
    }

    .pos-catalog {
        padding: 14px;
    }

    .pos-cards {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 9px;
    }
}

@media (max-width: 760px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .pos-cart {
        position: static;
        grid-row: 1;
    }

    .pos-cart-lines {
        max-height: 34vh;
    }

    .pos-catalog {
        grid-row: 2;
        padding: 12px;
    }

    .pos-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pos-item-card {
        min-height: 155px;
        padding: 9px;
    }

    .pos-item-art {
        height: 62px;
        flex-basis: 62px;
    }

    .pos-payment-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .pos-payment-modal {
        width: 100%;
        max-height: 92vh;
        padding: 16px;
        border-radius: 18px 18px 0 0;
    }
}

@media print {
    .pos-payment-backdrop {
        display: none !important;
    }
}
