:root {
    --ink: #203a34;
    --muted: #76817a;
    --cream: #f7f6f1;
    --green: #315a49;
    --line: #e9e9e2;
    --orange: #e99065;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    min-height: 100vh;
    max-width: 1600px;
    margin: auto;
}

.topbar {
    height: 82px;
    padding: 0 clamp(1.2rem, 6vw, 6rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0ec;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.3rem;
    font-weight: 760;
    letter-spacing: -.06em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px 10px 10px 3px;
    background: var(--green);
    color: #fff;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
}

.main-nav {
    align-items: center;
    height: 100%;
    overflow-y: hidden;
}

.nav-link {
    background: transparent;
    border: 0;
    color: #7a817c;
    font-size: .87rem;
    height: 100%;
    position: relative;
}

.nav-link.active {
    color: var(--ink);
    font-weight: 650;
}

.nav-link.active::after {
    content: "";
    height: 2px;
    background: var(--green);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.location-chip {
    color: #65736a;
    font-size: .8rem;
    white-space: nowrap;
}

.icon {
    font-size: 1.08em;
    margin-right: .35em;
}

.button {
    border: 0;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-weight: 650;
    transition: transform .15s ease, background .15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-dark {
    background: var(--ink);
    color: white;
}

.bag-button {
    font-size: .82rem;
    padding: .72rem 1.05rem;
}

.hero {
    min-height: 410px;
    margin: 30px clamp(1.2rem, 6vw, 6rem) 0;
    border-radius: 16px;
    background: #f5f4ed;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    overflow: hidden;
}

.hero-copy {
    padding: clamp(2.5rem, 6vw, 5.5rem);
    align-self: center;
}

.eyebrow {
    color: #74826f;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .13em;
}

.hero h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -.055em;
    font-size: clamp(2.8rem, 5.3vw, 5rem);
    line-height: .99;
    margin: 1.1rem 0 1rem;
    max-width: 590px;
}

.hero-copy>p {
    color: #6e7971;
    line-height: 1.7;
    max-width: 435px;
    font-size: .98rem;
}

.hero-points {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
    color: #596d5f;
    font-size: .75rem;
}

.hero-art {
    min-height: 350px;
    position: relative;
    margin: 0 25px 0 0;
    overflow: hidden;
    background: linear-gradient(145deg, #dce6d8 0%, #bfd2bc 45%, #96b99c 100%);
    border-radius: 0 16px 16px 0;
    align-self: stretch;
}

.hero-art::before,
.hero-art::after {
    content: "";
    position: absolute;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(53, 91, 70, .18);
    width: 70%;
    height: 70%;
}

.hero-art::after {
    background: rgba(245, 211, 141, .32);
    width: 58%;
    height: 85%;
    right: -20%;
    bottom: -40%;
}

.art-sun {
    position: absolute;
    top: 13%;
    left: 20%;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: #f1c783;
    opacity: .9;
}

.art-emoji {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 50%;
    box-shadow: 0 12px 30px #3b584329;
    background: #fff8e9;
}

.art-one {
    font-size: 6rem;
    width: 190px;
    height: 190px;
    top: 31%;
    left: 28%;
    transform: rotate(-11deg);
}

.art-two {
    font-size: 3.8rem;
    width: 110px;
    height: 110px;
    top: 18%;
    right: 9%;
    background: #f5f1dd;
    transform: rotate(12deg);
}

.art-three {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    left: 10%;
    bottom: 9%;
    background: #f8dba1;
}

.art-caption {
    position: absolute;
    z-index: 1;
    bottom: 22px;
    right: 25px;
    display: grid;
    gap: .35rem;
    text-align: right;
    color: #fff;
    text-shadow: 0 1px 6px #2b493d66;
}

.art-caption span {
    font-size: .57rem;
    letter-spacing: .13em;
}

.art-caption strong {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
}

.shop-section {
    padding: 76px clamp(1.2rem, 6vw, 6rem) 55px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.section-heading h2 {
    font-family: Georgia, serif;
    font-weight: 500;
    letter-spacing: -.04em;
    font-size: 2.25rem;
    margin: .6rem 0 0;
}

.muted {
    color: var(--muted);
    font-size: .8rem;
    padding-bottom: .35rem;
}

.shop-controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin: 1.9rem 0 1.6rem;
}

.category-list {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.filter-chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 22px;
    padding: .55rem .9rem;
    font-size: .74rem;
    color: #647068;
}

.filter-chip.selected {
    color: white;
    border-color: var(--green);
    background: var(--green);
}

.search-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 .8rem;
    width: 260px;
    color: #849087;
}

.search-box input {
    border: 0;
    outline: 0;
    min-width: 0;
    width: 100%;
    color: var(--ink);
    font-size: .75rem;
    background: transparent;
}

.search-box input::placeholder {
    color: #9aa29c;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.product-card {
    min-width: 0;
}

.product-image {
    height: clamp(190px, 22vw, 280px);
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 11px;
}

.product-image::before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    border: 1px solid #ffffff70;
    border-radius: 50%;
}

.product-image::after {
    content: "";
    position: absolute;
    width: 245px;
    height: 245px;
    border: 1px solid #ffffff45;
    border-radius: 50%;
}

.product-image.sand {
    background: #eae1d2;
}

.product-image.coral {
    background: #f1dcd2;
}

.product-image.sage {
    background: #dfe7d9;
}

.product-image.sky {
    background: #dce6e5;
}

.product-emoji {
    font-size: clamp(4.5rem, 8vw, 7rem);
    z-index: 1;
    filter: drop-shadow(0 16px 10px #00000012);
}

.distance-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    background: #ffffffdf;
    border-radius: 18px;
    padding: .38rem .58rem;
    font-size: .64rem;
    color: #53685a;
}

.save-button {
    position: absolute;
    right: 12px;
    top: 12px;
    border: 0;
    background: #ffffffdf;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    color: #59685f;
    z-index: 2;
}

.save-button.saved {
    color: #d7635a;
}

.product-info {
    padding: 1rem .1rem 0;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    color: #879188;
    font-size: .58rem;
    letter-spacing: .08em;
    font-weight: 700;
}

.product-info h3 {
    margin: .5rem 0 .25rem;
    font-size: 1rem;
    letter-spacing: -.02em;
}

.store-name {
    color: #7e8880;
    font-size: .73rem;
    margin: 0;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .9rem;
}

.product-bottom strong {
    font-size: 1rem;
}

.button-add {
    font-size: .7rem;
    padding: .6rem .8rem;
    color: #fff;
    background: var(--green);
}

.button-add:hover {
    background: #244737;
}

.trust-strip {
    background: var(--cream);
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 3.6rem;
    padding: 1.35rem;
    color: #607367;
}

.trust-strip>div {
    display: flex;
    align-items: center;
    font-size: .74rem;
}

.trust-strip .icon {
    color: #698877;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 1.5rem clamp(1.2rem, 6vw, 6rem);
    display: flex;
    justify-content: space-between;
    color: #89928b;
    font-size: .69rem;
}

.toast-region {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 12;
    display: grid;
    gap: .5rem;
}

.toast {
    background: var(--ink);
    color: white;
    border-radius: 8px;
    padding: .85rem 1rem;
    box-shadow: 0 8px 28px #172c2344;
    font-size: .8rem;
    animation: appear .18s ease-out;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: #152b25a6;
    display: flex;
    justify-content: flex-end;
}

.cart-panel {
    overflow-y: auto;
    background: #fff;
    width: min(100%, 470px);
    height: 100%;
    padding: 2rem;
    box-shadow: -15px 0 45px #0002;
}

.cart-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.6rem;
}

.cart-heading h2 {
    font-family: Georgia, serif;
    font-weight: 500;
    font-size: 2rem;
    margin: .35rem 0;
}

.close-button {
    border: 0;
    background: #f2f3ef;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.2rem;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: .9rem 0;
    font-size: .85rem;
}

.cart-row div {
    display: grid;
    gap: .3rem;
}

.cart-row div span {
    color: var(--muted);
    font-size: .72rem;
}

.checkout-note {
    margin: 1.2rem 0;
    padding: .85rem;
    background: #f0f5ef;
    color: #4d6b56;
    font-size: .74rem;
    line-height: 1.5;
    border-radius: 7px;
}

.delivery-option {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    margin: .7rem 0;
    color: #536359;
}

.cart-totals {
    border-top: 1px solid var(--line);
    margin-top: 1.2rem;
    padding-top: .7rem;
}

.cart-totals>div {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    padding: .5rem 0;
    color: #738078;
}

.cart-totals>div:last-child {
    color: var(--ink);
    font-size: .84rem;
}

.checkout-button {
    width: 100%;
    margin-top: 1.2rem;
}

.error-state {
    max-width: 600px;
    margin: 12vh auto;
    padding: 2rem;
}

.error-state h1 {
    font-family: Georgia, serif;
    font-weight: 500;
}

.admin-nav,
.auth-nav {
    text-decoration: none;
    font-weight: 650;
}

.admin-header-title {
    font-size: .8rem;
    color: #76817a;
}

.admin-main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
}

.admin-intro {
    margin-bottom: 2rem;
}

.admin-intro h1 {
    font: 500 clamp(2.5rem, 5vw, 4rem)/1 Georgia, serif;
    letter-spacing: -.05em;
    margin: .8rem 0;
}

.admin-intro p,
.admin-help {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.6;
}

.admin-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
}

.admin-card h2 {
    font: 500 1.6rem Georgia, serif;
    margin: .5rem 0 1rem;
}

.admin-login {
    max-width: 470px;
    display: grid;
    gap: 1rem;
}

.admin-login p {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
}

.admin-input {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: .65rem .75rem;
    border: 1px solid #dfe4de;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .82rem;
}

.admin-textarea {
    min-height: 150px;
    font: .77rem/1.5 ui-monospace, monospace;
    resize: vertical;
}

.admin-message {
    color: #718077;
    font-size: .75rem;
}

.admin-dashboard {
    display: grid;
    gap: 1.2rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.metric-card {
    display: grid;
    gap: .7rem;
    padding: 1.2rem;
    border-radius: 10px;
    background: #f4f6f1;
}

.metric-card span {
    color: #758078;
    font-size: .72rem;
}

.metric-card strong {
    font: 500 1.8rem Georgia, serif;
}

.admin-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

.admin-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    margin-bottom: 1rem;
}

.admin-card-heading h2 {
    margin-bottom: 0;
}

.tax-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: .5rem;
    padding: .9rem 0;
    border-top: 1px solid var(--line);
}

.tax-row>div {
    display: grid;
    gap: .35rem;
}

.tax-row strong,
.audit-row strong,
.role-row strong {
    font-size: .8rem;
}

.tax-row span,
.audit-row span,
.role-row span {
    color: var(--muted);
    font-size: .7rem;
}

.button-soft {
    border: 1px solid #dce4dd;
    background: #f7f8f5;
    color: #435c4c;
    font-size: .72rem;
}

.button-danger {
    border: 0;
    background: #fff3f0;
    color: #a34d3e;
    font-size: .68rem;
}

.admin-form {
    display: grid;
    gap: 1rem;
}

.admin-field {
    display: grid;
    gap: .45rem;
    color: #65746a;
    font-size: .72rem;
}

.admin-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

.admin-help {
    margin: 0 0 1rem;
    font-size: .74rem;
}

.calc-row {
    display: flex;
    gap: .5rem;
    margin: 1.2rem 0 .5rem;
}

.calc-row .admin-input {
    flex: 1;
    min-width: 0;
}

.admin-result {
    display: block;
    min-height: 1.2em;
    color: #54745b;
    font-size: .76rem;
}

.audit-card {
    margin-top: .1rem;
}

.audit-row {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    padding: .75rem 0;
    border-top: 1px solid var(--line);
}

.audit-row span {
    text-align: right;
}

.admin-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-loading {
    color: var(--muted);
    padding: 2rem;
}

.auth-panel {
    width: min(100%, 470px);
}

.auth-form {
    margin-top: 1rem;
}

.auth-switch {
    display: flex;
    gap: .5rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.auth-switch button {
    flex: 1;
}

.account-roles {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 1rem 0 1.4rem;
}

.account-roles .badge {
    width: fit-content;
}

.role-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding: .8rem 0;
}

.role-row>div {
    display: grid;
    gap: .3rem;
    flex: 1;
    min-width: 220px;
}

.role-editor {
    display: grid;
    grid-template-columns: 1fr minmax(150px, .4fr) auto;
    gap: .65rem;
    margin-top: 1rem;
}

@media (max-width: 820px) {
    .main-nav {
        gap: .5rem;
    }

    .nav-link {
        font-size: .74rem;
    }

    .hero {
        grid-template-columns: 1fr .75fr;
    }

    .hero-copy {
        padding: 2.2rem;
    }

    .hero-art {
        margin-right: 0;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trust-strip {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 590px) {
    .topbar {
        height: 68px;
        gap: .4rem;
        padding: 0 1rem;
    }

    .main-nav {
        display: none;
    }

    .location-chip {
        display: none;
    }

    .top-actions {
        gap: .45rem;
    }

    .auth-nav {
        font-size: .69rem;
        padding: .35rem;
    }

    .admin-nav {
        font-size: .69rem;
        padding: .35rem;
    }

    .hero {
        margin: 14px 12px 0;
        display: block;
    }

    .hero-copy {
        padding: 2.4rem 1.5rem;
    }

    .hero h1 {
        font-size: 3.1rem;
    }

    .hero-points {
        gap: .7rem;
        font-size: .66rem;
    }

    .hero-art {
        min-height: 235px;
        border-radius: 0 0 16px 16px;
    }

    .art-one {
        width: 145px;
        height: 145px;
        font-size: 4.8rem;
    }

    .art-two {
        width: 80px;
        height: 80px;
        font-size: 2.8rem;
    }

    .shop-section {
        padding: 3.5rem 1rem 2.5rem;
    }

    .section-heading h2 {
        font-size: 1.85rem;
    }

    .section-heading>.muted {
        font-size: .68rem;
    }

    .shop-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .category-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .2rem;
    }

    .filter-chip {
        white-space: nowrap;
    }

    .search-box {
        width: 100%;
    }

    .product-grid {
        gap: 1rem .75rem;
    }

    .product-image {
        height: 175px;
    }

    .product-emoji {
        font-size: 4.5rem;
    }

    .distance-tag {
        font-size: .55rem;
    }

    .product-info h3 {
        font-size: .9rem;
    }

    .product-bottom strong {
        font-size: .9rem;
    }

    .button-add {
        padding: .55rem .6rem;
    }

    .trust-strip {
        display: grid;
        gap: .9rem;
        margin-top: 2.5rem;
    }

    .footer {
        padding: 1.3rem 1rem;
        gap: .7rem;
        flex-direction: column;
    }

    .cart-panel {
        padding: 1.4rem;
    }

    .role-editor {
        grid-template-columns: 1fr;
    }

    .role-row>div {
        min-width: 100%;
    }
}

.business-location-map {
    height: 300px;
    min-height: 260px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    background: #edf2f7;
}

.location-help {
    color: #52606d;
    font-size: .88rem;
    margin: 0;
}

.customer-location {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.reference-location-dialog {
    width: min(100%, 680px);
}

.reference-location-map {
    height: 350px;
    margin: .9rem 0;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    overflow: hidden;
    background: #edf2f7;
}

.reference-location-coordinates,
.reference-location-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    align-items: end;
}

.reference-location-actions {
    margin-top: .9rem;
}

.leaflet-container {
    font: inherit;
    z-index: 1;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    align-items: start;
}

.admin-sidebar {
    padding: 3rem 0 2rem .5rem;
    position: sticky;
    top: 0;
}

.admin-side-link {
    color: #66766d;
    text-decoration: none;
    font-size: .85rem;
    padding: .75rem .9rem;
    border-radius: 8px;
}

.admin-side-link:hover,
.admin-side-link.active {
    color: var(--ink);
    background: #eef3ed;
    font-weight: 650;
}

.admin-main {
    max-width: none;
    min-width: 0;
    width: 100%;
    margin: 0;
}

.admin-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .7rem;
}

.admin-shortcut {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    text-decoration: none;
    font-size: .82rem;
}

.admin-shortcut:hover {
    background: #f4f6f1;
}

@media (max-width: 820px) {
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .admin-sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
        padding: .7rem 1rem;
        border-bottom: 1px solid var(--line);
    }

    .admin-sidebar .eyebrow {
        display: none;
    }

    .admin-side-link {
        white-space: nowrap;
    }

    .admin-main {
        padding-top: 2rem;
    }
}

.business-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 3.5rem 0 5rem;
    display: grid;
    gap: 1.2rem;
}

.business-intro {
    display: grid;
    gap: .8rem;
    width: calc(100% - 3rem);
    max-width: 1440px;
    margin: 0 auto .5rem;
}

.business-intro h1 {
    font: 500 clamp(2.3rem, 4vw, 3.4rem)/1 Georgia, serif;
    letter-spacing: -.045em;
    margin: .6rem 0;
}

.business-intro p {
    color: var(--muted);
    font-size: .84rem;
}

.business-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.business-selector {
    max-width: 280px;
}

.business-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    gap: 1.2rem;
    align-items: start;
}

.business-location-card {
    display: grid;
    gap: .8rem;
}

.business-location-map {
    width: 100%;
}

.category-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(200px, 1fr) auto;
    align-items: end;
    gap: .8rem;
}

.category-form .admin-input {
    min-width: 0;
}

.business-category-tree {
    display: grid;
    gap: .6rem;
    margin-top: 1rem;
}

.business-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1rem .8rem 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface, #fff);
}

.business-category-label {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.business-category-label span,
.business-category-label small {
    color: var(--muted);
}

.business-category-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.business-product-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    border-top: 1px solid var(--line);
    padding: .8rem 0;
}

.business-product-row>div {
    display: grid;
    gap: .2rem;
    flex: 1;
    min-width: 0;
}

.business-product-row>div strong {
    font-size: .84rem;
}

.business-product-row>div span {
    color: var(--muted);
    font-size: .72rem;
}

.business-product-image {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: #f1f3ee;
    border-radius: 8px;
    font-size: 1.25rem;
}

.business-product-price {
    min-width: 95px;
    text-align: right;
    font-size: .84rem;
}

.tax-calculator {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: .6rem;
}

@media (max-width: 820px) {
    .business-workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 590px) {
    .business-main {
        padding: 2rem 0 3rem;
    }

    .business-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .business-selector {
        max-width: none;
    }

    .business-product-row {
        flex-wrap: wrap;
    }

    .business-product-price {
        text-align: left;
    }

    .tax-calculator {
        grid-template-columns: 1fr;
    }

    .category-form {
        grid-template-columns: 1fr;
    }

    .business-category-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.business-management-layout {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.business-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
}

.business-page-link {
    display: block;
    padding: .8rem .9rem;
    border-radius: 8px;
    text-decoration: none;
    color: #65746a;
    font-size: .84rem;
}

.business-page-link:hover,
.business-page-link.active {
    background: #eff4ed;
    color: var(--green);
    font-weight: 650;
}

.business-page-content {
    min-width: 0;
}

.business-page-content>h1 {
    font: 500 clamp(2.2rem, 4vw, 3.5rem)/1 Georgia, serif;
    letter-spacing: -.05em;
    margin: .7rem 0 1.5rem;
}

.business-page-content .admin-card {
    margin-bottom: 1rem;
}

.inventory-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px auto;
    gap: .7rem;
    align-items: center;
    padding: .9rem 0;
    border-top: 1px solid var(--line);
}

.inventory-product {
    display: grid;
    gap: .25rem;
}

.inventory-product strong {
    font-size: .82rem;
}

.inventory-product span {
    color: var(--muted);
    font-size: .7rem;
}

.inventory-row .admin-input {
    min-width: 0;
}

.finance-note {
    padding: 1rem;
    border-radius: 8px;
    background: #f5f4ed;
    color: #667267;
    font-size: .78rem;
    line-height: 1.6;
}

@media (max-width: 820px) {
    .business-intro {
        width: calc(100% - 2rem);
    }

    .business-management-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .business-sidebar {
        position: static;
        display: flex;
        gap: .25rem;
        overflow-x: auto;
        padding: .7rem 0;
        border-bottom: 1px solid var(--line);
    }

    .business-main {
        padding-top: 2rem;
    }

    .business-page-link {
        white-space: nowrap;
        padding: .65rem .75rem;
    }

    .inventory-row {
        grid-template-columns: minmax(0, 1fr) 90px auto;
        gap: .45rem;
    }

    .inventory-row .button {
        padding: .65rem .7rem;
    }
}

.order-card h2 {
    margin: .2rem 0;
    font-size: 1rem;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
    color: #68756d;
    font-size: .76rem;
}

.order-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid #f1f1ec;
    font-size: .76rem;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.checkout-form {
    display: grid;
    gap: .9rem;
    margin-top: 1rem;
}

.checkout-form [hidden] {
    display: none;
}

.product-meta-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    padding: 1rem;
    background: #f7f8f5;
    border-radius: 8px;
}

.product-meta-help {
    grid-column: 1 / -1;
    margin: 0;
}

@media (max-width: 420px) {
    .product-meta-fields {
        grid-template-columns: 1fr;
    }
}

.uploaded-product-image {
    object-fit: cover;
}

.uploaded-product-image.product-emoji {
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: none;
}

.business-product-image.uploaded-product-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.product-image-preview {
    margin-top: .6rem;
}

.product-image-preview .business-product-image {
    width: 68px;
    height: 68px;
}

.variant-editor {
    display: grid;
    gap: .6rem;
    padding: 1rem;
    background: #f7f8f5;
    border-radius: 8px;
}

.variant-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px auto;
    gap: .6rem;
    align-items: end;
}

.inventory-product-card {
    display: grid;
    gap: .5rem;
    padding: .9rem 0;
    border-top: 1px solid var(--line);
}

.inventory-product-card>div {
    display: grid;
    gap: .2rem;
}

.inventory-product-card>div span,
.variant-stock-row span {
    color: var(--muted);
    font-size: .72rem;
}

.variant-stock-row {
    display: grid;
    grid-template-columns: 1fr 125px;
    gap: .7rem;
    align-items: center;
}

.business-hours-editor {
    display: grid;
    gap: .45rem;
}

.business-hours-row {
    display: grid;
    grid-template-columns: 1fr repeat(3, minmax(100px, .7fr));
    gap: .6rem;
    align-items: end;
    padding: .6rem 0;
    border-top: 1px solid var(--line);
}

.business-hours-row>strong {
    align-self: center;
    font-size: .82rem;
    text-transform: capitalize;
}

.business-tax-options {
    display: grid;
    gap: .5rem;
}

.store-directory {
    padding: 3rem max(1rem, calc((100vw - 1120px)/2));
    background: #f5f6f1;
}

.store-directory h2 {
    margin: .5rem 0 1.4rem;
    font: 500 clamp(1.8rem, 4vw, 2.7rem) Georgia, serif;
}

.store-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.storefront-card {
    display: grid;
    gap: .65rem;
    padding: 1.3rem;
    border-radius: 12px;
    background: #fff;
    border-top: 4px solid #758d70;
    color: var(--ink);
}

.storefront-theme-coral {
    border-top-color: #ce8067;
}

.storefront-theme-sand {
    border-top-color: #b79d72;
}

.storefront-card h3 {
    margin: .1rem 0;
    font: 500 1.45rem Georgia, serif;
}

.storefront-card p {
    margin: 0;
    color: var(--muted);
    font-size: .79rem;
    line-height: 1.5;
}

.storefront-tagline {
    font-weight: 650;
    color: var(--green) !important;
}

.storefront-announcement {
    padding: .6rem;
    background: #f5f6f1;
    border-radius: 6px;
}

.storefront-hours {
    font-size: .72rem !important;
}

.storefront-card a {
    font-size: .75rem;
    color: var(--green);
}

.store-distance {
    font-size: .7rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .business-hours-row {
        grid-template-columns: 1fr 1fr;
    }

    .variant-editor-row {
        grid-template-columns: 1fr 95px auto;
    }
}

.finance-inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: center;
    margin: 14px 0
}

.finance-pos-lines {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding: 8px 0
}

.finance-pos-lines .variant-stock-row {
    grid-template-columns: 28px minmax(180px, 1fr) minmax(120px, auto) 90px
}

.pos-register {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, .8fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.pos-register-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pos-register-header h2,
.pos-cart-heading h2 {
    margin: .25rem 0 0;
}

.pos-cart-count {
    padding: .45rem .7rem;
    border-radius: 999px;
    background: #edf3ee;
    color: var(--green);
    font-weight: 700;
    font-size: .82rem;
}

.pos-product-filters {
    grid-column: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, .6fr);
    gap: .65rem;
}

.pos-product-grid {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: .75rem;
    max-height: min(68vh, 760px);
    min-height: 260px;
    overflow-y: auto;
    align-content: start;
    padding: .1rem .25rem .4rem .1rem;
}

.pos-product-tile {
    display: grid;
    align-content: start;
    gap: .4rem;
    min-width: 0;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.pos-product-image {
    width: 100%;
    height: 100px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f3ee;
    font-size: 2rem;
}

.pos-product-image.uploaded-product-image {
    object-fit: cover;
}

.pos-product-info {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.pos-product-info>strong:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
}

.pos-product-category,
.pos-stock,
.pos-tax-included {
    color: var(--muted);
    font-size: .7rem;
}

.pos-product-price {
    font-size: 1rem;
}

.pos-tax-included {
    color: var(--green);
}

.pos-product-variant {
    min-width: 0;
    padding: .5rem;
    font-size: .75rem;
}

.pos-add-button {
    width: 100%;
    min-height: 38px;
}

.pos-add-button:disabled,
.pos-charge-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.pos-cart-panel {
    grid-column: 2;
    grid-row: 2 / span 2;
    position: sticky;
    top: 1rem;
    display: grid;
    gap: .8rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgb(16 42 67 / 7%);
}

.pos-cart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: .7rem;
}

.pos-cart-lines {
    display: grid;
    gap: .5rem;
    max-height: 38vh;
    min-height: 70px;
    overflow-y: auto;
}

.pos-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .4rem .6rem;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px solid var(--line);
}

.pos-cart-line-name {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.pos-cart-line-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8rem;
}

.pos-cart-line-name span {
    color: var(--muted);
    font-size: .68rem;
}

.pos-cart-line-controls {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.pos-quantity-button {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1rem;
}

.pos-quantity-value {
    min-width: 1.2rem;
    text-align: center;
    font-weight: 700;
}

.pos-line-total {
    text-align: right;
    font-size: .82rem;
}

.pos-remove-button {
    grid-column: 2;
    justify-self: end;
    padding: .3rem .5rem;
    font-size: .68rem;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .2rem;
    font-size: .85rem;
}

.pos-charge-button {
    width: 100%;
    min-height: 48px;
    font-size: .95rem;
}

.pos-empty,
.pos-empty-cart {
    grid-column: 1 / -1;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.income-expense-page {
    max-width: 1100px;
}

.income-expense-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    align-items: end;
}

.income-expense-form .admin-field {
    min-width: 0;
}

.income-expense-form .admin-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.income-expense-form textarea {
    resize: vertical;
}

.income-expense-form button {
    min-height: 42px;
}

.income-expense-filter {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: .7rem;
    margin-bottom: 1rem;
}

.income-expense-filter .admin-input {
    min-width: 0;
}

.income-expense-metrics {
    margin-bottom: 1rem;
}

.income-expense-rows {
    display: grid;
}

.income-expense-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 0;
    border-top: 1px solid var(--line);
}

.income-expense-description {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.income-expense-description strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.income-expense-description span,
.income-expense-description small {
    color: var(--muted);
    font-size: .75rem;
}

.income-expense-description .income-expense-status {
    width: fit-content;
    padding: .15rem .4rem;
    border-radius: 999px;
    background: #edf3ee;
    color: var(--green);
    text-transform: capitalize;
}

.income-expense-description .income-expense-status.voided,
.income-expense-description .income-expense-status.refunded {
    background: #f9e9e7;
    color: #a33a32;
}

.income-expense-amount {
    white-space: nowrap;
    font-size: .95rem;
}

.income-expense-row.income .income-expense-amount {
    color: var(--green);
}

.income-expense-row.expense .income-expense-amount {
    color: #a33a32;
}

.delivery-accounting-page {
    max-width: 1100px;
}

.delivery-ledger-rows {
    display: grid;
}

.delivery-ledger-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 0;
    border-top: 1px solid var(--line);
}

.delivery-ledger-row span {
    color: var(--muted);
    text-align: right;
}

.delivery-journal-entry {
    padding: .8rem 0;
    border-top: 1px solid var(--line);
}

.delivery-journal-entry .admin-card-heading {
    align-items: baseline;
    gap: .6rem;
}

@media (max-width: 1050px) {
    .pos-register {
        grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    }
}

@media (max-width: 760px) {
    .income-expense-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-register {
        display: flex;
        flex-direction: column;
    }

    .pos-register-header,
    .pos-product-filters,
    .pos-product-grid,
    .pos-cart-panel {
        width: 100%;
        box-sizing: border-box;
    }

    .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 55vh;
        min-height: 180px;
    }

    .pos-cart-panel {
        position: static;
    }
}

@media (max-width: 520px) {
    .income-expense-form,
    .income-expense-filter {
        grid-template-columns: 1fr;
    }

    .delivery-ledger-row {
        flex-direction: column;
        gap: .2rem;
    }

    .delivery-ledger-row span {
        text-align: left;
    }
}

.finance-journal-entry {
    border-top: 1px solid var(--line, #e5e7eb);
    padding: 12px 0
}

.finance-journal-entry summary {
    cursor: pointer;
    font-weight: 650
}

.finance-journal-entry .order-line {
    padding: 6px 0
}

.pos-receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    border-top: 1px solid var(--line);
}

.pos-receipt-summary,
.pos-receipt-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.pos-receipt-summary {
    justify-content: space-between;
    flex: 1;
}

.pos-receipt-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.receipt-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 1rem;
    background: rgb(22 35 31 / 65%);
}

.receipt-dialog {
    width: min(620px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1rem;
    border-radius: 12px;
    background: var(--cream);
    box-shadow: 0 20px 70px rgb(0 0 0 / 25%);
}

.receipt-actions {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-bottom: .8rem;
}

.receipt-paper {
    width: 100%;
    padding: 2rem;
    border: 1px solid var(--line);
    background: #fff;
    color: #17231f;
}

.receipt-header {
    padding-bottom: 1rem;
    border-bottom: 1px dashed #bfc5bf;
    text-align: center;
}

.receipt-header .eyebrow {
    color: var(--green);
    font-weight: 750;
    letter-spacing: .12em;
}

.receipt-header h1 {
    margin: .45rem 0;
    font: 600 1.5rem/1.2 Georgia, serif;
}

.receipt-header p,
.receipt-customer span,
.receipt-notes,
.receipt-disclaimer {
    color: var(--muted);
    font-size: .82rem;
}

.receipt-header p {
    margin: .2rem 0;
}

.receipt-customer {
    display: grid;
    gap: .2rem;
    padding: 1rem 0;
    border-bottom: 1px dashed #bfc5bf;
}

.receipt-group-title {
    margin: 1rem 0 .4rem;
    font-size: .9rem;
}

.receipt-line,
.receipt-total-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem 0;
    border-bottom: 1px solid #eef0ed;
}

.receipt-line > div {
    display: grid;
    gap: .15rem;
}

.receipt-line small {
    color: var(--muted);
}

.receipt-summary {
    padding-top: .8rem;
}

.receipt-grand-total {
    margin-top: .4rem;
    padding-top: .8rem;
    border-top: 1px solid #87938c;
    border-bottom: 0;
    font-size: 1.1rem;
}

.receipt-notes {
    margin-top: .8rem;
}

.receipt-disclaimer {
    margin: 1.5rem 0 0;
    padding-top: .8rem;
    border-top: 1px dashed #bfc5bf;
    text-align: center;
}

@media print {
    @page {
        margin: 12mm;
    }

    body > :not(.receipt-modal) {
        display: none !important;
    }

    .receipt-modal {
        position: static !important;
        inset: auto !important;
        display: block !important;
        overflow: visible !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .receipt-dialog {
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .receipt-paper {
        width: 100% !important;
        margin: 0 !important;
    }

    .receipt-actions {
        display: none !important;
    }
}

.delivery-portal {
    width: min(1240px, calc(100% - 2rem));
    margin: 2rem auto 4rem;
    display: grid;
    gap: 1.2rem;
}

.delivery-portal h1 {
    font: 500 clamp(2rem, 4vw, 3rem)/1.1 Georgia, serif;
    margin: .4rem 0;
}

.delivery-application {
    max-width: 760px;
    margin: 2rem auto;
}

.delivery-application-form {
    margin-top: 1.2rem;
}

.delivery-empty {
    max-width: 760px;
    margin: 2rem auto;
}

.delivery-status-card {
    display: grid;
    gap: .45rem;
}

.delivery-status-line {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    color: var(--muted);
}

.delivery-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8f8f4;
}

.delivery-section-nav .business-page-link {
    flex: 0 0 auto;
    border-radius: 8px;
    padding: .65rem .9rem;
}

.delivery-section-nav .business-page-link.active {
    background: #fff;
    box-shadow: 0 2px 8px rgb(16 42 67 / 8%);
}

.delivery-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 1.2rem;
    align-items: start;
}

.delivery-workspace>.admin-card {
    min-width: 0;
}

.delivery-map {
    height: 440px;
    min-height: 300px;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    overflow: hidden;
    background: #edf2f7;
}

.delivery-map-toolbar,
.delivery-block-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .8rem 0;
}

.delivery-block-chip {
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: .6rem .8rem;
    background: white;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
}

.delivery-block-chip.selected {
    border-color: var(--green);
    background: #eff4ed;
    color: var(--green);
    font-weight: 650;
}

.delivery-price-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: .7rem;
    margin: .8rem 0 1rem;
}

.delivery-price-form .admin-field {
    display: grid;
    gap: .35rem;
    color: var(--muted);
    font-size: .76rem;
}

.delivery-price-matrix {
    display: grid;
    gap: .55rem;
    margin: .8rem 0 1rem;
}

.delivery-price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: .65rem;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.delivery-price-row>span {
    color: var(--muted);
}

.delivery-task-card {
    border-top: 1px solid var(--line);
    padding: 1rem 0;
}

.delivery-task-card p {
    margin: .4rem 0;
    font-size: .8rem;
    overflow-wrap: anywhere;
}

@media (max-width: 850px) {
    .delivery-workspace {
        grid-template-columns: 1fr;
    }

    .delivery-map {
        height: 360px;
    }
}

@media (max-width: 540px) {
    .delivery-portal {
        width: calc(100% - 1rem);
        margin-top: 1rem;
    }

    .delivery-map-toolbar .button {
        flex: 1 1 40%;
    }

    .delivery-price-form {
        grid-template-columns: 1fr;
    }

    .delivery-price-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pos-receipt-row,
    .pos-receipt-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .pos-receipt-actions {
        justify-content: flex-start;
    }

    .receipt-paper {
        padding: 1.2rem;
    }

    .reference-location-coordinates,
    .reference-location-actions {
        grid-template-columns: 1fr;
    }

    .reference-location-map {
        height: 300px;
    }
}

.staff-management,
.staff-card {
    display: grid;
    gap: 1rem;
}

.payroll-configuration {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
}

.payroll-settings-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.payroll-brackets {
    display: grid;
    gap: .6rem;
}

.payroll-band-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
    align-items: end;
    gap: .65rem;
}

.payroll-bracket-editor {
    display: grid;
    grid-column: 1 / -1;
    gap: .65rem;
}

.staff-card > h2,
.staff-card > h3,
.staff-card > h4,
.staff-note h2 {
    margin: 0;
}

.staff-note {
    border-left: 4px solid var(--green);
}

.staff-row,
.staff-slip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line);
}

.staff-row > div {
    display: grid;
    gap: .25rem;
}

.staff-row > div span,
.staff-status {
    color: var(--muted);
    font-size: .85rem;
}

.staff-applicant,
.staff-employee,
.staff-payroll-run {
    display: grid;
    gap: .75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.staff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.staff-inline-compensation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: end;
    gap: .7rem;
    margin: .4rem 0;
}

.staff-pay-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .9rem;
}

.staff-payroll-run > .staff-slip-row:last-child,
.staff-employee:last-child,
.staff-applicant:last-child {
    border-bottom: 0;
}

.staff-careers-intro {
    margin-bottom: 1rem;
}

.staff-job-card {
    display: grid;
    gap: .8rem;
    margin: 0 0 1rem;
}

.staff-job-description {
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    .staff-row,
    .staff-slip-row,
    .staff-pay-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .payroll-band-row {
        grid-template-columns: 1fr;
    }
}

.api-docs-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(12px);
}

.api-docs-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 4vw, 3.5rem) 5rem;
}

.api-docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.api-docs-sidebar {
    position: sticky;
    top: 110px;
    display: grid;
    gap: .8rem;
    padding: 1rem 0;
}

.api-docs-sidebar > strong {
    font-size: .82rem;
}

.api-docs-toc {
    display: grid;
    gap: .2rem;
}

.api-docs-toc a {
    padding: .45rem .6rem;
    border-radius: 6px;
    color: #64736a;
    font-size: .8rem;
    text-decoration: none;
}

.api-docs-toc a:hover,
.api-docs-toc a:focus-visible {
    background: #f1f5ef;
    color: var(--green);
}

.api-docs-version {
    padding: .55rem .6rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .72rem;
}

.api-docs-content {
    min-width: 0;
}

.api-docs-hero {
    padding: 2.4rem 0 2rem;
    border-bottom: 1px solid var(--line);
}

.api-docs-hero h1 {
    max-width: 820px;
    margin: .75rem 0;
    font: 500 clamp(2.4rem, 5vw, 4rem)/1.05 Georgia, serif;
    letter-spacing: -.045em;
}

.api-docs-hero > p {
    max-width: 740px;
}

.api-docs-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0;
}

.api-docs-badges span {
    padding: .35rem .65rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: #f8f9f6;
    color: #516359;
    font-size: .72rem;
}

.api-docs-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 110px;
}

.api-docs-section h2 {
    margin: .45rem 0 .8rem;
    font: 500 clamp(1.7rem, 3vw, 2.3rem)/1.15 Georgia, serif;
    letter-spacing: -.025em;
}

.api-docs-section h3 {
    margin: 1.5rem 0 .6rem;
    font-size: 1rem;
}

.api-docs-section > p,
.api-docs-details p {
    color: #586860;
    font-size: .86rem;
    line-height: 1.75;
}

.api-docs-code-wrap {
    margin: 1rem 0;
    overflow: hidden;
    border: 1px solid #dfe5dc;
    border-radius: 10px;
    background: #f7f8f5;
}

.api-docs-code-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem .8rem;
    border-bottom: 1px solid #e3e7e0;
    color: #64736a;
    font-size: .72rem;
}

.api-docs-copy {
    min-height: 32px;
    padding: .35rem .65rem;
    font-size: .72rem;
}

.api-docs-code {
    max-height: 560px;
    margin: 0;
    padding: 1rem;
    overflow: auto;
    color: #263d35;
    font: .78rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
    tab-size: 2;
    white-space: pre;
}

.api-docs-list {
    display: grid;
    gap: .6rem;
    padding-left: 1.35rem;
    color: #586860;
    font-size: .84rem;
    line-height: 1.7;
}

.api-docs-details {
    display: grid;
    gap: .6rem;
    margin: 1rem 0;
}

.api-docs-details details,
.api-docs-raw {
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.api-docs-details summary,
.api-docs-raw summary {
    color: var(--ink);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 650;
}

.api-docs-details p {
    overflow-wrap: anywhere;
}

.api-docs-endpoints {
    margin: 1.4rem 0;
}

.api-docs-search {
    max-width: 520px;
    margin: 1rem 0;
}

.api-docs-endpoint {
    margin: .55rem 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.api-docs-endpoint > summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    padding: .8rem;
    color: var(--ink);
    cursor: pointer;
    list-style-position: inside;
}

.api-docs-endpoint > summary code {
    overflow-wrap: anywhere;
    font: .76rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.api-docs-endpoint-summary {
    flex: 1 1 180px;
    color: var(--muted);
    font-size: .75rem;
}

.api-docs-method {
    min-width: 3.2rem;
    padding: .2rem .38rem;
    border-radius: 4px;
    background: #edf2eb;
    color: #315a49;
    font: 700 .65rem/1.4 ui-monospace, monospace;
    text-align: center;
}

.api-docs-method.method-post,
.api-docs-method.method-put,
.api-docs-method.method-patch,
.api-docs-method.method-delete {
    background: #fff1df;
    color: #81500a;
}

.api-docs-endpoint-body {
    padding: .2rem .9rem 1rem;
    border-top: 1px solid var(--line);
}

.api-docs-endpoint-body > p,
.api-docs-request-form > p {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.6;
}

.api-docs-schema {
    margin: .8rem 0;
    padding: .6rem .75rem;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.api-docs-schema > summary {
    color: var(--ink);
    cursor: pointer;
    font-size: .75rem;
    font-weight: 650;
}

.api-docs-request-form,
.api-docs-params {
    display: grid;
    gap: .7rem;
}

.api-docs-editor,
.api-docs-capture {
    min-height: 100px;
    max-height: 360px;
    overflow: auto;
    font: .74rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
    tab-size: 2;
}

.api-docs-capture {
    margin: .4rem 0 0;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f7f8f5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.api-docs-capture-section {
    margin-top: 1rem;
}

.api-docs-capture-section h4 {
    margin: .5rem 0;
    font-size: .78rem;
}

.api-docs-response-status {
    font-size: .75rem;
}

.api-docs-response-status[data-ok="true"] {
    color: #287044;
}

.api-docs-response-status[data-ok="false"] {
    color: #a33b2c;
}

.api-docs-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.api-docs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    text-align: left;
}

.api-docs-table th,
.api-docs-table td {
    min-width: 100px;
    padding: .7rem .75rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: .74rem;
}

.api-docs-table th {
    background: #f7f8f5;
    color: #5b6b61;
    font-weight: 650;
}

.api-docs-table td:last-child {
    min-width: 260px;
    color: #5b6b61;
    line-height: 1.55;
}

.api-docs-table tr:last-child td {
    border-bottom: 0;
}

.api-docs-table code,
.api-docs-raw code {
    overflow-wrap: anywhere;
    color: #315a49;
    font: .72rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.api-docs-raw {
    margin-top: 1.2rem;
}

.api-docs-raw ul {
    display: grid;
    gap: .4rem;
    max-height: 460px;
    padding: .8rem 1.25rem;
    overflow: auto;
}

.api-docs-raw li {
    font-size: .72rem;
}

.api-docs-raw p {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.8;
}

.api-docs-load-error {
    max-width: 620px;
    margin: 5rem auto;
}

@media (max-width: 850px) {
    .api-docs-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .api-docs-sidebar {
        position: static;
        gap: .45rem;
        padding: .4rem 0;
    }

    .api-docs-toc {
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .api-docs-toc a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .api-docs-version {
        border-top: 0;
    }

}

@media (max-width: 540px) {
    .api-docs-topbar {
        gap: .7rem;
        padding: 0 1rem;
    }

    .api-docs-main {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .api-docs-topbar .admin-header-title {
        display: none;
    }

    .api-docs-hero {
        padding-top: 1.4rem;
    }

    .api-docs-code {
        font-size: .7rem;
    }
}