.shop-dashboard {
    max-width: 66rem;
    margin: 1rem auto 2rem;
}

#main-content:has(> .shop-dashboard) > :is(.notice, .error) {
    max-width: 66rem;
    margin: 1rem auto 0;
    padding: .65rem .85rem;
}

.shop-dashboard-heading,
.shop-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}

.shop-dashboard-heading {
    justify-content: space-between;
    margin-bottom: .75rem;
}

.shop-dashboard-heading h1 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.shop-dashboard-actions form {
    margin: 0;
}

.shop-dashboard-actions .shop-logout {
    background: #fff;
    color: #40596b;
    border-color: #d7e2e9;
}

.shop-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr);
    align-items: start;
    gap: .75rem;
}

.shop-dashboard-grid-single {
    grid-template-columns: minmax(0, 28rem);
}

.shop-dashboard-grid > .panel {
    min-width: 0;
    padding: clamp(.75rem, 2vw, 1rem);
    border-radius: .75rem;
}

.shop-dashboard-grid h2 {
    margin: 0 0 .625rem;
    font-size: 1.05rem;
}

.shop-profile-form {
    display: grid;
    gap: .625rem;
}

.shop-profile-form > label,
.shop-color-field {
    display: grid;
    min-width: 0;
    gap: .2rem;
}

.shop-profile-form small {
    color: #526779;
    font-size: .75rem;
    font-weight: 400;
}

.shop-dashboard-grid input:not([type="checkbox"]):not([type="hidden"]):not([type="color"]),
.shop-dashboard-grid select,
.shop-dashboard-grid textarea {
    width: 100%;
    min-width: 0;
    min-height: 2.25rem;
    padding: .35rem .5rem;
    border-radius: .375rem;
    line-height: 1.4;
}

.shop-dashboard-grid textarea {
    resize: vertical;
}

.shop-profile-form input[type="file"] {
    background: #fff;
    font-size: .8rem;
}

.shop-color-control {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.shop-color-control input[type="color"] {
    width: 2.75rem;
    min-height: 2.25rem;
    height: 2.25rem;
    padding: .2rem;
    cursor: pointer;
}

.shop-color-control output {
    color: #4b6273;
    font: .78rem ui-monospace, monospace;
}

.shop-profile-form .shop-remove-logo {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.shop-remove-logo input {
    width: auto;
    min-height: 0;
}

.shop-dashboard-grid .button {
    justify-self: start;
    padding: .4rem .8rem;
    min-height: 2.25rem;
}

.shop-brand {
    --shop-accent: #087f8c;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .7rem;
    padding: .6rem;
    border: 1px solid #dce6ec;
    border-inline-start: .25rem solid var(--shop-accent);
    border-radius: .625rem;
    background: #f7fafc;
    background: color-mix(in srgb, var(--shop-accent) 9%, white);
    overflow-wrap: anywhere;
}

.shop-brand-logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    overflow: hidden;
    border: 1px solid #dce6ec;
    border-radius: .5rem;
    background: #fff;
    color: #273d4c;
    font-weight: 700;
}

.shop-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-brand-logo [hidden] {
    display: none;
}

.shop-new-product,
.shop-product-item {
    margin: .35rem 0 0;
    padding: .45rem .6rem;
    border: 1px solid #dce6ec;
    border-radius: .5rem;
}

.shop-new-product {
    background: #f4fbfa;
}

.shop-inventory summary {
    cursor: pointer;
    font-weight: 600;
}

.shop-inventory summary:focus-visible {
    outline: 2px solid #087f8c;
    outline-offset: 3px;
}

.shop-product-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .1rem .5rem;
    max-width: calc(100% - 1.5rem);
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.shop-product-summary span {
    color: #526779;
    font-size: .8rem;
    font-weight: 400;
}

.shop-inventory-empty {
    margin: .6rem 0 0;
}

.shop-inventory .product-row-editor {
    max-width: 100%;
}

.shop-inventory .product-form {
    gap: .5rem .65rem;
    margin: .65rem 0 .25rem;
}

.shop-inventory .product-form > label {
    display: grid;
    align-content: start;
    gap: .2rem;
    margin: 0;
}

.shop-inventory .product-form input:is([type="number"], [type="date"]) {
    height: 2.25rem;
}

.shop-inventory .product-form textarea[name="description"] {
    height: 5rem;
}

.shop-inventory .product-form > .check {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.shop-inventory .image-uploader,
.shop-inventory .image-dropzone,
.shop-inventory .product-live-preview {
    padding: .5rem;
}

.shop-inventory .image-dropzone,
.shop-inventory .image-upload-help,
.shop-inventory .image-upload-status {
    margin: .25rem 0;
}

.shop-inventory .is-enhanced .image-slot-picker input {
    width: 1px;
    min-height: 0;
    padding: 0;
}

.shop-inventory .image-nine-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .3rem;
}

.shop-inventory .image-slot-empty button {
    min-height: 2.25rem;
}

.shop-inventory .product-live-preview img {
    width: 3rem;
    height: 3.25rem;
}

.shop-inventory .product-live-preview {
    flex-direction: row;
    gap: .5rem;
}

.shop-inventory .product-live-preview p {
    margin-bottom: .25rem;
}

.shop-store-heading {
    display: grid;
    gap: .45rem;
    margin: 1rem 0;
}

.shop-brand-store {
    padding: .9rem;
}

.shop-brand-store .shop-brand-logo {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
}

.shop-brand-store h1 {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.shop-brand-store p {
    margin: .2rem 0 0;
    white-space: pre-line;
}

.shop-operations > .panel + .panel {
    margin-top: .75rem;
}

.shop-operations > .panel {
    padding: clamp(.75rem, 2vw, 1.15rem);
}

.shop-stock-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    align-items: end;
    gap: .5rem;
    margin: .55rem 0 .25rem;
}

.shop-stock-form label {
    display: grid;
    gap: .2rem;
}

.shop-stock-form :is(input, select) {
    width: 100%;
    min-width: 0;
    min-height: 2.25rem;
    padding: .35rem .5rem;
}

.shop-stock-form button {
    justify-self: start;
}

.shop-document-actions {
    margin-bottom: .75rem;
}

.shop-sale-document h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.shop-sale-document dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .4rem 1rem;
    margin-bottom: 1rem;
}

.shop-sale-document dt {
    font-weight: 700;
}

.shop-sale-document dd {
    margin: 0;
}

@media print {
    body:has(.shop-sale-document) > :is(header, footer, .announcement, .signed-in-account, .skip-link),
    body:has(.shop-sale-document) :is(.shop-document-actions, main > .notice, main > .error) {
        display: none;
    }

    body:has(.shop-sale-document),
    .shop-sale-document {
        background: #fff;
        color: #111;
    }

    .shop-sale-document {
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .shop-sale-document .table-wrap {
        overflow: visible;
    }
}

@media (max-width: 800px) {
    .shop-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .shop-inventory .product-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .shop-inventory .image-nine-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
