.staff-barcode-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #18212f;
}

.staff-barcode-page-pdp {
    padding-top: 4px;
}

body:not(.ms-inventory-tab-allowed) #tab-label-webpos_barcode_reception,
body:not(.ms-inventory-tab-allowed) #webpos_barcode_reception {
    display: none !important;
}

.staff-barcode-header h1 {
    margin: 0 0 8px;
}

.staff-barcode-header p {
    margin: 0;
    max-width: 720px;
}

.staff-barcode-lead {
    color: #425466;
}

.staff-barcode-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.staff-barcode-count {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eaf8ff;
    color: #1f6181;
    font-weight: 600;
}

.staff-barcode-count strong {
    color: #18212f;
}

.staff-barcode-count.is-muted {
    background: #f1f5f9;
    color: #607085;
}

.staff-barcode-count.is-dark {
    background: #18212f;
    color: #f8fafc;
}

.staff-barcode-count.is-dark strong {
    color: inherit;
}

.staff-barcode-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.staff-barcode-search,
.staff-barcode-panel,
.staff-barcode-product-card {
    background: #fff;
    border: 1px solid #d8e1ee;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    padding: 24px;
}

.staff-barcode-search-row,
.staff-barcode-inline-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.staff-barcode-inline-form {
    flex-direction: column;
    align-items: stretch;
}

.staff-barcode-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #c9d4e3;
    border-radius: 6px;
    padding: 12px 14px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.staff-barcode-input:focus {
    border-color: #0ea5d7;
    box-shadow: 0 0 0 3px rgba(14, 165, 215, 0.15);
    outline: none;
}

.staff-barcode-page button.staff-barcode-button,
.staff-barcode-page button.staff-barcode-mini-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    box-sizing: border-box;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    padding: 0 16px;
    text-align: center;
    text-transform: uppercase;
}

.staff-barcode-button {
    min-width: 164px;
}

.staff-barcode-mini-button {
    min-height: 40px;
    font-size: 0.88rem;
}

.staff-barcode-button.action.primary,
.staff-barcode-mini-button.action.primary {
    background: #12a9d6;
    color: #fff;
}

.staff-barcode-button.action.secondary,
.staff-barcode-mini-button.action.secondary {
    background: #eef7fb;
    color: #136987;
    border: 1px solid #86c7df;
}

.staff-barcode-button:hover,
.staff-barcode-mini-button:hover {
    opacity: 0.95;
}

.staff-barcode-page button.staff-barcode-button span,
.staff-barcode-page button.staff-barcode-mini-button span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    line-height: 1;
    text-align: center;
}

.staff-barcode-results {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-barcode-result-card {
    display: flex;
    gap: 12px;
    min-height: 120px;
    padding: 16px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d8e1ee;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.staff-barcode-result-card:hover {
    transform: translateY(-1px);
    border-color: #9dc9dc;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.staff-barcode-result-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.staff-barcode-result-eyebrow {
    color: #5e7188;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.staff-barcode-result-media,
.staff-barcode-product-media {
    width: 132px;
    min-width: 132px;
    aspect-ratio: 1 / 1;
    background: #f4f7fb;
    border: 1px solid #e1e8f1;
    border-radius: 8px;
    overflow: hidden;
}

.staff-barcode-media-frame {
    position: relative;
    width: 100%;
    height: 100%;
}

.staff-barcode-result-media img,
.staff-barcode-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.staff-barcode-result-media img.is-hidden,
.staff-barcode-product-media img.is-hidden {
    display: none;
}

.staff-barcode-media-frame.is-fallback .staff-barcode-placeholder {
    display: flex;
}

.staff-barcode-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.staff-barcode-product-card {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
    align-items: start;
}

.staff-barcode-product-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.staff-barcode-product-topline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.staff-barcode-product-meta h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
}

.staff-barcode-chip {
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e9f7ff;
    color: #205b95;
    font-size: 0.85rem;
    font-weight: 600;
}

.staff-barcode-subtle {
    color: #5f6f84;
    font-size: 0.95rem;
}

.staff-barcode-definition-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 0;
}

.staff-barcode-definition-card {
    padding: 16px;
    border: 1px solid #e3ebf4;
    border-radius: 8px;
    background: #f8fbfe;
}

.staff-barcode-definition-list dt {
    font-size: 0.85rem;
    color: #607085;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.staff-barcode-definition-list dd {
    margin: 4px 0 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.staff-barcode-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
}

.staff-barcode-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.staff-barcode-grid > .staff-barcode-panel:last-child {
    grid-column: 1 / -1;
}

.staff-barcode-panel-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.staff-barcode-panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.15;
}

.staff-barcode-panel-header p {
    margin: 0;
    color: #425466;
}

.staff-barcode-panel-eyebrow {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d6e6f3;
    border-radius: 999px;
    background: #f7fbff;
    color: #2f4d68;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.staff-barcode-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.staff-barcode-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 999px;
    background: #e9f7ff;
    border: 1px solid #cfe6f3;
    color: #184f69;
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.staff-barcode-panel-count.is-muted {
    background: #f4f7fb;
    border-color: #dce6f0;
    color: #3d556e;
}

.staff-barcode-secondary-form {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e6edf5;
}

.staff-barcode-panel .staff-barcode-button,
.staff-barcode-panel .staff-barcode-inline-form .staff-barcode-button,
.staff-barcode-panel .staff-barcode-secondary-form .staff-barcode-button {
    width: 100%;
    min-width: 0;
}

.staff-barcode-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.staff-barcode-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    align-items: start;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e3ebf4;
    border-radius: 8px;
    background: #fbfdff;
}

.staff-barcode-item.is-primary {
    border-color: #64b3cf;
    background: #f4fbff;
}

.staff-barcode-item.is-blocked strong {
    text-decoration: line-through;
}

.staff-barcode-item-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.staff-barcode-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.staff-barcode-actions form,
.staff-barcode-actions button,
.staff-barcode-mini-button {
    width: 100%;
}

.staff-barcode-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.staff-barcode-tags span,
.staff-barcode-note {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #eef3f8;
    border: 1px solid #dbe5ef;
    color: #304458;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.staff-barcode-tag.is-primary {
    background: #e7f7ff;
    border-color: #b9dff1;
    color: #0d5f7e;
}

.staff-barcode-tag.is-attribute {
    background: #f2f6fb;
    border-color: #d7e2ed;
    color: #41586e;
}

.staff-barcode-tag.is-pos {
    background: #edf8ef;
    border-color: #c8e7cf;
    color: #2f6b3e;
}

.staff-barcode-tag.is-fallback {
    background: #f7f1ff;
    border-color: #ddd0f7;
    color: #5d4d93;
}

.staff-barcode-empty {
    margin: 0;
    padding: 16px 0 4px;
    color: #607085;
}

@media (min-width: 1600px) {
    .staff-barcode-grid {
        grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.12fr) minmax(280px, 0.88fr);
    }

    .staff-barcode-grid > .staff-barcode-panel:last-child {
        grid-column: auto;
    }
}

@media (max-width: 1024px) {
    .staff-barcode-grid {
        grid-template-columns: 1fr;
    }

    .staff-barcode-grid > .staff-barcode-panel:last-child {
        grid-column: auto;
    }
}

@media (max-width: 767px) {
    .staff-barcode-product-card,
    .staff-barcode-grid,
    .staff-barcode-item {
        grid-template-columns: 1fr;
    }

    .staff-barcode-result-card {
        min-height: auto;
    }

    .staff-barcode-result-media,
    .staff-barcode-product-media {
        width: 100%;
        min-width: 0;
    }

    .staff-barcode-panel-title-row,
    .staff-barcode-product-topline {
        align-items: flex-start;
    }

    .staff-barcode-button {
        min-width: 0;
    }

    .staff-barcode-search-row .staff-barcode-button,
    .staff-barcode-inline-form .staff-barcode-button,
    .staff-barcode-actions form,
    .staff-barcode-actions button {
        width: 100%;
    }
}
