/* ComprasApp V3.5 app shell contract. Loaded after route components. */
:root {
    --ca-shell-bg: #f7f7f5;
    --ca-shell-surface: #ffffff;
    --ca-shell-text: #171717;
    --ca-shell-muted: #6b7075;
    --ca-shell-line: rgba(0, 0, 0, .085);
    --ca-shell-soft: #f1f1ee;
    --ca-shell-brand: #050505;
    --ca-shell-radius: 12px;
    --ca-shell-topbar-h: calc(62px + env(safe-area-inset-top, 0px));
    --ca-shell-bottom-nav-h: calc(64px + env(safe-area-inset-bottom, 0px));
}

html {
    background: var(--ca-shell-brand) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
}

html body.square-mobile-first,
html body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
    background: var(--ca-shell-bg) !important;
    color: var(--ca-shell-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: 0 !important;
    padding-top: var(--ca-shell-topbar-h) !important;
}

html body.square-mobile-first *,
html body.square-mobile-first *::before,
html body.square-mobile-first *::after {
    box-sizing: border-box !important;
}

html body.square-mobile-first .store-shell-topbar,
html body .store-shell-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    z-index: 2147483000 !important;
    width: 100vw !important;
    width: 100dvw !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    min-height: 52px !important;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
    background: var(--ca-shell-brand) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html body.square-mobile-first .store-shell-brand,
html body .store-shell-brand {
    min-width: 0 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: hidden !important;
    color: #fff !important;
    text-decoration: none !important;
}

html body.square-mobile-first .store-shell-brand-title,
html body .store-shell-brand-title {
    display: block !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body.square-mobile-first .store-shell-brand-subtitle,
html body .store-shell-brand-subtitle {
    display: none !important;
}

html body.square-mobile-first .store-shell-actions,
html body .store-shell-actions {
    position: relative !important;
    z-index: 2147483001 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: min(44vw, 142px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    gap: 6px !important;
    overflow: visible !important;
}

html body.square-mobile-first .store-shell-actions .user-menu,
html body .store-shell-actions .user-menu {
    position: relative !important;
    z-index: 2147483002 !important;
    width: min(44vw, 142px) !important;
    min-width: 0 !important;
    max-width: 142px !important;
    flex: 0 1 auto !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__button,
html body .store-shell-actions .user-menu__button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 142px !important;
    min-height: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 7px 4px 4px !important;
    border: 1px solid rgba(0, 0, 0, .10) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025), inset 0 0 0 1px var(--app-accent-soft, transparent) !important;
    list-style: none !important;
}

html body.square-mobile-first .store-shell-actions .user-menu[open] .user-menu__button,
html body .store-shell-actions .user-menu[open] .user-menu__button {
    border-color: var(--app-accent, rgba(0, 0, 0, .18)) !important;
    box-shadow: 0 0 0 3px var(--app-accent-soft, rgba(0, 0, 0, .06)) !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__button::-webkit-details-marker,
html body .store-shell-actions .user-menu__button::-webkit-details-marker {
    display: none !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__avatar,
html body .store-shell-actions .user-menu__avatar {
    flex: 0 0 26px !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--app-accent, #111) !important;
    color: var(--app-accent-text, #fff) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__text,
html body .store-shell-actions .user-menu__text {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__text span,
html body .store-shell-actions .user-menu__text span {
    display: block !important;
    overflow: hidden !important;
    max-width: none !important;
    color: #111 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__text small,
html body .store-shell-actions .user-menu__text small {
    display: block !important;
    overflow: hidden !important;
    max-width: none !important;
    margin-top: 2px !important;
    color: #6b7075 !important;
    font-size: 8px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__panel,
html body .store-shell-actions .user-menu__panel {
    position: fixed !important;
    z-index: 2147483003 !important;
    top: calc(54px + env(safe-area-inset-top, 0px)) !important;
    right: calc(12px + env(safe-area-inset-right, 0px)) !important;
    left: auto !important;
    width: min(260px, calc(100dvw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))) !important;
    max-width: none !important;
    padding: 8px !important;
    border: 1px solid color-mix(in srgb, var(--app-accent, #111) 24%, #e8e8e8) !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, var(--app-accent-soft, #f7f7f5) 0%, #fff 34%) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .18) !important;
    transform: none !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__panel::before,
html body .store-shell-actions .user-menu__panel::before {
    content: "" !important;
    display: block !important;
    width: 34px !important;
    height: 3px !important;
    margin: 0 0 8px auto !important;
    border-radius: 999px !important;
    background: var(--app-accent, #111) !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__item,
html body .store-shell-actions .user-menu__item {
    width: 100% !important;
    min-height: 46px !important;
    display: grid !important;
    gap: 2px !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, .78) !important;
    color: #111 !important;
    text-align: left !important;
    text-decoration: none !important;
    font: inherit !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__item:hover,
html body.square-mobile-first .store-shell-actions .user-menu__item:focus-visible,
html body .store-shell-actions .user-menu__item:hover,
html body .store-shell-actions .user-menu__item:focus-visible {
    background: var(--app-accent-soft, #f1f1ee) !important;
    outline: 0 !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__item span,
html body .store-shell-actions .user-menu__item span {
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__item small,
html body .store-shell-actions .user-menu__item small {
    color: #6b7075 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__item--danger,
html body .store-shell-actions .user-menu__item--danger {
    color: #9f1d1d !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__item--danger span,
html body .store-shell-actions .user-menu__item--danger span {
    color: #9f1d1d !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__form,
html body .store-shell-actions .user-menu__form {
    margin: 6px 0 0 !important;
}

html body.square-mobile-first .app-shell {
    width: 100% !important;
    max-width: min(1080px, 100%) !important;
    margin: 0 auto !important;
    padding: 10px 12px calc(var(--ca-shell-bottom-nav-h) + 20px) !important;
    overflow-x: clip !important;
}

html body.square-mobile-first .square-app-main,
html body.square-mobile-first main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip !important;
    padding-bottom: calc(var(--ca-shell-bottom-nav-h) + 20px) !important;
}

html body.square-mobile-first .page-header,
html body.square-mobile-first .v35-hero,
html body.square-mobile-first .po-head,
html body.square-mobile-first .appearance-head,
html body.square-mobile-first .quicknav-head {
    max-width: 100% !important;
    margin: 0 0 10px !important;
    padding: 12px !important;
    border-radius: var(--ca-shell-radius) !important;
    background: var(--ca-shell-surface) !important;
    border: 1px solid var(--ca-shell-line) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025) !important;
}

html body.square-mobile-first h1,
html body.square-mobile-first .page-header h1,
html body.square-mobile-first .v35-hero h1,
html body.square-mobile-first .po-head h1 {
    margin: 0 0 6px !important;
    color: var(--ca-shell-text) !important;
    font-size: clamp(23px, 6vw, 28px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .page-header p,
html body.square-mobile-first .v35-hero p,
html body.square-mobile-first .po-head p,
html body.square-mobile-first .subtitle,
html body.square-mobile-first .lead {
    margin: 0 !important;
    color: var(--ca-shell-muted) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .card,
html body.square-mobile-first .v35-card-item,
html body.square-mobile-first .po-card,
html body.square-mobile-first .table-card {
    max-width: 100% !important;
    border-radius: var(--ca-shell-radius) !important;
    border: 1px solid var(--ca-shell-line) !important;
    background: var(--ca-shell-surface) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025) !important;
}

html body.square-mobile-first .actions,
html body.square-mobile-first .v35-hero-actions,
html body.square-mobile-first .v35-card-actions,
html body.square-mobile-first .po-card-actions,
html body.square-mobile-first .po-top-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
}

html body.square-mobile-first .button,
html body.square-mobile-first button.button,
html body.square-mobile-first a.button,
html body.square-mobile-first .po-action-button,
html body.square-mobile-first .po-filter-button {
    min-height: 38px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
}


html body.square-mobile-first .button:not(.secondary):not(.danger),
html body.square-mobile-first button.button:not(.secondary):not(.danger),
html body.square-mobile-first a.button:not(.secondary):not(.danger),
html body.square-mobile-first .po-action-button:not(.secondary):not(.danger) {
    border: 1px solid var(--app-accent-dark, var(--app-accent, #111)) !important;
    border-color: color-mix(in srgb, var(--app-accent-dark, var(--app-accent, #111)) 82%, #111 18%) !important;
    background: var(--app-accent, #111) !important;
    color: var(--app-accent-text, #fff) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14) !important;
    text-decoration: none !important;
}

html body.square-mobile-first input,
html body.square-mobile-first select,
html body.square-mobile-first textarea {
    max-width: 100% !important;
    min-width: 0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .ca-combobox {
    position: relative !important;
    min-width: min(100%, 180px) !important;
    flex: 1 1 180px !important;
}

html body.square-mobile-first .ca-combobox__input {
    width: 100% !important;
}

html body.square-mobile-first .ca-combobox__menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2147482500 !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    padding: 6px !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .16) !important;
}

html body.square-mobile-first .ca-combobox__option {
    width: 100% !important;
    min-height: 42px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #111 !important;
    text-align: left !important;
}

html body.square-mobile-first .ca-combobox__option:hover,
html body.square-mobile-first .ca-combobox__option:focus-visible {
    background: var(--app-accent-soft, #f1f1ee) !important;
    outline: 0 !important;
}

html body.square-mobile-first .ca-combobox__option span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    font-weight: 850 !important;
}

html body.square-mobile-first .ca-combobox__option small,
html body.square-mobile-first .ca-combobox__empty {
    color: #6b7075 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
}

html body.square-mobile-first .ca-combobox__empty {
    padding: 10px !important;
}

html body.square-mobile-first .purchase-create-header {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body.square-mobile-first .purchase-mode-selector {
    display: grid !important;
    gap: 0 !important;
    margin: 0 0 8px !important;
}

html body.square-mobile-first .purchase-mode-title {
    color: #111 !important;
    font-size: 17px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
}

html body.square-mobile-first .purchase-mode-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

html body.square-mobile-first .purchase-mode-card {
    min-height: 66px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    padding: 10px 8px !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #111 !important;
    text-align: center !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025) !important;
    text-decoration: none !important;
}

html body.square-mobile-first .purchase-mode-card.is-active {
    border-color: var(--app-accent, #111) !important;
    background: var(--app-accent-soft, #f1f1ee) !important;
    box-shadow: inset 0 0 0 1px var(--app-accent, #111) !important;
}

html body.square-mobile-first .purchase-mode-icon {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--app-accent, #111) !important;
    color: var(--app-accent-text, #fff) !important;
    font-size: 15px !important;
    font-weight: 950 !important;
}

html body.square-mobile-first .purchase-mode-copy {
    min-width: 0 !important;
    display: grid !important;
    gap: 3px !important;
    text-align: left !important;
}

html body.square-mobile-first .purchase-mode-card strong {
    font-size: 13px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html body.square-mobile-first .purchase-mode-card small {
    display: block !important;
    color: #686863 !important;
    font-size: 10.5px !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    white-space: normal !important;
}

html body.square-mobile-first .purchase-favorite-link {
    width: auto !important;
    min-height: 66px !important;
}

html body.square-mobile-first .purchase-flow-section[hidden] {
    display: none !important;
}

html body.square-mobile-first .purchase-flow-section {
    margin: 0 0 12px !important;
}

html body.square-mobile-first .purchase-flow-document {
    margin-top: 8px !important;
    margin-bottom: 10px !important;
    padding: 10px !important;
}

html body.square-mobile-first .purchase-flow-document .section-header {
    display: none !important;
}

html body.square-mobile-first .purchase-flow-document .section-header h2 {
    font-size: 16px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
}

html body.square-mobile-first .purchase-flow-document [data-purchase-create-scan] {
    padding: 0 !important;
    margin-bottom: 8px !important;
    border: 0 !important;
    background: transparent !important;
}

html body.square-mobile-first .purchase-flow-document label {
    margin-top: 0 !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header {
    gap: 10px !important;
    margin-bottom: 12px !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header h1 {
    font-size: 28px !important;
    line-height: 1 !important;
    margin: 0 0 4px !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header p {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions .button,
html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions button,
html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions form {
    width: 100% !important;
    min-width: 0 !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions .button,
html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions button {
    min-height: 42px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions a[href*="/edit"] {
    grid-column: 1 / -1 !important;
}

html body.square-mobile-first .purchase-order-detail-page .purchase-order-detail-header .actions form:has(.danger) {
    grid-column: 1 / -1 !important;
}

html body.square-mobile-first .purchase-admin-details {
    margin: 0 0 12px !important;
}

html body.square-mobile-first .purchase-order-form > .form-actions,
html body.square-mobile-first form.purchase-order-form > .form-actions {
    position: sticky !important;
    bottom: var(--ca-shell-bottom-nav-h) !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    margin: 14px -6px -2px !important;
    padding: 8px !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 -10px 24px rgba(0, 0, 0, .08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

html body.square-mobile-first nav.mobile-bottom-nav,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    z-index: 2147482990 !important;
    width: 100vw !important;
    width: 100dvw !important;
    min-width: 0 !important;
    min-height: var(--ca-shell-bottom-nav-h) !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    contain: layout paint !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 18px 18px 0 0 !important;
    background: rgba(255, 255, 255, .96) !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-bottom: 0 !important;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, .10) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

html body.square-mobile-first nav.mobile-bottom-nav a,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a {
    min-width: 0 !important;
    min-height: 44px !important;
    border-radius: 17px !important;
    display: grid !important;
    gap: 2px !important;
    justify-items: center !important;
    align-content: center !important;
    color: var(--ca-shell-muted) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

html body.square-mobile-first nav.mobile-bottom-nav a span:first-child,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a span:first-child {
    font-size: 17px !important;
    line-height: 1 !important;
}

html body.square-mobile-first nav.mobile-bottom-nav a span:last-child,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a span:last-child {
    max-width: 64px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body.square-mobile-first nav.mobile-bottom-nav a.is-active,
html body.square-mobile-first nav.mobile-bottom-nav a.mobile-main-action,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a.is-active,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a.mobile-main-action {
    background: var(--app-accent-soft, rgba(17, 17, 17, .08)) !important;
    color: var(--app-accent-text, var(--app-accent, #111)) !important;
}

html body.square-mobile-first nav.mobile-bottom-nav a.mobile-main-action,
html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a.mobile-main-action {
    background: var(--app-accent, #111) !important;
    color: var(--app-accent-text, #fff) !important;
}

@media (min-width: 821px) {
    html body.square-mobile-first .store-shell-topbar {
        min-height: 56px !important;
        padding: 12px 18px !important;
    }

    html body.square-mobile-first .app-shell {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    html body.square-mobile-first nav.mobile-bottom-nav,
    html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav {
        left: 0 !important;
        right: auto !important;
        width: 100dvw !important;
        max-width: 100dvw !important;
        transform: none !important;
    }
}

/* Compact operational density for purchase/documents surfaces. */
html body.square-mobile-first .card,
html body.square-mobile-first .v35-card-item,
html body.square-mobile-first .po-card,
html body.square-mobile-first .table-card {
    padding: 12px !important;
}

html body.square-mobile-first .card h2,
html body.square-mobile-first .v35-card-item h2,
html body.square-mobile-first .po-card h2,
html body.square-mobile-first .table-card h2 {
    margin: 0 0 8px !important;
    font-size: 19px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .summary-grid,
html body.square-mobile-first .metrics-grid,
html body.square-mobile-first .metric-grid,
html body.square-mobile-first .stats-grid {
    gap: 8px !important;
}

html body.square-mobile-first .metric-card,
html body.square-mobile-first .summary-card,
html body.square-mobile-first .stat-card,
html body.square-mobile-first .kpi-card {
    min-height: 72px !important;
    padding: 10px !important;
    border-radius: 10px !important;
}

html body.square-mobile-first .metric-card strong,
html body.square-mobile-first .summary-card strong,
html body.square-mobile-first .stat-card strong,
html body.square-mobile-first .kpi-card strong {
    font-size: 24px !important;
    line-height: 1 !important;
}

@media (max-width: 560px) {
    html body.square-mobile-first .store-shell-topbar {
        min-height: 50px !important;
        padding: calc(5px + env(safe-area-inset-top, 0px)) 10px 5px !important;
    }

    html body.square-mobile-first .store-shell-brand-title {
        font-size: 16px !important;
    }

    html body.square-mobile-first .store-shell-actions {
        max-width: 138px !important;
    }

    html body.square-mobile-first .store-shell-actions .user-menu {
        width: 138px !important;
        max-width: 138px !important;
    }

    html body.square-mobile-first .store-shell-actions .user-menu__button {
        height: 34px !important;
        min-height: 34px !important;
    }

    html body.square-mobile-first nav.mobile-bottom-nav,
    html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav {
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        min-height: var(--ca-shell-bottom-nav-h) !important;
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)) !important;
    }

    html body.square-mobile-first nav.mobile-bottom-nav a,
    html body.square-mobile-first .mobile-bottom-nav.role-aware-bottom-nav a {
        min-height: 44px !important;
    }
}

/* Shell cleanup: user chip has a single visual layer and documents header is not carded. */
html body.square-mobile-first .store-shell-topbar {
    background: var(--ca-shell-brand) !important;
    color: #fff !important;
}

html body.square-mobile-first .store-shell-actions,
html body.square-mobile-first .store-shell-actions .user-menu {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

html body.square-mobile-first .store-shell-actions .user-menu__button {
    border: 1px solid rgba(255, 255, 255, .18) !important;
    background: #fff !important;
    box-shadow: none !important;
}

html body.square-mobile-first .store-shell-actions .user-menu[open] .user-menu__button {
    border-color: rgba(255, 255, 255, .24) !important;
}

html body.square-mobile-first .purchase-invoices-page .documents-page-clean > .page-header {
    padding: 0 !important;
    margin: 12px 0 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Invoice document detail follows the same shell, navigation and visual language. */
html body.square-mobile-first:has(.purchase-invoice-document) .app-shell {
    width: 100% !important;
    max-width: min(1080px, 100%) !important;
    margin: 0 auto !important;
    padding: 10px 12px calc(var(--ca-shell-bottom-nav-h) + 22px) !important;
    background: transparent !important;
}

html body.square-mobile-first:has(.purchase-invoice-document) .square-app-main,
html body.square-mobile-first:has(.purchase-invoice-document) main {
    max-width: 100% !important;
    padding: 0 0 calc(var(--ca-shell-bottom-nav-h) + 20px) !important;
}

html body.square-mobile-first .purchase-invoice-document.ca-page {
    gap: 12px !important;
    padding-bottom: calc(var(--ca-shell-bottom-nav-h) + 10px) !important;
}

html body.square-mobile-first .purchase-invoice-document .ca-page-header,
html body.square-mobile-first .purchase-invoice-document-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 0 0 2px !important;
    padding: 14px !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-radius: 14px !important;
    background: var(--ca-shell-surface) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.025) !important;
}

html body.square-mobile-first .purchase-invoice-document .eyebrow {
    margin: 0 0 6px !important;
    color: color-mix(in srgb, var(--app-accent, #111) 76%, #111 24%) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

html body.square-mobile-first .purchase-invoice-document h1 {
    margin: 0 0 7px !important;
    color: var(--ca-shell-text) !important;
    font-size: clamp(24px, 6.2vw, 30px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .purchase-invoice-document .ca-section-card,
html body.square-mobile-first .purchase-invoice-document-card,
html body.square-mobile-first .purchase-invoice-process-card,
html body.square-mobile-first .purchase-invoice-learning-state,
html body.square-mobile-first .purchase-invoice-reprocess-card {
    padding: 14px !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-radius: 14px !important;
    background: var(--ca-shell-surface) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.025) !important;
}

html body.square-mobile-first .purchase-invoice-document h2 {
    margin: 0 0 10px !important;
    color: var(--ca-shell-text) !important;
    font-size: 18px !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .purchase-invoice-card-heading {
    display: grid !important;
    gap: 10px !important;
}

html body.square-mobile-first .purchase-invoice-process-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
}

html body.square-mobile-first .purchase-invoice-process-chip {
    min-height: 32px !important;
    padding: 7px 8px !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-radius: 10px !important;
    background: var(--ca-shell-soft) !important;
    color: var(--ca-shell-muted) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
}

html body.square-mobile-first .purchase-invoice-process-chip.is-done {
    background: var(--app-accent-soft, #eef3e1) !important;
    border-color: color-mix(in srgb, var(--app-accent, #a9b66b) 38%, transparent) !important;
    color: color-mix(in srgb, var(--app-accent, #a9b66b) 52%, #111 48%) !important;
}

html body.square-mobile-first .purchase-invoice-document-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

html body.square-mobile-first .purchase-invoice-document .purchase-invoice-details {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    margin: 0 !important;
}

html body.square-mobile-first .purchase-invoice-document .purchase-invoice-details dt,
html body.square-mobile-first .purchase-invoice-document .purchase-invoice-details dd {
    margin: 0 !important;
    min-height: 34px !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid rgba(17,24,39,.075) !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
}

html body.square-mobile-first .purchase-invoice-document .purchase-invoice-details dt {
    color: var(--ca-shell-muted) !important;
    font-weight: 850 !important;
}

html body.square-mobile-first .purchase-invoice-document .purchase-invoice-details dd {
    color: var(--ca-shell-text) !important;
    font-weight: 760 !important;
    overflow-wrap: anywhere !important;
}

html body.square-mobile-first .purchase-invoice-amounts {
    gap: 8px !important;
}

html body.square-mobile-first .purchase-invoice-amounts > div {
    padding: 10px !important;
    border: 1px solid rgba(17,24,39,.075) !important;
    border-radius: 10px !important;
    background: var(--ca-shell-soft) !important;
}

html body.square-mobile-first .purchase-invoice-document .badge {
    min-height: 22px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    background: var(--app-accent-soft, #eef3e1) !important;
    color: color-mix(in srgb, var(--app-accent, #a9b66b) 50%, #111 50%) !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
}

html body.square-mobile-first:has(.purchase-invoice-document) nav.mobile-bottom-nav,
html body.square-mobile-first:has(.purchase-invoice-document) .mobile-bottom-nav.role-aware-bottom-nav {
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    min-height: var(--ca-shell-bottom-nav-h) !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px 16px 0 0 !important;
    background: rgba(255,255,255,.97) !important;
    border: 1px solid var(--ca-shell-line) !important;
    border-bottom: 0 !important;
    transform: none !important;
}

html body.square-mobile-first:has(.purchase-invoice-document) nav.mobile-bottom-nav a,
html body.square-mobile-first:has(.purchase-invoice-document) .mobile-bottom-nav.role-aware-bottom-nav a {
    min-height: 44px !important;
    border-radius: 12px !important;
    color: var(--ca-shell-muted) !important;
    background: transparent !important;
}

html body.square-mobile-first:has(.purchase-invoice-document) nav.mobile-bottom-nav a.is-active,
html body.square-mobile-first:has(.purchase-invoice-document) .mobile-bottom-nav.role-aware-bottom-nav a.is-active {
    background: var(--app-accent-soft, rgba(17,17,17,.08)) !important;
    color: var(--app-accent-text, var(--ca-shell-text)) !important;
}

html body.square-mobile-first:has(.purchase-invoice-document) nav.mobile-bottom-nav a.mobile-main-action,
html body.square-mobile-first:has(.purchase-invoice-document) .mobile-bottom-nav.role-aware-bottom-nav a.mobile-main-action {
    background: var(--app-accent, #111) !important;
    color: var(--app-accent-text, #fff) !important;
}

html body.square-mobile-first .purchase-invoices-page .document-filter-chips .button.secondary.is-active,
html body.square-mobile-first .purchase-invoices-page .document-filter-chips a.button.secondary.is-active {
    background: color-mix(in srgb, var(--app-accent, #111) 70%, #111 30%) !important;
    border-color: color-mix(in srgb, var(--app-accent-dark, #111) 82%, #111 18%) !important;
    color: var(--app-accent-text, #fff) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .20), 0 8px 18px rgba(17, 24, 39, .16) !important;
}
