.dash-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 44px; padding-block: 36px 80px; }
.dash-sidebar { position: sticky; top: 110px; align-self: start; border: 1px solid #e7e7e7; border-radius: 24px; padding: 26px 16px; }
.dash-sidebar > .eyebrow { font-size: 9px; margin: 0 12px 26px; }
.dash-sidebar nav { display: grid; gap: 6px; }
.dash-sidebar nav a { padding: 16px 12px; display: flex; align-items: center; gap: 12px; border-radius: 14px; font-size: 13px; }
.dash-sidebar nav a:hover { background: #f6f6f6; }
.dash-sidebar nav a[aria-current] { background: #111; color: #fff; }
.dash-nav-index { font-size: 9px; opacity: .5; }
.dash-nav-arrow { margin-left: auto; }
.dash-owner { display: grid; gap: 12px; margin: 30px 12px 0; padding-top: 22px; border-top: 1px solid #eee; font-size: 11px; overflow-wrap: anywhere; }
.dash-owner > span { color: #777; }
.dash-owner strong { font-weight: 500; }
.dash-content { min-width: 0; }
.dash-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 10px 0 28px; }
.dash-header .eyebrow { font-size: 9px; margin-bottom: 16px; }
.dash-header h1 { font-size: clamp(27px,3vw,42px); letter-spacing: -.04em; }
.dash-header .button { flex-shrink: 0; }
.dash-notice { display: flex; align-items: center; gap: 18px; padding: 16px 20px; background: #f7f7f7; border-radius: 16px; margin-bottom: 28px; font-size: 11px; }
.dash-notice span { font-weight: 600; white-space: nowrap; }
.dash-notice p { color: #777; line-height: 1.6; }
.dash-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 28px; }
.dash-metric { display: flex; flex-direction: column; gap: 18px; padding: 24px 20px; border: 1px solid #e6e6e6; border-radius: 20px; min-width: 0; }
.dash-metric span, .dash-metric small { color: #777; font-size: 11px; line-height: 1.6; }
.dash-metric strong { font-size: clamp(22px,2.4vw,34px); font-weight: 500; overflow-wrap: anywhere; }
.dash-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.dash-panel { border: 1px solid #e6e6e6; border-radius: 22px; padding: 24px; margin-bottom: 24px; min-width: 0; }
.dash-panel-heading { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.dash-panel h2 { font-size: 20px; }
.dash-panel-heading .text-link { font-size: 11px; white-space: nowrap; }
.dash-attention a, .dash-categories > div { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid #eee; font-size: 12px; line-height: 1.6; }
.dash-attention strong { white-space: nowrap; }
.dash-table-scroll { overflow-x: auto; max-width: 100%; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.dash-table th { font-weight: 400; color: #888; font-size: 10px; padding: 14px 12px; border-bottom: 1px solid #ddd; white-space: nowrap; }
.dash-table td { padding: 20px 12px; border-bottom: 1px solid #eee; line-height: 1.65; overflow-wrap: anywhere; }
.dash-table td:first-child, .dash-table th:first-child { padding-left: 0; }
.dash-table small { display: block; color: #888; font-size: 10px; margin-top: 6px; }
.dash-table a:hover { text-decoration: underline; }
.dash-table strong { font-weight: 500; }
.dash-empty { padding: 42px 16px; color: #888; font-size: 13px; text-align: center; line-height: 1.8; }
.dash-product { display: flex; align-items: center; gap: 16px; min-width: 210px; }
.dash-product img { width: 65px; height: 65px; object-fit: contain; }
.dash-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 24px 0; }
.dash-filters .form-field { flex: 1 1 200px; margin: 0; }
.dash-filters select { border: 1px solid #ddd; padding: 14px; height: 50px; border-radius: 14px; background: white; font: inherit; width: 100%; }
.dash-filters > .text-link { padding-bottom: 17px; font-size: 12px; }
.dash-period { display: flex; gap: 8px; margin-bottom: 16px; }
.dash-period a { border: 1px solid #e5e5e5; padding: 12px 22px; border-radius: 30px; font-size: 12px; }
.dash-period .selected { background: #111; color: white; border-color: #111; }
.dash-statuses > div { display: grid; grid-template-columns: 110px 1fr 24px; align-items: center; gap: 14px; margin: 18px 0; font-size: 12px; }
.dash-statuses meter { width: 100%; height: 10px; }
.dash-statuses meter::-webkit-meter-bar { background: #f0f0f0; border: none; }
.dash-statuses meter::-webkit-meter-optimum-value { background: #222; }
.dash-system > div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid #eee; font-size: 13px; line-height: 1.7; }
.dash-system dt { color: #777; }
.dash-system dd { margin: 0; overflow-wrap: anywhere; }
.dash-system small { display: block; color: #888; }
.dash-updated { color: #999; font-size: 10px; text-align: right; margin-top: 24px; }
.dash-content > .admin-page { width: 100%; padding: 0; }
.dash-content > .admin-page > .breadcrumbs, .dash-content > .admin-page > .page-heading, .dash-content > .admin-page > .form-note { display: none; }
.dash-content .admin-stats { margin-top: 0; }
@media(max-width:1100px) { .dash-layout { grid-template-columns: 190px minmax(0,1fr); gap: 24px; } .dash-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .dash-columns { grid-template-columns: 1fr; gap: 0; } }
@media(max-width:800px) { .dash-layout { display: block; padding-top: 20px; } .dash-sidebar { position: static; padding: 14px; margin-bottom: 28px; } .dash-sidebar nav { grid-template-columns: repeat(3,minmax(0,1fr)); } .dash-sidebar nav a { justify-content: center; padding: 13px 6px; font-size: 11px; } .dash-nav-index,.dash-nav-arrow,.dash-owner,.dash-sidebar>.eyebrow { display:none; } .dash-header { flex-wrap: wrap; } .dash-notice { flex-direction: column; align-items: start; gap: 6px; } .dash-system > div { grid-template-columns: 1fr; gap: 6px; } }
@media(max-width:400px) { .dash-sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); } .dash-metric { padding: 18px 14px; } .dash-panel { padding: 18px; } .dash-panel-heading { flex-wrap: wrap; } .dash-statuses > div { grid-template-columns: 95px 1fr 20px; gap: 8px; } .dash-period a { padding: 12px 16px; } }

.dash-product-actions { display:flex; justify-content:flex-end; margin-bottom:24px; }
html.editor-open { overflow:hidden; }
.product-editor { width:min(900px,calc(100% - 32px)); max-height:90dvh; border:1px solid #ddd; border-radius:24px; padding:32px; color:#111; background:#fff; }
.product-editor::backdrop { background:rgb(0 0 0 / 20%); backdrop-filter:blur(6px); }
.editor-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:24px; }
.editor-heading h2 { margin:6px 0; font-size:28px; }
.product-editor fieldset { border:0; padding:0; margin:0; min-width:0; }
.editor-fields { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.product-editor .form-field { margin-bottom:16px; min-width:0; }
.product-editor input,.product-editor select,.product-editor textarea { width:100%; min-width:0; border:1px solid #ddd; border-radius:12px; padding:12px; background:#fff; color:#111; font:inherit; }
.product-editor textarea { resize:vertical; }
.editor-section { margin-top:28px; padding-top:22px; border-top:1px solid #eee; }
.editor-size-head,.editor-size-row { display:grid; grid-template-columns:1fr 80px; gap:12px; margin:10px 0; align-items:center; }
.editor-size-head { color:#777; font-size:12px; }
.editor-sizes { margin-bottom:18px; }
.editor-photos { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:18px 0; }
.editor-photo { display:flex; flex-direction:column; gap:10px; padding:12px; border:1px solid #eee; border-radius:16px; font-size:12px; }
.editor-photo img { width:100%; height:130px; object-fit:contain; }
.editor-photo button { text-align:left; font-size:12px; }
.editor-footer { display:flex; align-items:center; gap:20px; margin-top:28px; }
.product-editor button:disabled { opacity:.45; cursor:default; }
.product-gallery { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.product-gallery button { width:70px; height:70px; border:1px solid #ddd; border-radius:12px; background:white; padding:4px; }
.product-gallery img { width:100%; height:100%; object-fit:contain; transform:none; }
.size-button:disabled { opacity:.3; text-decoration:line-through; cursor:not-allowed; }
@media(max-width:600px) { .product-editor { padding:18px; border-radius:18px; } .editor-fields { grid-template-columns:1fr; gap:0; } .editor-heading h2 { font-size:22px; } .editor-heading { align-items:flex-start; } .editor-heading .button { padding:10px; min-width:0; } .editor-photos { grid-template-columns:repeat(2,minmax(0,1fr)); } .editor-size-row,.editor-size-head { grid-template-columns:minmax(0,1fr) 60px; gap:8px; } .editor-footer { flex-direction:column; align-items:stretch; } }

.detail-art:has(.product-gallery:not(:empty)), #product-dialog .detail-art:has(.product-gallery:not(:empty)) { flex-direction:column; justify-content:center; padding-bottom:125px; }
.detail-art > .product-gallery:not(:empty) { position:absolute; z-index:3; left:12px; right:12px; bottom:30px; justify-content:center; margin:0; }
.detail-art > .product-gallery img { max-height:60px; }
.detail-art:has(.product-gallery:not(:empty))::after, #product-dialog .detail-art:has(.product-gallery:not(:empty))::after { bottom:120px; }
@media(max-width:600px) { #product-dialog .detail-art:has(.product-gallery:not(:empty)) { min-height:340px; } .product-gallery button { width:52px; height:52px; } }

.product-row-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; min-width:190px; }

@media(max-width:600px) {
 .dash-table:has(.dash-product), .dash-table:has(.dash-product) tbody { display:block; width:100%; min-width:0; }
 .dash-table:has(.dash-product) thead { display:none; }
 .dash-table:has(.dash-product) tr { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:20px 0; border-bottom:1px solid #eee; }
 .dash-table:has(.dash-product) td { padding:0; border:0; min-width:0; overflow-wrap:normal; }
 .dash-table:has(.dash-product) td:first-child, .dash-table:has(.dash-product) td:last-child { grid-column:1 / -1; }
 .dash-table:has(.dash-product) td:nth-child(2)::before { content:'Раздел'; }
 .dash-table:has(.dash-product) td:nth-child(3)::before { content:'Цена'; }
 .dash-table:has(.dash-product) td:nth-child(4)::before { content:'Размеры'; }
 .dash-table:has(.dash-product) td:nth-child(5)::before { content:'Статус'; }
 .dash-table:has(.dash-product) td::before { display:block; color:#777; font-size:11px; margin-bottom:5px; }
 .product-row-actions { min-width:0; padding-top:8px; }
}

/* Thumbnails occupy their own row instead of overlaying the photograph. */
.detail-art:has(.product-gallery:not(:empty)), #product-dialog .detail-art:has(.product-gallery:not(:empty)) { display:flex; flex-direction:column; justify-content:flex-start; padding-bottom:45px; }
.detail-art > .product-gallery:not(:empty) { position:static; flex-shrink:0; width:100%; margin:38px 0 0; gap:10px; justify-content:center; }
.detail-art > img { cursor:zoom-in; flex-shrink:0; }
.detail-art > img:focus-visible { outline:2px solid #111; outline-offset:5px; border-radius:12px; }
.detail-art:has(.product-gallery:not(:empty))::after, #product-dialog .detail-art:has(.product-gallery:not(:empty))::after { display:none; }
#photo-viewer { width:calc(100vw - 32px); height:calc(100dvh - 32px); max-width:1400px; max-height:none; margin:auto; padding:0; border:1px solid #ddd; border-radius:20px; background:#f7f7f7; overflow:hidden; }
#photo-viewer[open] { display:flex; flex-direction:column; }
#photo-viewer::backdrop { background:#0008; backdrop-filter:blur(6px); }
.photo-tools { display:flex; align-items:center; justify-content:center; gap:12px; padding:12px; background:#fff; z-index:1; }
.photo-tools button { min-width:44px; min-height:44px; padding:8px 14px; border:1px solid #ddd; border-radius:12px; background:#fff; }
.photo-tools output { min-width:52px; text-align:center; font-size:13px; }
.photo-tools [data-zoom="close"] { margin-left:auto; }
.photo-stage { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; overflow:hidden; touch-action:none; cursor:grab; }
.photo-stage:active { cursor:grabbing; }
.photo-stage img { width:100%; height:100%; object-fit:contain; user-select:none; pointer-events:none; }
.photo-help { margin:0; padding:12px; text-align:center; font-size:12px; color:#666; }
@media(max-width:600px) { .detail-art > .product-gallery:not(:empty) { margin-top:30px; gap:8px; } #photo-viewer { width:100vw; height:100dvh; max-width:100vw; border-radius:0; border:0; } .photo-tools { gap:6px; padding:8px; } .photo-help { font-size:10px; } }

/* Square catalog crops; keep original photographs in the product gallery. */
.product-card[data-category="sneakers"] .product-image-link:has(.supplier-lifestyle) { padding:0; aspect-ratio:1 / 1; overflow:hidden; border-radius:22px; }
.product-image-link .supplier-lifestyle, .product-image-link:hover .supplier-lifestyle { width:100%; height:100%; max-width:none; max-height:none; object-fit:cover; object-position:center bottom; transform:none; filter:none; }
#product-dialog .detail-art > .supplier-lifestyle { width:100%; height:auto; max-height:440px; object-fit:contain; transform:none; filter:none; border-radius:18px; }
@media(max-width:600px) { #product-dialog .detail-art > .supplier-lifestyle { max-height:340px; } }
