#profile{max-width:850px;margin:auto}#card{margin:25px 0;display:grid;grid-template-columns:1fr 1fr;gap:16px}.block,.future{background:#fff;border:1px solid #e7e1d5;border-radius:8px;padding:22px}.block h2,.future h2{font:22px Georgia,serif;margin:0 0 12px}.block a{display:inline-block;margin:4px 10px 4px 0}.block p{overflow-wrap:anywhere}.future{background:#f3efe5;margin-bottom:20px}#error{color:#a34639}@media(max-width:600px){#card{grid-template-columns:1fr}}

#profile{max-width:1200px}.price-section,.request-section{margin-top:30px}.price-section{background:white;border:1px solid var(--line);border-radius:8px;padding:22px}.product-table{min-width:740px}.product-table th:nth-child(1){width:75px}.product-table th:nth-child(2){width:auto}.product-table th:nth-child(3){width:135px}.product-table th:nth-child(4){width:115px}.product-table th:nth-child(5){width:145px}.product-table input{margin:0;padding:10px}.product-table td:first-child{position:static;box-shadow:none}.product-table thead th,.product-table thead th:first-child{position:sticky;top:0;left:auto;z-index:5;box-shadow:0 1px 0 var(--line)}.price-save{display:flex;align-items:center;gap:18px;padding-top:16px}.request-section{border-left:3px solid var(--gold);padding-left:18px}.request-section h2{font:23px Georgia,serif}#request-error{color:#a34639}.price-section h2{font:28px Georgia,serif}.price-section .filters{margin-top:20px}.price-section .table-wrap{max-height:60vh}@media(max-width:600px){.price-section{padding:14px}.price-save{align-items:flex-start;flex-direction:column}}

.product-table .product-group th{position:static;width:auto;padding:14px;background:#eae2ce;color:#655326;font-size:14px;font-weight:600;border-top:1px solid #d5c7a4}.product-table .product-subgroup th{position:static;width:auto;padding:12px 14px;background:#f5f1e8;color:#655326;font-size:13px;border-top:1px solid var(--line)}.price-tools{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px;align-items:center}.template-link{padding:11px 18px;border:1px solid var(--line);border-radius:5px;text-decoration:none}.import-hint{font-size:12px}.import-preview{max-height:45vh;overflow:auto}.import-preview p{display:flex;gap:20px;justify-content:space-between;border-bottom:1px solid var(--line);padding:8px 0}.import-preview strong{white-space:nowrap}.import-error{white-space:pre-line;color:#a34639}

#price-message{white-space:pre-line}

.store-logo{width:128px;height:128px;object-fit:contain;border:1px solid #e7e1d5;border-radius:12px;background:white}.logo-editor{padding:20px;background:#f6f2e9;border-radius:12px;margin:20px 0}.logo-crop{max-width:540px}.logo-crop canvas{width:min(100%,360px);height:auto;display:block;margin:16px auto;touch-action:none;cursor:grab;border:1px solid #d5c7a4}.logo-crop input[type=range]{width:100%;padding:0}.logo-crop [data-error],#logo-status{overflow-wrap:anywhere}

.phone-messengers{display:flex;flex-wrap:wrap;gap:12px;margin:6px 0 14px}.phone-messengers a,.phone-messenger{font-size:12px}
.telegram-section{margin:24px 0;padding:22px;border:1px solid #ddcda8;border-radius:14px;background:#faf6ed}.telegram-section h2{font:26px Georgia,serif;margin:8px 0 14px}.telegram-section p{overflow-wrap:anywhere}.telegram-section .telegram-note{color:#756a58;font-size:12px;line-height:1.6;margin:18px 0 0}#telegram-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}#telegram-controls>p{flex-basis:100%;margin:0 0 8px}#telegram-controls button,.telegram-open{min-height:44px}.telegram-open{display:inline-flex;align-items:center;background:#826625;color:white;border-radius:6px;text-decoration:none;padding:12px 18px}#telegram-message{color:#a34639}#telegram-status{font-weight:600}@media(max-width:600px){.telegram-section{padding:16px}#telegram-controls button,.telegram-open{width:100%;justify-content:center}}
.offer-dialog{width:min(880px,94vw);max-height:90vh;overflow:auto}.offer-line{margin:18px 0;padding:18px;border:1px solid #ded3bb;border-radius:12px}.offer-line legend{font-weight:600;max-width:100%}.offer-line label,.offer-dialog form>label{display:block;margin:10px 0}.offer-line input,.offer-line select,.offer-dialog textarea{max-width:100%;width:100%;box-sizing:border-box}.offer-line .offer-confirm{display:flex;align-items:center;gap:10px}.offer-confirm input{width:auto}.offer-summary{padding-left:22px}.offer-summary li{margin:14px 0}.offer-total{font-size:22px;font-weight:700}.offer-success{color:#356344}.offer-dialog [hidden]{display:none!important}
.product-table th:nth-child(6){width:140px}.import-preview strong{white-space:normal;text-align:right}.offer-line select{min-width:0}.offer-line legend{overflow-wrap:anywhere}
.telegram-invitation{display:flex;align-items:flex-start;gap:24px;flex-basis:100%;min-width:0;padding:18px;background:#fff;border:1px solid var(--line);border-radius:10px}.telegram-invitation-details{flex:1;min-width:0}.telegram-invitation label{display:block;font-weight:600;margin-bottom:8px}.telegram-invitation input{width:100%;min-width:0;box-sizing:border-box;font-size:14px;margin:0 0 14px}.telegram-invitation-actions{display:flex;flex-wrap:wrap;gap:10px}.telegram-invitation-note{font-size:13px;line-height:1.6;margin:14px 0 0;color:#665d4f}.telegram-qr{flex:0 0 196px;width:196px;margin:0;text-align:center}.telegram-qr svg{display:block;width:196px;height:196px;background:white}.telegram-qr figcaption{font-size:12px;line-height:1.5;margin-top:6px;color:#665d4f}@media(max-width:600px){.telegram-invitation{flex-direction:column;padding:14px;gap:18px}.telegram-invitation-details{width:100%}.telegram-invitation-actions{flex-direction:column}.telegram-qr{flex-basis:auto;align-self:center}}

/* Collapsible buyer requests and compact product rows. */
.purchase-section{border:1px solid var(--line);border-radius:16px;padding:0;background:#fff;overflow:hidden}
.purchase-heading,.purchase-summary{display:flex;align-items:center;gap:14px;cursor:pointer;list-style:none}
.purchase-heading::-webkit-details-marker,.purchase-summary::-webkit-details-marker{display:none}
.purchase-heading{padding:22px}.purchase-heading h2{margin:0;flex:1}
.purchase-count{background:#f2eee5;border-radius:20px;padding:4px 10px;font-size:14px;font-weight:600}
.purchase-chevron{width:8px;height:8px;border-right:2px solid #877954;border-bottom:2px solid #877954;transform:rotate(45deg);flex:none;margin:0 4px 4px 6px;transition:transform .15s}
[open]>.purchase-heading .purchase-chevron,[open]>.purchase-summary .purchase-chevron{transform:rotate(225deg);margin-bottom:0}
.purchase-heading:focus-visible,.purchase-summary:focus-visible{outline:2px solid var(--gold);outline-offset:-4px}
.purchase-section-body{padding:0 22px 22px}#refresh-purchases{margin-bottom:16px}
.purchase-request{border:1px solid var(--line);border-radius:12px;margin-top:12px;overflow:hidden}
.purchase-summary{padding:18px;background:#fcfbf8}.purchase-summary>div{flex:1;min-width:0}.purchase-summary strong{font-size:17px}
.purchase-meta{display:block;color:#756f65;font-size:13px;margin-top:6px;line-height:1.5}
.purchase-badge{font-size:12px;padding:5px 9px;border-radius:20px;background:#eeeae4;color:#6c6355;white-space:nowrap}.purchase-badge.is-open{background:#eaf2e8;color:#356344}
.purchase-body{padding:0 18px 18px;border-top:1px solid var(--line)}.purchase-info{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px;color:#756f65;padding:16px 0}
.purchase-product{display:grid;grid-template-columns:68px minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px 0;border-top:1px solid #eeeae2}
.purchase-photo{width:68px;height:76px;position:relative;background:#f7f5ef;border-radius:8px;overflow:hidden}
.purchase-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff}
.purchase-photo-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;font:10px Georgia;color:#a09274}.purchase-photo-fallback small{font:9px Arial;margin-top:6px}
.purchase-product-name{font-size:15px;line-height:1.5;overflow-wrap:anywhere}.purchase-product-name small{display:block;font-size:12px;color:#756f65;margin-top:4px}
.purchase-quantity{font-size:19px;white-space:nowrap}.purchase-quantity span{font-size:13px;font-weight:400;color:#756f65}
.purchase-totals{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:14px;color:#756f65;font-size:13px}.purchase-totals span{color:#302b23;font-weight:600}
.purchase-customer{font-size:14px;margin-top:22px}.purchase-comment{padding:12px 14px;border-radius:8px;background:#faf6ed;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}
.purchase-actions{margin:18px 0 12px}.purchase-body .footnote{margin-bottom:0;max-width:680px}.purchase-empty{color:#756f65;padding:16px 0}
@media(max-width:600px){.purchase-heading{padding:18px 14px;gap:8px}.purchase-heading h2{font-size:21px}.purchase-section-body{padding:0 12px 14px}.purchase-summary{padding:14px 12px;gap:8px}.purchase-summary strong{font-size:15px}.purchase-body{padding:0 12px 14px}.purchase-product{grid-template-columns:52px minmax(0,1fr) auto;gap:10px}.purchase-photo{width:52px;height:64px}.purchase-product-name{font-size:14px}.purchase-quantity{font-size:17px}.purchase-actions button{width:100%}.purchase-meta{font-size:12px}}

.offer-dialog label.offer-confirm{display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:12px 0;line-height:1.5}
.offer-dialog .offer-confirm input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;margin:3px 0 0;padding:0}
.offer-dialog .offer-confirm>span{flex:1;min-width:0}

/* Partner price list: five compact columns, stacked editing on narrow screens. */
.price-section .product-table{width:100%;min-width:0;table-layout:fixed;font-size:13px}
.price-section .product-table th,.price-section .product-table td{padding:8px;white-space:normal;overflow-wrap:anywhere}
.price-section .product-table thead th:nth-child(1){width:64px}
.price-section .product-table thead th:nth-child(2){width:auto}
.price-section .product-table thead th:nth-child(3){width:120px}
.price-section .product-table thead th:nth-child(4),.price-section .product-table thead th:nth-child(5){width:106px}
.price-section .product-table input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:7px 8px;font-size:13px}
.price-section .product-table .product-group th,.price-section .product-table .product-subgroup th{padding:9px 10px}
.price-section .price-product-name{line-height:1.4}.price-section .price-product-name strong{font-weight:500}
.price-section .filters>*{min-width:0}.price-section .filters input,.price-section .filters select{min-width:0;max-width:100%}
@media(max-width:700px){
.price-section .product-table,.price-section .product-table tbody{display:block}
.price-section .product-table thead{display:none}
.price-section .product-table tr{display:block}
.price-section .product-table .partner-price-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 12px;padding:12px 4px;border-bottom:1px solid var(--line)}
.price-section .product-table td{display:block;border:0;padding:0;width:auto!important}
.price-section .product-table td.price-product-name{grid-column:1 / -1;grid-row:1;font-size:14px}
.price-section .product-table td[data-label]::before{content:attr(data-label);display:block;color:#756f65;font-size:11px;margin-bottom:3px}
.price-section .product-table td[data-label="Код"],.price-section .product-table td[data-label="Штрихкод"]{font-size:12px;color:#756f65}
.price-section .product-table input{font-size:16px;min-height:38px}
.price-section .product-table .product-group th,.price-section .product-table .product-subgroup th{display:block;width:auto}
.price-section .filters{flex-direction:column;align-items:stretch}.price-section .filters>label{width:100%}
}

.discussion-thread{display:grid;gap:10px;margin:18px 0;max-height:40vh;overflow:auto}.discussion-message{border:1px solid #e4dac3;border-radius:10px;padding:12px;background:#fff;overflow-wrap:anywhere}.discussion-message.buyer{background:#f7f1e4}.discussion-message small{display:block;color:#756f65;font-size:12px;margin-top:4px}.discussion-message p{white-space:pre-wrap;font-size:14px;margin:8px 0 0}.offer-versions{margin:16px 0;padding:12px;border:1px solid #e4dac3;border-radius:10px}.offer-versions summary{cursor:pointer}.offer-version{font-size:13px;color:#756f65}.discussion-form fieldset{border:1px solid #e4dac3;border-radius:10px;padding:12px}.discussion-form .discussion-check{display:flex;align-items:flex-start;gap:10px;margin:12px 0;line-height:1.4}.discussion-check input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:2px 0 0;padding:0}.discussion-form textarea,.partner-reply textarea{box-sizing:border-box;width:100%;max-width:100%;font:inherit;padding:10px;resize:vertical}.discussion-form>label,.partner-reply label{display:block;margin:14px 0}.discussion-form button[type=submit],.discuss-offer{width:100%;margin:12px 0}.discussion-dialog{max-width:620px}.offer-dialog .offer-versions h2{font-size:20px}.contact-label{font-weight:600;margin:8px 0 0}

.request-clock{display:flex;flex-direction:column;gap:5px;padding:12px 14px;margin:12px 0;background:#edf2eb;border:1px solid #d5dfd0;border-radius:10px;color:#36503a;line-height:1.4;min-width:0;grid-column:1 / -1}
.request-clock .request-clock-value{font:600 16px Arial,sans-serif;font-variant-numeric:tabular-nums}.request-clock small{display:block;font-size:11px;font-weight:400;white-space:normal;overflow-wrap:anywhere}.request-clock .request-clock-rule{color:#68695e}.request-clock.is-warning{background:#fff4d9;border-color:#e8cd88;color:#785514}.request-clock.is-urgent{background:#fff0eb;border-color:#e4ad99;color:#973f27}.request-clock.is-expired{background:#f0eeea;border-color:#ddd8cf;color:#756f65}.request-summary .request-clock{margin:8px 0 0}.purchase-summary{align-items:flex-start}.purchase-summary>.purchase-badge{margin-top:2px}.purchase-summary>.purchase-chevron{margin-top:6px}.repeat-request{margin-top:18px}.discussion-dialog .request-clock{margin:12px 0}
.purchase-summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start}
.purchase-summary>div{display:contents}.purchase-summary>div>strong{grid-column:1;grid-row:1}.purchase-summary>.purchase-badge{grid-column:2;grid-row:1}.purchase-summary>.purchase-chevron{grid-column:3;grid-row:1}
.purchase-summary .purchase-meta{grid-column:1 / -1;margin:0}.purchase-summary .request-clock{grid-column:1 / -1;margin:0}

/* Compact parcel measurements in the CDEK offer form. */
.offer-dialog .parcel-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.offer-dialog .parcel-grid label{min-width:0;font-size:13px}.offer-dialog .parcel-grid input{width:100%;min-width:0;padding:10px 8px;box-sizing:border-box}@media(max-width:480px){.offer-dialog .parcel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.request-clock{display:block!important;width:auto!important;padding:2px 0!important;margin:5px 0!important;border:0!important;background:transparent!important;box-shadow:none!important}.request-clock .request-clock-value{font-size:13px!important;font-weight:500!important;line-height:1.4}.request-summary,.purchase-summary{position:relative;padding-right:48px!important}.request-delete{position:absolute;right:8px;top:8px;width:32px;height:32px;padding:0!important;border:0;background:transparent;font-size:24px;color:#867c69;line-height:1;cursor:pointer}.purchase-history{margin-top:20px}.purchase-history>summary{padding:12px;cursor:pointer;font-weight:600}

/* Keep mobile form focus at the normal reading scale. */
@media(max-width:760px){
 main{padding-left:14px;padding-right:14px}
 body input,body select,body textarea{font-size:16px!important}
 #profile,#card>.block,.edit-grid>label{min-width:0}
 .block a{max-width:100%;overflow-wrap:anywhere}
}
