:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-soft: #eef6f5;
    --accent: #99b8b4;
    --danger: #b42318;
    --danger-dark: #912018;
    --success: #15803d;
    --success-dark: #166534;
    --warning-bg: #fdf6ec;
    --warning-text: #8a4b08;
    --bg: #f6f7f8;
    --surface: #ffffff;
    --text: #24303a;
    --muted: #64707a;
    --border: #e1e5e9;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(20, 30, 40, 0.07);
    --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12px;
}

/* шапка */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.logo:hover {
    text-decoration: none;
}

.search-box {
    flex: 1 1 320px;
    display: flex;
    gap: 8px;
    max-width: 620px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-label {
    font-size: 14px;
    color: var(--muted);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}



.link-btn:hover {
    text-decoration: underline;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* выпадающая панель уведомлений */

.dropdown {
    position: absolute;
    top: 100%;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.dropdown-body {
    max-height: 380px;
    overflow-y: auto;
}

.notification {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.notification:last-child {
    border-bottom: none;
}

.notification:hover {
    background: #f7f9fc;
    text-decoration: none;
}

.notification.unread {
    background: var(--primary-soft);
}

/* макет */

.layout {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
}

.content {
    min-width: 0;
}

.tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 10px 2px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 600;
}

.tab:hover {
    color: var(--primary);
    text-decoration: none;
}

.tab.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}

/* элементы формы */

.field {
    display: block;
    margin-bottom: 12px;
}

.field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.field-error {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.35;
}

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

.input-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(224, 31, 79, 0.12);
}

.consent-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.consent-field input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--primary);
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.14);
}

textarea {
    resize: vertical;
}

/* кнопки */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--primary-soft);
    border-color: var(--accent);
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-wide {
    width: 100%;
    margin-top: 16px;
}

.btn-sm {
    padding: 7px 10px;
    font-size: 12px;
}

.detail-actions {
    margin-top: 16px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.icon-btn:hover {
    background: #f2f5fa;
}

.icon-btn.danger {
    color: var(--danger);
    border-color: transparent;
    background: transparent;
}

.icon-btn.danger:hover {
    background: #fde8ee;
}

/* каталог */

.filter-bar {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.filter-bar-head span {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.filter-grid .field {
    margin: 0;
}

.catalog-head,
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.catalog-head h2,
.section-head h2 {
    margin: 0;
    font-size: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: #c6ced5;
}

.product-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background: #f1f3f5;
    overflow: hidden;
}

.photo-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(13, 27, 42, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    color: var(--muted);
    font-size: 13px;
    background: repeating-linear-gradient(45deg, #f1f3f5, #f1f3f5 12px, #e9ecef 12px, #e9ecef 24px);
}

.product-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.product-body h3 a {
    color: var(--text);
}

.product-body h3 a:hover {
    color: var(--primary);
    text-decoration: none;
}

.composition {
    font-size: 12px;
    color: var(--muted);
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.price {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.stock {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}

.stock-in {
    background: #e6f7ee;
    color: var(--success-dark);
}

.stock-out {
    background: #fde8ee;
    color: var(--danger);
}

.row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-actions {
    margin-top: 8px;
}

.card-actions .btn {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 13px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 48px 20px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.empty-state p {
    margin: 0 0 14px;
    color: var(--muted);
}

/* карточка товара */

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-media {
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f8;
}

.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.detail-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    overflow: hidden;
    background: #eef2f8;
    cursor: pointer;
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-thumb:hover {
    border-color: #b9c6d8;
}

.detail-thumb.active {
    border-color: var(--primary);
}

.detail-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.detail-info h1 {
    margin: 6px 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.detail-price {
    margin: 14px 0 8px;
    font-size: 30px;
    font-weight: 800;
}

.specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
    padding: 0;
}

.specs div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f7f9fc;
    border-radius: 10px;
}

.specs dt {
    color: var(--muted);
    font-size: 13px;
}

.specs dd {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
    text-align: right;
}

.info-block {
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.info-block h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.info-block p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* корзина */

.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cart-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.cart-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.cart-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cart-thumb {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef2f8;
}

.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-info h3 {
    margin: 0 0 3px;
    font-size: 16px;
}

.cart-info h3 a {
    color: var(--text);
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    width: 34px;
    height: 36px;
    border: none;
    background: #f4f6fa;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
}

.qty-btn:hover:not(:disabled) {
    background: #e8edf5;
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-input {
    width: 54px;
    height: 36px;
    padding: 0;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    text-align: center;
    font-weight: 600;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.cart-line-total {
    min-width: 96px;
    text-align: right;
    font-weight: 700;
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cart-summary .price {
    margin-top: 2px;
}

.cart-summary .btn {
    min-width: 220px;
}

.warning {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--warning-bg);
    color: var(--warning-text);
    font-size: 13px;
    line-height: 1.35;
}

/* заказы */

.order-filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.order-filters .field {
    margin: 0;
    min-width: 170px;
}

.order-card {
    padding: 18px;
}

.order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.order-number {
    font-weight: 700;
    font-size: 16px;
}

.order-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.order-details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.order-details h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.order-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.order-item:last-of-type {
    border-bottom: none;
}

.order-item-main a {
    font-weight: 600;
}

.order-item-price {
    text-align: right;
    white-space: nowrap;
}

.order-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 17px;
}

.status {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-select {
    width: auto;
    min-width: 170px;
    padding: 8px 10px;
}

.status-accepted {
    background: #e8f0ff;
    color: var(--primary-dark);
}

.status-progress {
    background: #fff3d6;
    color: #805600;
}

.status-assembled {
    background: #ede8ff;
    color: #4b2fb3;
}

.status-ready {
    background: #e6f7ee;
    color: var(--success-dark);
}

.status-cancelled {
    background: #fde8ee;
    color: var(--danger);
}

/* админ-панель */

.admin-panel {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-head h2 {
    margin: 0;
    font-size: 18px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0 16px;
}

.field-wide {
    grid-column: span 2;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}

.user-card-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.user-card-main strong {
    margin-right: 8px;
}

.user-card-main .muted {
    overflow-wrap: anywhere;
}

.role-badge {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.photo-upload {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.photo-upload > span {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.photo-upload input[type="file"] {
    width: auto;
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px;
}

.photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.photo-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #eef2f8;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .icon-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.main-photo-badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(13, 27, 42, 0.72);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

/* модальные окна */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 15, 40, 0.62);
    backdrop-filter: blur(4px);
}

.modal-card {
    width: 400px;
    max-width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 22px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(9, 22, 40, 0.25);
}

.modal-small {
    width: 420px;
}

.modal-order {
    width: 580px;
}

.confirm-order-items {
    max-height: 42vh;
    overflow-y: auto;
    margin: 12px 0 0;
    padding-right: 4px;
}

.confirm-order-actions {
    margin-top: 16px;
}

.confirm-order-actions .btn {
    flex: 1 1 180px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-head h2 {
    margin: 0;
    font-size: 20px;
}

.notice {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
}

.form .btn {
    width: 100%;
}

.switch-text {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.demo-access {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.demo-access .row {
    margin-top: 6px;
    gap: 14px;
}

/* уведомления */

.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    padding: 12px 16px;
    border-radius: 10px;
    background: #16243a;
    color: #fff;
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: toast-in 0.2s ease-out;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

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

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 24px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* адаптивность */

@media (max-width: 1000px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .detail-media {
        height: 320px;
    }
}

@media (max-width: 900px) {
    .topbar-inner {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 760px) {
    .topbar-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .search-box {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .topbar-actions {
        gap: 8px;
    }

    .user-label {
        max-width: 120px;
    }

    .layout {
        padding: 0 16px;
        margin: 16px auto;
    }

    .cart-item {
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: start;
    }

    .cart-thumb {
        width: 64px;
        height: 64px;
    }

    .cart-line-total {
        text-align: left;
    }

    .qty {
        grid-column: 2;
    }

    .cart-side {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cart-item .icon-btn.danger {
        grid-column: 2;
        justify-self: start;
    }

    .order-foot,
    .cart-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-summary .btn {
        width: 100%;
    }

    .status-select {
        width: 100%;
    }

    .user-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-head {
        flex-direction: column;
    }

    .field-wide {
        grid-column: span 1;
    }

    .dropdown {
        right: 16px;
    }
}

/* узкие экраны */

@media (max-width: 760px) {
    .tabs {
        gap: 14px;
        overflow-x: auto;
    }

    .tab {
        flex: 0 0 auto;
    }

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

    .footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 16px;
    }
}
