﻿:root {
    --bg: #f5efe5;
    --bg-soft: #fbf8f2;
    --light: #f8fafc;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --line: rgba(31, 41, 51, 0.12);
    --primary: #c96f32;
    --primary-deep: #8c4a22;
    --accent: #1e847f;
    --success: #1f9d73;
    --warning: #d59524;
    --danger: #c23a2b;
    --shadow: 0 20px 50px rgba(57, 35, 14, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

body.admin-page .order-edit-state {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(30, 132, 127, 0.2);
    border-radius: 16px;
    background: rgba(30, 132, 127, 0.08);
}

body.admin-page .order-edit-copy {
    display: grid;
    gap: 6px;
}

body.admin-page .order-edit-copy strong {
    font-size: 1rem;
}

body.admin-page .order-edit-copy p {
    margin: 0;
    color: var(--muted);
}

body.admin-page .order-edit-badge {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page .order-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

body.admin-page .order-form-actions .btn-primary {
    flex: 1 1 220px;
}

body.admin-page[data-page="orders"] .orders-create-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.admin-page[data-page="orders"] .order-form-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

body.admin-page[data-page="orders"] .order-form-modal-shell[hidden] {
    display: none;
}

body.admin-page[data-page="orders"] .order-form-modal-shell.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.admin-page[data-page="orders"] .order-form-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(8px);
}

body.admin-page[data-page="orders"] .order-form-modal-panel {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 0;
    padding: 0;
    border-radius: 28px;
    transform: translateY(18px) scale(0.985);
    transition: transform 0.22s ease;
}

body.admin-page[data-page="orders"] .order-form-modal-shell.is-open .order-form-modal-panel {
    transform: translateY(0) scale(1);
}

body.admin-page[data-page="orders"] .order-form-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 0;
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 252, 248, 0.92));
}

body.admin-page[data-page="orders"] .order-form-modal-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
}

body.admin-page[data-page="orders"] .order-reopen-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

body.admin-page[data-page="orders"] .order-reopen-modal-shell[hidden] {
    display: none;
}

body.admin-page[data-page="orders"] .order-reopen-modal-shell.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.admin-page[data-page="orders"] .order-reopen-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(8px);
}

body.admin-page[data-page="orders"] .order-reopen-modal-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    margin: 0;
    padding: 0;
    border-radius: 24px;
    transform: translateY(18px) scale(0.985);
    transition: transform 0.22s ease;
}

body.admin-page[data-page="orders"] .order-reopen-modal-shell.is-open .order-reopen-modal-panel {
    transform: translateY(0) scale(1);
}

body.admin-page[data-page="orders"] .order-reopen-modal-head,
body.admin-page[data-page="orders"] .order-reopen-modal-body {
    padding: 20px;
}

body.admin-page[data-page="orders"] .order-reopen-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 0;
}

body.admin-page[data-page="orders"] .order-reopen-modal-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
}

body.admin-page[data-page="orders"] .order-reopen-modal-body {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="orders"] #order-reopen-reason {
    width: 100%;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    line-height: 1.55;
    resize: vertical;
}

body.admin-page[data-page="orders"] .order-reopen-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.admin-page[data-page="orders"] #order-form-card {
    margin: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

body.admin-page.order-form-modal-open {
    overflow: hidden;
}

body.admin-page .btn-secondary {
    border: 1px solid rgba(31, 41, 51, 0.12);
    border-radius: 14px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font-weight: 700;
}

body.admin-page .item-row-preview {
    align-items: flex-start;
}

body.admin-page .item-row-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

body.admin-page .item-inline-field {
    display: grid;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--muted);
}

body.admin-page .item-inline-field input,
body.admin-page .item-inline-field select {
    min-width: 110px;
    border: 1px solid rgba(31, 41, 51, 0.12);
    border-radius: 12px;
    padding: 9px 12px;
    background: #fff;
    color: var(--text);
}

body.admin-page .item-inline-field input {
    width: 96px;
}

body.admin-page .item-total-row {
    border: 1px dashed rgba(31, 41, 51, 0.12);
    background: rgba(31, 41, 51, 0.04);
}

@media (max-width: 720px) {
    body.admin-page .order-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page .item-row-preview {
        flex-direction: column;
    }

    body.admin-page .item-row-actions {
        width: 100%;
        align-items: stretch;
    }

    body.admin-page .item-inline-field input,
    body.admin-page .item-inline-field select {
      width: 100%;
      }
  }

@media (max-width: 768px) {
    body.admin-page[data-page="orders"] .order-form-modal-shell {
        align-items: end;
        padding: 0;
    }

    body.admin-page[data-page="orders"] .order-form-modal-panel {
        width: 100%;
        max-height: min(100vh, 100dvh);
        border-radius: 26px 26px 0 0;
        transform: translateY(100%);
    }

    body.admin-page[data-page="orders"] .order-form-modal-shell.is-open .order-form-modal-panel {
        transform: translateY(0);
    }

    body.admin-page[data-page="orders"] .order-form-modal-head {
        padding: 18px 16px 0;
    }

    body.admin-page[data-page="orders"] .order-reopen-modal-shell {
        align-items: end;
        padding: 0;
    }

    body.admin-page[data-page="orders"] .order-reopen-modal-panel {
        width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    body.admin-page[data-page="orders"] .order-reopen-modal-shell.is-open .order-reopen-modal-panel {
        transform: translateY(0);
    }

    body.admin-page[data-page="orders"] .order-reopen-modal-actions {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Inter", "Noto Sans Myanmar", "Pyidaungsu", "Padauk", "Myanmar Text", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(201, 111, 50, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(30, 132, 127, 0.14), transparent 28%),
        linear-gradient(180deg, #f8f2e8 0%, #f3ecdf 40%, #f8f5ef 100%);
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container,
.admin-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(250, 245, 237, 0.82);
    border-bottom: 1px solid rgba(31, 41, 51, 0.08);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 11px;
}

.logo-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 18px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.08;
    justify-content: center;
    text-align: left;
}

.logo-main,
.logo-sub {
    display: block;
    margin: 0;
}

.logo-main {
    font-size: clamp(1.16rem, 2vw, 1.42rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1e293b;
}

.logo-sub {
    font-size: clamp(0.74rem, 1vw, 0.86rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f59e0b;
}

.wholesale-note-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
    min-width: 0;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 236, 219, 0.95));
    border: 1px solid rgba(201, 111, 50, 0.16);
    box-shadow: 0 12px 30px rgba(57, 35, 14, 0.08);
}

.wholesale-note-bar b {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-admin,
.btn,
.btn-add,
.btn-primary,
.filter-bar button,
.checkout,
.clear-cart,
.pagination button,
.icon-btn,
.modal button {
    border: none;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-admin,
.btn,
.btn-add,
.btn-primary,
.checkout {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 14px 28px rgba(140, 74, 34, 0.24);
}

.contact-admin:hover,
.btn:hover,
.btn-add:hover,
.btn-primary:hover,
.checkout:hover,
.clear-cart:hover,
.filter-bar button:hover,
.pagination button:hover,
.icon-btn:hover,
.modal button:hover {
    transform: translateY(-1px);
}

.contact-admin,
.btn,
.btn-add,
.checkout,
.clear-cart,
.filter-bar button {
    padding: 11px 18px;
    font-weight: 700;
}

.cart-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #105e5a);
    box-shadow: 0 14px 24px rgba(16, 94, 90, 0.22);
    cursor: pointer;
}

.cart-btn span {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-deep);
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

main.container {
    padding: 42px 0 80px;
}

.title {
    margin: 0 0 22px;
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.category-bar button {
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    border: 1px solid rgba(31, 41, 51, 0.08);
    box-shadow: 0 8px 18px rgba(57, 35, 14, 0.06);
}

.category-bar button.active {
    background: linear-gradient(135deg, var(--accent), #105e5a);
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.product {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
}

.product-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(201, 111, 50, 0.14), rgba(30, 132, 127, 0.1));
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.product-tag {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(30, 132, 127, 0.1);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product h4 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.45;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-stock {
    font-size: 0.88rem;
    font-weight: 700;
}

.product-stock.in {
    color: var(--success);
}

.product-stock.out {
    color: var(--danger);
}

.price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-deep);
}

.btn.btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.cart {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(31, 41, 51, 0.08);
    box-shadow: -18px 0 40px rgba(17, 24, 39, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 30;
}

.cart.active {
    transform: translateX(0);
}

.cart-head,
.cart-foot,
.cart-item,
.modal,
.card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.cart-head,
.cart-foot {
    border-radius: 22px;
    padding: 18px;
}

.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-head h3,
.modal h3 {
    margin: 0;
}

.cart-head i {
    cursor: pointer;
}

#cart-items {
        flex: 1 1 auto;
    min-height: 0;
    display: grid;
    gap: 14px;
        overflow-y: auto;
        padding-right: 4px;
}

.cart-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    padding: 14px;
    border-radius: 22px;
}

.cart-item img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 18px;
}

.cart-info {
    display: grid;
    gap: 8px;
}

.cart-info h5 {
    margin: 0;
    font-size: 1rem;
}

.qty-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px;
    border-radius: 999px;
    background: rgba(31, 41, 51, 0.06);
}

.qty-box button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #fff;
}

.subtotal,
.total,
.empty-cart,
.empty-products,
.empty-state {
    color: var(--muted);
}

.cart-foot {
        margin-top: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
        gap: 12px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.cart-foot::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: -18px;
    height: 24px;
    background: linear-gradient(180deg, rgba(250, 248, 244, 0), rgba(250, 248, 244, 0.9));
    pointer-events: none;
}

.total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
}

.clear-cart {
    background: rgba(31, 41, 51, 0.08);
    color: var(--text);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(31, 41, 51, 0.36);
    backdrop-filter: blur(8px);
    z-index: 40;
}

.modal {
    width: min(420px, 100%);
    display: grid;
    gap: 12px;
    padding: 24px;
    border-radius: 28px;
}

.checkout-modal textarea,
.checkout-modal input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(31, 41, 51, 0.12);
    border-radius: 14px;
    background: #fff;
}

.checkout-modal textarea {
    min-height: 96px;
    resize: vertical;
}

.checkout-helper {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.modal button {
    padding: 14px 18px;
    color: #fff;
}

.modal .tg {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.modal .vb {
    background: #7360f2;
}

.modal .ms {
    background: #0084ff;
}

.modal .cancel {
    background: rgba(31, 41, 51, 0.1);
    color: var(--text);
}

body.shop-page .platform-selection-modal {
    width: min(460px, 100%);
    gap: 14px;
    padding: 24px;
    border-radius: 24px;
}

body.shop-page #checkout-modal[hidden],
body.shop-page #platform-modal[hidden],
body.shop-page #order-preview-modal[hidden],
body.shop-page #order-preview-fallback-note[hidden],
body.shop-page #order-preview-copy-btn[hidden] {
    display: none;
}

body.shop-page .order-preview-modal {
    width: min(620px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}

body.shop-page .order-preview-text {
    margin: 0;
    max-height: min(48vh, 420px);
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(31, 41, 51, 0.12);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

body.shop-page .order-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.shop-page .order-preview-actions button {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
}

body.shop-page .order-preview-copy-btn {
    background: #e8f8ef;
    border: 1px solid #9dd8b5;
    color: #1f7a4d;
}

body.shop-page .order-preview-copy-btn:hover,
body.shop-page .order-preview-copy-btn:focus-visible {
    background: #d9f2e4;
}

body.shop-page .order-preview-edit-btn {
    background: #fff3e8;
    border: 1px solid #f3b178;
    color: #a94f12;
}

body.shop-page .order-preview-edit-btn:hover,
body.shop-page .order-preview-edit-btn:focus-visible {
    background: #ffe5cf;
    border-color: #eda15f;
    color: #8a3f0d;
}

body.shop-page .order-preview-close-btn {
    background: #eef1f5;
    border: 1px solid #d6dce5;
    color: #334155;
}

body.shop-page .order-preview-close-btn:hover,
body.shop-page .order-preview-close-btn:focus-visible {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.shop-page .order-preview-fallback-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #075985;
    font-size: 0.92rem;
    line-height: 1.55;
}

body.shop-page .platform-option-list {
    display: grid;
    gap: 10px;
}

body.shop-page .platform-fallback-note {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.18);
    color: #4c1d95;
    font-size: 0.92rem;
    line-height: 1.55;
}

body.shop-page .platform-fallback-note[hidden] {
    display: none;
}

body.shop-page .platform-option-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 58px;
    padding: 16px 20px;
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.shop-page .platform-option-btn:hover,
body.shop-page .platform-option-btn:focus-visible {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 22px 42px rgba(124, 58, 237, 0.32);
    filter: brightness(1.03);
}

body.shop-page .platform-option-btn.recommended {
    box-shadow: 0 18px 36px rgba(124, 58, 237, 0.28);
}

body.shop-page .platform-option-viber {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 52%, #a855f7 100%);
}

body.shop-page .platform-option-btn i {
    font-size: 1.2rem;
}

body.shop-page .platform-selection-actions {
    display: grid;
}

body.shop-page .checkout-info-box {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.16);
    color: #4c1d95;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.55;
}

@media (max-width: 520px) {
    body.shop-page .modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    body.shop-page .checkout-modal,
    body.shop-page .platform-selection-modal {
        width: 100%;
        gap: 10px;
        padding: 20px 18px;
        border-radius: 22px 22px 18px 18px;
    }

    body.shop-page .platform-option-btn {
        min-height: 56px;
    }
}

.admin-container {
    padding: 28px 0 70px;
}

.admin-container > h2 {
    margin: 0 0 22px;
    font-size: clamp(2rem, 3.4vw, 3rem);
}

.card {
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 28px;
}

.card h3 {
    margin-top: 0;
}

.form-row,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.form-row input,
.form-row textarea,
.form-row select,
.filter-bar input,
.filter-bar select {
    flex: 1;
    min-width: 180px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
}

body.admin-page[data-page="orders"] .order-address-row {
    margin-top: 14px;
}

body.admin-page[data-page="orders"] .order-address-row .field-stack {
    flex: 1 1 100%;
}

body.admin-page[data-page="orders"] #customer-address {
    width: 100%;
    min-height: 80px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    line-height: 1.55;
    resize: vertical;
}

.qty-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(31, 41, 51, 0.06);
}

.items-preview {
    margin: 18px 0;
    padding: 18px;
    border: 1px dashed rgba(31, 41, 51, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
}

.item-row-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.item-row-preview + .item-row-preview {
    margin-top: 10px;
}

.item-row-preview strong,
.item-row-preview span {
    display: block;
}

.remove-item-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: var(--danger);
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 800;
}

.btn-primary:disabled,
.btn-add:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 22px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(31, 41, 51, 0.08);
    text-align: center;
    vertical-align: middle;
}

.admin-table th {
    background: rgba(31, 41, 51, 0.05);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.items-cell {
    min-width: 220px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.remark-text {
    display: inline-block;
    max-width: 220px;
    color: var(--muted);
}

.status-select {
    min-width: 110px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(31, 41, 51, 0.06);
    font-weight: 800;
}

.new {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
}

.pending {
    color: var(--warning);
}

.packed {
    color: #2563eb;
}

.shipped {
    color: #7c3aed;
}

.delivered {
    color: #0f766e;
}

.achieved {
    color: #15803d;
    background: rgba(22, 163, 74, 0.12);
}

.return {
    color: #dc2626;
}

.cancelled {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
}

.return,
.cancelled {
    font-style: italic;
}

.new,
.packed,
.shipped,
.delivered,
.return,
.pending,
.achieved,
.cancelled {
    border-color: currentColor;
}

body.admin-page[data-page="orders"] .admin-table tbody tr.order-row-new td {
    background: rgba(239, 246, 255, 0.92);
}

.action-cell {
    white-space: nowrap;
}

.icon-btn {
    width: 42px;
    height: 42px;
    margin: 0 4px;
    color: #fff;
}

.icon-btn.edit {
    background: linear-gradient(135deg, var(--accent), #105e5a);
}

.icon-btn.delete {
    background: linear-gradient(135deg, var(--danger), #912317);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.pagination button {
    min-width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
}

.pagination .active-page {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
}

@media (max-width: 920px) {
    .nav {
        flex-wrap: wrap;
    }

    .wholesale-note-bar {
        order: 3;
        width: 100%;
        justify-content: space-between;
        border-radius: 24px;
    }

    .cart {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .container,
    .admin-container {
        width: min(100% - 20px, 1180px);
    }

    .title,
    .admin-container > h2 {
        text-align: center;
    }

    .product-meta,
    .wholesale-note-bar,
    .cart-item,
    .cart-head,
    .total {
        align-items: flex-start;
    }

    .product-meta,
    .wholesale-note-bar {
        flex-direction: column;
    }

    .cart-item {
        grid-template-columns: 1fr;
    }

    .cart-item img {
        width: 100%;
        height: 180px;
    }

    .card {
        padding: 18px;
        border-radius: 22px;
    }

    .filter-bar button,
    .btn-add,
    .contact-admin,
    .btn,
    .checkout,
    .clear-cart {
        width: 100%;
        justify-content: center;
    }
}

body.admin-page {
    background: var(--light);
    font-family: "Inter", "Noto Sans Myanmar", "Pyidaungsu", "Padauk", "Myanmar Text", "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
}

body.admin-page .admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    transition: grid-template-columns 0.25s ease;
    position: relative;
}

body.admin-page.sidebar-collapsed .admin-layout {
    grid-template-columns: 88px minmax(0, 1fr);
}

body.admin-page .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 20px;
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: #e5e7eb;
    overflow: hidden;
    transition: width 0.25s ease, padding 0.25s ease, transform 0.25s ease;
    z-index: 30;
}

body.admin-page .admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

body.admin-page .admin-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.admin-page .admin-sidebar-brand strong {
    display: block;
    font-size: 16px;
}

body.admin-page .admin-sidebar-brand p {
    margin: 4px 0 0;
    color: #9ca3af;
    font-size: 12px;
    transition: opacity 0.2s ease;
}

body.admin-page .admin-nav {
    display: grid;
    gap: 8px;
}

body.admin-page .admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #d1d5db;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.admin-page .admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

body.admin-page .admin-nav-link.active {
    background: linear-gradient(135deg, rgba(201, 111, 50, 0.24), rgba(140, 74, 34, 0.32));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.admin-page.sidebar-collapsed .admin-sidebar {
    padding-left: 16px;
    padding-right: 16px;
}

body.admin-page.sidebar-collapsed .admin-sidebar-brand {
    justify-content: center;
}

body.admin-page.sidebar-collapsed .admin-sidebar-brand strong,
body.admin-page.sidebar-collapsed .admin-sidebar-brand p,
body.admin-page.sidebar-collapsed .admin-nav-link span {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

body.admin-page.sidebar-collapsed .admin-nav-link {
    justify-content: center;
    padding-left: 12px;
    padding-right: 12px;
}

body.admin-page .admin-main {
    min-width: 0;
    padding: 24px;
    transition: padding 0.25s ease;
}

body.admin-page[data-auth-protected="true"] .admin-layout {
    visibility: hidden;
}

body.admin-page[data-auth-protected="true"].auth-ready .admin-layout {
    visibility: visible;
}

body.admin-page[data-auth-protected="true"]:not(.auth-ready)::before {
    content: "Checking admin session...";
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    z-index: 9999;
}

body.admin-page .toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.shop-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-message {
    flex: 1 1 auto;
    min-width: 0;
}

.toast-important {
    padding-right: 12px;
}

.toast-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.toast-close:hover,
.toast-close:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.03);
}

.toast-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.toast-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #fb923c);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.24);
}

body.shop-page .toast-error.toast-important {
    background: linear-gradient(135deg, #f59e0b, #fb923c);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.24);
}

.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

body.admin-page .toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.admin-page .toast-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

body.admin-page .toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

body.admin-page .toast-visible {
    opacity: 1;
    transform: translateY(0);
}

body.admin-page .toast-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

body.admin-page .admin-container {
    max-width: none;
    margin: 0;
    padding: 0;
    width: auto;
}

body.admin-page .admin-page-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

body.admin-page .admin-page-header h1 {
    margin: 4px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

body.admin-page .admin-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.admin-page .admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    font-weight: 700;
}

body.admin-page .admin-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.admin-page .admin-logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 55%, #334155);
    font-family: inherit;
}

body.login-page .login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

body.login-page .login-card {
    width: min(100%, 460px);
    padding: 32px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

body.login-page .login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

body.login-page .login-brand h1 {
    margin: 4px 0 0;
    color: #0f172a;
}

body.login-page .login-copy {
    margin: 0 0 22px;
    color: #475569;
    line-height: 1.6;
}

body.login-page .login-form {
    display: grid;
    gap: 16px;
}

body.login-page .login-field {
    display: grid;
    gap: 8px;
}

body.login-page .login-field span {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

body.login-page .login-field input {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #fff;
}

body.login-page .login-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

body.login-page .login-password-wrap input {
    width: 100%;
    padding-right: 50px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.login-page .login-password-wrap input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

body.login-page .login-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.login-page .login-password-toggle:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

body.login-page .login-password-toggle:focus-visible {
    outline: none;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

body.login-page .login-password-toggle.is-visible {
    color: #1d4ed8;
}

body.login-page .login-submit-btn {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

body.login-page .login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

body.login-page .login-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

body.login-page .login-error {
    margin: 0;
}

body.admin-page .analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

body.admin-page .summary-card,
body.admin-page .analytics-card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.06);
}

body.admin-page .summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
}

body.admin-page .summary-card h3 {
    margin: 6px 0 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}

body.admin-page .summary-card-label,
body.admin-page .analytics-card-label {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.admin-page .summary-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
}

body.admin-page .summary-card-icon.orders {
    background: linear-gradient(135deg, #1f9d73, #0f766e);
}

body.admin-page .summary-card-icon.pending {
    background: linear-gradient(135deg, #d59524, #b45309);
}

body.admin-page .summary-card-icon.delivered {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

body.admin-page .summary-card-icon.revenue {
    background: linear-gradient(135deg, #c96f32, #8c4a22);
}

body.admin-page .summary-card-icon.retail {
    background: linear-gradient(135deg, #0f766e, #115e59);
}

body.admin-page .summary-card-icon.wholesale {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

body.admin-page .analytics-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    gap: 20px;
    margin-bottom: 20px;
}

body.admin-page .analytics-card {
    border-radius: 16px;
}

body.admin-page .analytics-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

body.admin-page .analytics-card-header h3 {
    margin: 6px 0 0;
}

body.admin-page .trend-chart,
body.admin-page .best-seller-list {
    display: grid;
    gap: 14px;
}

body.admin-page .trend-row {
    display: grid;
    gap: 8px;
}

body.admin-page .trend-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

body.admin-page .trend-date {
    color: #6b7280;
    font-weight: 600;
}

body.admin-page .trend-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

body.admin-page .trend-bar {
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

body.admin-page .best-seller-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

body.admin-page .best-seller-item:first-child {
    padding-top: 0;
    border-top: none;
}

body.admin-page .best-seller-rank {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(201, 111, 50, 0.12);
    color: var(--primary-deep);
    font-weight: 800;
}

body.admin-page .best-seller-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.admin-page .best-seller-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-page .best-seller-copy span {
    color: #6b7280;
    font-size: 13px;
}

body.admin-page .best-seller-revenue {
    font-weight: 800;
    color: var(--primary-deep);
    white-space: nowrap;
}

body.admin-page .admin-menu-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page .admin-menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

body.admin-page .admin-sidebar-backdrop {
    display: none;
}

body.admin-page .section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

body.admin-page .section-toolbar h3 {
    margin: 0;
}

body.admin-page .admin-eyebrow {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.admin-page .card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

body.admin-page .form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

body.admin-page .field-stack {
    flex: 1;
    min-width: 180px;
    display: grid;
    gap: 6px;
}

body.admin-page .form-row input,
body.admin-page .form-row textarea,
body.admin-page .form-row select {
    flex: 1;
    min-width: 180px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

body.admin-page .remark-builder {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.admin-page .remark-builder.remark-builder-disabled {
    opacity: 0.5;
}

body.admin-page .remark-builder.remark-builder-disabled .remark-option,
body.admin-page .remark-builder.remark-builder-disabled .remark-note-input {
    cursor: not-allowed;
}

body.admin-page .remark-option {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

body.admin-page .remark-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.admin-page .remark-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #d4d4d8;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    opacity: 0.5;
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.admin-page .remark-option:hover .remark-chip {
    opacity: 0.75;
    filter: brightness(1.03);
}

body.admin-page .remark-option input:checked + .remark-chip,
body.admin-page .remark-chip.selected {
    opacity: 1;
    font-weight: 700;
    transform: scale(1.04);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.14);
    filter: brightness(1.02);
}

body.admin-page .remark-chip.urgent,
body.admin-page .remark-badge.urgent {
    background: #fee2e2;
    color: #b91c1c;
}

body.admin-page .remark-chip.cod,
body.admin-page .remark-badge.cod {
    background: #fef3c7;
    color: #92400e;
}

body.admin-page .remark-chip.paid,
body.admin-page .remark-badge.paid {
    background: #dcfce7;
    color: #166534;
}

body.admin-page .remark-note-input {
    flex: 1;
    min-width: 240px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.admin-page .remark-note-input:disabled {
    opacity: 0.7;
    background: #f3f4f6;
    cursor: not-allowed;
}

body.admin-page .product-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.admin-page .product-section.product-section-disabled {
    opacity: 0.5;
    pointer-events: none;
    transform: translateY(4px);
}

body.admin-page .product-section.product-section-disabled .form-helper-text {
    opacity: 1;
}

body.admin-page .form-helper-text {
    margin: 10px 0 0;
    font-size: 12px;
    color: #6b7280;
    transition: opacity 0.2s ease, color 0.2s ease;
}

body.admin-page .field-group {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.admin-page .field-group select {
    width: 100%;
}

body.admin-page .field-group textarea {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

body.admin-page .field-group label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body.admin-page .sort-field-group {
    flex: 0 0 240px;
    min-width: 220px;
}

body.admin-page .field-error {
    margin: 0;
    min-height: 16px;
    font-size: 12px;
    color: #b91c1c;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.admin-page .field-error.visible {
    opacity: 1;
}

body.admin-page .product-table {
    min-width: 1720px;
}

body.admin-page .product-col-name {
    min-width: 240px;
    width: 240px;
    text-align: left;
}

body.admin-page .product-col-category {
    min-width: 180px;
    width: 180px;
    text-align: left;
}

body.admin-page .product-col-price {
    min-width: 140px;
    width: 140px;
}

body.admin-page .product-col-action {
    min-width: 110px;
    width: 110px;
}

body.admin-page .product-image-cell a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

body.admin-page .toggle-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

body.admin-page .product-upload-panel {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(31, 41, 51, 0.1);
    border-radius: 14px;
    background: #f8fafc;
}

body.admin-page .product-image-preview-wrap {
    display: grid;
    gap: 10px;
    align-content: start;
}

body.admin-page .product-image-preview {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(201, 111, 50, 0.08), rgba(30, 132, 127, 0.08));
}

body.admin-page .product-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.admin-page .product-upload-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
}

body.admin-page .upload-field {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}

body.admin-page .upload-field input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

body.admin-page .upload-status-text {
    margin: 0;
    min-height: 18px;
    font-size: 12px;
    color: #6b7280;
}

body.admin-page .upload-status-text.success {
    color: #15803d;
}

body.admin-page .upload-status-text.error {
    color: #b91c1c;
}

body.admin-page #manage-product-image[readonly] {
    background: #f8fafc;
    color: #64748b;
}

body.admin-page #manage-product-profit-per-unit[readonly],
body.admin-page #manage-product-wholesale-profit-per-unit[readonly],
body.admin-page #manage-product-expected-profit[readonly],
body.admin-page #manage-product-expected-wholesale-profit[readonly],
body.admin-page #manage-product-profit-percent[readonly],
body.admin-page #manage-product-wholesale-profit-percent[readonly],
body.admin-page #manage-product-markup-percent[readonly] {
    background: #eef6ff;
    color: #1e3a8a;
    font-weight: 700;
}

body.admin-page #product-profit-warning.visible {
    opacity: 1;
}

body.admin-page .sale-type-field {
    min-width: 170px;
}

body.admin-page .sale-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page .sale-type-badge.retail {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

body.admin-page .sale-type-badge.wholesale {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

body.admin-page .item-row-copy {
    display: grid;
    gap: 4px;
    text-align: left;
}

body.admin-page .item-row-meta {
    color: #64748b;
    font-size: 12px;
}

body.admin-page .price-warning {
    color: #b91c1c;
    font-weight: 700;
}

body.admin-page .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

body.admin-page .status-pill.in {
    background: #dcfce7;
    color: #166534;
}

body.admin-page .status-pill.out {
    background: #fee2e2;
    color: #b91c1c;
}

body.admin-page .status-pill.hidden {
    background: #e5e7eb;
    color: #374151;
}

body.admin-page .accounting-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

body.admin-page .accounting-overview-card {
    overflow: hidden;
}

body.admin-page .accounting-helper-text {
    margin-bottom: 16px;
}

body.admin-page .accounting-table {
    min-width: 2240px;
}

body.admin-page .positive-value {
    color: #15803d;
    font-weight: 700;
}

body.admin-page .negative-value {
    color: #b91c1c;
    font-weight: 700;
}

body.admin-page .warning-value {
    color: #d59524;
    font-weight: 700;
}

body.admin-page .neutral-value {
    color: #64748b;
    font-weight: 700;
}

body.admin-page .stock-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

body.admin-page .stock-toolbar input,
body.admin-page .stock-toolbar select {
    min-width: 220px;
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

body.admin-page .stock-adjuster {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

body.admin-page .stock-step-btn,
body.admin-page .stock-save-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 8px 10px;
    font-weight: 700;
    box-shadow: none;
}

body.admin-page .stock-save-btn {
    background: var(--success);
    color: #fff;
    border-color: transparent;
}

body.admin-page .stock-quick-input {
    width: 84px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
}

body.admin-page .qty-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #eee;
    padding: 0 10px;
    border-radius: 6px;
    min-height: auto;
}

body.admin-page .btn-add {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: none;
}

body.admin-page .items-preview {
    margin: 15px 0;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    min-height: 40px;
    background: transparent;
}

body.admin-page .item-row-preview {
    display: flex;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
}

body.admin-page .item-row-preview button {
    border: none;
    background: transparent;
}

body.admin-page .btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: none;
}

body.admin-page .filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

body.admin-page .quick-date-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

body.admin-page .quick-date-filters button {
    border: 1px solid #d1d5db;
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page .quick-date-filters button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
    background: #f8fafc;
}

body.admin-page .filter-bar button {
    border-radius: 0;
    padding: 6px 12px;
    font-weight: normal;
    color: inherit;
    background: buttonface;
    box-shadow: none;
}

body.admin-page .admin-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #444;
    background: white;
}

body.admin-page .admin-table th,
body.admin-page .admin-table td {
    border: 1px solid #444;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

body.admin-page .admin-table th {
    background: transparent;
    font-size: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
}

body.admin-page .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 0;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

body.admin-page #orders-results-section.results-flash {
    animation: ordersResultsFlash 0.9s ease;
}

@keyframes ordersResultsFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
    35% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

body.admin-page .status-select {
    padding: 5px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 110px;
    background: white;
}

body.admin-page .pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
    flex-wrap: wrap;
}

body.admin-page .pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 0;
    min-width: auto;
    height: auto;
    color: inherit;
    box-shadow: none;
}

body.admin-page .active-page {
    background: var(--primary) !important;
    color: white;
}

body.admin-page .remark-text {
    display: inline-block;
    max-width: none;
    color: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.admin-page .remark-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.admin-page .remark-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

body.admin-page .remark-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

body.admin-page .remark-note-text {
    font-size: 12px;
    line-height: 1.4;
    color: #666;
}

body.admin-page .icon-btn {
    width: 32px;
    height: 32px;
    margin: 0 2px;
    color: inherit;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.admin-page .icon-btn.edit,
body.admin-page .icon-btn.delete {
    background: transparent;
}

body.admin-page .admin-table {
    width: 100%;
    min-width: 1380px;
    table-layout: fixed;
}

body.admin-page .admin-table th,
body.admin-page .admin-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.admin-page .admin-table .col-id {
    min-width: 70px;
    width: 70px;
}

body.admin-page .admin-table .col-date {
    min-width: 110px;
    width: 110px;
}

body.admin-page .admin-table .col-customer {
    min-width: 150px;
    width: 150px;
}

body.admin-page .admin-table .col-phone {
    min-width: 140px;
    width: 140px;
}

body.admin-page .admin-table .col-address {
    min-width: 220px;
    width: 220px;
    text-align: left;
    vertical-align: top;
}

body.admin-page .admin-table .col-remark {
    min-width: 220px;
    width: 220px;
    text-align: left;
    vertical-align: top;
}

body.admin-page .admin-table .col-items {
    min-width: 260px;
    width: 260px;
    text-align: left;
    vertical-align: top;
}

body.admin-page .admin-table .col-total {
    min-width: 120px;
    width: 120px;
}

body.admin-page .admin-table .col-status {
    min-width: 130px;
    width: 130px;
}

body.admin-page .admin-table .col-action {
    min-width: 110px;
    width: 110px;
}

body.admin-page[data-page="stock"] .stock-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

body.admin-page[data-page="stock"] .stock-summary-card,
body.admin-page[data-page="stock"] .stock-board-card {
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="stock"] .stock-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

body.admin-page[data-page="stock"] .stock-summary-label {
    margin: 0 0 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

body.admin-page[data-page="stock"] .stock-summary-card h3 {
    margin: 0;
    font-size: 1.6rem;
    color: #0f172a;
}

body.admin-page[data-page="stock"] .stock-summary-note {
    margin: 6px 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
}

body.admin-page[data-page="stock"] .stock-summary-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    flex-shrink: 0;
}

body.admin-page[data-page="stock"] .stock-summary-icon.total,
body.admin-page[data-page="stock"] .stock-summary-icon.units {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

body.admin-page[data-page="stock"] .stock-summary-icon.low {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

body.admin-page[data-page="stock"] .stock-summary-icon.out {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

body.admin-page[data-page="stock"] .stock-summary-icon.recent {
    background: linear-gradient(135deg, #0f766e, #0d9488);
}

body.admin-page[data-page="stock"] .stock-summary-card.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), #fff);
}

body.admin-page[data-page="stock"] .stock-summary-card.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), #fff);
}

body.admin-page[data-page="stock"] .stock-summary-card.accent {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), #fff);
}

body.admin-page[data-page="stock"] .stock-board-card {
    padding: 18px;
}

body.admin-page[data-page="stock"] .stock-filter-panel {
    margin-bottom: 18px;
}

body.admin-page[data-page="stock"] .stock-filter-panel-summary {
    display: none;
    list-style: none;
}

body.admin-page[data-page="stock"] .stock-filter-panel-summary::-webkit-details-marker {
    display: none;
}

body.admin-page[data-page="stock"] .stock-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.8fr)) auto auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

body.admin-page[data-page="stock"] .stock-toolbar-field {
    display: grid;
    gap: 6px;
}

body.admin-page[data-page="stock"] .stock-toolbar-field label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

body.admin-page[data-page="stock"] .stock-toolbar input,
body.admin-page[data-page="stock"] .stock-toolbar select {
    min-width: 0;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
}

body.admin-page[data-page="stock"] .stock-toggle-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
}

body.admin-page[data-page="stock"] .stock-reset-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 0 16px;
    border-radius: 14px;
}

body.admin-page[data-page="stock"] .stock-table {
    min-width: 1260px;
    border-collapse: separate;
    border-spacing: 0;
}

body.admin-page[data-page="stock"] .stock-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

body.admin-page[data-page="stock"] .stock-table th,
body.admin-page[data-page="stock"] .stock-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

body.admin-page[data-page="stock"] .stock-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.72);
}

body.admin-page[data-page="stock"] .stock-table tbody tr:hover td {
    background: rgba(239, 246, 255, 0.92);
}

body.admin-page[data-page="stock"] .stock-product-cell,
body.admin-page[data-page="stock"] .stock-price-cell,
body.admin-page[data-page="stock"] .stock-updated-cell {
    text-align: left;
}

body.admin-page[data-page="stock"] .stock-qty-cell strong,
body.admin-page[data-page="stock"] .stock-product-name {
    color: #0f172a;
    font-weight: 700;
}

body.admin-page[data-page="stock"] .stock-product-meta,
body.admin-page[data-page="stock"] .stock-updated-cell {
    color: #64748b;
    font-size: 0.86rem;
}

body.admin-page[data-page="stock"] .status-pill.low {
    background: #ffedd5;
    color: #c2410c;
}

body.admin-page[data-page="stock"] .stock-adjuster {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

body.admin-page[data-page="stock"] .stock-step-btn,
body.admin-page[data-page="stock"] .stock-save-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
}

body.admin-page[data-page="stock"] .stock-step-btn {
    background: #fff;
    color: #0f172a;
}

body.admin-page[data-page="stock"] .stock-save-btn {
    background: #16a34a;
    color: #fff;
}

body.admin-page[data-page="stock"] .stock-quick-input {
    width: 74px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    background: #fff;
}

body.admin-page[data-page="stock"] .stock-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.admin-page[data-page="stock"] .icon-btn {
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 12px;
}

body.admin-page[data-page="stock"] .icon-btn.edit {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

body.admin-page[data-page="stock"] .icon-btn.delete {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

body.admin-page[data-page="stock"] .stock-empty-state {
    display: grid;
    gap: 8px;
    place-items: center;
    padding: 26px 12px;
    color: #64748b;
}

body.admin-page[data-page="stock"] .stock-empty-state i {
    font-size: 1.6rem;
    color: #94a3b8;
}

body.admin-page[data-page="stock"] .stock-card-list,
body.admin-page[data-page="stock"] .stock-mobile-action-bar {
    display: none;
}

body.admin-page[data-page="stock"] .stock-mobile-card {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

body.admin-page[data-page="stock"] .stock-mobile-card-top,
body.admin-page[data-page="stock"] .stock-mobile-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.admin-page[data-page="stock"] .stock-mobile-product h3,
body.admin-page[data-page="stock"] .stock-mobile-product p,
body.admin-page[data-page="stock"] .stock-mobile-block-label {
    margin: 0;
}

body.admin-page[data-page="stock"] .stock-mobile-product h3 {
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.3;
}

body.admin-page[data-page="stock"] .stock-mobile-product p,
body.admin-page[data-page="stock"] .stock-mobile-block-label {
    color: #64748b;
    font-size: 0.82rem;
}

body.admin-page[data-page="stock"] .stock-mobile-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

body.admin-page[data-page="stock"] .stock-mobile-card-item,
body.admin-page[data-page="stock"] .stock-mobile-card-block {
    display: grid;
    gap: 5px;
}

body.admin-page[data-page="stock"] .stock-mobile-card-item {
    padding: 12px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.88);
}

body.admin-page[data-page="stock"] .stock-mobile-card-item span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.admin-page[data-page="stock"] .stock-mobile-card-item strong {
    color: #0f172a;
    font-size: 0.98rem;
}

body.admin-page[data-page="stock"] .stock-mobile-card-block {
    margin-top: 14px;
}

body.admin-page[data-page="stock"] .stock-mobile-card-actions {
    margin-top: 16px;
}

body.admin-page[data-page="stock"] .stock-mobile-card-btn {
    flex: 1 1 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
}

body.admin-page[data-page="stock"] .stock-mobile-card-btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

body.admin-page[data-page="stock"] .stock-mobile-empty-state {
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.82);
}

@media (max-width: 1180px) {
    body.admin-page[data-page="stock"] .stock-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="stock"] .stock-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="stock"] .stock-summary-grid,
    body.admin-page[data-page="stock"] .stock-toolbar {
        grid-template-columns: 1fr;
    }
}

body.admin-page .items-text {
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.admin-page .action-cell {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 980px) {
    body.admin-page .admin-layout {
        grid-template-columns: 1fr;
    }

    body.admin-page .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(280px, calc(100vw - 48px));
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 20px 0 40px rgba(17, 24, 39, 0.18);
    }

    body.admin-page.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    body.admin-page .admin-sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        border: none;
        padding: 0;
        background: rgba(17, 24, 39, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 20;
    }

    body.admin-page.sidebar-open .admin-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.admin-page .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page.sidebar-collapsed .admin-sidebar {
        padding-left: 20px;
        padding-right: 20px;
    }

    body.admin-page.sidebar-collapsed .admin-sidebar-brand strong,
    body.admin-page.sidebar-collapsed .admin-sidebar-brand p,
    body.admin-page.sidebar-collapsed .admin-nav-link span {
        opacity: 1;
        pointer-events: auto;
        width: auto;
        overflow: visible;
    }

    body.admin-page.sidebar-collapsed .admin-nav-link {
        justify-content: flex-start;
        padding-left: 14px;
        padding-right: 14px;
    }

    body.admin-page .analytics-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .shop-toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    .shop-toast-container .toast {
        min-width: 0;
        max-width: none;
        width: 100%;
        font-size: 0.92rem;
    }

    body.admin-page .admin-main {
        padding: 16px;
    }

    body.admin-page .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    body.admin-page .toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    body.admin-page .admin-nav {
        grid-template-columns: 1fr;
    }

    body.admin-page .section-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page .sort-field-group {
        min-width: 100%;
    }

    body.admin-page .product-upload-panel {
        grid-template-columns: 1fr;
    }

    body.admin-page .summary-card {
        padding: 16px;
    }

    body.admin-page .best-seller-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    body.admin-page .best-seller-revenue {
        grid-column: 2;
    }
}

body.admin-page[data-page="products"] .product-management-card,
body.admin-page[data-page="products"] .product-table-card {
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 26%), #fff;
}

body.admin-page[data-page="products"] .product-management-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

body.admin-page[data-page="products"] .product-management-header h3 {
    margin: 6px 0 10px;
}

body.admin-page[data-page="products"] .product-management-helper {
    margin: 0;
    max-width: 720px;
    color: #64748b;
    line-height: 1.6;
}

body.admin-page[data-page="products"] .product-submit-hero {
    min-width: 180px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    font-size: 0.98rem;
    align-self: center;
}

body.admin-page[data-page="products"] .product-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 20px;
}

body.admin-page[data-page="products"] .product-form-main,
body.admin-page[data-page="products"] .product-form-side {
    display: grid;
    gap: 18px;
}

body.admin-page[data-page="products"] .product-form-section {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.admin-page[data-page="products"] .product-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

body.admin-page[data-page="products"] .product-form-step {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e847f, #2563eb);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    flex-shrink: 0;
}

body.admin-page[data-page="products"] .product-form-section-head h4 {
    margin: 2px 0 6px;
    font-size: 1rem;
    color: #0f172a;
}

body.admin-page[data-page="products"] .product-form-section-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

body.admin-page[data-page="products"] .product-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.admin-page[data-page="products"] .field-span-2 {
    grid-column: span 2;
}

body.admin-page[data-page="products"] .field-help {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

body.admin-page[data-page="products"] .readonly-field input[readonly] {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    border-color: rgba(37, 99, 235, 0.14);
    color: #1e3a8a;
    font-weight: 700;
}

body.admin-page[data-page="products"] .readonly-field input[readonly].positive-value {
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
    background: linear-gradient(180deg, rgba(220, 252, 231, 0.9) 0%, #f8fffb 100%);
}

body.admin-page[data-page="products"] .readonly-field input[readonly].negative-value {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.24);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.95) 0%, #fff7f7 100%);
}

body.admin-page[data-page="products"] .readonly-field input[readonly].warning-value {
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.24);
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.95) 0%, #fffaf5 100%);
}

body.admin-page[data-page="products"] .product-publish-actions {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="products"] .product-visibility-toggle {
    justify-content: space-between;
    min-height: 52px;
    border-radius: 14px;
    padding: 0 16px;
}

body.admin-page[data-page="products"] .product-upload-panel {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
    border: 0;
    margin-top: 0;
}

body.admin-page[data-page="products"] .product-image-preview {
    border-style: solid;
    border-color: rgba(148, 163, 184, 0.3);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(30, 132, 127, 0.08));
}

body.admin-page[data-page="products"] .product-upload-fields {
    gap: 14px;
}

body.admin-page[data-page="products"] .upload-field input[type="file"],
body.admin-page[data-page="products"] #manage-product-image,
body.admin-page[data-page="products"] .product-form-section input,
body.admin-page[data-page="products"] .product-form-section select {
    border-radius: 14px;
    min-height: 48px;
}

body.admin-page[data-page="products"] .product-form-section input:focus,
body.admin-page[data-page="products"] .product-form-section select:focus,
body.admin-page[data-page="products"] .upload-field input[type="file"]:focus,
body.admin-page[data-page="products"] #manage-product-image:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

body.admin-page[data-page="products"] .product-table-toolbar {
    align-items: end;
    margin-bottom: 18px;
}

body.admin-page[data-page="products"] .product-table {
    min-width: 980px;
}

body.admin-page[data-page="products"] .admin-data-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

body.admin-page[data-page="products"] .admin-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

body.admin-page[data-page="products"] .admin-data-table tbody td {
    padding: 14px 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.admin-page[data-page="products"] .admin-data-table tbody td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

body.admin-page[data-page="products"] .admin-data-table tbody td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

body.admin-page[data-page="products"] .admin-data-table tbody tr:hover td {
    background: #f8fbff;
}

body.admin-page[data-page="products"] .product-summary-row td {
    background: rgba(255, 255, 255, 0.96);
}

body.admin-page[data-page="products"] .product-listing-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.admin-page[data-page="products"] .product-listing-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

body.admin-page[data-page="products"] .product-listing-copy strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: #0f172a;
}

body.admin-page[data-page="products"] .product-listing-copy p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

body.admin-page[data-page="products"] .product-thumb-img {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 14px;
    object-fit: cover;
    object-position: center;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
}

body.admin-page[data-page="products"] .status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

body.admin-page[data-page="products"] .status-chip.success {
    background: #dcfce7;
    color: #166534;
}

body.admin-page[data-page="products"] .status-chip.neutral {
    background: #e5e7eb;
    color: #374151;
}

body.admin-page[data-page="products"] .table-action-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}

body.admin-page[data-page="products"] .table-action-group .btn-compact {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

body.admin-page[data-page="products"] .admin-table-error-row,
body.admin-page[data-page="products"] .admin-table-empty-row {
    text-align: center;
    color: #475569;
}

body.admin-page[data-page="products"] .admin-table-error-row {
    color: #b91c1c;
}

body.admin-page[data-page="products"] .product-name-cell {
    display: grid;
    gap: 4px;
    text-align: left;
}

body.admin-page[data-page="products"] .product-name-cell span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

body.admin-page[data-page="products"] .product-profit-stack {
    display: grid;
    gap: 6px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
}

body.admin-page[data-page="products"] .product-table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}

body.admin-page[data-page="products"] .pricing-rule-builder,
body.admin-page[data-page="products"] .pricing-base-panel,
body.admin-page[data-page="products"] .pricing-preview-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    padding: 18px;
}

body.admin-page[data-page="products"] .pricing-base-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

body.admin-page[data-page="products"] .pricing-base-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.admin-page[data-page="products"] .pricing-mode-toggle {
    justify-content: flex-start;
    min-height: 52px;
}

body.admin-page[data-page="products"] .readonly-input {
    background: rgba(248, 250, 252, 0.96);
    color: #64748b;
    cursor: default;
}

body.admin-page[data-page="products"] .pricing-cost-panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    overflow: hidden;
}

body.admin-page[data-page="products"] .pricing-cost-panel-static {
    padding: 18px;
}

body.admin-page[data-page="products"] .pricing-cost-panel summary {
    padding: 14px 18px;
    cursor: pointer;
    color: #334155;
    font-weight: 800;
}

body.admin-page[data-page="products"] .pricing-cost-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 18px 18px;
}

body.admin-page[data-page="products"] .pricing-cost-panel-static .pricing-cost-grid {
    padding: 0;
}

body.admin-page[data-page="products"] .product-other-cost-list {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="products"] .product-other-cost-empty-state {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
}

body.admin-page[data-page="products"] .product-other-cost-empty-state strong {
    color: #0f172a;
}

body.admin-page[data-page="products"] .product-other-cost-empty-state p {
    margin: 0;
}

body.admin-page[data-page="products"] .product-other-cost-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.8fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

body.admin-page[data-page="products"] .product-other-cost-row.is-invalid {
    border-color: rgba(220, 38, 38, 0.32);
    background: rgba(254, 242, 242, 0.88);
}

body.admin-page[data-page="products"] .product-other-cost-remove {
    align-self: center;
}

body.admin-page[data-page="products"] .product-other-cost-row-error {
    grid-column: 1 / -1;
    min-height: 18px;
    margin: -4px 0 0;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
}

body.admin-page[data-page="products"] .product-other-cost-summary-grid {
    margin-top: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.admin-page[data-page="products"] .pricing-cost-formula {
    margin: 8px 2px 0;
    text-align: left;
}

body.admin-page[data-page="products"] .pricing-cost-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.85), rgba(241, 245, 249, 0.95));
    border: 1px solid rgba(203, 213, 225, 0.9);
}

body.admin-page[data-page="products"] .pricing-cost-total span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .pricing-cost-total strong {
    color: #0f172a;
    font-size: 1.15rem;
}

body.admin-page[data-page="products"] .pricing-buying-summary {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
    border: 1px solid rgba(226, 232, 240, 0.95);
}

body.admin-page[data-page="products"] .pricing-buying-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 16px;
    align-items: stretch;
}

body.admin-page[data-page="products"] .field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

body.admin-page[data-page="products"] .field-label-row label {
    margin: 0;
}

body.admin-page[data-page="products"] .field-action-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

body.admin-page[data-page="products"] .field-action-link:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

body.admin-page[data-page="products"] .quick-add-panel {
    display: grid;
    gap: 14px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
}

body.admin-page[data-page="products"] .quick-add-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.admin-page[data-page="products"] .quick-add-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

body.admin-page[data-page="products"] .quick-add-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

body.admin-page[data-page="products"] .product-variant-quick-picks {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
}

body.admin-page[data-page="products"] .product-variant-quick-picks-head {
    display: grid;
    gap: 4px;
}

body.admin-page[data-page="products"] .product-variant-quick-picks-head label {
    margin: 0;
}

body.admin-page[data-page="products"] .product-variant-quick-picks-head p {
    margin: 0;
}

body.admin-page[data-page="products"] .product-variant-quick-picks-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.admin-page[data-page="products"] .product-identity-gate-note {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    background: rgba(248, 250, 252, 0.92);
}

body.admin-page[data-page="products"] .product-identity-gate-note strong {
    color: #0f172a;
}

body.admin-page[data-page="products"] .product-identity-gate-note p {
    margin: 0;
    color: #475569;
}

body.admin-page[data-page="products"] .product-dependent-section {
    transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

body.admin-page[data-page="products"] .product-dependent-section.is-locked {
    opacity: 0.58;
}

body.admin-page[data-page="products"] .product-dependent-section.is-locked .pricing-rule-builder,
body.admin-page[data-page="products"] .product-dependent-section.is-locked .pricing-preview-card,
body.admin-page[data-page="products"] .product-dependent-section.is-locked .pricing-cost-panel,
body.admin-page[data-page="products"] .product-dependent-section.is-locked .pricing-legacy-panel,
body.admin-page[data-page="products"] .product-dependent-section.is-locked .pricing-buying-summary {
    filter: grayscale(0.08);
}

body.admin-page[data-page="products"] .product-dependent-section.is-locked details {
    pointer-events: none;
}

body.admin-page[data-page="products"] .product-dependent-section.is-locked input,
body.admin-page[data-page="products"] .product-dependent-section.is-locked select,
body.admin-page[data-page="products"] .product-dependent-section.is-locked textarea,
body.admin-page[data-page="products"] .product-dependent-section.is-locked button {
    cursor: not-allowed;
}

body.admin-page[data-page="products"] .pricing-buying-input-group {
    margin: 0;
}

body.admin-page[data-page="products"] .pricing-buying-summary-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body.admin-page[data-page="products"] .pricing-buying-summary-value span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .pricing-buying-summary-value strong {
    color: #0f172a;
    font-size: 1.2rem;
}

body.admin-page[data-page="products"] #manage-product-total-buying-formula {
    margin: 0;
}

body.admin-page[data-page="products"] .pricing-rule-builder-header,
body.admin-page[data-page="products"] .pricing-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

body.admin-page[data-page="products"] .pricing-rule-builder-header > div:first-child,
body.admin-page[data-page="products"] .pricing-preview-header > div:first-child {
    width: 100%;
}

body.admin-page[data-page="products"] .pricing-rule-builder-header label,
body.admin-page[data-page="products"] .pricing-preview-header label {
    margin-bottom: 4px;
}

body.admin-page[data-page="products"] .pricing-rule-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

body.admin-page[data-page="products"] .pricing-rule-list {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="products"] .pricing-rule-empty-state {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
}

body.admin-page[data-page="products"] .pricing-rule-empty-state strong {
    color: #0f172a;
}

body.admin-page[data-page="products"] .pricing-rule-empty-state p {
    margin: 0;
}

body.admin-page[data-page="products"] .pricing-rule-row {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="products"] .pricing-rule-row.is-match {
    border-color: rgba(14, 165, 233, 0.55);
    background: rgba(240, 249, 255, 0.96);
}

body.admin-page[data-page="products"] .pricing-rule-row.is-best {
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18), 0 12px 30px rgba(22, 163, 74, 0.08);
}

body.admin-page[data-page="products"] .pricing-rule-row.is-invalid {
    border-color: rgba(220, 38, 38, 0.32);
    background: rgba(254, 242, 242, 0.88);
}

body.admin-page[data-page="products"] .pricing-rule-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.admin-page[data-page="products"] .pricing-rule-row-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .pricing-rule-remove {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 12px;
    background: rgba(254, 242, 242, 0.92);
    color: #b91c1c;
    font-weight: 700;
    cursor: pointer;
}

body.admin-page[data-page="products"] .pricing-rule-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

body.admin-page[data-page="products"] .pricing-rule-box-type-field {
    transition: opacity 0.2s ease;
}

body.admin-page[data-page="products"] .pricing-rule-note-field {
    grid-column: 1 / -1;
}

body.admin-page[data-page="products"] .pricing-rule-box-helper {
    margin: -4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

body.admin-page[data-page="products"] .is-hidden {
    display: none !important;
}

body.admin-page[data-page="products"] .pricing-rule-row-error {
    min-height: 18px;
    margin: -4px 0 0;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
}

body.admin-page[data-page="products"] .pricing-rule-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.admin-page[data-page="products"] .pricing-rule-metric {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

body.admin-page[data-page="products"] .pricing-rule-metric span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .pricing-rule-metric strong {
    color: #0f172a;
    font-size: 1rem;
}

body.admin-page[data-page="products"] .pricing-json-preview {
    margin-top: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
}

body.admin-page[data-page="products"] .pricing-json-preview summary {
    padding: 12px 14px;
    cursor: pointer;
    color: #334155;
    font-weight: 700;
}

body.admin-page[data-page="products"] .pricing-json-preview pre {
    margin: 0;
    padding: 0 14px 14px;
    overflow-x: auto;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.55;
}

body.admin-page[data-page="products"] .pricing-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.admin-page[data-page="products"] .pricing-preview-result {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid rgba(191, 219, 254, 0.9);
    color: #0f172a;
}

body.admin-page[data-page="products"] .pricing-preview-result strong {
    font-size: 1.05rem;
}

body.admin-page[data-page="products"] .pricing-preview-result p {
    margin: 0;
    color: #334155;
}

body.admin-page[data-page="products"] .pricing-preview-section-label {
    margin: 4px 0 2px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .pricing-preview-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.admin-page[data-page="products"] .pricing-preview-stat {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(191, 219, 254, 0.9);
}

body.admin-page[data-page="products"] .pricing-preview-stat span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .pricing-preview-stat strong {
    color: #0f172a;
    font-size: 1rem;
}

body.admin-page[data-page="products"] .pricing-preview-stat-accent {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(224, 242, 254, 0.92));
    border-color: rgba(96, 165, 250, 0.45);
}

body.admin-page[data-page="products"] .pricing-preview-stat-accent strong {
    font-size: 1.15rem;
    color: #0c4a6e;
}

body.admin-page[data-page="products"] .pricing-preview-stat-wide {
    grid-column: 1 / -1;
}

body.admin-page[data-page="products"] .pricing-preview-conversion {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #075985;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

body.admin-page[data-page="products"] .pricing-rule-metric .positive,
body.admin-page[data-page="products"] .pricing-preview-stat .positive {
    color: #166534;
}

body.admin-page[data-page="products"] .pricing-rule-metric .negative,
body.admin-page[data-page="products"] .pricing-preview-stat .negative {
    color: #b91c1c;
}

body.admin-page[data-page="products"] .pricing-rule-metric .muted,
body.admin-page[data-page="products"] .pricing-preview-stat .muted {
    color: #64748b;
}

body.admin-page[data-page="products"] .pricing-preview-hit,
body.admin-page[data-page="products"] .pricing-preview-note,
body.admin-page[data-page="products"] .pricing-preview-fallback {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

body.admin-page[data-page="products"] .pricing-preview-hit {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}

body.admin-page[data-page="products"] .pricing-preview-note {
    background: rgba(15, 23, 42, 0.07);
    color: #334155;
}

body.admin-page[data-page="products"] .pricing-preview-fallback {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

body.admin-page[data-page="products"] .pricing-legacy-panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    overflow: hidden;
}

body.admin-page[data-page="products"] .pricing-legacy-panel summary {
    padding: 14px 18px;
    cursor: pointer;
    color: #334155;
    font-weight: 800;
}

body.admin-page[data-page="products"] .pricing-legacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 18px 18px;
}

body.admin-page[data-page="products"] .product-action-icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="products"] .product-action-icon i {
    font-size: 14px;
}

body.admin-page[data-page="products"] .product-action-icon.view {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

body.admin-page[data-page="products"] .product-action-icon.edit {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
}

body.admin-page[data-page="products"] .product-action-icon.delete {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

body.admin-page[data-page="products"] .product-action-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

body.admin-page[data-page="products"] .product-action-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    padding: 6px 8px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
}

body.admin-page[data-page="products"] .product-action-icon:hover::after,
body.admin-page[data-page="products"] .product-action-icon:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.admin-page[data-page="products"] .product-delete-modal-overlay[hidden] {
    display: none;
}

body.admin-page[data-page="products"] .product-delete-modal {
    width: min(420px, 100%);
    gap: 14px;
}

body.admin-page[data-page="products"] .product-delete-copy {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

body.admin-page[data-page="products"] .product-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

body.admin-page[data-page="products"] .product-delete-actions .cancel {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

body.admin-page[data-page="products"] .product-delete-actions .delete {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
}

body.admin-page.modal-open {
    overflow: hidden;
}

body.admin-page[data-page="products"] .product-detail-row td {
    padding: 0;
    background: #f8fafc;
}

body.admin-page[data-page="products"] .product-detail-panel {
    padding: 18px 20px 22px;
    text-align: left;
}

body.admin-page[data-page="products"] .product-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

body.admin-page[data-page="products"] .product-detail-item {
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    display: grid;
    gap: 6px;
}

body.admin-page[data-page="products"] .product-detail-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.admin-page[data-page="products"] .product-detail-link {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

body.admin-page[data-page="products"] .sort-field-group select {
    min-width: 220px;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="products"] .product-form-layout {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="products"] .product-management-header {
        flex-direction: column;
    }

    body.admin-page[data-page="products"] .product-submit-hero {
        width: 100%;
    }

    body.admin-page[data-page="products"] .product-section-grid,
    body.admin-page[data-page="products"] .product-detail-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .field-span-2 {
        grid-column: span 1;
    }

    body.admin-page[data-page="products"] .product-table,
    body.admin-page[data-page="products"] .admin-data-table {
        min-width: 760px;
    }

    body.admin-page[data-page="products"] .admin-data-table thead th,
    body.admin-page[data-page="products"] .admin-data-table tbody td {
        padding: 12px 14px;
    }

    body.admin-page[data-page="products"] .product-thumb-img {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }
}

body.admin-page[data-page="accounting"] .accounting-command-card,
body.admin-page[data-page="accounting"] .accounting-overview-card,
body.admin-page[data-page="accounting"] .accounting-chart-card,
body.admin-page[data-page="accounting"] .accounting-insight-card,
body.admin-page[data-page="accounting"] .accounting-kpi-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="accounting"] .accounting-command-card {
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(15, 118, 110, 0.05));
}

body.admin-page[data-page="accounting"] .accounting-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

body.admin-page[data-page="accounting"] .accounting-command-bar h3 {
    margin: 6px 0 0;
}

body.admin-page[data-page="accounting"] .accounting-range-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.admin-page[data-page="accounting"] .time-filter-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

body.admin-page[data-page="accounting"] .accounting-period-control {
    display: grid;
    gap: 8px;
    min-width: 0;
}

body.admin-page[data-page="accounting"] .accounting-period-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.admin-page[data-page="accounting"] .time-btn,
body.admin-page[data-page="accounting"] .accounting-range-switch button {
    flex: 1;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    border-radius: 25px;
    padding: 12px 0;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.admin-page[data-page="accounting"] .time-btn.active,
body.admin-page[data-page="accounting"] .accounting-range-switch button.active,
body.admin-page[data-page="accounting"] .time-btn:hover,
body.admin-page[data-page="accounting"] .accounting-range-switch button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(29, 78, 216, 0.2);
}

body.admin-page[data-page="accounting"] .accounting-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card {
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    display: grid;
    gap: 10px;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.revenue {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), #fff);
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.cost {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), #fff);
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.estimated {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), #fff);
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.expenses {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), #fff);
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.net {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(255, 255, 255, 0.96));
    transform: scale(1.02);
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.net.loss {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.16), rgba(255, 255, 255, 0.96));
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.net h3 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

body.admin-page[data-page="accounting"] .accounting-kpi-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card h3 {
    margin: 0;
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    line-height: 1.1;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.revenue h3 {
    color: #1d4ed8;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.cost h3 {
    color: #dc2626;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.estimated h3 {
    color: #c2410c;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.expenses h3 {
    color: #0369a1;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.net.profit h3 {
    color: #15803d;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.net.loss h3 {
    color: #b91c1c;
}

body.admin-page[data-page="accounting"] .accounting-kpi-note {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

body.admin-page[data-page="accounting"] .accounting-insights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

body.admin-page[data-page="accounting"] .accounting-insight-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    display: grid;
    gap: 8px;
}

body.admin-page[data-page="accounting"] .accounting-insight-label {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.admin-page[data-page="accounting"] .accounting-insight-card h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

body.admin-page[data-page="accounting"] .accounting-insight-meta {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

body.admin-page[data-page="accounting"] .accounting-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

body.admin-page[data-page="accounting"] .accounting-expense-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

body.admin-page[data-page="accounting"] .accounting-expense-card {
    border-radius: 24px;
    background: #fff;
}

body.admin-page[data-page="accounting"] .accounting-expense-header {
    margin-bottom: 18px;
}

body.admin-page[data-page="accounting"] .accounting-expense-form {
    display: grid;
    gap: 18px;
}

body.admin-page[data-page="accounting"] .accounting-expense-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.admin-page[data-page="accounting"] .accounting-expense-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.admin-page[data-page="accounting"] .accounting-expense-table {
    min-width: 720px;
}

body.admin-page[data-page="accounting"] .accounting-expense-amount {
    font-weight: 700;
    color: #0f172a;
}

body.admin-page[data-page="accounting"] .accounting-expense-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body.admin-page[data-page="accounting"] .accounting-expense-type.fixed {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

body.admin-page[data-page="accounting"] .accounting-expense-type.variable {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}

body.admin-page[data-page="accounting"] .accounting-expense-actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

body.admin-page[data-page="accounting"] .accounting-expense-action {
    min-width: 76px;
}

body.admin-page[data-page="accounting"] .accounting-chart-card {
    border-radius: 22px;
    background: #fff;
}

body.admin-page[data-page="accounting"] .accounting-chart-wide {
    grid-column: span 2;
}

body.admin-page[data-page="accounting"] .accounting-chart-wrap {
    position: relative;
    min-height: 290px;
}

body.admin-page[data-page="accounting"] .accounting-overview-card {
    border-radius: 24px;
    background: #fff;
}

body.admin-page[data-page="accounting"] .accounting-table-header {
    margin-bottom: 16px;
}

body.admin-page[data-page="accounting"] .accounting-helper-text {
    margin: 0;
    color: #64748b;
    max-width: 560px;
}

body.admin-page[data-page="accounting"] .accounting-empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 36px 20px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(15, 118, 110, 0.05));
    text-align: center;
    color: #64748b;
}

body.admin-page[data-page="accounting"] .accounting-empty-state i {
    font-size: 28px;
    color: #2563eb;
}

body.admin-page[data-page="accounting"] .accounting-table {
    min-width: 980px;
}

body.admin-page[data-page="accounting"] .accounting-summary-row td {
    background: rgba(255, 255, 255, 0.98);
    transition: background 0.2s ease;
}

body.admin-page[data-page="accounting"] .accounting-summary-row:hover td {
    background: #f8fbff;
}

body.admin-page[data-page="accounting"] .accounting-name-cell {
    display: grid;
    gap: 4px;
    text-align: left;
}

body.admin-page[data-page="accounting"] .accounting-name-cell span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

body.admin-page[data-page="accounting"] .accounting-profit-stack {
    display: grid;
    gap: 6px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
}

body.admin-page[data-page="accounting"] .accounting-report-toggle {
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
}

body.admin-page[data-page="accounting"] .accounting-report-toggle:hover {
    background: rgba(37, 99, 235, 0.14);
}

body.admin-page[data-page="accounting"] .accounting-detail-row td {
    padding: 0;
    background: #f8fafc;
}

body.admin-page[data-page="accounting"] .accounting-detail-panel {
    padding: 18px 20px 22px;
    text-align: left;
}

body.admin-page[data-page="accounting"] .accounting-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

body.admin-page[data-page="accounting"] .accounting-detail-item {
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 6px;
}

body.admin-page[data-page="accounting"] .accounting-detail-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="accounting"] .accounting-kpi-grid,
    body.admin-page[data-page="accounting"] .accounting-insights-grid,
    body.admin-page[data-page="accounting"] .accounting-chart-grid,
    body.admin-page[data-page="accounting"] .accounting-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="accounting"] .accounting-expense-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wide {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="accounting"] .accounting-command-bar {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid,
    body.admin-page[data-page="accounting"] .accounting-insights-grid,
    body.admin-page[data-page="accounting"] .accounting-chart-grid,
    body.admin-page[data-page="accounting"] .accounting-detail-grid,
    body.admin-page[data-page="accounting"] .accounting-expense-form-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wide {
        grid-column: span 1;
    }

    body.admin-page[data-page="accounting"] .accounting-table {
        min-width: 760px;
    }

    body.admin-page[data-page="accounting"] .accounting-expense-table {
        min-width: 680px;
    }
}

body.admin-page[data-page="accounting"] .accounting-command-card,
body.admin-page[data-page="accounting"] .accounting-details-card,
body.admin-page[data-page="accounting"] .accounting-chart-card,
body.admin-page[data-page="accounting"] .accounting-secondary-card,
body.admin-page[data-page="accounting"] .accounting-insight-card,
body.admin-page[data-page="accounting"] .accounting-kpi-card {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

body.admin-page[data-page="accounting"] .accounting-executive-card {
    margin-bottom: 22px;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

body.admin-page[data-page="accounting"] .accounting-command-bar-executive {
    padding: 24px 26px;
    align-items: flex-end;
}

body.admin-page[data-page="accounting"] .accounting-command-copy h3 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    color: #0f172a;
}

body.admin-page[data-page="accounting"] .dashboard-controls {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

body.admin-page[data-page="accounting"] .accounting-filter-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

body.admin-page[data-page="accounting"] .accounting-period-control .accounting-range-switch {
    padding: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.admin-page[data-page="accounting"] .accounting-custom-range {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}

body.admin-page[data-page="accounting"] .accounting-date-field {
    display: grid;
    gap: 6px;
    min-width: 148px;
    flex: 0 0 auto;
}

body.admin-page[data-page="accounting"] .accounting-date-field span {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

body.admin-page[data-page="accounting"] .accounting-date-field input {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}

body.admin-page[data-page="accounting"] .accounting-custom-range-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

body.admin-page[data-page="accounting"] .accounting-range-action {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="accounting"] .accounting-range-action.apply {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 10px 18px rgba(29, 78, 216, 0.18);
}

body.admin-page[data-page="accounting"] .accounting-range-action.clear {
    background: #fff;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.22);
}

body.admin-page[data-page="accounting"] .accounting-range-error {
    margin: 0;
    color: #b91c1c;
    font-size: 0.88rem;
    font-weight: 600;
}

body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding-inline: 18px;
    justify-self: start;
}

@media (min-width: 861px) {
    body.admin-page[data-page="accounting"] .dashboard-controls {
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    body.admin-page[data-page="accounting"] .accounting-filter-bar {
        min-width: 0;
    }

    body.admin-page[data-page="accounting"] .accounting-period-control {
        flex: 0 0 auto;
    }
}

body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 18px;
}

body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card {
    min-height: 168px;
    padding: 24px 24px 22px;
    border-radius: 24px;
}

body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card.net {
    transform: none;
}

body.admin-page[data-page="accounting"] .accounting-kpi-card.capital {
    position: relative;
}

body.admin-page[data-page="accounting"] .accounting-kpi-meta {
    margin: 6px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

body.admin-page[data-page="accounting"] .accounting-secondary-summary {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

body.admin-page[data-page="accounting"] .accounting-secondary-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    padding: 18px 20px;
    display: grid;
    gap: 10px;
}

body.admin-page[data-page="accounting"] .accounting-secondary-card h4 {
    margin: 4px 0 0;
    font-size: 1.15rem;
    color: #0f172a;
}

body.admin-page[data-page="accounting"] .accounting-secondary-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

body.admin-page[data-page="accounting"] .accounting-secondary-card-muted {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.8), rgba(255, 255, 255, 0.96));
}

body.admin-page[data-page="accounting"] .accounting-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

body.admin-page[data-page="accounting"] .accounting-chart-card {
    border-radius: 24px;
    padding: 0;
}

body.admin-page[data-page="accounting"] .accounting-chart-card .analytics-card-header,
body.admin-page[data-page="accounting"] .accounting-details-card .analytics-card-header {
    margin-bottom: 14px;
}

body.admin-page[data-page="accounting"] .accounting-chart-card .analytics-card-header {
    padding: 24px 24px 0;
}

body.admin-page[data-page="accounting"] .accounting-chart-wrap {
    padding: 0 20px 20px;
    min-height: 300px;
}

body.admin-page[data-page="accounting"] .accounting-details-card {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.98);
    padding: 22px;
}

body.admin-page[data-page="accounting"] .accounting-details-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

body.admin-page[data-page="accounting"] .accounting-details-header h3 {
    margin: 6px 0 0;
}

body.admin-page[data-page="accounting"] .accounting-detail-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

body.admin-page[data-page="accounting"] .accounting-tab {
    border: 0;
    background: transparent;
    color: #475569;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.admin-page[data-page="accounting"] .accounting-tab.active,
body.admin-page[data-page="accounting"] .accounting-tab:hover {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 10px 22px rgba(29, 78, 216, 0.18);
}

body.admin-page[data-page="accounting"] .accounting-tab-panels {
    display: grid;
}

body.admin-page[data-page="accounting"] .accounting-tab-panel {
    display: none;
}

body.admin-page[data-page="accounting"] .accounting-tab-panel.active {
    display: block;
}

body.admin-page[data-page="accounting"] .accounting-chart-card-nested {
    margin-top: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

body.admin-page[data-page="accounting"] .accounting-chart-card-nested .analytics-card-header {
    padding-top: 20px;
}

body.admin-page[data-page="accounting"] .accounting-insights-grid-detail {
    margin-bottom: 0;
}

body.admin-page[data-page="accounting"] .accounting-expense-table,
body.admin-page[data-page="accounting"] .accounting-table {
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0 10px;
}

body.admin-page[data-page="accounting"] .accounting-expense-table thead th,
body.admin-page[data-page="accounting"] .accounting-table thead th {
    border-bottom: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-bottom: 8px;
}

body.admin-page[data-page="accounting"] .accounting-expense-table tbody td,
body.admin-page[data-page="accounting"] .accounting-table tbody td {
    background: #fff;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    padding-top: 16px;
    padding-bottom: 16px;
}

body.admin-page[data-page="accounting"] .accounting-expense-table tbody td:first-child,
body.admin-page[data-page="accounting"] .accounting-table tbody td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

body.admin-page[data-page="accounting"] .accounting-expense-table tbody td:last-child,
body.admin-page[data-page="accounting"] .accounting-table tbody td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

body.admin-page[data-page="accounting"] .accounting-expense-table tbody tr:hover td,
body.admin-page[data-page="accounting"] .accounting-summary-row:hover td {
    background: #f8fbff;
}

body.admin-page[data-page="accounting"] .accounting-summary-row td {
    transition: background 0.2s ease, transform 0.2s ease;
}

body.admin-page[data-page="accounting"] .accounting-expense-actions-cell,
body.admin-page[data-page="accounting"] .accounting-report-toggle {
    align-items: center;
}

body.admin-page[data-page="accounting"] .accounting-expense-action,
body.admin-page[data-page="accounting"] .accounting-report-toggle {
    border-radius: 999px;
    min-height: 36px;
    padding: 8px 12px;
}

body.admin-page[data-page="accounting"] .accounting-detail-row td {
    background: transparent;
    border: 0;
}

body.admin-page[data-page="accounting"] .accounting-detail-panel {
    padding: 8px 0 16px;
}

body.admin-page[data-page="accounting"] .accounting-detail-grid {
    gap: 12px;
}

body.admin-page[data-page="accounting"] .accounting-detail-item {
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: none;
}

body.admin-page[data-page="accounting"] .accounting-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 28px;
}

body.admin-page[data-page="accounting"] .accounting-modal[hidden] {
    display: none;
}

body.modal-open {
    overflow: hidden;
}

body.admin-page[data-page="accounting"] .accounting-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.52));
    backdrop-filter: blur(4px);
}

body.admin-page[data-page="accounting"] .accounting-modal-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
    padding: 30px;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.24);
    z-index: 1;
}

body.admin-page[data-page="accounting"] .accounting-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

body.admin-page[data-page="accounting"] .accounting-modal-header h3 {
    margin: 6px 0 0;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

body.admin-page[data-page="accounting"] .accounting-modal-close {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.94);
    color: #475569;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.admin-page[data-page="accounting"] .accounting-modal-close:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.26);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.14);
}

body.admin-page[data-page="accounting"] .accounting-modal-close:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.24);
    outline-offset: 2px;
}

body.admin-page[data-page="stock"] .stock-pricing-trigger {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
    color: #0f172a;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

body.admin-page[data-page="stock"] .stock-pricing-trigger span,
body.admin-page[data-page="stock"] .stock-pricing-trigger small {
    display: block;
    text-align: left;
}

body.admin-page[data-page="stock"] .stock-pricing-trigger small {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
}

body.admin-page[data-page="stock"] .stock-pricing-trigger:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(239, 246, 255, 0.92);
    transform: translateY(-1px);
}

body.admin-page[data-page="stock"] .stock-pricing-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 28px;
    opacity: 1;
    pointer-events: auto;
}

body.admin-page[data-page="stock"] .stock-pricing-modal[hidden] {
    display: none;
}

body.admin-page[data-page="stock"] .stock-pricing-modal .accounting-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.52));
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

body.admin-page[data-page="stock"] .stock-pricing-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
    padding: 30px;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.24);
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

body.admin-page[data-page="stock"] .stock-pricing-modal-body {
    display: grid;
    gap: 18px;
}

body.admin-page[data-page="stock"] .stock-pricing-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.admin-page[data-page="stock"] .stock-pricing-panel {
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.82);
}

body.admin-page[data-page="stock"] .stock-pricing-panel h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #0f172a;
}

body.admin-page[data-page="stock"] .stock-pricing-panel-summary {
    grid-column: 1 / -1;
}

body.admin-page[data-page="stock"] .stock-pricing-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

body.admin-page[data-page="stock"] .stock-pricing-summary-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.85);
}

body.admin-page[data-page="stock"] .stock-pricing-summary-item span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.admin-page[data-page="stock"] .stock-pricing-summary-item strong {
    color: #0f172a;
    font-size: 1rem;
}

body.admin-page[data-page="stock"] .stock-pricing-help,
body.admin-page[data-page="stock"] .stock-pricing-empty {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

body.admin-page[data-page="stock"] .stock-pricing-rule-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.admin-page[data-page="stock"] .stock-pricing-panel-notes {
    grid-column: 1 / -1;
}

body.admin-page[data-page="stock"] .stock-pricing-rule-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

body.admin-page[data-page="stock"] .stock-pricing-rule-item strong,
body.admin-page[data-page="stock"] .stock-pricing-rule-item span {
    color: #0f172a;
}

body.admin-page[data-page="stock"] .stock-pricing-tier-line {
    display: block;
}

body.admin-page[data-page="stock"] .stock-pricing-rule-item small {
    color: #64748b;
}

body.admin-page[data-page="stock"] .stock-pricing-rule-item .stock-pricing-profit {
    color: #0f766e;
    font-weight: 700;
}

body.admin-page[data-page="stock"] .stock-pricing-rule-item .stock-pricing-margin {
    color: #475569;
    font-weight: 700;
}

body.admin-page[data-page="stock"] .stock-pricing-notes {
    margin: 0;
    padding-left: 18px;
    color: #334155;
}

body.admin-page[data-page="accounting"] .accounting-expense-form-modal {
    margin-top: 20px;
    gap: 20px;
}

body.admin-page[data-page="accounting"] .accounting-expense-form-modal .accounting-expense-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

body.admin-page[data-page="accounting"] .accounting-expense-form-modal .field-group label {
    margin-bottom: 8px;
}

body.admin-page[data-page="accounting"] .accounting-expense-form-modal .field-group input,
body.admin-page[data-page="accounting"] .accounting-expense-form-modal .field-group select {
    min-height: 48px;
}

body.admin-page[data-page="accounting"] .accounting-expense-form-modal .accounting-expense-actions {
    justify-content: flex-end;
    padding-top: 4px;
}

body.admin-page[data-page="accounting"] .admin-page-header {
    gap: 16px;
}

body.admin-page[data-page="accounting"] .admin-page-header > div:nth-child(2) {
    min-width: 0;
}

body.admin-page[data-page="accounting"] .admin-page-header h1 {
    margin: 6px 0 0;
    font-size: clamp(1.6rem, 2.7vw, 2.35rem);
    line-height: 1.14;
    overflow-wrap: anywhere;
}

body.admin-page[data-page="accounting"] .accounting-command-copy,
body.admin-page[data-page="accounting"] .accounting-command-copy .accounting-helper-text {
    min-width: 0;
}

body.admin-page[data-page="accounting"] .accounting-command-copy .accounting-helper-text {
    max-width: 640px;
}

body.admin-page[data-page="accounting"] .accounting-range-switch {
    justify-content: flex-end;
}

body.admin-page[data-page="accounting"] .accounting-range-switch button {
    flex: 0 0 auto;
}

body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
    flex: 0 0 auto;
    min-height: 46px;
    white-space: nowrap;
}

body.admin-page[data-page="accounting"] .accounting-secondary-card,
body.admin-page[data-page="accounting"] .accounting-chart-card,
body.admin-page[data-page="accounting"] .accounting-details-card {
    min-width: 0;
}

body.admin-page[data-page="accounting"] .accounting-chart-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

body.admin-page[data-page="accounting"] .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.admin-page[data-page="accounting"] .accounting-expense-table,
body.admin-page[data-page="accounting"] .accounting-table {
    width: max-content;
}

body.admin-page[data-page="accounting"] .accounting-modal-dialog::-webkit-scrollbar {
    width: 10px;
}

body.admin-page[data-page="accounting"] .accounting-modal-dialog::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

body.admin-page[data-page="accounting"].modal-open .toast-container {
    top: auto;
    right: auto;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 32px));
    z-index: 1250;
    align-items: stretch;
}

body.admin-page[data-page="accounting"].modal-open .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
    text-align: center;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary,
    body.admin-page[data-page="accounting"] .accounting-secondary-summary,
    body.admin-page[data-page="accounting"] .accounting-insights-grid-detail,
    body.admin-page[data-page="accounting"] .accounting-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="accounting"] .accounting-command-bar-executive {
        align-items: stretch;
    }

    body.admin-page[data-page="accounting"] .accounting-command-actions {
        width: 100%;
    }

    body.admin-page[data-page="accounting"] .accounting-period-control {
        width: 100%;
    }
}

@media (max-width: 860px) {
    body.admin-page[data-page="accounting"] .accounting-command-bar-executive,
    body.admin-page[data-page="accounting"] .accounting-details-header {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="accounting"] .accounting-command-actions {
        justify-content: flex-start;
    }

    body.admin-page[data-page="accounting"] .accounting-period-control {
        width: 100%;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch {
        justify-content: flex-start;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="accounting"] .accounting-chart-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wrap {
        min-height: 260px;
    }

    body.admin-page[data-page="accounting"] .accounting-details-card {
        padding: 20px;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="accounting"] .admin-page-header {
        align-items: flex-start;
    }

    body.admin-page[data-page="accounting"] .admin-header-actions {
        width: 100%;
    }

    body.admin-page[data-page="accounting"] .admin-user-chip {
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
    }

    body.admin-page[data-page="accounting"] .accounting-executive-card {
        margin-bottom: 18px;
    }

    body.admin-page[data-page="accounting"] .accounting-command-bar-executive {
        padding: 20px 18px;
    }

    body.admin-page[data-page="accounting"] .accounting-command-copy h3 {
        font-size: 1.3rem;
    }

    body.admin-page[data-page="accounting"] .accounting-command-actions {
        display: grid;
        gap: 12px;
    }

    body.admin-page[data-page="accounting"] .accounting-period-control {
        width: 100%;
        gap: 6px;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch button {
        width: 100%;
        padding-inline: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
        width: 100%;
        justify-content: center;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary,
    body.admin-page[data-page="accounting"] .accounting-secondary-summary,
    body.admin-page[data-page="accounting"] .accounting-chart-grid,
    body.admin-page[data-page="accounting"] .accounting-insights-grid-detail,
    body.admin-page[data-page="accounting"] .accounting-detail-grid,
    body.admin-page[data-page="accounting"] .accounting-expense-form-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card {
        min-height: 0;
        padding: 20px 18px;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card h3 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
    }

    body.admin-page[data-page="accounting"] .accounting-secondary-card,
    body.admin-page[data-page="accounting"] .accounting-chart-card,
    body.admin-page[data-page="accounting"] .accounting-details-card {
        border-radius: 20px;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wrap {
        min-height: 220px;
        padding: 0 14px 16px;
    }

    body.admin-page[data-page="accounting"] .accounting-detail-tabs {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
        padding: 5px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    body.admin-page[data-page="accounting"] .accounting-detail-tabs::-webkit-scrollbar {
        display: none;
    }

    body.admin-page[data-page="accounting"] .accounting-tab {
        flex: 1;
        text-align: center;
        min-width: 96px;
        padding: 10px 12px;
    }

    body.admin-page[data-page="accounting"] .accounting-modal {
        padding: 16px;
    }

    body.admin-page[data-page="accounting"] .accounting-modal-dialog {
        width: min(100%, 100%);
        max-height: calc(100vh - 32px);
        padding: 22px 18px;
        border-radius: 24px;
    }

    body.admin-page[data-page="accounting"] .accounting-expense-form-modal .accounting-expense-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.admin-page[data-page="accounting"] .accounting-expense-form-modal .accounting-expense-actions {
        justify-content: stretch;
    }

    body.admin-page[data-page="accounting"] .accounting-expense-form-modal .accounting-expense-actions .btn-primary,
    body.admin-page[data-page="accounting"] .accounting-expense-form-modal .accounting-expense-actions .btn-secondary {
        width: 100%;
    }

    body.admin-page[data-page="accounting"].modal-open .toast-container {
        bottom: 16px;
        width: calc(100% - 24px);
    }

    body.admin-page[data-page="accounting"] .accounting-expense-table {
        min-width: 620px;
    }

    body.admin-page[data-page="accounting"] .accounting-table {
        min-width: 760px;
    }
}

@media (max-width: 520px) {
    body.admin-page[data-page="accounting"] .admin-main {
        padding: 14px;
    }

    body.admin-page[data-page="accounting"] .admin-page-header h1 {
        font-size: 1.42rem;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.admin-page[data-page="accounting"] .accounting-secondary-card {
        padding: 16px;
    }

    body.admin-page[data-page="accounting"] .accounting-details-card {
        padding: 16px;
    }

    body.admin-page[data-page="accounting"] .accounting-details-header {
        margin-bottom: 16px;
    }

    body.admin-page[data-page="accounting"] .accounting-modal {
        padding: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-modal-dialog {
        max-height: calc(100vh - 20px);
        padding: 18px 14px;
        border-radius: 20px;
    }

    body.admin-page[data-page="accounting"] .accounting-modal-header {
        gap: 12px;
    }

    body.admin-page[data-page="accounting"] .accounting-modal-close {
        width: 42px;
        height: 42px;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wrap {
        min-height: 200px;
    }
}

body.admin-page[data-page="products"] .product-expense-note-field {
    grid-column: span 2;
}

body.admin-page[data-page="products"] .product-business-expense-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.12);
}

body.admin-page[data-page="products"] .product-business-expense-note i {
    color: #1d4ed8;
    font-size: 18px;
    margin-top: 2px;
}

body.admin-page[data-page="products"] .product-business-expense-note strong,
body.admin-page[data-page="products"] .product-business-expense-note p {
    margin: 0;
}

body.admin-page[data-page="products"] .product-business-expense-note p {
    margin-top: 4px;
    color: #475569;
    line-height: 1.5;
}

body.admin-page[data-page="dashboard"] .dashboard-hero-card,
body.admin-page[data-page="dashboard"] .dashboard-chart-card,
body.admin-page[data-page="dashboard"] .dashboard-insight-card {
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="dashboard"] .dashboard-hero-card {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    padding: 24px;
    margin-bottom: 20px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

body.admin-page[data-page="dashboard"] .dashboard-hero-card h2 {
    margin: 6px 0 10px;
    max-width: 720px;
    font-size: clamp(1.6rem, 2.6vw, 2.3rem);
    line-height: 1.15;
}

body.admin-page[data-page="dashboard"] .dashboard-hero-text {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

body.admin-page[data-page="dashboard"] .dashboard-controls-shell {
    display: grid;
    gap: 16px;
    width: 100%;
    margin-top: 18px;
}

body.admin-page[data-page="dashboard"] .dashboard-controls {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}

body.admin-page[data-page="dashboard"] .dashboard-filter-bar,
body.admin-page[data-page="dashboard"] .dashboard-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

body.admin-page[data-page="dashboard"] .dashboard-filter-bar {
    row-gap: 10px;
}

body.admin-page[data-page="dashboard"] .dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}

body.admin-page[data-page="dashboard"] .dashboard-hero-actions {
    display: grid;
    gap: 16px;
    min-width: 320px;
}

body.admin-page[data-page="dashboard"] .dashboard-filter-panel {
    display: grid;
    gap: 12px;
    justify-items: end;
}

body.admin-page[data-page="dashboard"] .dashboard-range-switch {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.admin-page[data-page="dashboard"] .dashboard-range-switch button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 700;
    border-radius: 999px;
    min-height: 30px;
    padding: 4px 10px;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.admin-page[data-page="dashboard"] .dashboard-range-switch button:hover {
    transform: translateY(-1px);
}

body.admin-page[data-page="dashboard"] .dashboard-range-switch button.active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

body.admin-page[data-page="dashboard"] .dashboard-custom-range {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex: 1 1 520px;
    min-width: min(100%, 520px);
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
}

body.admin-page[data-page="dashboard"] .dashboard-date-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

body.admin-page[data-page="dashboard"] .dashboard-date-field span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

body.admin-page[data-page="dashboard"] .dashboard-date-field input {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}

body.admin-page[data-page="dashboard"] .dashboard-custom-range-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

body.admin-page[data-page="dashboard"] .dashboard-range-action {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="dashboard"] .dashboard-range-action:hover {
    transform: translateY(-1px);
}

body.admin-page[data-page="dashboard"] .dashboard-range-action.apply {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

body.admin-page[data-page="dashboard"] .dashboard-range-action.clear {
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    border-color: rgba(255, 255, 255, 0.2);
}

body.admin-page[data-page="dashboard"] .dashboard-range-error {
    margin: 0;
    color: #ffe2e2;
    font-size: 0.9rem;
    font-weight: 600;
}

body.admin-page[data-page="dashboard"] .dashboard-quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

body.admin-page[data-page="dashboard"] .dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.admin-page[data-page="dashboard"] .dashboard-action-btn.primary {
    background: #fff;
    color: #0f172a;
}

body.admin-page[data-page="dashboard"] .dashboard-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
}

body.admin-page[data-page="dashboard"] .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.admin-page[data-page="dashboard"] .summary-card {
    min-height: 118px;
    border-radius: 20px;
}

body.admin-page[data-page="dashboard"] .summary-card-net-profit {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(255, 255, 255, 1));
}

body.admin-page[data-page="dashboard"] .summary-card-net-profit.loss {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(255, 255, 255, 1));
}

body.admin-page[data-page="dashboard"] .summary-card-net-profit.profit h3 {
    color: #15803d;
}

body.admin-page[data-page="dashboard"] .summary-card-net-profit.loss h3 {
    color: #b91c1c;
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value.profit {
    color: #22c55e;
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value.loss {
    color: #ef4444;
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value.neutral {
    color: #475569;
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value.profit::before {
    content: "Profit";
    color: #166534;
    background: rgba(34, 197, 94, 0.14);
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value.loss::before {
    content: "Loss";
    color: #991b1b;
    background: rgba(239, 68, 68, 0.14);
}

body.admin-page[data-page="dashboard"] .dashboard-net-profit-value.neutral::before {
    content: "Profit";
    color: #475569;
    background: rgba(148, 163, 184, 0.14);
}

body.admin-page[data-page="dashboard"] .summary-card-icon.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

body.admin-page[data-page="dashboard"] .summary-card-icon.success {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

body.admin-page[data-page="dashboard"] .summary-card-icon.margin {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
}

body.admin-page[data-page="dashboard"] .summary-card-icon.customers {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

body.admin-page[data-page="dashboard"] .dashboard-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

body.admin-page[data-page="dashboard"] .dashboard-insight-card {
    background: #fff;
}

body.admin-page[data-page="dashboard"] .dashboard-insight-card.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 1));
}

body.admin-page[data-page="dashboard"] .dashboard-insight-stack {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-insight-metric {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

body.admin-page[data-page="dashboard"] .dashboard-insight-metric span,
body.admin-page[data-page="dashboard"] .dashboard-insight-metric small {
    color: #64748b;
}

body.admin-page[data-page="dashboard"] .dashboard-insight-metric strong {
    font-size: 1.15rem;
    color: #0f172a;
}

body.admin-page[data-page="dashboard"] .dashboard-channel-metric {
    gap: 8px;
}

body.admin-page[data-page="dashboard"] .dashboard-channel-metric small {
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
}

body.admin-page[data-page="dashboard"] .dashboard-channel-metric.dominant {
    border-color: rgba(37, 99, 235, 0.22);
    background: linear-gradient(180deg, #f8fbff, #f8fafc);
}

body.admin-page[data-page="dashboard"] .dashboard-channel-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

body.admin-page[data-page="dashboard"] .dashboard-channel-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

body.admin-page[data-page="dashboard"] .dashboard-channel-bar-fill.retail {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

body.admin-page[data-page="dashboard"] .dashboard-channel-bar-fill.wholesale {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

body.admin-page[data-page="dashboard"] .dashboard-channel-dominant {
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page[data-page="dashboard"] .dashboard-profit-margin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

body.admin-page[data-page="dashboard"] .dashboard-profit-margin-badge.profit {
    color: #15803d;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.18);
}

body.admin-page[data-page="dashboard"] .dashboard-profit-margin-badge.loss {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.18);
}

body.admin-page[data-page="dashboard"] .dashboard-profit-margin-badge.neutral {
    color: #475569;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.18);
}

body.admin-page[data-page="dashboard"] .dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

body.admin-page[data-page="dashboard"] .dashboard-chart-wide {
    grid-column: span 2;
}

body.admin-page[data-page="dashboard"] .dashboard-chart-card {
    background: #fff;
}

body.admin-page[data-page="dashboard"] .dashboard-chart-wrap {
    position: relative;
    min-height: 280px;
}

body.admin-page[data-page="dashboard"] .dashboard-chart-wrap.compact {
    min-height: 240px;
}

body.admin-page[data-page="dashboard"] .dashboard-chart-wrap.empty::after {
    content: attr(data-empty-message);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 20px;
    border-radius: 16px;
    color: #64748b;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(248, 250, 252, 0.98));
    border: 1px dashed rgba(148, 163, 184, 0.35);
}

body.admin-page[data-page="dashboard"] .dashboard-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
}

body.admin-page[data-page="dashboard"] .dashboard-activity-list {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

body.admin-page[data-page="dashboard"] .dashboard-activity-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    flex-shrink: 0;
}

body.admin-page[data-page="dashboard"] .dashboard-activity-item.delivery .dashboard-activity-icon {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

body.admin-page[data-page="dashboard"] .dashboard-activity-item.product .dashboard-activity-icon {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

body.admin-page[data-page="dashboard"] .dashboard-activity-copy {
    display: grid;
    gap: 4px;
}

body.admin-page[data-page="dashboard"] .dashboard-activity-copy strong {
    color: #0f172a;
}

body.admin-page[data-page="dashboard"] .dashboard-activity-copy span {
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid,
    body.admin-page[data-page="dashboard"] .dashboard-insight-grid,
    body.admin-page[data-page="dashboard"] .dashboard-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="dashboard"] .dashboard-chart-wide {
        grid-column: span 2;
    }

    body.admin-page[data-page="dashboard"] .dashboard-content-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-card {
        flex-direction: column;
    }

    body.admin-page[data-page="dashboard"] .dashboard-controls-shell,
    body.admin-page[data-page="dashboard"] .dashboard-controls,
    body.admin-page[data-page="dashboard"] .dashboard-custom-range {
        width: 100%;
    }

    body.admin-page[data-page="dashboard"] .dashboard-filter-bar {
        justify-content: flex-start;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range {
        flex-wrap: wrap;
        min-width: 0;
        flex-basis: 100%;
    }
}

@media (max-width: 760px) {
    body.admin-page .admin-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.admin-page .admin-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    body.admin-page .admin-user-chip,
    body.admin-page .admin-logout-btn {
        width: 100%;
        justify-content: center;
    }

    body.login-page .login-card {
        padding: 24px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid,
    body.admin-page[data-page="dashboard"] .dashboard-insight-grid,
    body.admin-page[data-page="dashboard"] .dashboard-chart-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="dashboard"] .dashboard-chart-wide {
        grid-column: span 1;
    }

    body.admin-page[data-page="dashboard"] .dashboard-controls-shell {
        gap: 10px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-controls {
        gap: 10px;
        padding: 12px;
        border-radius: 18px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-filter-bar {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
        width: 100%;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        flex: none;
    }

    body.admin-page[data-page="dashboard"] .dashboard-date-field {
        display: grid;
        gap: 4px;
        width: 100%;
        min-width: 0;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch button,
    body.admin-page[data-page="dashboard"] .dashboard-range-action,
    body.admin-page[data-page="dashboard"] .dashboard-date-field input {
        width: 100%;
        min-width: 0;
    }

    body.admin-page[data-page="dashboard"] .dashboard-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}

body.admin-page[data-page="products"] .product-wizard-shell,
body.admin-page[data-page="products"] .product-list-page-card {
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 26%), #fff;
}

body.admin-page[data-page="products"] .product-wizard-shell {
    padding: 24px;
}

body.admin-page[data-page="products"] .product-wizard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

body.admin-page[data-page="products"] .product-list-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="products"] .product-list-link.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    color: #fff;
}

body.admin-page[data-page="products"] .product-list-link:hover {
    transform: translateY(-1px);
}

body.admin-page[data-page="products"] .product-stepper {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

body.admin-page[data-page="products"] .product-stepper-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

body.admin-page[data-page="products"] .product-stepper-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    transition: width 0.25s ease;
}

body.admin-page[data-page="products"] .product-stepper-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

body.admin-page[data-page="products"] .product-step-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #fff;
    color: #475569;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="products"] .product-step-chip:disabled,
body.admin-page[data-page="products"] .product-step-chip.locked {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

body.admin-page[data-page="products"] .product-step-chip-number {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 800;
}

body.admin-page[data-page="products"] .product-step-chip.active,
body.admin-page[data-page="products"] .product-step-chip.complete {
    border-color: rgba(37, 99, 235, 0.24);
    background: #f8fbff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

body.admin-page[data-page="products"] .product-step-chip.active .product-step-chip-number,
body.admin-page[data-page="products"] .product-step-chip.complete .product-step-chip-number {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

body.admin-page[data-page="products"] .product-wizard-steps {
    display: grid;
}

body.admin-page[data-page="products"] .product-wizard-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.admin-page[data-page="products"] .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.admin-page[data-page="products"] .product-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

body.admin-page[data-page="products"] .product-step-actions .btn-secondary:last-child {
    margin-left: auto;
}

body.admin-page[data-page="products"] .product-step-actions .btn-secondary:disabled,
body.admin-page[data-page="products"] .product-step-actions .btn-secondary.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(226, 232, 240, 0.95);
    color: #64748b;
    box-shadow: none;
}

body.admin-page[data-page="products"] .product-step-actions .btn-secondary:not(:disabled):hover {
    transform: translateY(-1px);
}

body.admin-page[data-page="products"] .product-step-helper {
    margin: 16px 0 0;
    min-height: 18px;
    font-size: 13px;
    color: #b45309;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.admin-page[data-page="products"] .product-step-helper.visible {
    opacity: 1;
}

body.admin-page[data-page="products"] .field-group.invalid input,
body.admin-page[data-page="products"] .field-group.invalid select,
body.admin-page[data-page="products"] .field-group.invalid textarea,
body.admin-page[data-page="products"] .field-group input.is-invalid,
body.admin-page[data-page="products"] .field-group select.is-invalid,
body.admin-page[data-page="products"] .field-group textarea.is-invalid {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    background: #fff7f7;
}

body.admin-page[data-page="products"] .product-price-suggestion-card {
    margin-top: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border: 1px solid rgba(37, 99, 235, 0.14);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.06);
    overflow: hidden;
}

body.admin-page[data-page="products"] .product-price-suggestion-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
}

body.admin-page[data-page="products"] .product-price-suggestion-summary::-webkit-details-marker {
    display: none;
}

body.admin-page[data-page="products"] .product-price-suggestion-head {
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.admin-page[data-page="products"] .product-price-suggestion-head span,
body.admin-page[data-page="products"] .product-price-suggestion-helper {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

body.admin-page[data-page="products"] .product-suggestion-action {
    margin-top: 10px;
    width: 100%;
}

body.admin-page[data-page="products"] .product-price-suggestion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

body.admin-page[data-page="products"] .product-price-suggestion-toggle i {
    transition: transform 0.2s ease;
}

body.admin-page[data-page="products"] .product-price-suggestion-card[open] .product-price-suggestion-toggle i {
    transform: rotate(180deg);
}

body.admin-page[data-page="products"] .product-price-suggestion-body {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
}

body.admin-page[data-page="products"] .product-price-suggestion-helper.invalid {
    color: #b91c1c;
}

body.admin-page[data-page="products"] .product-advanced-panel {
    margin-top: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: #f8fafc;
}

body.admin-page[data-page="products"] .product-advanced-panel summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 800;
    color: #0f172a;
}

body.admin-page[data-page="products"] .product-advanced-panel summary::-webkit-details-marker {
    display: none;
}

body.admin-page[data-page="products"] .product-advanced-panel summary i {
    transition: transform 0.2s ease;
}

body.admin-page[data-page="products"] .product-advanced-panel.open summary i,
body.admin-page[data-page="products"] .product-advanced-panel[open] summary i {
    transform: rotate(180deg);
}

body.admin-page[data-page="products"] .product-advanced-panel .advanced-grid {
    padding: 0 18px 18px;
}

body.admin-page[data-page="products"] .product-other-cost-builder {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
    gap: 10px;
}

body.admin-page[data-page="products"] .product-other-cost-list {
    display: grid;
    gap: 14px;
    margin-top: 0;
}

body.admin-page[data-page="products"] .product-other-cost-empty {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    color: #64748b;
    font-size: 13px;
}

body.admin-page[data-page="products"] .product-cost-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

body.admin-page[data-page="products"] .product-cost-item-copy {
    display: grid;
    gap: 4px;
}

body.admin-page[data-page="products"] .product-cost-item-copy span {
    color: #64748b;
    font-size: 13px;
}

body.admin-page[data-page="products"] .product-cost-remove {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.admin-page[data-page="products"] .product-cost-remove:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.14);
}

body.admin-page[data-page="products"] .product-wholesale-toggle-row {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

body.admin-page[data-page="products"] .product-wholesale-toggle {
    justify-self: start;
    font-weight: 700;
}

body.admin-page[data-page="products"] .product-wholesale-helper {
    margin: 0;
    font-size: 13px;
    color: #15803d;
}

body.admin-page[data-page="products"] .product-wholesale-helper.is-disabled {
    color: #b45309;
}

body.admin-page[data-page="products"] .product-advanced-panel.wholesale-disabled .advanced-grid input:disabled {
    opacity: 0.6;
}

body.admin-page[data-page="products"] .product-advanced-panel.wholesale-disabled .advanced-grid .field-group.readonly-field input[readonly] {
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body.admin-page[data-page="products"] .product-insight-banner {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

body.admin-page[data-page="products"] .product-profit-feedback {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
    border: 1px solid transparent;
}

body.admin-page[data-page="products"] .product-profit-feedback.good {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
    color: #15803d;
}

body.admin-page[data-page="products"] .product-profit-feedback.warn {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.2);
    color: #b45309;
}

body.admin-page[data-page="products"] .product-profit-feedback.bad {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
    color: #b91c1c;
}

body.admin-page[data-page="products"] .product-media-compact {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

body.admin-page[data-page="products"] .product-image-preview-wrap.compact {
    gap: 8px;
}

body.admin-page[data-page="products"] .product-image-preview.small {
    width: 120px;
    height: 120px;
    aspect-ratio: auto;
    justify-self: start;
}

body.admin-page[data-page="products"] .product-media-grid {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

body.admin-page[data-page="products"] .product-media-fields {
    display: grid;
    gap: 14px;
}

body.admin-page[data-page="products"] .compact-upload {
    display: grid;
    gap: 10px;
}

body.admin-page[data-page="products"] .product-action-bar {
    position: sticky;
    bottom: 18px;
    z-index: 5;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
}

body.admin-page[data-page="products"] .product-action-bar-copy {
    display: grid;
    gap: 4px;
}

body.admin-page[data-page="products"] .product-action-bar-copy span {
    color: #64748b;
}

body.admin-page[data-page="products"] .product-save-helper {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #b45309;
}

body.admin-page[data-page="products"] .product-save-helper.ready {
    color: #15803d;
}

body.admin-page[data-page="products"] .product-action-bar-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.admin-page[data-page="products"] .product-submit-sticky {
    min-width: 180px;
    min-height: 50px;
    border-radius: 16px;
}

body.admin-page[data-page="products"] .product-submit-sticky:disabled,
body.admin-page[data-page="products"] .product-submit-sticky.is-disabled {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #f8fafc;
    box-shadow: none;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

body.admin-page[data-page="products"] .product-submit-sticky:not(:disabled):hover {
    transform: translateY(-1px);
}

body.admin-page[data-page="products"] .product-list-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="products"] .product-stepper-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="products"] .product-media-compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="products"] .product-wizard-header,
    body.admin-page[data-page="products"] .product-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="products"] .product-stepper-nav,
    body.admin-page[data-page="products"] .compact-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-other-cost-builder {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-action-bar-buttons,
    body.admin-page[data-page="products"] .product-list-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    body.admin-page[data-page="products"] .product-action-bar-buttons > *,
    body.admin-page[data-page="products"] .product-list-toolbar-actions > * {
        flex: 1 1 auto;
    }
}

body.admin-page[data-page="dashboard"] .dashboard-hero-card.dashboard-hero-compact {
    padding: 18px 20px;
    margin-bottom: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-hero-compact h2 {
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    margin: 6px 0 8px;
}

body.admin-page[data-page="dashboard"] .dashboard-alert-bar {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-alert {
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 700;
    border: 1px solid transparent;
}

body.admin-page[data-page="dashboard"] .dashboard-alert.warning {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.18);
    color: #b45309;
}

body.admin-page[data-page="dashboard"] .dashboard-alert.danger {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.18);
    color: #b91c1c;
}

body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact {
    margin-bottom: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card {
    min-height: 98px;
    padding: 16px 18px;
}

body.admin-page[data-page="dashboard"] .dashboard-focus-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 16px;
    margin-bottom: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-primary-chart-card {
    padding: 18px;
}

body.admin-page[data-page="dashboard"] .dashboard-primary-chart-card .dashboard-chart-wrap {
    min-height: 250px;
}

body.admin-page[data-page="dashboard"] .dashboard-insight-card-compact {
    padding: 18px;
}

body.admin-page[data-page="dashboard"] .dashboard-secondary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

body.admin-page[data-page="dashboard"] .summary-card-secondary {
    min-height: 84px;
    padding: 14px 16px;
}

body.admin-page[data-page="dashboard"] .summary-card-secondary h3 {
    font-size: 1.3rem;
}

body.admin-page[data-page="dashboard"] .dashboard-detail-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

body.admin-page[data-page="dashboard"] .dashboard-detail-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="dashboard"] .dashboard-detail-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="dashboard"] .dashboard-detail-toggle i {
    transition: transform 0.2s ease;
}

body.admin-page[data-page="dashboard"] .dashboard-detail-toggle.open i {
    transform: rotate(180deg);
}

body.admin-page[data-page="dashboard"] .dashboard-activity-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 700;
}

body.admin-page[data-page="dashboard"] .dashboard-details {
    display: grid;
    gap: 16px;
}

body.admin-page[data-page="dashboard"] .dashboard-chart-grid.compact {
    margin-bottom: 0;
}

body.admin-page[data-page="dashboard"] .dashboard-detail-panels {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
}

body.admin-page[data-page="dashboard"] .dashboard-detail-panels .dashboard-insight-card,
body.admin-page[data-page="dashboard"] .dashboard-detail-panels .analytics-card {
    padding: 18px;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="dashboard"] .dashboard-focus-grid,
    body.admin-page[data-page="dashboard"] .dashboard-detail-panels,
    body.admin-page[data-page="dashboard"] .dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

body.admin-page[data-page="settings"] .settings-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    margin-bottom: 18px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 55%, #334155 100%);
    color: #f8fafc;
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
}

body.admin-page[data-page="settings"] .settings-hero-copy h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

body.admin-page[data-page="settings"] .settings-hero-copy p:last-child {
    margin: 0;
    max-width: 62ch;
    color: rgba(226, 232, 240, 0.82);
    line-height: 1.7;
}

body.admin-page[data-page="settings"] .settings-hero-status {
    display: grid;
    gap: 12px;
    min-width: 250px;
}

body.admin-page[data-page="settings"] .settings-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.admin-page[data-page="settings"] .settings-status-pill.success {
    color: #dcfce7;
}

body.admin-page[data-page="settings"] .settings-status-pill.neutral {
    color: #e2e8f0;
}

body.admin-page[data-page="settings"] .settings-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

body.admin-page[data-page="settings"] .settings-shortcut-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    text-align: left;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="settings"] .settings-shortcut-card.active {
    border-color: rgba(201, 111, 50, 0.24);
    background: linear-gradient(135deg, rgba(201, 111, 50, 0.12), rgba(255, 255, 255, 0.98));
}

body.admin-page[data-page="settings"] .settings-shortcut-card strong,
body.admin-page[data-page="settings"] .settings-shortcut-card small {
    display: block;
}

body.admin-page[data-page="settings"] .settings-shortcut-card small {
    margin-top: 4px;
    color: #64748b;
}

body.admin-page[data-page="settings"] .settings-shortcut-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(201, 111, 50, 0.12);
    color: #8c4a22;
    font-size: 1rem;
}

body.admin-page[data-page="settings"] .settings-layout-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

body.admin-page[data-page="settings"] .settings-side-card,
body.admin-page[data-page="settings"] .settings-panel {
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="settings"] .settings-side-card {
    padding: 24px;
}

body.admin-page[data-page="settings"] .settings-section-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.admin-page[data-page="settings"] .settings-side-card h3,
body.admin-page[data-page="settings"] .settings-panel h3 {
    margin: 14px 0 8px;
}

body.admin-page[data-page="settings"] .settings-side-card p,
body.admin-page[data-page="settings"] .settings-panel-head p,
body.admin-page[data-page="settings"] .settings-logout-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

body.admin-page[data-page="settings"] .settings-bullet-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

body.admin-page[data-page="settings"] .settings-bullet-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-weight: 600;
}

body.admin-page[data-page="settings"] .settings-bullet-list i {
    color: #16a34a;
}

body.admin-page[data-page="settings"] .settings-panel {
    padding: 24px;
}

body.admin-page[data-page="settings"] .settings-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

body.admin-page[data-page="settings"] .settings-password-form {
    display: grid;
    gap: 18px;
}

body.admin-page[data-page="settings"] .settings-field-group {
    gap: 8px;
}

body.admin-page[data-page="settings"] .settings-input-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.admin-page[data-page="settings"] .settings-input-shell:focus-within {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #fff;
}

body.admin-page[data-page="settings"] .settings-input-shell input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
}

body.admin-page[data-page="settings"] .settings-password-toggle {
    min-width: 64px;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 800;
}

body.admin-page[data-page="settings"] .settings-strength-wrap {
    display: grid;
    gap: 10px;
}

body.admin-page[data-page="settings"] .settings-strength-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

body.admin-page[data-page="settings"] .settings-strength-bar span {
    display: block;
    width: 18%;
    height: 100%;
    border-radius: inherit;
    background: #94a3b8;
    transition: width 0.2s ease, background-color 0.2s ease;
}

body.admin-page[data-page="settings"] .settings-strength-hint {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

body.admin-page[data-page="settings"] .settings-inline-error {
    min-height: 18px;
}

body.admin-page[data-page="settings"] .settings-field-group.invalid .settings-input-shell {
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
    background: #fff7f7;
}

body.admin-page[data-page="settings"] .settings-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 6px;
}

body.admin-page[data-page="settings"] .settings-save-btn,
body.admin-page[data-page="settings"] .settings-cancel-btn {
    width: auto;
    min-width: 160px;
}

body.admin-page[data-page="settings"] .settings-cancel-btn {
    padding: 14px 20px;
}

body.admin-page[data-page="settings"] .settings-logout-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.admin-page[data-page="settings"] .settings-logout-card strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

body.admin-page[data-page="settings"] .settings-logout-btn {
    white-space: nowrap;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="settings"] .settings-layout-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="settings"] .settings-panel-head,
    body.admin-page[data-page="settings"] .settings-hero-card,
    body.admin-page[data-page="settings"] .settings-logout-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="settings"] .settings-shortcut-grid,
    body.admin-page[data-page="settings"] .settings-form-actions {
        grid-template-columns: 1fr;
        display: grid;
    }

    body.admin-page[data-page="settings"] .settings-save-btn,
    body.admin-page[data-page="settings"] .settings-cancel-btn,
    body.admin-page[data-page="settings"] .settings-logout-btn {
        width: 100%;
    }
}

body.admin-page[data-page="orders"] .admin-page-header {
    gap: 16px;
}

body.admin-page[data-page="orders"] .admin-page-header > div:nth-child(2) {
    min-width: 0;
}

body.admin-page[data-page="orders"] .admin-page-header h1 {
    margin: 6px 0 0;
    font-size: clamp(1.6rem, 2.8vw, 2.35rem);
    line-height: 1.14;
    overflow-wrap: anywhere;
}

body.admin-page[data-page="orders"] #order-form-card,
body.admin-page[data-page="orders"] #orders-results-section {
    overflow: hidden;
}

body.admin-page[data-page="orders"] .form-row,
body.admin-page[data-page="orders"] .filter-bar {
    align-items: stretch;
}

body.admin-page[data-page="orders"] .filter-section {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

body.admin-page[data-page="orders"] .orders-results-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

body.admin-page[data-page="orders"] .filter-bar {
    flex: 1 1 auto;
    gap: 12px;
    margin-bottom: 0;
}

body.admin-page[data-page="orders"] .date-row {
    display: flex;
    gap: 8px;
    flex: 1 1 280px;
    min-width: 220px;
}

body.admin-page[data-page="orders"] .date-row input {
    flex: 1 1 50%;
    min-width: 0;
}

body.admin-page[data-page="orders"] .filter-search {
    flex: 1 1 100%;
    min-width: 0;
}

body.admin-page[data-page="orders"] .quick-date-filters.time-filter-group {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
    padding: 4px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

body.admin-page[data-page="orders"] .quick-date-filters.time-filter-group .time-btn,
body.admin-page[data-page="orders"] .quick-date-filters button {
    flex: 1 1 0;
    min-width: 30%;
    min-height: 44px;
    padding: 10px 8px;
    border-radius: 25px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: #f8fafc;
    color: #1e3a8a;
    font-weight: 600;
    text-align: center;
    box-shadow: none;
}

body.admin-page[data-page="orders"] .quick-date-filters button.active,
body.admin-page[data-page="orders"] .quick-date-filters button:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 22px rgba(29, 78, 216, 0.18);
}

body.admin-page[data-page="orders"] .reset-btn {
    width: 100%;
    min-height: 42px;
    margin-top: -2px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: none;
}

body.admin-page[data-page="orders"] .field-stack,
body.admin-page[data-page="orders"] .sale-type-field,
body.admin-page[data-page="orders"] .qty-group {
    min-width: 0;
}

body.admin-page[data-page="orders"] .field-stack input,
body.admin-page[data-page="orders"] .field-stack select,
body.admin-page[data-page="orders"] .filter-bar input,
body.admin-page[data-page="orders"] .filter-bar select,
body.admin-page[data-page="orders"] .qty-group input,
body.admin-page[data-page="orders"] #add-item-btn,
body.admin-page[data-page="orders"] .quick-date-filters button,
body.admin-page[data-page="orders"] .pagination button,
body.admin-page[data-page="orders"] .status-select {
    min-height: 46px;
}

body.admin-page[data-page="orders"] .remark-builder {
    align-items: stretch;
    gap: 10px;
}

body.admin-page[data-page="orders"] .remark-chip-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

body.admin-page[data-page="orders"] .remark-option {
    flex: 0 0 auto;
}

body.admin-page[data-page="orders"] .remark-chip {
    padding: 9px 15px;
    min-height: 38px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

body.admin-page[data-page="orders"] .remark-option input:checked + .remark-chip,
body.admin-page[data-page="orders"] .remark-chip.selected {
    transform: none;
    box-shadow: 0 10px 18px rgba(31, 41, 51, 0.12);
}

body.admin-page[data-page="orders"] .remark-note-input {
    flex: 1 1 100%;
    min-width: 220px;
    margin-top: 0;
}

body.admin-page[data-page="orders"] #product-section .form-row {
    margin-top: 15px;
}

body.admin-page[data-page="orders"] #product-name,
body.admin-page[data-page="orders"] #comic-name,
body.admin-page[data-page="orders"] .sale-type-field,
body.admin-page[data-page="orders"] .qty-group,
body.admin-page[data-page="orders"] #add-item-btn {
    flex: 1 1 180px;
}

body.admin-page[data-page="orders"] .qty-group {
    justify-content: space-between;
}

body.admin-page[data-page="orders"] .qty-group label {
    white-space: nowrap;
}

body.admin-page[data-page="orders"] .qty-group input {
    width: 100%;
    min-width: 0;
}

body.admin-page[data-page="orders"] .items-preview {
    overflow: hidden;
}

body.admin-page[data-page="orders"] .item-row-preview {
    gap: 14px;
}

body.admin-page[data-page="orders"] .item-row-copy,
body.admin-page[data-page="orders"] .item-row-actions {
    min-width: 0;
}

body.admin-page[data-page="orders"] .item-row-actions {
    justify-content: flex-end;
}

body.admin-page[data-page="orders"] .item-inline-field {
    min-width: 120px;
}

body.admin-page[data-page="orders"] .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.admin-page[data-page="orders"] .admin-table {
    min-width: 1380px;
}

body.admin-page[data-page="orders"] .action-cell {
    white-space: nowrap;
}

body.admin-page[data-page="orders"] .icon-btn {
    width: 40px;
    height: 40px;
}

body.admin-page[data-page="orders"] .icon-btn.reopen {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

body.admin-page[data-page="orders"] .order-reopened-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-top: 6px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.admin-page[data-page="orders"] .remark-audit-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    margin-top: 6px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
}

body.admin-page[data-page="orders"] .pagination {
    justify-content: center;
}

@media (max-width: 1120px) {
    body.admin-page[data-page="orders"] .form-row:first-of-type .field-stack {
        flex: 1 1 calc(50% - 10px);
    }

    body.admin-page[data-page="orders"] .filter-bar > *:not(.date-row) {
        flex: 1 1 calc(50% - 10px);
    }

    body.admin-page[data-page="orders"] .orders-results-toolbar {
        flex-wrap: wrap;
    }

    body.admin-page[data-page="orders"] .remark-note-input {
        flex-basis: 100%;
    }
}

@media (max-width: 860px) {
    body.admin-page[data-page="orders"] .admin-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.admin-page[data-page="orders"] .admin-header-actions {
        width: 100%;
    }

    body.admin-page[data-page="orders"] .admin-user-chip {
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
    }

    body.admin-page[data-page="orders"] .form-row:first-of-type .field-stack,
    body.admin-page[data-page="orders"] .filter-bar > *:not(.date-row) {
        flex: 1 1 100%;
    }

    body.admin-page[data-page="orders"] .orders-results-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="orders"] .orders-create-trigger {
        width: 100%;
        justify-content: center;
    }

    body.admin-page[data-page="orders"] #product-name,
    body.admin-page[data-page="orders"] #comic-name,
    body.admin-page[data-page="orders"] .sale-type-field,
    body.admin-page[data-page="orders"] .qty-group,
    body.admin-page[data-page="orders"] #add-item-btn {
        flex: 1 1 calc(50% - 10px);
    }

    body.admin-page[data-page="orders"] .quick-date-filters {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    body.admin-page[data-page="orders"] .quick-date-filters button {
        width: 100%;
        justify-content: center;
    }

    body.admin-page[data-page="orders"] .order-form-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    body.admin-page[data-page="orders"] .order-form-actions .btn-primary,
    body.admin-page[data-page="orders"] .order-form-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="orders"] .admin-main {
        padding: 16px;
    }

    body.admin-page[data-page="orders"] #order-form-card h3,
    body.admin-page[data-page="orders"] #orders-results-section h3 {
        overflow-wrap: anywhere;
    }

    body.admin-page[data-page="orders"] .remark-builder {
        gap: 8px;
    }

    body.admin-page[data-page="orders"] .remark-chip-row {
        gap: 8px;
    }

    body.admin-page[data-page="orders"] .remark-option {
        flex: 0 0 auto;
    }

    body.admin-page[data-page="orders"] .remark-chip {
        padding: 8px 14px;
        min-height: 36px;
    }

    body.admin-page[data-page="orders"] .remark-note-input {
        flex: 1 1 100%;
        min-width: 0;
    }

    body.admin-page[data-page="orders"] #product-name,
    body.admin-page[data-page="orders"] #comic-name,
    body.admin-page[data-page="orders"] .sale-type-field,
    body.admin-page[data-page="orders"] .qty-group,
    body.admin-page[data-page="orders"] #add-item-btn {
        flex: 1 1 100%;
    }

    body.admin-page[data-page="orders"] .qty-group {
        padding: 10px 12px;
        border-radius: 12px;
    }

    body.admin-page[data-page="orders"] .items-preview {
        padding: 12px;
        border-radius: 16px;
    }

    body.admin-page[data-page="orders"] .item-row-preview {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 14px;
    }

    body.admin-page[data-page="orders"] .item-row-actions {
        width: 100%;
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body.admin-page[data-page="orders"] .item-inline-field {
        min-width: 0;
    }

    body.admin-page[data-page="orders"] .item-inline-field input,
    body.admin-page[data-page="orders"] .item-inline-field select {
        width: 100%;
        min-width: 0;
    }

    body.admin-page[data-page="orders"] .remove-item-btn {
        width: 42px;
        height: 42px;
        justify-self: end;
    }

    body.admin-page[data-page="orders"] .filter-section {
        gap: 10px;
        margin-bottom: 12px;
    }

    body.admin-page[data-page="orders"] .filter-bar {
        gap: 10px;
    }

    body.admin-page[data-page="orders"] .date-row {
        width: 100%;
        min-width: 0;
    }

    body.admin-page[data-page="orders"] .quick-date-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    body.admin-page[data-page="orders"] .quick-date-filters .time-btn {
        flex: 1 1 calc(33.333% - 6px);
    }

    body.admin-page[data-page="orders"] .order-form-actions {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="orders"] .pagination {
        justify-content: flex-start;
    }

    body.admin-page[data-page="orders"] .pagination button {
        min-width: 44px;
        height: 44px;
    }
}

@media (max-width: 520px) {
    body.admin-page[data-page="orders"] .admin-main {
        padding: 14px;
    }

    body.admin-page[data-page="orders"] .admin-page-header h1 {
        font-size: 1.42rem;
    }

    body.admin-page[data-page="orders"] .remark-chip-row {
        gap: 6px;
    }

    body.admin-page[data-page="orders"] .remark-option {
        flex: 0 0 auto;
    }

    body.admin-page[data-page="orders"] .remark-chip {
        padding: 8px 12px;
        min-height: 36px;
        font-size: 0.78rem;
    }

    body.admin-page[data-page="orders"] .item-row-actions {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="orders"] .filter-section {
        gap: 8px;
    }

    body.admin-page[data-page="orders"] .filter-bar {
        gap: 8px;
    }

    body.admin-page[data-page="orders"] .date-row {
        gap: 6px;
    }

    body.admin-page[data-page="orders"] .quick-date-filters.time-filter-group {
        gap: 6px;
        padding: 4px;
    }

    body.admin-page[data-page="orders"] .quick-date-filters .time-btn {
        min-height: 42px;
        padding: 8px 6px;
        font-size: 0.82rem;
    }

    body.admin-page[data-page="orders"] .reset-btn {
        min-height: 40px;
    }
}

/* Products page responsive */
body.admin-page[data-page="products"] .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.admin-page[data-page="products"] .product-wizard-header > *,
body.admin-page[data-page="products"] .product-form-section-head > div,
body.admin-page[data-page="products"] .product-action-bar-copy,
body.admin-page[data-page="products"] .product-media-fields,
body.admin-page[data-page="products"] .field-group {
    min-width: 0;
}

body.admin-page[data-page="products"] .product-step-chip {
    min-width: 0;
}

body.admin-page[data-page="products"] .product-step-chip span:last-child,
body.admin-page[data-page="products"] .product-management-helper,
body.admin-page[data-page="products"] .product-action-bar-copy span,
body.admin-page[data-page="products"] .product-action-bar-copy strong,
body.admin-page[data-page="products"] .product-price-suggestion-head span,
body.admin-page[data-page="products"] .product-form-section-head p {
    overflow-wrap: anywhere;
}

body.admin-page[data-page="products"] .product-list-link,
body.admin-page[data-page="products"] .product-step-actions .btn-secondary,
body.admin-page[data-page="products"] .product-action-bar-buttons button,
body.admin-page[data-page="products"] .product-suggestion-action {
    min-height: 46px;
}

@media (max-width: 1120px) {
    body.admin-page[data-page="products"] .admin-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 14px;
    }

    body.admin-page[data-page="products"] .admin-header-actions {
        width: 100%;
    }

    body.admin-page[data-page="products"] .admin-user-chip {
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
    }

    body.admin-page[data-page="products"] .product-wizard-shell {
        padding: 22px;
    }

    body.admin-page[data-page="products"] .product-stepper-nav,
    body.admin-page[data-page="products"] .compact-grid,
    body.admin-page[data-page="products"] .product-section-grid,
    body.admin-page[data-page="products"] .product-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="products"] .product-price-suggestion-body .compact-grid,
    body.admin-page[data-page="products"] .product-advanced-panel .advanced-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="products"] .product-step-chip {
        padding: 12px;
    }

    body.admin-page[data-page="products"] .product-step-chip span:last-child {
        font-size: 0.93rem;
    }

    body.admin-page[data-page="products"] .product-action-bar {
        bottom: 14px;
        padding: 14px 16px;
    }
}

@media (max-width: 860px) {
    body.admin-page[data-page="products"] .admin-main {
        padding: 18px;
    }

    body.admin-page[data-page="products"] .admin-page-header h1 {
        font-size: clamp(1.55rem, 4vw, 1.9rem);
    }

    body.admin-page[data-page="products"] .product-wizard-shell {
        padding: 20px;
        border-radius: 22px;
    }

    body.admin-page[data-page="products"] .product-wizard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    body.admin-page[data-page="products"] .product-list-link {
        width: 100%;
        justify-content: center;
    }

    body.admin-page[data-page="products"] .product-form-section-head {
        gap: 12px;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-summary,
    body.admin-page[data-page="products"] .product-wizard-panel,
    body.admin-page[data-page="products"] .product-advanced-panel .advanced-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-body {
        padding: 0 16px 16px;
    }

    body.admin-page[data-page="products"] .product-wholesale-toggle-row {
        padding: 0 16px 16px;
    }

    body.admin-page[data-page="products"] .product-step-actions {
        flex-wrap: wrap;
    }

    body.admin-page[data-page="products"] .product-step-actions .btn-secondary {
        flex: 1 1 calc(50% - 6px);
    }

    body.admin-page[data-page="products"] .product-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="products"] .product-action-bar-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page[data-page="products"] .product-submit-sticky,
    body.admin-page[data-page="products"] .product-action-bar-buttons > * {
        width: 100%;
        min-width: 0;
    }

    body.admin-page[data-page="products"] .product-media-compact {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-image-preview.small {
        justify-self: center;
    }

    body.admin-page[data-page="products"] .product-table {
        min-width: 900px;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="products"] .admin-main {
        padding: 16px;
    }

    body.admin-page[data-page="products"] .product-wizard-shell {
        padding: 18px;
    }

    body.admin-page[data-page="products"] .product-stepper-nav,
    body.admin-page[data-page="products"] .compact-grid,
    body.admin-page[data-page="products"] .product-section-grid,
    body.admin-page[data-page="products"] .product-detail-grid,
    body.admin-page[data-page="products"] .product-price-suggestion-body .compact-grid,
    body.admin-page[data-page="products"] .product-advanced-panel .advanced-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .field-span-2 {
        grid-column: span 1;
    }

    body.admin-page[data-page="products"] .product-step-chip {
        justify-content: flex-start;
    }

    body.admin-page[data-page="products"] .product-step-actions .btn-secondary,
    body.admin-page[data-page="products"] .product-action-bar-buttons {
        width: 100%;
    }

    body.admin-page[data-page="products"] .product-step-actions .btn-secondary {
        flex: 1 1 100%;
    }

    body.admin-page[data-page="products"] .product-step-actions .btn-secondary:last-child {
        margin-left: 0;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-card,
    body.admin-page[data-page="products"] .product-wizard-panel {
        border-radius: 18px;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-summary {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-toggle {
        width: 100%;
        justify-content: center;
    }

    body.admin-page[data-page="products"] .product-advanced-panel summary {
        padding: 14px 16px;
    }

    body.admin-page[data-page="products"] .product-wholesale-toggle-row {
        gap: 12px;
    }

    body.admin-page[data-page="products"] .product-business-expense-note {
        align-items: flex-start;
    }

    body.admin-page[data-page="products"] .product-image-preview.small {
        width: min(132px, 100%);
        height: 132px;
    }

    body.admin-page[data-page="products"] .product-action-bar {
        position: static;
        margin-top: 16px;
        padding: 14px;
        border-radius: 18px;
        backdrop-filter: none;
    }

    body.admin-page[data-page="products"] .product-action-bar-buttons {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-submit-sticky {
        min-height: 48px;
    }

    body.admin-page[data-page="products"] .product-table,
    body.admin-page[data-page="products"] .admin-data-table {
        min-width: 760px;
    }

    body.admin-page[data-page="products"] .admin-data-table thead th,
    body.admin-page[data-page="products"] .admin-data-table tbody td {
        padding: 12px 14px;
    }

    body.admin-page[data-page="products"] .product-thumb-img {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }
}

@media (max-width: 520px) {
    body.admin-page[data-page="products"] .admin-main {
        padding: 14px;
    }

    body.admin-page[data-page="products"] .admin-page-header h1 {
        font-size: 1.42rem;
    }

    body.admin-page[data-page="products"] .product-wizard-shell {
        padding: 16px;
    }

    body.admin-page[data-page="products"] .product-form-section-head {
        align-items: flex-start;
    }

    body.admin-page[data-page="products"] .product-form-step {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
    }

    body.admin-page[data-page="products"] .product-step-chip {
        padding: 11px 12px;
        border-radius: 16px;
    }

    body.admin-page[data-page="products"] .product-step-chip-number {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-summary,
    body.admin-page[data-page="products"] .product-wizard-panel,
    body.admin-page[data-page="products"] .product-action-bar {
        padding: 14px;
    }

    body.admin-page[data-page="products"] .product-price-suggestion-body {
        padding: 0 14px 14px;
    }

    body.admin-page[data-page="products"] .product-advanced-panel summary,
    body.admin-page[data-page="products"] .product-advanced-panel .advanced-grid,
    body.admin-page[data-page="products"] .product-wholesale-toggle-row {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.admin-page[data-page="products"] .product-list-link,
    body.admin-page[data-page="products"] .product-action-bar-buttons button,
    body.admin-page[data-page="products"] .product-step-actions .btn-secondary,
    body.admin-page[data-page="products"] .product-submit-sticky,
    body.admin-page[data-page="products"] .product-form-section input,
    body.admin-page[data-page="products"] .product-form-section select,
    body.admin-page[data-page="products"] .upload-field input[type="file"],
    body.admin-page[data-page="products"] #manage-product-image {
        min-height: 48px;
    }

    body.admin-page[data-page="products"] .product-table-actions {
        gap: 8px;
    }

    body.admin-page[data-page="products"] .product-action-icon {
        width: 36px;
        height: 36px;
    }
}

/* Shared admin responsive consistency */
body.admin-page .admin-main,
body.admin-page .admin-page-header,
body.admin-page .admin-header-actions,
body.admin-page .section-toolbar,
body.admin-page .card,
body.admin-page .summary-card,
body.admin-page .analytics-card,
body.admin-page .field-group,
body.admin-page .field-stack,
body.admin-page .admin-user-chip,
body.admin-page .admin-nav-link,
body.admin-page .admin-table-wrap,
body.admin-page .admin-table,
body.admin-page .modal,
body.admin-page .toast,
body.admin-page .btn-add,
body.admin-page .btn-primary,
body.admin-page .btn-secondary {
    min-width: 0;
}

body.admin-page .admin-main > * {
    min-width: 0;
}

body.admin-page .card,
body.admin-page .summary-card,
body.admin-page .analytics-card,
body.admin-page .accounting-command-card,
body.admin-page .accounting-details-card,
body.admin-page .accounting-chart-card,
body.admin-page .accounting-secondary-card,
body.admin-page .accounting-insight-card,
body.admin-page .accounting-kpi-card,
body.admin-page[data-page="products"] .product-wizard-shell,
body.admin-page[data-page="products"] .product-wizard-panel,
body.admin-page[data-page="products"] .product-price-suggestion-card,
body.admin-page[data-page="products"] .product-action-bar,
body.admin-page[data-page="products"] .product-table-card,
body.admin-page[data-page="orders"] #order-form-card,
body.admin-page[data-page="orders"] #orders-results-section {
    overflow: hidden;
}

body.admin-page .admin-table-wrap {
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-left: 0;
    padding-right: 0;
}

body.admin-page .admin-table-wrap > * {
    min-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

body.admin-page .form-row,
body.admin-page .section-toolbar,
body.admin-page .admin-header-actions {
    row-gap: 12px;
}

body.admin-page .field-group input,
body.admin-page .field-group select,
body.admin-page .field-group textarea,
body.admin-page .field-stack input,
body.admin-page .field-stack select,
body.admin-page .remark-note-input,
body.admin-page .filter-bar input,
body.admin-page .filter-bar select,
body.admin-page .upload-field input[type="file"] {
    min-height: 46px;
}

body.admin-page .btn-add,
body.admin-page .btn-primary,
body.admin-page .btn-secondary,
body.admin-page .icon-btn,
body.admin-page .pagination button,
body.admin-page .filter-bar button,
body.admin-page .admin-menu-toggle {
    min-height: 44px;
}

body.admin-page .admin-page-header > div,
body.admin-page .section-toolbar > div,
body.admin-page .card > *,
body.admin-page .summary-card > *,
body.admin-page .analytics-card > * {
    min-width: 0;
}

body.admin-page .admin-page-header h1,
body.admin-page .card h3,
body.admin-page .analytics-card-header h3,
body.admin-page .section-toolbar h3 {
    overflow-wrap: anywhere;
}

body.admin-page .modal,
body.admin-page .accounting-modal-dialog,
body.admin-page[data-page="products"] .product-delete-modal {
    max-width: min(100%, 760px);
}

body.admin-page .toast-container {
    max-width: calc(100vw - 32px);
}

@media (max-width: 1120px) {
    body.admin-page .admin-main {
        padding: 22px;
    }

    body.admin-page .card,
    body.admin-page .summary-card,
    body.admin-page .analytics-card {
        padding: 18px;
        border-radius: 18px;
    }

    body.admin-page .admin-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.admin-page .admin-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    body.admin-page .admin-user-chip {
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    body.admin-page .admin-sidebar {
        width: min(300px, calc(100vw - 36px));
        padding: 24px 18px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.admin-page .admin-sidebar-backdrop {
        backdrop-filter: blur(4px);
    }

    body.admin-page .admin-nav {
        gap: 10px;
    }

    body.admin-page .admin-nav-link {
        min-height: 48px;
    }
}

@media (max-width: 860px) {
    body.admin-page .admin-main {
        padding: 18px;
    }

    body.admin-page .admin-page-header {
        gap: 14px;
        margin-bottom: 18px;
    }

    body.admin-page .admin-page-header h1 {
        font-size: clamp(1.55rem, 4vw, 2rem);
    }

    body.admin-page .admin-header-actions > * {
        flex: 0 1 auto;
    }

    body.admin-page .section-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.admin-page .filter-bar,
    body.admin-page .form-row {
        gap: 12px;
    }
}

@media (max-width: 760px) {
    body.admin-page .admin-main {
        padding: 16px;
    }

    body.admin-page .admin-page-header {
        gap: 12px;
        margin-bottom: 16px;
    }

    body.admin-page .admin-header-actions,
    body.admin-page .section-toolbar {
        width: 100%;
    }

    body.admin-page .admin-user-chip,
    body.admin-page .admin-logout-btn {
        width: 100%;
        justify-content: center;
    }

    body.admin-page .card,
    body.admin-page .summary-card,
    body.admin-page .analytics-card {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    body.admin-page .form-row,
    body.admin-page .section-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page .field-stack,
    body.admin-page .field-group,
    body.admin-page .sort-field-group {
        min-width: 0;
        width: 100%;
    }

    body.admin-page .btn-add,
    body.admin-page .btn-primary,
    body.admin-page .btn-secondary,
    body.admin-page .filter-bar button,
    body.admin-page .pagination button {
        min-height: 46px;
    }

    body.admin-page .modal,
    body.admin-page .accounting-modal-dialog,
    body.admin-page[data-page="products"] .product-delete-modal {
        width: min(100%, calc(100vw - 24px));
    }
}

@media (max-width: 640px) {
    body.admin-page .admin-main {
        padding: 15px;
    }

    body.admin-page .toast-container {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-width: none;
    }

    body.admin-page .toast {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    body.admin-page .admin-sidebar {
        width: min(300px, calc(100vw - 24px));
    }

    body.admin-page .admin-nav {
        grid-template-columns: 1fr;
    }

    body.admin-page .admin-page-header h1 {
        font-size: clamp(1.42rem, 5vw, 1.8rem);
    }

    body.admin-page .admin-menu-toggle {
        width: 42px;
        height: 42px;
    }

    body.admin-page .admin-user-chip {
        min-height: 44px;
        padding: 0 12px;
    }

    body.admin-page .modal,
    body.admin-page .accounting-modal-dialog,
    body.admin-page[data-page="products"] .product-delete-modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    body.admin-page .admin-main {
        padding: 14px;
    }

    body.admin-page .card,
    body.admin-page .summary-card,
    body.admin-page .analytics-card {
        padding: 14px;
        border-radius: 14px;
    }

    body.admin-page .admin-page-header h1 {
        font-size: 1.38rem;
    }

    body.admin-page .admin-eyebrow {
        font-size: 11px;
    }

    body.admin-page .field-group input,
    body.admin-page .field-group select,
    body.admin-page .field-group textarea,
    body.admin-page .field-stack input,
    body.admin-page .field-stack select,
    body.admin-page .remark-note-input,
    body.admin-page .filter-bar input,
    body.admin-page .filter-bar select,
    body.admin-page .upload-field input[type="file"] {
        min-height: 48px;
    }

    body.admin-page .btn-add,
    body.admin-page .btn-primary,
    body.admin-page .btn-secondary,
    body.admin-page .filter-bar button,
    body.admin-page .pagination button,
    body.admin-page .icon-btn {
        min-height: 48px;
    }
}

body.admin-page .admin-table-scroll-shell {
    position: relative;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    isolation: isolate;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

body.admin-page .admin-table-scroll-hint {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.admin-page .admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
}

body.admin-page .admin-table-wrap::-webkit-scrollbar {
    height: 8px;
}

body.admin-page .admin-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.72);
    border-radius: 999px;
}

body.admin-page .admin-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

body.admin-page .admin-table-wrap table {
    width: max-content;
    min-width: 100%;
    margin-left: auto;
    margin-right: auto;
    touch-action: auto;
}

body.admin-page[data-page="stock"] .stock-board-card,
body.admin-page[data-page="accounting"] .accounting-details-card {
    min-width: 0;
}

@media (max-width: 760px) {
    body.admin-page .admin-table-scroll-hint {
        display: inline-flex;
    }

    body.admin-page[data-page="products"] .pricing-rule-builder-header,
    body.admin-page[data-page="products"] .pricing-preview-header,
    body.admin-page[data-page="products"] .pricing-rule-row-top {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="products"] .pricing-rule-toolbar {
        justify-content: stretch;
    }

      body.admin-page[data-page="products"] .pricing-rule-toolbar > * {
          flex: 1 1 160px;
      }

    body.admin-page[data-page="products"] .pricing-rule-grid,
    body.admin-page[data-page="products"] .pricing-base-grid,
    body.admin-page[data-page="products"] .pricing-preview-grid,
    body.admin-page[data-page="products"] .pricing-base-metrics,
    body.admin-page[data-page="products"] .pricing-rule-metrics,
    body.admin-page[data-page="products"] .product-other-cost-row,
    body.admin-page[data-page="products"] .pricing-preview-summary,
    body.admin-page[data-page="products"] .product-media-grid,
    body.admin-page[data-page="products"] .quick-add-panel-grid,
    body.admin-page[data-page="products"] .pricing-buying-row,
    body.admin-page[data-page="products"] .pricing-cost-grid,
    body.admin-page[data-page="products"] .pricing-legacy-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page #orders-results-section,
    body.admin-page[data-page="products"] .product-table-card,
      body.admin-page[data-page="stock"] .stock-board-card,
      body.admin-page[data-page="accounting"] .accounting-details-card {
          overflow: hidden;
      }

    body.admin-page .admin-table-scroll-shell {
        margin-top: 4px;
    }

    body.admin-page .admin-table-wrap {
        max-width: 100%;
    }

    body.admin-page[data-page="stock"] .stock-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 14px;
    }

    body.admin-page[data-page="stock"] .stock-summary-card {
        gap: 10px;
        padding: 14px 12px;
        border-radius: 18px;
    }

    body.admin-page[data-page="stock"] .stock-summary-grid .stock-summary-card:last-child {
        grid-column: span 2;
    }

    body.admin-page[data-page="stock"] .stock-summary-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    body.admin-page[data-page="stock"] .stock-summary-label {
        margin-bottom: 2px;
        font-size: 0.7rem;
    }

    body.admin-page[data-page="stock"] .stock-summary-card h3 {
        font-size: 1.25rem;
    }

    body.admin-page[data-page="stock"] .stock-board-card {
        padding: 14px;
        border-radius: 18px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 14px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar-field.search {
        grid-column: 1 / -1;
    }

    body.admin-page[data-page="stock"] .stock-toggle-filter,
    body.admin-page[data-page="stock"] .stock-reset-btn {
        min-height: 44px;
    }

    body.admin-page[data-page="stock"] .stock-reset-btn {
        justify-content: center;
        padding-inline: 14px;
    }

      body.admin-page[data-page="stock"] .stock-table {
          min-width: 920px;
      }

      body.admin-page[data-page="stock"] .admin-table-wrap {
          padding-bottom: 4px;
      }

    body.admin-page[data-page="accounting"] .accounting-executive-card {
        margin-bottom: 14px;
    }

    body.admin-page[data-page="accounting"] .accounting-command-bar-executive {
        padding: 16px 14px;
        gap: 14px;
    }

    body.admin-page[data-page="accounting"] .accounting-command-copy h3 {
        font-size: 1.18rem;
        line-height: 1.22;
    }

    body.admin-page[data-page="accounting"] .accounting-helper-text {
        font-size: 0.83rem;
        line-height: 1.45;
    }

    body.admin-page[data-page="accounting"] .dashboard-controls {
        gap: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        width: 100%;
        gap: 8px;
        padding: 4px;
        border-radius: 18px;
        background: rgba(37, 99, 235, 0.08);
        border: 1px solid rgba(37, 99, 235, 0.1);
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch button {
        flex: 1 1 0;
        min-height: 42px;
        padding: 10px 8px;
        border-radius: 14px;
        box-shadow: none;
    }

    body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
        min-height: 44px;
        padding-inline: 16px;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary {
        gap: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card {
        padding: 16px 14px;
        border-radius: 18px;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card h3 {
        font-size: clamp(1.32rem, 6vw, 1.75rem);
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-note {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    body.admin-page[data-page="accounting"] .accounting-secondary-summary {
        gap: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-secondary-card,
    body.admin-page[data-page="accounting"] .accounting-chart-card,
    body.admin-page[data-page="accounting"] .accounting-details-card {
        padding: 16px 14px;
        border-radius: 18px;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wrap {
        min-height: 190px;
        padding: 0 8px 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-details-header {
        gap: 12px;
        margin-bottom: 14px;
    }

    body.admin-page[data-page="accounting"] .accounting-tab-panels,
    body.admin-page[data-page="accounting"] .accounting-tab-panel {
        min-width: 0;
        overflow: hidden;
    }

    body.admin-page[data-page="accounting"] .accounting-detail-tabs {
        justify-content: flex-start;
        gap: 8px;
        padding: 4px;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    body.admin-page[data-page="accounting"] .accounting-tab {
        flex: 0 0 auto;
        min-width: 92px;
        min-height: 40px;
        padding: 9px 12px;
        white-space: nowrap;
    }

    body.admin-page[data-page="accounting"] .accounting-expense-table {
        min-width: 640px;
    }

    body.admin-page[data-page="accounting"] .accounting-table {
        min-width: 940px;
    }

    body.admin-page[data-page="accounting"] .admin-table-wrap {
        padding-bottom: 4px;
    }
}

  @media (max-width: 520px) {
    body.admin-page[data-page="stock"] .stock-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    body.admin-page[data-page="stock"] .stock-summary-card {
        padding: 12px 10px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body.admin-page[data-page="stock"] .stock-summary-grid .stock-summary-card:last-child {
        grid-column: span 2;
    }

    body.admin-page[data-page="stock"] .stock-table {
        min-width: 900px;
    }

    body.admin-page[data-page="accounting"] .accounting-command-bar-executive {
        padding: 14px 12px;
    }

    body.admin-page[data-page="accounting"] .accounting-period-label {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 6px;
        padding: 4px;
        border-radius: 16px;
        background: rgba(37, 99, 235, 0.08);
        border: 1px solid rgba(37, 99, 235, 0.1);
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch button {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 30%;
        min-height: 40px;
        font-size: 0.82rem;
        padding: 8px 6px;
        border-radius: 12px;
        box-shadow: none;
    }

    body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
        width: 100%;
        justify-content: center;
    }

    body.admin-page[data-page="accounting"] .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    body.admin-page[data-page="accounting"] .accounting-kpi-grid-primary .accounting-kpi-card,
    body.admin-page[data-page="accounting"] .accounting-secondary-card,
    body.admin-page[data-page="accounting"] .accounting-chart-card,
    body.admin-page[data-page="accounting"] .accounting-details-card {
        padding: 14px 12px;
    }

    body.admin-page[data-page="accounting"] .accounting-chart-wrap {
        min-height: 176px;
        padding: 0 4px 8px;
    }

    body.admin-page[data-page="accounting"] .accounting-tab {
        min-width: 88px;
        padding: 8px 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-expense-table {
        min-width: 620px;
    }

    body.admin-page[data-page="accounting"] .accounting-table {
        min-width: 900px;
    }
}

/* Stock page mobile compactness refinements */
@media (max-width: 760px) {
    body.admin-page[data-page="stock"] .admin-page-header {
        margin-bottom: 14px;
    }

    body.admin-page[data-page="stock"] .admin-page-header h1 {
        line-height: 1.12;
    }

    body.admin-page[data-page="stock"] .stock-summary-grid {
        align-items: stretch;
        margin-bottom: 12px;
    }

    body.admin-page[data-page="stock"] .stock-summary-card {
        align-items: flex-start;
        gap: 9px;
        padding: 12px 11px;
        min-height: 0;
    }

    body.admin-page[data-page="stock"] .stock-summary-card > div:last-child {
        min-width: 0;
    }

    body.admin-page[data-page="stock"] .stock-summary-label {
        line-height: 1.25;
        letter-spacing: 0.06em;
    }

    body.admin-page[data-page="stock"] .stock-summary-card h3 {
        font-size: 1.18rem;
        line-height: 1.1;
    }

    body.admin-page[data-page="stock"] .stock-board-card {
        padding: 12px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar {
        gap: 8px;
        margin-bottom: 12px;
        align-items: stretch;
    }

    body.admin-page[data-page="stock"] .stock-toolbar-field {
        gap: 4px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar-field label {
        font-size: 0.72rem;
        letter-spacing: 0.07em;
    }

    body.admin-page[data-page="stock"] .stock-toolbar input,
    body.admin-page[data-page="stock"] .stock-toolbar select,
    body.admin-page[data-page="stock"] .stock-toggle-filter,
    body.admin-page[data-page="stock"] .stock-reset-btn {
        min-height: 42px;
        border-radius: 12px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar input,
    body.admin-page[data-page="stock"] .stock-toolbar select {
        padding-inline: 12px;
    }

    body.admin-page[data-page="stock"] .stock-toggle-filter {
        gap: 8px;
        padding-inline: 12px;
        font-size: 0.92rem;
    }

    body.admin-page[data-page="stock"] .stock-toggle-filter span {
        line-height: 1.2;
    }

    body.admin-page[data-page="stock"] .stock-reset-btn {
        gap: 8px;
        padding-inline: 12px;
        white-space: nowrap;
    }

    body.admin-page[data-page="stock"] .admin-table-scroll-hint {
        margin-bottom: 8px;
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    body.admin-page[data-page="stock"] .admin-main {
        padding: 13px;
    }

    body.admin-page[data-page="stock"] .admin-page-header {
        margin-bottom: 12px;
    }

    body.admin-page[data-page="stock"] .stock-summary-grid {
        margin-bottom: 10px;
    }

    body.admin-page[data-page="stock"] .stock-summary-card {
        gap: 8px;
        padding: 11px 10px;
        border-radius: 16px;
    }

    body.admin-page[data-page="stock"] .stock-summary-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    body.admin-page[data-page="stock"] .stock-summary-label {
        font-size: 0.66rem;
        margin-bottom: 1px;
    }

    body.admin-page[data-page="stock"] .stock-summary-card h3 {
        font-size: 1.08rem;
    }

    body.admin-page[data-page="stock"] .stock-board-card {
        padding: 10px;
        border-radius: 16px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar {
        gap: 7px;
        margin-bottom: 10px;
    }

    body.admin-page[data-page="stock"] .stock-toolbar input,
    body.admin-page[data-page="stock"] .stock-toolbar select,
    body.admin-page[data-page="stock"] .stock-toggle-filter,
    body.admin-page[data-page="stock"] .stock-reset-btn {
        min-height: 40px;
    }

    body.admin-page[data-page="stock"] .stock-toggle-filter,
    body.admin-page[data-page="stock"] .stock-reset-btn {
        font-size: 0.88rem;
    }

      body.admin-page[data-page="stock"] .admin-table-scroll-shell {
          margin-top: 2px;
      }
  }

@media (max-width: 768px) {
    body.admin-page[data-page="stock"] .stock-filter-panel {
        margin-bottom: 14px;
        border: 1px solid rgba(226, 232, 240, 0.95);
        border-radius: 18px;
        background: rgba(248, 250, 252, 0.92);
        overflow: hidden;
    }

    body.admin-page[data-page="stock"] .stock-filter-panel-summary {
        min-height: 48px;
        padding: 0 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
        color: #0f172a;
        font-weight: 700;
    }

    body.admin-page[data-page="stock"] .stock-filter-panel[open] .stock-filter-panel-summary {
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    }

    body.admin-page[data-page="stock"] .stock-filter-panel .stock-toolbar {
        padding: 12px;
        margin-bottom: 0;
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="stock"] .admin-table-scroll-shell {
        display: none;
    }

    body.admin-page[data-page="stock"] .stock-card-list {
        display: grid;
        gap: 12px;
    }

    body.admin-page[data-page="stock"] .stock-mobile-action-bar {
        position: sticky;
        bottom: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
        border-top: 1px solid rgba(226, 232, 240, 0.95);
        backdrop-filter: blur(10px);
    }

    body.admin-page[data-page="stock"] .stock-mobile-action-btn {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 14px;
    }
}

/* Dashboard mobile refinement */
@media (max-width: 760px) {
    body.admin-page[data-page="dashboard"] .admin-page-header {
        margin-bottom: 14px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-card.dashboard-hero-compact {
        padding: 14px;
        gap: 14px;
        margin-bottom: 12px;
        border-radius: 20px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-copy h2 {
        font-size: 1.18rem;
        line-height: 1.18;
        margin: 4px 0 6px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-text {
        font-size: 0.84rem;
        line-height: 1.45;
    }

    body.admin-page[data-page="dashboard"] .dashboard-controls {
        gap: 8px;
        padding: 10px;
        border-radius: 16px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch {
        padding: 4px;
        gap: 4px;
        border-radius: 16px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch button {
        min-height: 30px;
        padding: 4px 8px;
        font-size: 0.78rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range {
        gap: 8px;
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="dashboard"] .dashboard-date-field {
        gap: 4px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-date-field span {
        font-size: 0.68rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-date-field input {
        min-height: 40px;
        padding: 0 10px;
        border-radius: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        grid-column: 1 / -1;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-action {
        min-height: 40px;
        padding: 0 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn {
        min-height: 42px;
        padding: 10px 8px;
        border-radius: 12px;
        font-size: 0.84rem;
        gap: 6px;
        flex-direction: column;
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn i {
        font-size: 0.95rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-alert-bar {
        gap: 8px;
        margin-bottom: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-alert {
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 0.9rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card {
        min-height: 84px;
        padding: 12px 13px;
        border-radius: 16px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card h3 {
        font-size: 1.12rem;
        line-height: 1.15;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card-label {
        font-size: 0.72rem;
        margin-bottom: 2px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-focus-grid {
        gap: 12px;
        margin-bottom: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-focus-grid .dashboard-insight-card-compact {
        order: 2;
    }

    body.admin-page[data-page="dashboard"] .dashboard-focus-grid .dashboard-primary-chart-card {
        order: 1;
    }

    body.admin-page[data-page="dashboard"] .dashboard-primary-chart-card,
    body.admin-page[data-page="dashboard"] .dashboard-insight-card-compact,
    body.admin-page[data-page="dashboard"] .summary-card-secondary {
        padding: 14px;
        border-radius: 18px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-primary-chart-card .dashboard-chart-wrap {
        min-height: 210px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-insight-card-compact .analytics-card-header {
        margin-bottom: 8px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-insight-stack {
        gap: 6px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-insight-metric {
        gap: 2px;
        padding: 8px 10px;
        border-radius: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-insight-metric strong {
        font-size: 0.92rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-insight-metric small,
    body.admin-page[data-page="dashboard"] .dashboard-insight-metric span {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    body.admin-page[data-page="dashboard"] .dashboard-secondary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }

    body.admin-page[data-page="dashboard"] .summary-card-secondary {
        min-height: 72px;
    }

    body.admin-page[data-page="dashboard"] .summary-card-secondary h3 {
        font-size: 1.05rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-detail-toggle-wrap {
        margin-bottom: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-detail-toggle {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 10px 14px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-details {
        gap: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-chart-card {
        padding: 14px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-chart-wrap {
        min-height: 190px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-chart-wrap.compact {
        min-height: 180px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-detail-panels .dashboard-insight-card,
    body.admin-page[data-page="dashboard"] .dashboard-detail-panels .analytics-card {
        padding: 14px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-list {
        gap: 8px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-item {
        padding: 10px 12px;
        border-radius: 14px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-copy {
        gap: 2px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-copy strong {
        font-size: 0.88rem;
        line-height: 1.3;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-copy span {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-list:not(.expanded) .dashboard-activity-item:nth-child(n + 4) {
        display: none;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-toggle {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    body.admin-page[data-page="dashboard"] .dashboard-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch,
    body.admin-page[data-page="dashboard"] .dashboard-custom-range,
    body.admin-page[data-page="dashboard"] .dashboard-date-field,
    body.admin-page[data-page="dashboard"] .dashboard-date-field input,
    body.admin-page[data-page="dashboard"] .dashboard-custom-range-actions {
        width: 100%;
        max-width: 100%;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        min-width: 0;
    }

    body.admin-page[data-page="dashboard"] .dashboard-date-field {
        display: grid;
        gap: 4px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn {
        display: flex;
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 10px 12px;
        justify-content: center;
        flex-direction: row;
        opacity: 1;
        color: #0f172a;
        background: #ffffff;
        border-color: rgba(15, 23, 42, 0.12);
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn i {
        color: inherit;
        opacity: 1;
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn.primary {
        background: #0f172a;
        color: #ffffff;
        border-color: #0f172a;
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn:not(.primary) {
        background: #ffffff;
        color: #0f172a;
        border-color: rgba(15, 23, 42, 0.14);
    }
}

@media (max-width: 860px) {
    body.admin-page[data-page="accounting"] .accounting-filter-bar {
        justify-content: flex-start;
    }

    body.admin-page[data-page="accounting"] .accounting-custom-range {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    body.admin-page[data-page="accounting"] .dashboard-controls {
        gap: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-period-control,
    body.admin-page[data-page="accounting"] .accounting-range-switch,
    body.admin-page[data-page="accounting"] .accounting-custom-range,
    body.admin-page[data-page="accounting"] .accounting-date-field,
    body.admin-page[data-page="accounting"] .accounting-date-field input,
    body.admin-page[data-page="accounting"] .accounting-custom-range-actions,
    body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
        width: 100%;
        max-width: 100%;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    body.admin-page[data-page="accounting"] .accounting-range-switch button {
        width: 100%;
        min-height: 40px;
        padding-inline: 10px;
    }

    body.admin-page[data-page="accounting"] .accounting-custom-range {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        justify-content: stretch;
    }

    body.admin-page[data-page="accounting"] .accounting-date-field {
        min-width: 0;
    }

    body.admin-page[data-page="accounting"] .accounting-custom-range-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    body.admin-page[data-page="accounting"] .accounting-range-action,
    body.admin-page[data-page="accounting"] .accounting-add-expense-btn {
        min-height: 42px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    body.admin-page[data-page="dashboard"] .admin-main {
        padding: 13px;
    }

    body.admin-page[data-page="dashboard"] .admin-page-header h1 {
        font-size: 1.4rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-card.dashboard-hero-compact {
        padding: 12px;
        gap: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-copy h2 {
        font-size: 1.08rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-hero-text {
        display: none;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch {
        gap: 4px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-switch button {
        min-height: 28px;
        font-size: 0.76rem;
        padding: 4px 6px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-custom-range-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-range-action {
        min-height: 38px;
        padding: 0 10px;
        font-size: 0.82rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-action-btn {
        min-height: 40px;
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact {
        gap: 8px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card {
        min-height: 72px;
        padding: 10px 9px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card h3 {
        font-size: 0.94rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-kpi-grid.compact .summary-card-icon {
        width: 34px;
        height: 34px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-primary-chart-card .dashboard-chart-wrap,
    body.admin-page[data-page="dashboard"] .dashboard-chart-wrap {
        min-height: 176px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-chart-wrap.compact {
        min-height: 168px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-secondary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    body.admin-page[data-page="dashboard"] .summary-card-secondary {
        min-height: 68px;
        padding: 10px 9px;
    }

    body.admin-page[data-page="dashboard"] .summary-card-secondary h3 {
        font-size: 0.96rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-insight-card-compact,
    body.admin-page[data-page="dashboard"] .dashboard-chart-card,
    body.admin-page[data-page="dashboard"] .dashboard-detail-panels .dashboard-insight-card,
    body.admin-page[data-page="dashboard"] .dashboard-detail-panels .analytics-card {
        padding: 12px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-item {
        padding: 9px 10px;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-copy strong {
        font-size: 0.84rem;
    }

    body.admin-page[data-page="dashboard"] .dashboard-activity-copy span {
        font-size: 0.72rem;
    }
}

/* Customer storefront redesign */
body.shop-page {
    color: var(--text);
}

body.shop-page.shop-cart-open {
    overflow: hidden;
}

body.shop-page .shop-support-bar {
    position: relative;
    z-index: 21;
    background: linear-gradient(135deg, rgba(24, 122, 117, 0.96), rgba(13, 97, 92, 0.96));
    color: #f8fafc;
}

body.shop-page .shop-support-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

body.shop-page .shop-support-inner p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.55;
}

body.shop-page .shop-support-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: none;
    line-height: 1.4;
}

body.shop-page .shop-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(248, 242, 232, 0.86);
    border-bottom: 1px solid rgba(31, 41, 51, 0.08);
}

body.shop-page .shop-nav {
    gap: 20px;
    padding: 16px 0;
}

body.shop-page .logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

body.shop-page .shop-brand-kicker,
body.shop-page .shop-section-kicker,
body.shop-page .shop-hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.shop-page .shop-header-search {
    flex: 1 1 380px;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    min-height: 60px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 41, 51, 0.08);
    box-shadow: 0 18px 40px rgba(57, 35, 14, 0.08);
}

body.shop-page .shop-header-search i {
    color: var(--muted);
}

body.shop-page .shop-header-search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.45;
}

body.shop-page .shop-viber-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 20px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #7c3aed, #22c55e);
    color: #fff;
    font-size: 0.94rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.shop-page .shop-viber-contact:hover,
body.shop-page .shop-viber-contact:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(124, 58, 237, 0.28);
    filter: saturate(1.04);
}

body.shop-page .shop-viber-contact i {
    font-size: 1rem;
}

body.shop-page .shop-viber-contact span {
    line-height: 1.2;
}

body.shop-page .cart-btn {
    border: none;
}

body.shop-page .cart-btn.cart-bump {
    animation: shopCartBump 0.34s ease;
}

body.shop-page .floating-contact {
    display: none;
}

@keyframes shopCartBump {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

body.shop-page .shop-main {
    padding: 20px 0 88px;
}

body.shop-page .shop-hero {
    display: block;
    margin-bottom: 12px;
}

body.shop-page .shop-hero-shell {
    width: min(100%, 1080px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 22px;
    align-items: center;
}

body.shop-page .shop-hero-copy,
body.shop-page .shop-toolbar,
body.shop-page .shop-trust-card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
}

body.shop-page .shop-hero-copy {
    width: 100%;
    max-width: none;
    padding: 16px 22px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(30, 132, 127, 0.16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(201, 111, 50, 0.18), transparent 40%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(252, 245, 236, 0.96));
}

body.shop-page .shop-hero-visual {
    position: relative;
    min-height: 300px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.84fr;
    gap: 14px;
    align-items: center;
}

body.shop-page .shop-hero-visual-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: 0 22px 46px rgba(57, 35, 14, 0.12);
}

body.shop-page .shop-hero-visual-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.shop-page .shop-hero-visual-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.38));
}

body.shop-page .shop-hero-visual-card-main {
    min-height: 320px;
    transform: translateY(6px);
}

body.shop-page .shop-hero-visual-stack {
    display: grid;
    gap: 14px;
}

body.shop-page .shop-hero-visual-card-small {
    min-height: 150px;
}

body.shop-page .shop-hero-visual-card.accent {
    transform: translateX(-12px);
}

body.shop-page .shop-hero-visual-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: grid;
    gap: 4px;
    padding: 16px;
    color: #fff;
}

body.shop-page .shop-hero-visual-copy strong {
    font-size: 1rem;
    line-height: 1.35;
}

body.shop-page .shop-hero-visual-copy span {
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.86);
}

body.shop-page .shop-hero-copy h2 {
    margin: 6px 0 8px;
    max-width: 26ch;
    font-size: clamp(1.56rem, 2.6vw, 2.2rem);
    line-height: 1.5;
    letter-spacing: 0.01em;
}

body.shop-page .shop-hero-copy p {
    max-width: 62ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.56;
}

body.shop-page .shop-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

body.shop-page .shop-hero-btn {
    min-height: 46px;
    padding-inline: 20px;
    line-height: 1.4;
}

body.shop-page .shop-hero-btn-primary {
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(140, 74, 34, 0.26);
}

body.shop-page .shop-hero-btn-secondary {
    background: linear-gradient(135deg, var(--accent), #126764);
    box-shadow: 0 14px 28px rgba(16, 94, 90, 0.2);
}

body.shop-page .shop-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

body.shop-page .shop-section-head .title {
    margin-bottom: 0;
    font-size: clamp(1.28rem, 2.2vw, 1.85rem);
    line-height: 1.2;
}

body.shop-page .shop-section-head > div:first-child {
    display: grid;
    gap: 2px;
}

body.shop-page .shop-section-kicker {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
}

body.shop-page .shop-results-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(31, 41, 51, 0.08);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

body.shop-page .shop-toolbar {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
}

body.shop-page .shop-toolbar-main {
    min-width: 0;
}

body.shop-page .category-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

body.shop-page .category-bar::-webkit-scrollbar {
    display: none;
}

body.shop-page .category-bar button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 999px;
    white-space: nowrap;
    text-align: center;
    font-weight: 800;
    line-height: 1.1;
}

body.shop-page .shop-toolbar-tools {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

body.shop-page .shop-filter-field {
    display: grid;
    gap: 7px;
    min-width: 200px;
    flex: 1 1 220px;
}

body.shop-page .shop-filter-field span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.shop-page .shop-filter-field select {
    min-height: 50px;
    padding: 0 15px;
    border: 1px solid rgba(31, 41, 51, 0.1);
    border-radius: 16px;
    background: #fff;
}

body.shop-page .shop-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(31, 41, 51, 0.1);
    font-weight: 700;
    line-height: 1.45;
}

body.shop-page .shop-filter-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

body.shop-page .wholesale-note-bar {
    width: fit-content;
    max-width: min(100%, 720px);
    margin: -4px auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7ed, #fffaf3);
    border: 1px solid rgba(201, 111, 50, 0.24);
    box-shadow: 0 12px 28px rgba(201, 111, 50, 0.1);
}

body.shop-page .wholesale-note-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(201, 111, 50, 0.14);
    color: var(--primary);
    font-size: 0.86rem;
}

body.shop-page .wholesale-note-bar b {
    min-width: 0;
    color: #6f3b15;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.45;
    white-space: normal;
}

body.shop-page .wholesale-note-action {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 12px;
    border: 1px solid rgba(201, 111, 50, 0.28);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #f59e0b);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(201, 111, 50, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.shop-page .wholesale-note-action:hover,
body.shop-page .wholesale-note-action:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(201, 111, 50, 0.24);
}

body.shop-page .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
    gap: 18px;
    justify-content: start;
    align-items: stretch;
}

body.shop-page .product {
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

@media (max-width: 640px) {
    body.shop-page .floating-contact {
        position: fixed;
        right: 16px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        z-index: 1120;
        display: grid;
        justify-items: end;
        gap: 10px;
        pointer-events: none;
    }

    body.shop-page .floating-contact-scrim {
        position: fixed;
        inset: 0;
        z-index: -1;
        border: 0;
        background: rgba(15, 23, 42, 0.12);
        pointer-events: auto;
        animation: floatingContactFade 0.18s ease both;
    }

    body.shop-page .floating-contact-scrim[hidden] {
        display: none;
    }

    body.shop-page .floating-contact-toggle,
    body.shop-page .floating-contact-action,
    body.shop-page .floating-contact-close {
        pointer-events: auto;
        border: 0;
        -webkit-tap-highlight-color: transparent;
    }

    body.shop-page .floating-contact-toggle {
        position: relative;
        display: grid;
        place-items: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: linear-gradient(135deg, #7360f2, #8f5cf7);
        color: #fff;
        font-size: 1.32rem;
        box-shadow: 0 16px 34px rgba(115, 96, 242, 0.34);
        cursor: pointer;
        animation: floatingContactPulse 2.4s ease-in-out infinite;
        transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    }

    body.shop-page .floating-contact-toggle i {
        color: #fff;
        line-height: 1;
    }

    body.shop-page .floating-contact-toggle:hover,
    body.shop-page .floating-contact-toggle:focus-visible {
        filter: saturate(1.06);
        transform: translateY(-1px);
        box-shadow: 0 18px 38px rgba(115, 96, 242, 0.42);
    }

    body.shop-page .floating-contact-toggle:active {
        transform: scale(0.94);
    }

    body.shop-page .floating-contact[data-open="true"] .floating-contact-toggle {
        animation: none;
        transform: scale(0.96);
        box-shadow: 0 18px 40px rgba(115, 96, 242, 0.44);
    }

    body.shop-page .floating-contact-menu {
        display: grid;
        width: min(342px, calc(100vw - 32px));
        gap: 14px;
        padding: 16px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.96);
        color: #0f172a;
        border: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
        backdrop-filter: blur(18px);
        transform-origin: bottom right;
        animation: floatingContactIn 0.18s ease both;
        pointer-events: auto;
    }

    body.shop-page .floating-contact-menu[hidden] {
        display: none;
    }

    body.shop-page .floating-contact-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    body.shop-page .floating-contact-sheet-head span {
        display: block;
        margin-bottom: 2px;
        color: #0f766e;
        font-size: 0.7rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    body.shop-page .floating-contact-sheet-head h3 {
        margin: 0;
        color: #111827;
        font-size: 1rem;
        line-height: 1.35;
    }

    body.shop-page .floating-contact-close {
        display: grid;
        place-items: center;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #f3f4f6;
        color: #334155;
    }

    body.shop-page .floating-contact-shop-list {
        display: grid;
        gap: 10px;
    }

    body.shop-page .floating-contact-shop {
        display: grid;
        gap: 12px;
        padding: 13px;
        border-radius: 18px;
        background: #f8fafc;
        border: 1px solid rgba(15, 23, 42, 0.08);
    }

    body.shop-page .floating-contact-shop-info {
        display: grid;
        gap: 3px;
    }

    body.shop-page .floating-contact-shop-info strong {
        color: #111827;
        font-size: 0.96rem;
        line-height: 1.2;
    }

    body.shop-page .floating-contact-shop-info span {
        color: #64748b;
        font-size: 0.86rem;
        font-weight: 700;
    }

    body.shop-page .floating-contact-shop-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    body.shop-page .floating-contact-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 48px;
        padding: 0 14px;
        border-radius: 14px;
        color: #fff;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
        text-decoration: none;
        font-size: 0.88rem;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
        transition: transform 0.16s ease, filter 0.16s ease;
    }

    body.shop-page .floating-contact-action:active {
        transform: scale(0.97);
    }

    body.shop-page .floating-contact-call {
        background: linear-gradient(135deg, #059669, #14b8a6);
    }

    body.shop-page .floating-contact-viber {
        background: linear-gradient(135deg, #7c3aed, #a855f7);
    }

}

@keyframes floatingContactFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes floatingContactIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatingContactPulse {
    0%,
    100% {
        box-shadow: 0 16px 34px rgba(115, 96, 242, 0.34), 0 0 0 0 rgba(115, 96, 242, 0.2);
    }

    50% {
        box-shadow: 0 18px 38px rgba(115, 96, 242, 0.4), 0 0 0 9px rgba(115, 96, 242, 0);
    }
}

body.shop-page .product-clickable-card {
    cursor: pointer;
}

body.shop-page .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 32px 68px rgba(57, 35, 14, 0.18);
}

body.shop-page .product-clickable-card:hover .product-media img,
body.shop-page .product-clickable-card:focus-visible .product-media img {
    transform: scale(1.04);
}

body.shop-page .product.product-out-of-stock {
    opacity: 0.68;
}

body.shop-page .product-media {
    position: relative;
    flex: 0 0 240px;
    height: 240px;
    overflow: hidden;
}

body.shop-page .product-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

body.shop-page .product-card-view-hint {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

body.shop-page .product-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px 16px;
    height: 100%;
}

body.shop-page .product-card-top {
    display: grid;
    gap: 7px;
}

body.shop-page .product-media.is-clickable,
body.shop-page .product-card-top.is-clickable {
    cursor: pointer;
}

body.shop-page .product-media.is-clickable:focus-visible,
body.shop-page .product-card-top.is-clickable:focus-visible {
    outline: 2px solid rgba(30, 132, 127, 0.42);
    outline-offset: 4px;
    border-radius: 18px;
}

body.shop-page .product-tag {
    padding: 6px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.11em;
    line-height: 1.35;
    white-space: normal;
}

body.shop-page .product-stock-status-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
}

body.shop-page .product-stock-status-out_of_stock {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

body.shop-page .product-stock-status-low_stock {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

body.shop-page .product-title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    min-height: calc(1.45em * 2);
}

body.shop-page .product-description-preview {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.shop-page .product-pricing-controls {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    order: 2;
}

body.shop-page .product-pricing-field {
    display: grid;
    gap: 4px;
}

body.shop-page .product-pricing-field span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.shop-page .product-pricing-field input,
body.shop-page .product-pricing-field select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(31, 41, 51, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: var(--text);
}

body.shop-page .product-unit-label {
    display: none;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.8);
}

body.shop-page .product-unit-label span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

body.shop-page .product-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    order: 1;
}

body.shop-page .product-pricing {
    display: grid;
    gap: 8px;
}

body.shop-page .product-details-trigger {
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.shop-page .product-bulk-alert {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.45;
}

body.shop-page .price {
    font-size: 1.16rem;
    line-height: 1.25;
}

body.shop-page.product-details-open {
    overflow: hidden;
}

body.shop-page .product-details-overlay[hidden] {
    display: none;
}

body.shop-page .product-details-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
}

body.shop-page .product-details-scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
}

body.shop-page .product-details-modal {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.22);
}

body.shop-page .product-details-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

body.shop-page .product-details-kicker {
    display: inline-block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.shop-page .product-details-modal-head h3 {
    margin: 6px 0 0;
}

body.shop-page .product-details-close {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.96);
    color: var(--text);
}

body.shop-page .product-details-modal-body {
    display: grid;
    gap: 16px;
}

body.shop-page .product-details-hero {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

body.shop-page .product-details-gallery {
    display: grid;
    gap: 10px;
    min-width: 0;
}

body.shop-page .product-details-image-wrap {
    border-radius: 20px;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    min-height: 300px;
    max-height: min(460px, 62vh);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.shop-page .product-details-image {
    width: 100%;
    height: auto;
    max-height: min(420px, 58vh);
    object-fit: contain;
    background: #f8fafc;
    display: block;
}

body.shop-page .product-details-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

body.shop-page .product-details-thumb {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    padding: 3px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

body.shop-page .product-details-thumb.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 132, 127, 0.14);
}

body.shop-page .product-details-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

body.shop-page .product-details-summary {
    display: grid;
    gap: 12px;
}

body.shop-page .product-details-price-block,
body.shop-page .product-details-panel {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

body.shop-page .product-details-price-label,
body.shop-page .product-details-panel-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.shop-page .product-details-price {
    color: var(--text);
    font-size: 1.3rem;
    line-height: 1.2;
}

body.shop-page .product-details-wholesale-panel {
    gap: 14px;
}

body.shop-page .product-details-tier-grid {
    display: grid;
    gap: 10px;
}

body.shop-page .product-details-tier-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

body.shop-page .product-details-tier-card strong,
body.shop-page .product-details-tier-card span {
    color: var(--text);
    font-size: 0.96rem;
    line-height: 1.35;
}

body.shop-page .product-details-tier-card span {
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

body.shop-page .product-details-tier-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

body.shop-page .product-details-ctn-highlight {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(30, 132, 127, 0.12), rgba(201, 111, 50, 0.1));
    border: 1px solid rgba(30, 132, 127, 0.24);
    box-shadow: 0 12px 28px rgba(30, 132, 127, 0.08);
}

body.shop-page .product-details-ctn-highlight > strong {
    color: var(--accent);
    font-size: 1.02rem;
    line-height: 1.35;
}

body.shop-page .product-details-ctn-highlight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
}

body.shop-page .product-details-ctn-highlight-grid span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

body.shop-page .product-details-ctn-highlight-grid b {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: right;
}

body.shop-page .product-details-tier-section {
    display: grid;
    gap: 10px;
}

body.shop-page .product-details-tier-section h5 {
    margin: 0;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.35;
}

body.shop-page .product-details-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.shop-page .product-details-buy-btn,
body.shop-page .product-details-add-btn,
body.shop-page .product-details-secondary-btn {
    width: 100%;
}

body.shop-page .product-details-buy-btn {
    min-height: 50px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(140, 74, 34, 0.22);
}

body.shop-page .product-details-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(201, 111, 50, 0.34);
    border-radius: 15px;
    background: #fff7ed;
    color: #a94f12;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

body.shop-page .product-details-buy-btn:hover,
body.shop-page .product-details-buy-btn:focus-visible,
body.shop-page .product-details-add-btn:hover,
body.shop-page .product-details-add-btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

body.shop-page .product-details-add-btn:hover,
body.shop-page .product-details-add-btn:focus-visible {
    background: #ffedd5;
    border-color: rgba(201, 111, 50, 0.52);
}

body.shop-page .product-details-add-btn.is-added-feedback {
    background: #e8f8ef;
    border-color: #9dd8b5;
    color: #1f7a4d;
}

body.shop-page .product-details-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid #9dd8b5;
    border-radius: 14px;
    background: #e8f8ef;
    color: #1f7a4d;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

body.shop-page .product-details-secondary-btn:hover,
body.shop-page .product-details-secondary-btn:focus-visible {
    background: #d9f2e4;
    border-color: #87cfa7;
    transform: translateY(-1px);
    outline: none;
}

body.shop-page .product-details-copy,
body.shop-page .product-details-description {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
}

body.shop-page .product-details-specs {
    display: grid;
    gap: 10px;
}

body.shop-page .product-details-spec-row {
    display: grid;
    grid-template-columns: minmax(120px, 140px) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

body.shop-page .product-details-spec-row strong {
    color: var(--text);
}

body.shop-page .product-details-spec-row span {
    color: var(--muted);
}

body.shop-page .product-details-accordion {
    display: block;
    overflow: visible;
}

body.shop-page .product-details-accordion-body {
    display: grid;
    gap: 10px;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    opacity: 1;
}

body.shop-page .product-details-accordion:not([open]) > .product-details-accordion-body {
    display: none;
}

body.shop-page .product-details-accordion[open] > .product-details-accordion-body {
    display: grid;
    animation: productDetailsAccordionIn 0.18s ease both;
}

@keyframes productDetailsAccordionIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.shop-page .product-details-accordion-summary {
    cursor: pointer;
    list-style: none;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.35;
}

body.shop-page .product-details-accordion-summary::-webkit-details-marker {
    display: none;
}

body.shop-page .product-details-accordion-summary::after {
    content: "+";
    float: right;
    color: var(--primary);
    font-weight: 900;
}

body.shop-page .product-details-accordion[open] > .product-details-accordion-summary {
    margin-bottom: 10px;
}

body.shop-page .product-details-accordion[open] > .product-details-accordion-summary::after {
    content: "-";
}

body.shop-page .product-details-fallback-text,
body.shop-page .product-details-empty {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 640px) {
    body.shop-page .product-details-overlay {
        align-items: center;
        padding: 12px;
    }

    body.shop-page .product-details-hero {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.shop-page .product-details-modal {
        width: min(100%, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: 88vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 14px;
        border-radius: 22px;
    }

    body.shop-page .product-details-modal-head {
        flex: 0 0 auto;
        margin-bottom: 10px;
    }

    body.shop-page .product-details-modal-head h3 {
        font-size: 1rem;
        line-height: 1.25;
    }

    body.shop-page .product-details-modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 2px calc(88px + env(safe-area-inset-bottom, 0px));
        gap: 10px;
    }

    body.shop-page .product-details-image-wrap {
        min-height: 190px;
        max-height: min(260px, 34vh);
        border-radius: 17px;
    }

    body.shop-page .product-details-image {
        max-height: min(240px, 32vh);
    }

    body.shop-page .product-details-thumbnails {
        gap: 6px;
    }

    body.shop-page .product-details-thumb {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }

    body.shop-page .product-details-summary {
        gap: 10px;
    }

    body.shop-page .product-details-price-block,
    body.shop-page .product-details-panel {
        padding: 12px;
        border-radius: 16px;
    }

    body.shop-page .product-details-price {
        font-size: 1.14rem;
    }

    body.shop-page .product-details-actions {
        position: sticky;
        bottom: 0;
        z-index: 3;
        gap: 8px;
        padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
        margin: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), #fff 28%);
        backdrop-filter: blur(6px);
    }

    body.shop-page .product-details-buy-btn {
        min-height: 50px;
        font-size: 1rem;
    }

    body.shop-page .product-details-add-btn {
        min-height: 46px;
        font-size: 0.92rem;
    }

    body.shop-page .product-details-tier-card,
    body.shop-page .product-details-ctn-highlight-grid {
        grid-template-columns: 1fr;
    }

    body.shop-page .product-details-tier-card span,
    body.shop-page .product-details-ctn-highlight-grid b {
        text-align: left;
        white-space: normal;
    }

    body.shop-page .product-details-accordion:not([open]) {
        padding-block: 12px;
    }

    body.shop-page .product-details-accordion {
        overflow: visible;
    }

    body.shop-page .product-details-accordion[open] {
        padding-bottom: 12px;
    }

    body.shop-page .product-details-accordion-body {
        gap: 8px;
        overflow: visible;
    }

    body.shop-page .product-details-accordion .product-details-copy {
        display: block;
        max-height: none;
        overflow: visible;
    }

    body.shop-page .product-details-spec-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 12px;
        border-radius: 13px;
    }
}

body.shop-page .product-tier-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.shop-page .product-tier-chip,
body.shop-page .product-tier-empty {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.4;
}

body.shop-page .product-tier-chip.is-active {
    background: rgba(30, 132, 127, 0.14);
    border-color: rgba(30, 132, 127, 0.24);
    color: var(--accent);
}

body.shop-page .product-tier-chip.is-best {
    box-shadow: inset 0 0 0 1px rgba(201, 111, 50, 0.28);
}

body.shop-page .btn {
    min-height: 46px;
    line-height: 1.4;
}

body.shop-page .btn-add {
    width: 100%;
    justify-content: center;
}

body.shop-page .product-buy-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 0;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(140, 74, 34, 0.22);
}

body.shop-page .product-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(140, 74, 34, 0.26);
}

body.shop-page .btn.btn-added {
    background: linear-gradient(135deg, var(--accent), #126764);
    box-shadow: 0 14px 28px rgba(16, 94, 90, 0.22);
}

body.shop-page .empty-products {
    padding: 32px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed rgba(31, 41, 51, 0.14);
    text-align: center;
}

body.shop-page .shop-trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

body.shop-page .shop-trust-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
}

body.shop-page .shop-trust-card i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(201, 111, 50, 0.12);
    color: var(--primary);
}

body.shop-page .shop-trust-card span {
    color: var(--muted);
    line-height: 1.55;
}

body.shop-page .cart-head h3,
body.shop-page .checkout-modal h3,
body.shop-page .checkout-helper,
body.shop-page .empty-cart,
body.shop-page .empty-products,
body.shop-page .subtotal,
body.shop-page .total,
body.shop-page .shop-results-meta {
    line-height: 1.5;
}

    body.shop-page .cart {
    z-index: 35;
}

body.shop-page .cart-scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 34;
}

body.shop-page.shop-cart-open .cart-scrim {
    opacity: 1;
    pointer-events: auto;
}

body.shop-page .cart-head i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(31, 41, 51, 0.06);
}

body.shop-page .qty-box button,
body.shop-page .cart-head i {
    transition: background 0.2s ease, transform 0.2s ease;
}

body.shop-page .qty-box button:hover,
body.shop-page .cart-head i:hover {
    background: rgba(201, 111, 50, 0.12);
}

body.shop-page .cart-foot .checkout {
    order: 2;
}

body.shop-page .cart-foot .clear-cart {
    order: 3;
}

body.shop-page .cart-foot .total {
    order: 1;
}

body.shop-page .shop-toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
}

body.shop-page .shop-toast-container .toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
        line-height: 1.62;
    font-size: 0.95rem;
        padding: 16px 18px;
}

body.shop-page .shop-toast-container .toast-success::before {
    content: "âœ“";
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

body.shop-page .shop-toast-container .toast-important {
    align-items: center;
}

/* Storefront Myanmar typography polish */
body.shop-page,
body.shop-page button,
body.shop-page input,
body.shop-page select,
body.shop-page textarea {
    font-family: "Pyidaungsu", "Noto Sans Myanmar", "Myanmar Text", system-ui, sans-serif;
    font-feature-settings: "kern" 1;
    text-rendering: optimizeLegibility;
}

body.shop-page .logo,
body.shop-page .logo-main,
body.shop-page .logo-sub,
body.shop-page .shop-brand-kicker,
body.shop-page .shop-section-kicker,
body.shop-page .shop-hero-kicker,
body.shop-page .shop-results-meta,
body.shop-page .product-tag,
body.shop-page .product-stock-status-badge,
body.shop-page .product-details-kicker,
body.shop-page .product-details-price-label,
body.shop-page .product-details-panel-label {
    letter-spacing: 0.01em;
}

body.shop-page .shop-hero-copy h2,
body.shop-page .shop-section-head .title,
body.shop-page .product-details-modal-head h3,
body.shop-page .checkout-modal h3,
body.shop-page .cart-head h3,
body.shop-page .order-notice-card h3 {
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
}

body.shop-page .shop-hero-copy p,
body.shop-page .product-description-preview,
body.shop-page .product-details-copy,
body.shop-page .product-details-description,
body.shop-page .product-details-fallback-text,
body.shop-page .checkout-helper,
body.shop-page .order-notice-message,
body.shop-page .order-notice-status-item,
body.shop-page .shop-trust-card span,
body.shop-page .platform-fallback-note {
    line-height: 1.65;
    font-weight: 500;
    letter-spacing: 0;
}

body.shop-page .product-title,
body.shop-page .product-details-tier-card strong,
body.shop-page .product-details-ctn-highlight > strong,
body.shop-page .shop-trust-card strong {
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
}

body.shop-page .btn,
body.shop-page .btn-add,
body.shop-page .product-buy-btn,
body.shop-page .shop-hero-btn,
body.shop-page .shop-viber-contact,
body.shop-page .category-bar button,
body.shop-page .platform-option-btn,
body.shop-page .order-notice-btn,
body.shop-page .checkout,
body.shop-page .clear-cart,
body.shop-page .modal button {
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
}

body.shop-page .shop-filter-field span,
body.shop-page .shop-filter-field select,
body.shop-page .shop-filter-toggle,
body.shop-page .product-pricing-field span,
body.shop-page .product-unit-label {
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0;
}

@media (max-width: 1080px) {
    body.shop-page .shop-hero-shell {
        grid-template-columns: 1fr;
    }

    body.shop-page .shop-hero-visual {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        min-height: 0;
    }

    body.shop-page .shop-trust-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    body.shop-page .shop-nav {
        align-items: stretch;
    }

    body.shop-page .shop-header-search {
        order: 3;
        flex-basis: 100%;
    }

    body.shop-page .shop-viber-contact {
        flex: 1 1 auto;
        min-height: 52px;
        padding: 0 16px;
    }
}

@media (max-width: 720px) {
    body.shop-page .shop-main {
        padding: 12px 0 84px;
    }

    body.shop-page .shop-hero {
        display: none !important;
        margin-bottom: 0;
    }

    body.shop-page .shop-hero-shell {
        gap: 8px;
    }

    body.shop-page .shop-hero-copy {
        width: 100%;
        padding: 11px 13px;
        border-radius: 22px;
    }

    body.shop-page .shop-hero-copy h2[data-mobile-headline] {
        max-width: none;
        margin: 4px 0 6px;
        font-size: 0;
        line-height: 0;
    }

    body.shop-page .shop-hero-copy h2[data-mobile-headline]::after {
        content: attr(data-mobile-headline);
        display: -webkit-box;
        color: var(--text);
        font-size: clamp(1.05rem, 4.8vw, 1.28rem);
        line-height: 1.32;
        font-weight: 850;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body.shop-page .shop-hero-copy p {
        display: none;
    }

    body.shop-page .shop-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 7px;
    }

    body.shop-page .shop-hero-btn-secondary {
        display: none;
    }

    body.shop-page .shop-hero-visual {
        display: none;
    }

    body.shop-page .shop-section-head {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 4px;
    }

    body.shop-page .shop-results-meta {
        width: fit-content;
    }

    body.shop-page .shop-toolbar {
        gap: 10px;
        padding: 10px 12px;
        border-radius: 20px;
    }

    body.shop-page .shop-toolbar-main {
        position: relative;
        display: grid;
        gap: 6px;
        min-width: 0;
    }

    body.shop-page .shop-toolbar-main::before {
        content: "ဘယ်/ညာ ဆွဲပြီး ကြည့်ပါ";
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1.35;
    }

    body.shop-page .shop-toolbar-main::after {
        content: "›";
        position: absolute;
        top: 24px;
        right: 0;
        bottom: 0;
        z-index: 2;
        width: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 8px;
        color: var(--accent);
        font-size: 1.65rem;
        font-weight: 900;
        line-height: 1;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 251, 245, 0.94) 54%, rgba(255, 251, 245, 1));
    }

    body.shop-page .category-bar {
        position: relative;
        padding-right: 52px;
        scroll-padding-left: 0;
        scrollbar-width: none;
    }

    body.shop-page .shop-toolbar-tools {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.shop-page .wholesale-note-bar {
        width: 100%;
        max-width: none;
        margin: -2px 0 12px;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 9px 10px;
        border-radius: 18px;
    }

    body.shop-page .wholesale-note-bar b {
        flex: 1 1 auto;
        font-size: 0.82rem;
        line-height: 1.45;
    }

    body.shop-page .wholesale-note-action {
        min-height: 32px;
        padding-inline: 10px;
        font-size: 0.76rem;
    }

    body.shop-page .shop-filter-field,
    body.shop-page .shop-filter-toggle {
        width: 100%;
    }

    body.shop-page .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    body.shop-page .product-media {
        flex-basis: auto;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    body.shop-page .product-body {
        padding: 16px;
    }

    body.shop-page .product-meta {
        flex-direction: column;
        align-items: stretch;
    }

    body.shop-page .product-pricing-controls {
        grid-template-columns: 1fr;
    }

    body.shop-page .shop-trust-strip {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 24px;
    }

    body.shop-page .cart {
        width: min(420px, calc(100% - 12px));
        right: 6px;
        top: 6px;
        height: calc(100vh - 12px);
        border-radius: 28px;
        border-left: none;
    }
}

@media (max-width: 480px) {
    body.shop-page .shop-toolbar-tools {
        gap: 9px;
        flex-wrap: wrap;
        align-items: stretch;
    }

    body.shop-page .shop-filter-field {
        flex: 1 1 134px;
        min-width: 128px;
    }

    body.shop-page .shop-filter-field select {
        width: 100%;
    }

    body.shop-page .shop-filter-toggle {
        flex: 1 1 138px;
        min-width: 132px;
        min-height: 32px;
        height: auto;
        padding: 6px 9px;
        border-radius: 999px;
        justify-content: center;
        white-space: normal;
    }

    body.shop-page .wholesale-note-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        margin: -4px 0 8px;
        padding: 7px 8px;
        border-radius: 15px;
    }

    body.shop-page .wholesale-note-icon {
        display: none;
    }

    body.shop-page .wholesale-note-bar b {
        font-size: 0;
        line-height: 0;
    }

    body.shop-page .wholesale-note-bar b::after {
        content: "📦 လက်ကားမှာယူရန် Admin ကိုဆက်သွယ်ပါ";
        display: block;
        color: #6f3b15;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.4;
    }

    body.shop-page .wholesale-note-action {
        min-height: 28px;
        padding: 0 9px;
        border-radius: 999px;
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    body.shop-page .wholesale-note-bar {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    body.shop-page .wholesale-note-action {
        min-height: 28px;
    }
}

@media (max-width: 520px) {
    body.shop-page .shop-nav {
        gap: 10px;
        padding: 10px 0;
    }

    body.shop-page .logo-img {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    body.shop-page .logo-text {
        gap: 3px;
    }

    body.shop-page .logo-main {
        font-size: 0.98rem;
        letter-spacing: 0.03em;
    }

    body.shop-page .logo-sub {
        font-size: 0.7rem;
    }

    body.shop-page .shop-header-search {
        min-height: 46px;
        padding: 0 12px;
    }

    body.shop-page .shop-header-search input {
        font-size: 0.84rem;
    }

    body.shop-page .cart-btn {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    body.shop-page .shop-main {
        padding-top: 8px;
    }

    body.shop-page .shop-hero {
        margin-bottom: 6px;
    }

    body.shop-page .shop-hero-copy {
        padding: 12px;
    }

    body.shop-page .shop-hero-copy h2[data-mobile-headline] {
        font-size: 0;
        line-height: 0;
        margin: 2px 0 4px;
    }

    body.shop-page .shop-hero-copy h2[data-mobile-headline]::after {
        font-size: 1.02rem;
        line-height: 1.3;
    }

    body.shop-page .shop-hero-actions {
        gap: 6px;
        margin-top: 6px;
    }

    body.shop-page .shop-hero-btn {
        min-height: 38px;
        padding-inline: 14px;
        font-size: 0.84rem;
    }

    body.shop-page .shop-hero-btn-secondary {
        display: none;
    }

    body.shop-page .shop-section-head .title {
        font-size: 1rem;
        line-height: 1.18;
    }

    body.shop-page .shop-section-kicker {
        font-size: 0.56rem;
    }

    body.shop-page .shop-toolbar {
        margin-bottom: 10px;
        padding: 8px 10px;
    }

    body.shop-page .category-bar button {
        min-height: 38px;
        padding: 8px 14px;
        font-size: 0.8rem;
        line-height: 1.1;
    }

    body.shop-page .product-tag {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    body.shop-page .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body.shop-page .product {
        border-radius: 20px;
    }

    body.shop-page .product-media {
        aspect-ratio: 1 / 1.06;
    }

    body.shop-page .product-card-view-hint {
        display: none;
    }

    body.shop-page .product-body {
        gap: 8px;
        padding: 10px;
    }

    body.shop-page .product-card-top {
        gap: 0;
    }

    body.shop-page .product-title {
        font-size: 0.9rem;
        line-height: 1.42;
        -webkit-line-clamp: 2;
    }

    body.shop-page .product-subcopy {
        font-size: 0.78rem;
    }

    body.shop-page .price {
        font-size: 1rem;
    }

    body.shop-page .product-stock {
        padding: 6px 9px;
        font-size: 0.74rem;
    }

    body.shop-page .btn-add {
        min-height: 40px;
        padding-inline: 10px;
        font-size: 0.84rem;
    }

    body.shop-page .shop-results-meta {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    body.shop-page .cart {
        width: calc(100% - 8px);
        right: 4px;
        top: 4px;
        height: calc(100vh - 8px);
                padding: 16px;
    }
}

@media (max-width: 480px) {
    body.shop-page .shop-trust-strip {
        gap: 8px;
        margin-top: 16px;
        margin-bottom: 4px;
    }

    body.shop-page .shop-trust-card {
        gap: 6px;
        padding: 12px 14px;
        border-radius: 18px;
    }

    body.shop-page .shop-trust-card i {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 0.92rem;
    }

    body.shop-page .shop-trust-card strong {
        font-size: 16px;
        line-height: 1.45;
    }

    body.shop-page .shop-trust-card span {
        font-size: 14px;
        line-height: 1.45;
    }
}

@media (max-width: 359px) {
    body.shop-page .shop-grid {
        grid-template-columns: 1fr;
    }

    body.shop-page .cart-head,
    body.shop-page .cart-foot {
        border-radius: 18px;
        padding: 14px;
    }

    body.shop-page #cart-items {
        gap: 10px;
        padding-right: 2px;
    }

    body.shop-page .cart-foot {
        gap: 10px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    body.shop-page .cart-foot::before {
        left: 14px;
        right: 14px;
        top: -14px;
    }

    body.shop-page .cart-foot .checkout,
    body.shop-page .cart-foot .clear-cart {
        min-height: 44px;
    }
}


body.shop-page .order-notice-overlay[hidden] {
    display: none;
}

body.shop-page .order-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(8px);
}

body.shop-page .order-notice-card {
    position: relative;
    width: min(520px, 100%);
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 252, 248, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

body.shop-page .order-notice-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: rgba(31, 41, 51, 0.08);
    color: #0f172a;
    font-size: 1.2rem;
    cursor: pointer;
}

body.shop-page .order-notice-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 18px 32px rgba(22, 163, 74, 0.22);
}

body.shop-page .order-notice-card h3 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.35;
    color: #0f172a;
}

body.shop-page .order-notice-message {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-line;
}

body.shop-page .order-notice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.shop-page .order-notice-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 18px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.shop-page .order-notice-btn:hover,
body.shop-page .order-notice-btn:focus-visible,
body.shop-page .order-notice-close:hover,
body.shop-page .order-notice-close:focus-visible {
    transform: translateY(-1px);
}

body.shop-page .order-notice-btn-viber {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 18px 32px rgba(124, 58, 237, 0.22);
}

@media (max-width: 640px) {
    body.shop-page .order-notice-overlay {
        padding: 14px;
        align-items: flex-end;
    }

    body.shop-page .order-notice-card {
        width: 100%;
        padding: 20px 18px 18px;
        border-radius: 24px 24px 18px 18px;
        gap: 14px;
    }

    body.shop-page .order-notice-card h3 {
        font-size: 1.2rem;
    }

    body.shop-page .order-notice-message {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    body.shop-page .order-notice-actions {
        grid-template-columns: 1fr;
    }
}


body.shop-page .platform-option-btn.loading {
    opacity: 0.92;
    cursor: wait;
    pointer-events: none;
}

body.shop-page .platform-option-btn:disabled {
    cursor: not-allowed;
}

body.shop-page .platform-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: #fff;
    border-radius: 50%;
    animation: shopPlatformSpin 0.8s linear infinite;
}

@keyframes shopPlatformSpin {
    to {
        transform: rotate(360deg);
    }
}


body.shop-page.shop-order-notice-open {
    overflow: hidden;
}

body.shop-page .order-notice-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

body.shop-page .order-notice-status[hidden],
body.shop-page .order-notice-actions[hidden] {
    display: none;
}

body.shop-page .order-notice-status {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

body.shop-page .order-notice-status-item {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
    border-radius: 14px;
}

body.shop-page .order-notice-status-item:last-child {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(251, 146, 60, 0.12));
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #92400e;
    font-weight: 700;
}

body.shop-page .order-notice-btn-close {
    background: rgba(31, 41, 51, 0.08);
    color: #0f172a;
    box-shadow: none;
}

body.shop-page.viber-shop-sheet-open {
    overflow: hidden;
}

body.shop-page .viber-shop-sheet[hidden] {
    display: none;
}

body.shop-page .viber-shop-sheet {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    pointer-events: auto;
}

body.shop-page .viber-shop-sheet-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    pointer-events: auto;
}

body.shop-page .viber-shop-panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 26px 26px 20px 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    pointer-events: auto;
}

body.shop-page .viber-shop-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

body.shop-page .viber-shop-panel-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.04rem;
    font-weight: 600;
    line-height: 1.5;
}

body.shop-page .viber-shop-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    cursor: pointer;
}

body.shop-page .viber-shop-options {
    display: grid;
    gap: 10px;
}

body.shop-page .viber-shop-option {
    width: 100%;
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.96));
    color: #1f2937;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

body.shop-page .viber-shop-option:hover,
body.shop-page .viber-shop-option:focus-visible,
body.shop-page .viber-shop-close:hover,
body.shop-page .viber-shop-close:focus-visible {
    transform: translateY(-1px);
}

body.shop-page .viber-shop-name {
    color: #312e81;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

body.shop-page .viber-shop-phone {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
}

body.shop-page .viber-shop-exit {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    background: #eef1f5;
    color: #334155;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

body.shop-page .viber-shop-exit:hover,
body.shop-page .viber-shop-exit:focus-visible {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

body.shop-page .viber-shop-status {
    padding: 12px 14px;
    border: 1px solid rgba(251, 146, 60, 0.36);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(251, 146, 60, 0.12));
    color: #7c2d12;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.55;
}

body.shop-page .viber-instruction-panel[hidden] {
    display: none;
}

body.shop-page .viber-instruction-panel {
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid rgba(115, 96, 242, 0.24);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(115, 96, 242, 0.1), rgba(255, 255, 255, 0.98));
}

body.shop-page .viber-instruction-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4c1d95;
    font-size: 0.94rem;
    font-weight: 900;
}

body.shop-page .viber-instruction-head i {
    color: #7360f2;
    font-size: 1.1rem;
}

body.shop-page .viber-instruction-panel p {
    margin: 0;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.55;
}

body.shop-page .viber-instruction-countdown {
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(115, 96, 242, 0.12);
    color: #4c1d95;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.2;
}

body.shop-page .viber-instruction-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(115, 96, 242, 0.16);
}

body.shop-page .viber-instruction-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7360f2, #8f5cf7);
    transform-origin: left center;
    animation: viberInstructionCountdown 7s linear forwards;
}

body.shop-page .viber-instruction-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.shop-page .viber-instruction-open,
body.shop-page .viber-instruction-copy {
    min-height: 42px;
    border-radius: 13px;
    border: 1px solid rgba(115, 96, 242, 0.2);
    padding: 0 10px;
    font-size: 0.84rem;
    font-weight: 900;
    cursor: pointer;
}

body.shop-page .viber-instruction-open {
    background: linear-gradient(135deg, #7360f2, #8f5cf7);
    color: #fff;
}

body.shop-page .viber-instruction-copy {
    background: #f8fafc;
    color: #4c1d95;
}

body.shop-page .viber-instruction-open:hover,
body.shop-page .viber-instruction-open:focus-visible,
body.shop-page .viber-instruction-copy:hover,
body.shop-page .viber-instruction-copy:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

@keyframes viberInstructionCountdown {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

body.shop-page .viber-fallback-panel[hidden],
body.shop-page .viber-fallback-copy-order[hidden] {
    display: none;
}

body.shop-page .viber-fallback-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(14, 165, 233, 0.24);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(255, 255, 255, 0.96));
}

body.shop-page .viber-fallback-note {
    margin: 0;
    color: #075985;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: pre-line;
}

body.shop-page .viber-fallback-phone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.shop-page .viber-fallback-phone span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

body.shop-page .viber-fallback-phone strong {
    color: #0f172a;
    font-size: 0.96rem;
    font-weight: 900;
}

body.shop-page .viber-fallback-actions {
    display: grid;
    gap: 8px;
}

body.shop-page .viber-fallback-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: #fff;
    color: #4c1d95;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

body.shop-page .viber-fallback-copy-phone {
    border-color: rgba(217, 119, 6, 0.28);
    background: #fff3e8;
    color: #a94f12;
}

body.shop-page .viber-fallback-copy-order {
    border-color: rgba(14, 165, 233, 0.28);
    background: #e8f6ff;
    color: #075985;
}

body.shop-page .viber-fallback-mobile-link {
    border-color: rgba(124, 58, 237, 0.26);
    background: #f4efff;
    color: #5b21b6;
}

body.shop-page .viber-fallback-retry {
    border-color: rgba(124, 58, 237, 0.28);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(255, 255, 255, 0.96));
    color: #5b21b6;
}

body.shop-page .viber-fallback-close {
    border-color: rgba(148, 163, 184, 0.32);
    background: #eef1f5;
    color: #334155;
}

body.shop-page .viber-fallback-btn:hover,
body.shop-page .viber-fallback-btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

body.shop-page .viber-shop-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.shop-page .viber-shop-actions[hidden] {
    display: none;
}

body.shop-page .viber-shop-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    cursor: pointer;
}

body.shop-page .viber-shop-open.is-opening {
    opacity: 0.72;
    cursor: progress;
}

body.shop-page .viber-shop-open:disabled {
    pointer-events: none;
}

body.shop-page .viber-shop-open {
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: #fff;
    color: #5b21b6;
}

body.shop-page .viber-shop-copy {
    border: 1px solid rgba(217, 119, 6, 0.22);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(255, 255, 255, 0.96));
    color: #92400e;
}

body.shop-page .viber-shop-cancel {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #fff;
    color: #334155;
}

@media (min-width: 641px) {
    body.shop-page .viber-shop-sheet {
        align-items: center;
    }

    body.shop-page .viber-shop-panel {
        border-radius: 24px;
    }
}

@media (max-width: 420px) {
    body.shop-page .viber-fallback-phone {
        align-items: flex-start;
        flex-direction: column;
    }

    body.shop-page .viber-instruction-actions {
        grid-template-columns: 1fr;
    }

    body.shop-page .viber-shop-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body.admin-page[data-page="stock"] .stock-pricing-modal-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="stock"] .stock-pricing-rule-list,
    body.admin-page[data-page="stock"] .stock-pricing-summary-grid {
        grid-template-columns: 1fr;
    }
}

body.admin-page[data-page="products"] .product-compact-shell {
    padding: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

body.admin-page[data-page="products"] .product-compact-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

body.admin-page[data-page="products"] .product-mobile-wizard,
body.admin-page[data-page="products"] .product-mobile-step-nav {
    display: none;
}

body.admin-page[data-page="products"] .product-compact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

body.admin-page[data-page="products"] .product-compact-main {
    display: grid;
    gap: 16px;
}

body.admin-page[data-page="products"] .product-compact-card {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

body.admin-page[data-page="products"] .product-compact-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

body.admin-page[data-page="products"] .product-compact-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .product-compact-section-head h4 {
    margin: 10px 0 6px;
    color: #0f172a;
    font-size: 1.08rem;
}

body.admin-page[data-page="products"] .product-compact-section-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.94rem;
    line-height: 1.55;
}

body.admin-page[data-page="products"] .product-compact-card .product-section-grid {
    gap: 14px;
}

body.admin-page[data-page="products"] .pricing-buying-summary-compact {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

body.admin-page[data-page="products"] .product-pricing-rules-compact {
    margin-top: 16px;
}

body.admin-page[data-page="products"] .product-compact-accordion {
    padding: 0;
    overflow: hidden;
}

body.admin-page[data-page="products"] .product-compact-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    cursor: pointer;
    list-style: none;
}

body.admin-page[data-page="products"] .product-compact-accordion summary::-webkit-details-marker {
    display: none;
}

body.admin-page[data-page="products"] .product-compact-accordion summary strong {
    display: block;
    margin: 10px 0 6px;
    color: #0f172a;
    font-size: 1rem;
}

body.admin-page[data-page="products"] .product-compact-accordion summary p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

body.admin-page[data-page="products"] .product-compact-accordion summary i {
    color: #64748b;
    transition: transform 0.2s ease;
}

body.admin-page[data-page="products"] .product-compact-accordion[open] summary i {
    transform: rotate(180deg);
}

body.admin-page[data-page="products"] .product-compact-accordion-body {
    padding: 0 18px 18px;
}

body.admin-page[data-page="products"] .product-visibility-wrap {
    margin-top: 14px;
}

body.admin-page[data-page="products"] .product-compact-side {
    position: relative;
}

body.admin-page[data-page="products"] .product-action-bar-sticky {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

body.admin-page[data-page="products"] .product-compact-summary {
    display: grid;
    gap: 10px;
}

body.admin-page[data-page="products"] .product-compact-summary-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

body.admin-page[data-page="products"] .product-compact-summary-item span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.admin-page[data-page="products"] .product-compact-summary-item strong {
    color: #0f172a;
    font-size: 0.98rem;
}

body.admin-page[data-page="products"] .product-action-bar-sticky .product-action-bar-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.admin-page[data-page="products"] .product-action-bar-sticky .product-submit-sticky,
body.admin-page[data-page="products"] .product-action-bar-sticky .btn-secondary {
    width: 100%;
}

body.admin-page[data-page="products"] .product-compact-card .field-group,
body.admin-page[data-page="products"] .product-compact-card .pricing-rule-metric,
body.admin-page[data-page="products"] .product-compact-card .pricing-cost-total,
body.admin-page[data-page="products"] .product-compact-card .pricing-buying-summary {
    min-width: 0;
}

@media (max-width: 1180px) {
    body.admin-page[data-page="products"] .product-compact-layout {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-action-bar-sticky {
        position: sticky;
        top: auto;
        bottom: 12px;
        z-index: 12;
    }
}

@media (max-width: 760px) {
    body.admin-page[data-page="products"] .product-compact-shell {
        padding: 16px;
    }

    body.admin-page[data-page="products"] .product-mobile-wizard {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 14px;
    }

    body.admin-page[data-page="products"] .product-mobile-step-chip {
        min-height: 74px;
        display: grid;
        justify-items: center;
        gap: 6px;
        padding: 10px 8px;
        border-radius: 16px;
        border: 1px solid rgba(226, 232, 240, 0.9);
        background: rgba(248, 250, 252, 0.92);
        color: #475569;
        font: inherit;
        font-weight: 700;
    }

    body.admin-page[data-page="products"] .product-mobile-step-chip.is-active {
        border-color: rgba(37, 99, 235, 0.24);
        background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(248, 250, 252, 0.98));
        color: #1d4ed8;
    }

    body.admin-page[data-page="products"] .product-mobile-step-chip-number {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.18);
        color: inherit;
        font-size: 0.84rem;
        font-weight: 800;
    }

    body.admin-page[data-page="products"] .product-mobile-step-chip.is-active .product-mobile-step-chip-number {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        color: #fff;
    }

    body.admin-page[data-page="products"] .product-compact-card,
    body.admin-page[data-page="products"] .product-action-bar-sticky {
        padding: 16px;
        border-radius: 18px;
    }

    body.admin-page[data-page="products"] .product-compact-card .product-section-grid,
    body.admin-page[data-page="products"] .pricing-base-grid,
    body.admin-page[data-page="products"] .pricing-base-metrics,
    body.admin-page[data-page="products"] .product-media-grid,
    body.admin-page[data-page="products"] .pricing-cost-grid,
    body.admin-page[data-page="products"] .pricing-buying-row,
    body.admin-page[data-page="products"] .quick-add-panel-grid,
    body.admin-page[data-page="products"] .pricing-rule-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-action-bar-sticky .product-action-bar-buttons {
        grid-template-columns: 1fr;
    }

    body.admin-page[data-page="products"] .product-mobile-step-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 12px;
    }

    body.admin-page[data-page="products"] .product-mobile-step-nav[hidden] {
        display: none;
    }

    body.admin-page[data-page="products"] .product-mobile-step-nav .btn-secondary,
    body.admin-page[data-page="products"] .product-mobile-step-nav .btn-add {
        width: 100%;
    }
}

/* Mobile-only compact shop layout: keep first product cards visible on entry. */
@media (max-width: 640px) {
    body.shop-page .shop-header {
        position: sticky;
        top: 0;
    }

    body.shop-page .shop-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
        padding: 8px 0;
        align-items: center;
    }

    body.shop-page .logo-box {
        min-width: 0;
        gap: 8px;
        height: 36px;
        align-items: center;
    }

    body.shop-page .logo-img {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    body.shop-page .logo,
    body.shop-page .logo-title,
    body.shop-page .brand-title {
        margin: 0;
        font-size: 1.45rem;
        line-height: 1.05;
    }

    body.shop-page .shop-brand-copy {
        height: auto;
        line-height: 1;
    }

    body.shop-page .cart-btn {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        justify-self: end;
    }

    body.shop-page .shop-header-search {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        order: initial;
        min-width: 0;
        min-height: 44px;
        height: 44px;
        padding: 0 12px;
        gap: 8px;
        box-shadow: 0 10px 24px rgba(57, 35, 14, 0.07);
    }

    body.shop-page .shop-header-search input,
    body.shop-page .search-input {
        height: 44px;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    body.shop-page .shop-viber-contact,
    body.shop-page .viber-btn,
    body.shop-page .cta-viber {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        order: initial;
        width: 44px;
        min-height: 44px;
        height: 44px;
        padding: 0;
        border-radius: 14px;
        font-size: 0.9rem;
    }

    body.shop-page .shop-viber-contact span {
        display: none;
    }

    body.shop-page .shop-main {
        padding-top: 6px;
    }

    body.shop-page .shop-hero,
    body.shop-page .hero,
    body.shop-page .top-section {
        padding-top: 14px;
        padding-bottom: 10px;
        margin-bottom: 0;
    }

    body.shop-page .shop-section-head {
        display: grid;
        gap: 2px;
        margin-bottom: 6px;
    }

    body.shop-page .shop-section-kicker {
        display: none;
    }

    body.shop-page .shop-section-head .title {
        font-size: 0.96rem;
        line-height: 1.15;
    }

    body.shop-page .shop-results-meta {
        padding: 5px 8px;
        font-size: 0.7rem;
        line-height: 1.15;
    }

    body.shop-page .shop-toolbar,
    body.shop-page .category-section,
    body.shop-page .filter-section {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 8px;
        gap: 7px;
        border-radius: 16px;
    }

    body.shop-page .shop-toolbar-main {
        gap: 4px;
    }

    body.shop-page .shop-toolbar-main::before,
    body.shop-page .shop-toolbar-main::after {
        display: none;
    }

    body.shop-page .category-bar {
        gap: 6px;
        padding-right: 0;
        padding-bottom: 0;
    }

    body.shop-page .category-bar button {
        min-height: 34px;
        padding: 6px 10px;
        font-size: 0.74rem;
        border-radius: 999px;
    }

    body.shop-page .shop-toolbar-tools {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 9px;
        align-items: stretch;
    }

    body.shop-page .shop-filter-field {
        gap: 4px;
    }

    body.shop-page .shop-filter-field span {
        display: none;
    }

    body.shop-page .shop-filter-field select,
    body.shop-page .shop-filter-toggle {
        min-height: 38px;
        padding: 0 10px;
        border-radius: 12px;
        font-size: 0.74rem;
    }

    body.shop-page .shop-filter-toggle {
        gap: 7px;
        line-height: 1.2;
        justify-content: center;
    }

    body.shop-page .shop-filter-toggle input {
        width: 16px;
        height: 16px;
    }

    body.shop-page .shop-grid,
    body.shop-page .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body.shop-page .product,
    body.shop-page .product-card {
        border-radius: 16px;
        overflow: hidden;
    }

    body.shop-page .product-clickable-card:active {
        transform: scale(0.98);
    }

    body.shop-page .product-media {
        height: 150px;
        min-height: 0;
        flex: 0 0 150px;
        aspect-ratio: auto;
    }

    body.shop-page .product-card img,
    body.shop-page .product-media img {
        height: 150px;
        object-fit: cover;
    }

    body.shop-page .product-card-view-hint {
        display: none;
    }

    body.shop-page .product-body {
        gap: 6px;
        padding: 9px;
    }

    body.shop-page .product-card-top {
        gap: 0;
    }

    body.shop-page .product-tag,
    body.shop-page .product-stock-status-badge {
        padding: 4px 7px;
        font-size: 0.62rem;
        line-height: 1.15;
    }

    body.shop-page .product-card h3,
    body.shop-page .product-title {
        min-height: auto;
        font-size: 0.82rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.shop-page .product-description-preview,
    body.shop-page .product-subcopy {
        display: none;
    }

    body.shop-page .price {
        font-size: 0.92rem;
        line-height: 1.2;
    }

    body.shop-page .product-stock {
        padding: 5px 7px;
        font-size: 0.68rem;
        line-height: 1.15;
    }

    body.shop-page .product-pricing-controls,
    body.shop-page .product-actions {
        gap: 6px;
    }
}

/* Extra compact mobile storefront header/filter pass. */
@media (max-width: 640px) {
    body.shop-page .shop-header {
        min-height: 0;
    }

    body.shop-page .shop-nav {
        position: relative;
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 6px;
        padding: 4px 0;
    }

    body.shop-page .logo-box {
        grid-column: 1 / -1;
        position: relative;
        justify-self: stretch;
        height: 36px;
        max-width: none;
        padding-inline: 44px;
        justify-content: center;
    }

    body.shop-page .logo-img {
        position: absolute;
        left: 0;
        top: 0;
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    body.shop-page .logo,
    body.shop-page .logo-title,
    body.shop-page .brand-title {
        margin: 0;
        font-size: 24px;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    body.shop-page .logo span::before {
        content: " ";
    }

    body.shop-page .cart-btn {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 3;
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    body.shop-page .shop-header-search {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        min-height: 40px;
        height: 40px;
        width: 100%;
        padding: 0 10px;
        padding-right: 58px;
    }

    body.shop-page .shop-header-search input,
    body.shop-page .search-input {
        height: 40px;
        font-size: 0.8rem;
    }

    body.shop-page .shop-viber-contact,
    body.shop-page .viber-btn,
    body.shop-page .cta-viber {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        justify-self: end;
        z-index: 2;
        width: 42px;
        min-height: 42px;
        height: 42px;
        border-radius: 13px;
    }

    body.shop-page .shop-main {
        padding-top: 3px;
    }

    body.shop-page .shop-catalog {
        margin-top: 0;
    }

    body.shop-page .shop-section-head {
        display: none;
        margin-bottom: 0;
    }

    body.shop-page .shop-section-head .title {
        font-size: 0.9rem;
        line-height: 1.1;
    }

    body.shop-page .shop-results-meta {
        flex: 0 0 auto;
        padding: 4px 7px;
        font-size: 0.66rem;
        line-height: 1;
    }

    body.shop-page .shop-toolbar,
    body.shop-page .category-section,
    body.shop-page .filter-section {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
        margin-bottom: 7px;
        padding: 6px;
        overflow-x: auto;
        border-radius: 14px;
        scrollbar-width: none;
    }

    body.shop-page .shop-toolbar::-webkit-scrollbar,
    body.shop-page .category-section::-webkit-scrollbar,
    body.shop-page .filter-section::-webkit-scrollbar {
        display: none;
    }

    body.shop-page .shop-toolbar-main,
    body.shop-page .shop-toolbar-tools {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 9px;
        width: auto;
    }

    body.shop-page .category-bar {
        gap: 5px;
        width: auto;
    }

    body.shop-page .category-bar button {
        min-height: 32px;
        padding: 5px 9px;
        font-size: 0.7rem;
    }

    body.shop-page .shop-filter-field {
        flex: 1 1 132px;
        min-width: 128px;
    }

    body.shop-page .shop-filter-field select,
    body.shop-page .shop-filter-toggle {
        min-height: 32px;
        height: 32px;
        padding: 0 8px;
        border-radius: 10px;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    body.shop-page .shop-filter-toggle {
        flex: 1 1 136px;
        max-width: none;
        gap: 6px;
        justify-content: center;
        overflow: visible;
        text-overflow: clip;
    }

    body.shop-page .shop-filter-toggle input {
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
    }

body.shop-page .shop-grid,
body.shop-page .product-grid {
    gap: 8px;
}
}

body.shop-page .shop-footer {
    margin-top: 10px;
    padding: 22px 0 26px;
    background: linear-gradient(135deg, #111827 0%, #0f172a 52%, #0ea5e9 100%);
    color: #ffffff;
    border-top: 4px solid #c96f32;
}

body.shop-page .shop-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
    gap: 20px;
    align-items: center;
}

body.shop-page .shop-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.shop-page .shop-footer-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 20%, rgba(125, 211, 252, 0.34), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.9));
    border: 1px solid rgba(125, 211, 252, 0.32);
    box-shadow: 0 14px 28px rgba(201, 111, 50, 0.22), 0 0 0 5px rgba(201, 111, 50, 0.08);
    overflow: hidden;
}

body.shop-page .shop-footer-mark img {
    display: block;
    width: 82%;
    height: 82%;
    object-fit: contain;
}

body.shop-page .shop-footer-brand strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.2;
}

body.shop-page .shop-footer-brand p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    line-height: 1.45;
}

body.shop-page .shop-footer-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.75fr) minmax(130px, 0.65fr);
    gap: 10px;
}

body.shop-page .shop-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

body.shop-page .shop-footer-contact-item i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #7dd3fc;
}

body.shop-page .shop-footer-contact-item span {
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

body.shop-page a.shop-footer-contact-item:hover,
body.shop-page a.shop-footer-contact-item:focus-visible {
    border-color: rgba(125, 211, 252, 0.62);
    background: rgba(14, 165, 233, 0.18);
    outline: none;
}

body.shop-page .shop-footer-social-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

body.shop-page .shop-footer-social-title {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

body.shop-page .shop-footer-social-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

body.shop-page .shop-footer-social-link {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

body.shop-page .shop-footer-social-link:hover,
body.shop-page .shop-footer-social-link:focus-visible {
    transform: translateY(-1px) scale(1.06);
    border-color: rgba(125, 211, 252, 0.62);
    background: rgba(14, 165, 233, 0.18);
    color: #ffffff;
    outline: none;
}

body.shop-page .shop-footer-social-facebook:hover,
body.shop-page .shop-footer-social-facebook:focus-visible {
    color: #7dd3fc;
}

body.shop-page .shop-footer-social-youtube:hover,
body.shop-page .shop-footer-social-youtube:focus-visible {
    color: #ff7a45;
}

body.shop-page .shop-footer-social-tiktok:hover,
body.shop-page .shop-footer-social-tiktok:focus-visible {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 860px) {
    body.shop-page .shop-footer-inner,
    body.shop-page .shop-footer-contact-grid {
        grid-template-columns: 1fr;
    }

    body.shop-page .shop-footer-inner {
        gap: 14px;
    }
}

@media (max-width: 520px) {
    body.shop-page .shop-footer {
        padding: 18px 0 22px;
    }

    body.shop-page .shop-footer-brand {
        align-items: flex-start;
    }

    body.shop-page .shop-footer-mark {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    body.shop-page .shop-footer-contact-item {
        padding: 11px;
        border-radius: 12px;
    }

    body.shop-page .shop-footer-social-panel {
        flex-direction: column;
        justify-content: center;
        padding: 12px;
        text-align: center;
    }

    body.shop-page .shop-footer-social-row {
        justify-content: center;
    }
}

/* Storefront narrow viewport guard for DevTools/mobile widths. */
@media (max-width: 900px) {
    html,
    body.shop-page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body.shop-page .container,
    body.shop-page .shop-header,
    body.shop-page .shop-nav,
    body.shop-page .shop-header-search,
    body.shop-page .shop-main,
    body.shop-page .shop-catalog,
    body.shop-page .shop-toolbar,
    body.shop-page .shop-grid,
    body.shop-page .product-grid {
        min-width: 0;
        max-width: 100%;
    }

    body.shop-page .shop-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    body.shop-page .logo-box,
    body.shop-page .shop-brand-copy,
    body.shop-page .shop-header-search {
        min-width: 0;
    }

    body.shop-page .shop-header-search {
        grid-column: 1 / -1;
        width: 100%;
        flex-basis: auto;
        order: 2;
    }

    body.shop-page .cart-btn {
        flex: 0 0 auto;
        order: 1;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    body.shop-page .shop-viber-contact {
        min-height: 48px;
        padding: 0 14px;
        border-radius: 14px;
        font-size: 0.82rem;
    }

    body.shop-page .shop-header-search {
        min-height: 48px;
        padding: 0 14px;
    }

    body.shop-page .shop-header-search input {
        font-size: 0.9rem;
    }
}

/* Final mobile storefront polish: compact, even cards without changing desktop layout. */
@media (max-width: 640px) {
    body.shop-page {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    body.shop-page .shop-main {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    body.shop-page .shop-grid,
    body.shop-page .product-grid {
        align-items: stretch;
    }

    body.shop-page .product,
    body.shop-page .product-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    body.shop-page .product-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: 7px;
        min-height: 124px;
    }

    body.shop-page .product-card-top {
        min-height: 48px;
    }

    body.shop-page .product-title {
        min-height: calc(1.38em * 2);
        font-size: 0.86rem;
        line-height: 1.38;
        -webkit-line-clamp: 2;
    }

    body.shop-page .product-meta {
        display: grid;
        gap: 7px;
        margin-top: auto;
        align-content: end;
    }

    body.shop-page .price {
        min-height: 1.2em;
        line-height: 1.2;
    }

    body.shop-page .product-buy-btn,
    body.shop-page .btn-add {
        min-height: 43px;
        height: 43px;
        padding: 0 10px;
        border-radius: 14px;
        font-size: 14px;
        line-height: 1.15;
    }

    body.shop-page .product-tag,
    body.shop-page .product-stock-status-badge {
        background: #e8f8ef;
        border: 1px solid #b7e4ca;
        color: #14532d;
        letter-spacing: 0.04em;
    }

    body.shop-page .category-bar {
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0;
        -webkit-overflow-scrolling: touch;
    }

    body.shop-page .category-bar::-webkit-scrollbar {
        display: none;
    }

    body.shop-page .category-bar button {
        min-height: 36px;
        padding: 7px 11px;
        font-size: 0.76rem;
    }

    body.shop-page .floating-contact {
        right: max(10px, env(safe-area-inset-right, 0px));
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        z-index: 36;
    }

    body.shop-page .floating-contact-toggle {
        width: 52px;
        height: 52px;
        min-height: 52px;
        border-radius: 50%;
    }

    body.shop-page .floating-contact-menu {
        right: 0;
        bottom: calc(62px + env(safe-area-inset-bottom, 0px));
        max-width: min(324px, calc(100vw - 24px));
    }

    body.shop-page .cart {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    body.shop-page .modal-overlay {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}
