html,
html[data-theme="light"] {
    --c-ink: 15 23 42;
    --c-paper: 246 247 251;
    --c-card: 255 255 255;
    --c-teal: 12 40 80;
    color-scheme: light;
    background: #f6f7fb;
    color: #0f172a;
}

html, body {
    background: #f6f7fb;
    color: #0f172a;
}

.logo-mark {
    display: inline-flex;
    line-height: 0;
    background: transparent;
}

.site-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #f6f7fb;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.site-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.site-bar-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-drawer-toggle {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.nav-icon,
.nav-close {
    position: relative;
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 0.8rem;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}

.nav-icon span {
    position: absolute;
    left: 0.82rem;
    width: 1.05rem;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
    transition: transform 0.16s ease, opacity 0.16s ease, top 0.16s ease;
}

.nav-icon span:nth-child(1) { top: 0.95rem; }
.nav-icon span:nth-child(2) { top: 1.28rem; }
.nav-icon span:nth-child(3) { top: 1.61rem; }

.nav-drawer-toggle:checked ~ header .nav-icon span:nth-child(1),
.nav-drawer-toggle:checked ~ .admin-main header .nav-icon span:nth-child(1) {
    top: 1.28rem;
    transform: rotate(45deg);
}

.nav-drawer-toggle:checked ~ header .nav-icon span:nth-child(2),
.nav-drawer-toggle:checked ~ .admin-main header .nav-icon span:nth-child(2) {
    opacity: 0;
}

.nav-drawer-toggle:checked ~ header .nav-icon span:nth-child(3),
.nav-drawer-toggle:checked ~ .admin-main header .nav-icon span:nth-child(3) {
    top: 1.28rem;
    transform: rotate(-45deg);
}

.nav-close {
    font-size: 1.5rem;
    line-height: 1;
}

.ui-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

.ui-icon-lg {
    width: 1.75rem;
    height: 1.75rem;
}

.nav-close .ui-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.nav-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    background: rgba(246, 247, 251, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.nav-drawer,
.admin-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: 80vw;
    transform: translateX(-105%);
    overflow: hidden;
    background: #fff;
    color: #0f172a;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 12px 0 40px rgba(15, 23, 42, 0.08);
    padding: 1rem 0.9rem 1.5rem;
    transition: transform 0.2s ease;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    flex: 0 0 auto;
}

.drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.drawer-foot {
    flex: 0 0 auto;
    margin-top: auto;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 0.75rem;
}

.nav-drawer-links a,
.drawer-logout {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.35rem;
    border-radius: 0.8rem;
    padding: 0.9rem 1rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
}

.nav-drawer-links a.is-active,
.admin-nav-link.is-active {
    background: #0c2850;
    color: #fff;
}

.drawer-foot .drawer-logout {
    margin-top: 0.35rem;
}

.drawer-wallet {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.85rem 0.25rem 0.25rem;
    font-size: 0.875rem;
    color: rgba(15, 23, 42, 0.62);
}

.shop-wallet {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.shop-wallet .ui-icon {
    color: #0c2850;
}

.nav-drawer-toggle:checked ~ .nav-drawer,
.nav-drawer-toggle:checked ~ .admin-sidebar {
    transform: none;
}

.nav-drawer-toggle:checked ~ .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.25rem 0 1rem;
}

.admin-nav-label {
    margin: 0.95rem 0.45rem 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.42);
}

.admin-nav-label:first-child {
    margin-top: 0.2rem;
}

.drawer-contacts {
    margin-top: 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 0.75rem;
}

.drawer-contacts-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.45);
}

.drawer-contacts-empty {
    margin: 0.45rem 0.35rem 0;
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.55);
}

.drawer-contacts ul {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.drawer-contacts a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 0.75rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.page-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.admin-main.page-shell {
    min-height: 0;
    flex: 1 1 auto;
}

.page-shell > main,
.admin-main > main {
    flex: 1 1 auto;
    width: 100%;
}

.site-footer {
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.5);
}

.catalog-panel {
    margin-top: 0.5rem;
    padding: 0.95rem 1rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.catalog-panel-title,
.catalog-sections-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.45);
}

.catalog-search {
    margin-top: 0.45rem;
}

.catalog-sections-label {
    margin-top: 0.85rem;
}

.catalog-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.catalog-sections button {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #f6f7fb;
    color: #0f172a;
    padding: 0.38rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}

.catalog-sections button.is-on {
    border-color: #0c2850;
    background: #0c2850;
    color: #fff;
}

.catalog-group {
    margin-top: 0.85rem;
}

.catalog-group-title {
    display: none;
}

.catalog-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0;
}

a.product-card,
button.product-card {
    width: 100%;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
}

.product-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.35rem;
    overflow: hidden;
    min-height: 5.35rem;
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.product-card:hover,
.product-card:focus-visible {
    border-color: #0c2850;
    box-shadow: 0 6px 16px rgba(12, 40, 80, 0.12);
}

.product-card:focus-visible {
    outline: 2px solid #0c2850;
    outline-offset: 2px;
}

.product-photo-wrap {
    display: flex;
    flex: 0 0 5.35rem;
    width: 5.35rem;
    background: #e7eef0;
}

.product-photo,
.product-photo-empty {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 5.35rem;
    flex: 1 1 auto;
    object-fit: cover;
}

.product-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.7rem 0.9rem 0.75rem 0;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.25;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.7rem;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
}

.product-hours {
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.2;
    color: #0c2850;
}

.product-note {
    font-size: 0.72rem;
    line-height: 1.3;
    color: rgba(15, 23, 42, 0.5);
}

.rent-photo {
    display: block;
    width: 7.5rem;
    height: 7.5rem;
    margin: 1.15rem auto 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.85rem;
    object-fit: cover;
    background: #e7eef0;
}

.rent-photo[hidden] {
    display: none;
}

.rent-fields {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.rent-fields label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.rent-fields input {
    margin-top: 0.3rem;
}

.rent-facts {
    display: grid;
    gap: 0.35rem;
    margin: 0.9rem 0 0;
}

.rent-facts div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
}

.rent-facts div[hidden] {
    display: none;
}

.rent-facts dt {
    color: rgba(15, 23, 42, 0.5);
}

.rent-facts dd {
    margin: 0;
    font-weight: 700;
}

.rent-status {
    color: #047857;
}

.rent-agree {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.rent-agree input {
    margin-top: 0.2rem;
    accent-color: #0c2850;
}

.rent-agree a {
    color: #0c2850;
    font-weight: 650;
    text-decoration: underline;
}

.terms-section {
    margin-top: 1.75rem;
    padding: 1rem 1.05rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1rem;
    background: #fff;
}

.terms-section h2 {
    font-size: 1.25rem;
}

.terms-body {
    margin-top: 0.55rem;
    white-space: pre-line;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(15, 23, 42, 0.75);
}

.maintenance-screen {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: #f6f7fb;
}

.maintenance-card {
    width: min(26rem, 100%);
    padding: 1.75rem 1.4rem 1.5rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.maintenance-card img {
    width: min(100%, 14rem);
    height: auto;
    margin: 0 auto;
}

.maintenance-card h1 {
    margin-top: 0.85rem;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.maintenance-card p {
    margin-top: 0.65rem;
    white-space: pre-line;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(15, 23, 42, 0.72);
}

.maintenance-staff {
    display: inline-block;
    margin-top: 1.15rem;
    font-size: 0.78rem;
    color: rgba(15, 23, 42, 0.45);
}

.orders-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.orders-table th,
.orders-table td {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.orders-table th {
    padding: 0.7rem 0.75rem;
    background: #f6f7fb;
    color: rgba(15, 23, 42, 0.45);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.orders-table td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.overflow-x-auto,
.table-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.85rem;
    background: #fff;
}

.record-list tr[hidden] {
    display: none;
}

.record-list.is-long .orders-table {
    font-size: 0.8rem;
}

.record-list.is-long .orders-table th,
.record-list.is-long .orders-table td {
    padding: 0.32rem 0.55rem;
}

.record-list.is-long .orders-table .mt-2 {
    margin-top: 0.2rem;
}

.record-list.is-long .orders-table .mt-1 {
    margin-top: 0.1rem;
}

.record-more {
    width: 100%;
    margin-top: 0.65rem;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.pager-status {
    min-width: 6.5rem;
    color: rgba(15, 23, 42, 0.55);
    font-size: 0.85rem;
    text-align: center;
}

.pager-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.product-thumb {
    width: 4.5rem;
    height: 3.2rem;
    aspect-ratio: auto;
    border-radius: 0.45rem;
}

.orders-table .product-hours {
    font-size: 1.15rem;
}

.catalog-desc {
    max-width: 18rem;
    margin-top: 0.15rem;
    color: rgba(15, 23, 42, 0.62);
    font-size: 0.8rem;
    line-height: 1.35;
    white-space: normal;
}

.orders-table tr.order-status-waiting { background: #fffbeb; }
.orders-table tr.order-status-active { background: #ecfdf5; }
.orders-table tr.order-status-expired,
.orders-table tr.order-status-failed { background: #fff1f2; }
.orders-table tr.order-status-refunded { background: #f0f9ff; }
.orders-table tr.pay-status-pending { background: #fffbeb; }
.orders-table tr.pay-status-approved { background: #ecfdf5; }
.orders-table tr.pay-status-rejected { background: #fff1f2; }
.orders-table tr.pay-status-other { background: #f8fafc; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 0.75rem;
    padding: 0.75rem 0.95rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-main {
    min-width: 0;
}

/* Fixed at the top of the screen: clicking a close label focuses the hidden box, and a box at the end of the page would make the browser jump there. */
.notice-toggle,
.popup-toggle {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.fund-pick {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.notice-bell {
    position: relative;
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 0.8rem;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}

.notice-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #b45309;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
}

.notice-backdrop,
.popup-backdrop {
    position: fixed;
    z-index: 65;
    inset: 0;
    background: rgba(246, 247, 251, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.notice-pop,
.popup-card {
    position: fixed;
    z-index: 70;
    left: 50%;
    width: min(32rem, calc(100vw - 1.5rem));
    max-height: min(86vh, 42rem);
    overflow: auto;
    background: #fff;
    color: #0f172a;
    border-radius: 1.15rem;
    padding: 1.15rem 1.15rem 1.3rem;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
    opacity: 0;
    pointer-events: none;
}

.notice-pop {
    top: 4.25rem;
    right: 0.75rem;
    left: auto;
    width: min(34rem, calc(100vw - 1rem));
    padding: 0.75rem 0.75rem 0.85rem;
    transform: translateY(-0.4rem);
}

.popup-card {
    top: 50%;
    transform: translate(-50%, -48%);
}

.notice-toggle:checked ~ .notice-backdrop,
.popup-toggle:checked + .popup-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.notice-toggle:checked ~ .notice-pop {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.popup-toggle:checked + .popup-backdrop + .popup-card {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.notice-allow {
    margin-top: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.notice-empty {
    margin-top: 0.65rem;
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.875rem;
}

.notice-scroll {
    margin-top: 0.55rem;
    overflow-x: auto;
}

.notice-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.84rem;
}

.notice-table th {
    padding: 0.35rem 0.45rem;
    color: rgba(15, 23, 42, 0.45);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notice-table td {
    padding: 0.4rem 0.45rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    vertical-align: top;
}

.notice-table a {
    color: inherit;
    font-weight: 600;
}

.notice-table td:last-child a {
    color: rgba(15, 23, 42, 0.62);
    font-weight: 500;
}

.popup-head,
.popup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.popup-actions {
    margin-top: 1.15rem;
}

.fund-progress {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.fund-progress span {
    width: 2rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
}

.fund-pane {
    display: none;
    margin-top: 1rem;
}

#fund-1:checked ~ .popup-head .dot-1,
#fund-2:checked ~ .popup-head .dot-1,
#fund-2:checked ~ .popup-head .dot-2,
#fund-3:checked ~ .popup-head .dot-1,
#fund-3:checked ~ .popup-head .dot-2,
#fund-3:checked ~ .popup-head .dot-3 {
    background: #0c2850;
}

#fund-1:checked ~ .fund-pane-1,
#fund-2:checked ~ .fund-pane-2,
#fund-3:checked ~ .fund-pane-3 {
    display: block;
}

.pay-pick {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.pay-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.pay-method-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1.5px solid rgba(15, 23, 42, 0.15);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.pay-method-card:active {
    transform: scale(0.97);
}

.pay-method-card:hover {
    border-color: #0c2850;
    box-shadow: 0 0 0 2px rgba(12, 40, 80, 0.08);
}

.pay-method-logo {
    width: 3.6rem;
    height: 3.6rem;
    object-fit: contain;
    border-radius: 0.75rem;
}

.pay-method-logo-sm {
    width: 1.4rem;
    height: 1.4rem;
    object-fit: contain;
    border-radius: 0.25rem;
}

.pay-method-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: inherit;
}

.pay-method-tag {
    font-size: 0.7rem;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pay-methods-grid.is-busy label {
    pointer-events: none;
    opacity: 0.6;
}

.pay-methods-grid.is-busy label:has(input:checked) {
    opacity: 1;
}

@media (max-width: 520px) {
    .pay-methods-grid {
        grid-template-columns: 1fr;
    }
}

/* Brand solid selected states */
#pay-gcash:checked ~ .pay-methods-grid label[for="pay-gcash"] {
    border-color: #0056b3;
    background: #0056b3;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.18);
}

#pay-maya:checked ~ .pay-methods-grid label[for="pay-maya"] {
    border-color: #0c2850;
    background: #0c2850;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(12, 40, 80, 0.18);
}

#pay-card:checked ~ .pay-methods-grid label[for="pay-card"] {
    border-color: #168f8d;
    background: #168f8d;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(22, 143, 141, 0.18);
}

#pay-qrph:checked ~ .pay-methods-grid label[for="pay-qrph"] {
    border-color: #0f172a;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.18);
}

#pay-gcash:checked ~ .pay-methods-grid label[for="pay-gcash"] .pay-method-tag,
#pay-maya:checked ~ .pay-methods-grid label[for="pay-maya"] .pay-method-tag,
#pay-card:checked ~ .pay-methods-grid label[for="pay-card"] .pay-method-tag,
#pay-qrph:checked ~ .pay-methods-grid label[for="pay-qrph"] .pay-method-tag {
    color: rgba(255, 255, 255, 0.85);
}

/* When no method is selected, show a gentle prompt */
.pay-methods-grid:has(input:not(:checked)) .pay-method-card {
    /* default outline style */
}

.pay-methods-grid:has(input:checked) .pay-method-card:has(input:not(:checked)) {
    opacity: 0.85;
}

.pay-methods-grid:has(input:checked) .pay-method-card:has(input:checked) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.pending-payment-row:hover {
    background: rgba(12, 40, 80, 0.06);
}

@keyframes fund-spin {
    to { transform: rotate(360deg); }
}

.is-loading {
    position: relative;
    pointer-events: none;
}

.is-loading::after {
    content: "";
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: fund-spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.amount-error {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.12) !important;
}

.amount-ok {
    border-color: #0c2850 !important;
    box-shadow: 0 0 0 2px rgba(12, 40, 80, 0.12) !important;
}

.qrph-pay {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.qrph-code-wrap {
    display: inline-block;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.qrph-code {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
}

.order-card {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-left-width: 8px;
    border-radius: 1rem;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.order-card.order-status-waiting { border-left-color: #d97706; background: #fffbeb; }
.order-card.order-status-active { border-left-color: #059669; background: #ecfdf5; }
.order-card.order-status-expired { border-left-color: #be123c; background: #fff1f2; }
.order-card.order-status-refunded { border-left-color: #0284c7; background: #f0f9ff; }
.order-card.order-status-failed { border-left-color: #e11d48; background: #fff1f2; }
.order-card.order-status-other,
.order-card.order-status-closed { border-left-color: #64748b; background: #f8fafc; }
.order-card.order-status-done { border-left-color: #059669; background: #ecfdf5; }

.order-status-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-status-label.order-status-waiting { background: #d97706; color: #fff; }
.order-status-label.order-status-active { background: #059669; color: #fff; }
.order-status-label.order-status-expired { background: #be123c; color: #fff; }
.order-status-label.order-status-refunded { background: #0284c7; color: #fff; }
.order-status-label.order-status-failed { background: #e11d48; color: #fff; }
.order-status-label.order-status-other,
.order-status-label.order-status-closed { background: #64748b; color: #fff; }
.order-status-label.order-status-done { background: #059669; color: #fff; }

.pay-card {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-left-width: 8px;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem 1.15rem;
}

.pay-card.pay-status-pending { border-left-color: #d97706; background: #fffbeb; }
.pay-card.pay-status-approved { border-left-color: #059669; background: #ecfdf5; }
.pay-card.pay-status-rejected { border-left-color: #be123c; background: #fff1f2; }
.pay-card.pay-status-other { border-left-color: #64748b; background: #f8fafc; }

.pay-status-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pay-status-label.pay-status-pending { background: #d97706; color: #fff; }
.pay-status-label.pay-status-approved { background: #059669; color: #fff; }
.pay-status-label.pay-status-rejected { background: #be123c; color: #fff; }
.pay-status-label.pay-status-other { background: #64748b; color: #fff; }

.paymongo-status-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.paymongo-status-label.paymongo-status-pending { background: #d97706; color: #fff; }
.paymongo-status-label.paymongo-status-paid { background: #059669; color: #fff; }
.paymongo-status-label.paymongo-status-failed { background: #e11d48; color: #fff; }
.paymongo-status-label.paymongo-status-expired { background: #be123c; color: #fff; }
.paymongo-status-label.paymongo-status-review { background: #7c3aed; color: #fff; }
.paymongo-status-label.paymongo-status-other { background: #64748b; color: #fff; }

.pay-choices label:only-child {
    grid-column: 1 / -1;
}

#pay-gcash:checked ~ .pay-choices label[for="pay-gcash"],
#pay-maya:checked ~ .pay-choices label[for="pay-maya"] {
    border-color: #0c2850;
    background: #0c2850;
    color: #fff;
}

.pay-detail {
    display: none;
    margin-top: 1rem;
}

#pay-gcash:checked ~ .pay-detail-gcash,
#pay-maya:checked ~ .pay-detail-maya {
    display: block;
}

@media (min-width: 800px) {
    .catalog-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .site-bar-inner {
        padding: 0.55rem 0.75rem;
    }

    .admin-nav-link {
        padding: 0.62rem 0.75rem;
    }

    .popup-card {
        width: min(32rem, calc(100vw - 1rem));
        max-height: min(90vh, 42rem);
        padding: 1rem;
    }

    main h1.font-display {
        font-size: 1.85rem;
        line-height: 1.15;
    }
}

.admin-main td {
    overflow-wrap: anywhere;
}

.admin-main .orders-table td,
.admin-main .orders-table th {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.admin-main .orders-table td.cell-wrap {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 16rem;
}

.contact-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.contact-stack > li {
    width: 100%;
}

.contact-stack-page a,
.contact-stack-page button,
.contact-stack-page label {
    width: 100%;
    justify-content: center;
}

.popup-actions-center {
    justify-content: center;
}

.popup-actions-equal > a,
.popup-actions-equal > label,
.popup-actions-equal > button {
    flex: 1 1 50%;
    text-align: center;
    justify-content: center;
}

.popup-actions-stack {
    flex-direction: column;
    align-items: stretch;
}

.popup-actions-stack > a,
.popup-actions-stack > label,
.popup-actions-stack > button {
    width: 100%;
    justify-content: center;
}

.popup-card.is-warning {
    border: 1px solid #f59e0b;
}

.popup-card.is-funds {
    overflow: hidden;
    width: min(26rem, calc(100vw - 1.25rem));
    max-height: none;
}

.popup-card.is-funds .fund-pane {
    margin-top: 0.65rem;
}

.popup-card.is-funds .pay-detail,
.popup-card.is-funds .pay-choices {
    margin-top: 0.65rem;
}

.popup-card.is-funds .popup-actions {
    margin-top: 0.85rem;
}

.pay-qr-image {
    max-height: 14rem;
    max-width: 100%;
}

.popup-toggle.is-qr:checked + .popup-backdrop {
    z-index: 75;
}

.popup-toggle.is-qr:checked + .popup-backdrop + .popup-card {
    z-index: 80;
}

@media (max-height: 760px) {
    .popup-card.is-funds {
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .popup-toggle:checked + .popup-backdrop + .popup-card.is-funds {
        transform: none;
    }
}

.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem 1rem 2rem;
}

.auth-card {
    width: min(26rem, 100%);
    margin-top: auto;
    margin-bottom: auto;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1.25rem;
    background: #fff;
    padding: 1.75rem 1.25rem 1.4rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.auth-logo {
    height: 5.75rem;
    width: auto;
}

.auth-title {
    margin: 0;
}

.auth-note {
    margin: -0.35rem 0 1.15rem;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(15, 23, 42, 0.65);
}

.auth-links {
    margin-top: 0.9rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(15, 23, 42, 0.65);
}

.auth-links + .auth-links {
    margin-top: 0.35rem;
}

@media (min-width: 40rem) {
    .auth-card {
        padding: 2rem 1.75rem 1.6rem;
    }

    .auth-logo {
        height: 6.5rem;
    }
}

@media (min-width: 64rem) {
    .nav-drawer,
    .admin-sidebar {
        width: 30vw;
    }
}

button.is-loading,
input.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    transition: none;
}

button.is-loading .ui-icon,
button.is-loading svg {
    visibility: hidden;
}

button.is-loading:disabled,
input.is-loading:disabled {
    opacity: 1;
}

button.is-loading::after,
input.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: -0.525rem;
    margin-left: -0.525rem;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-top-color: rgb(14, 122, 136);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.28);
    animation: btn-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    button.is-loading::after,
    input.is-loading::after {
        animation: none;
    }
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Page sections and spacing === */
.page-section {
    margin-top: 1.75rem;
}
.page-section:first-child {
    margin-top: 0;
}

.section-title {
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(15, 23, 42, 0.65);
}

/* === Empty states === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1.5rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 1rem;
    background: #fff;
    text-align: center;
}
.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.35);
}
.empty-state-icon .ui-icon {
    width: 1.5rem;
    height: 1.5rem;
}
.empty-state p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(15, 23, 42, 0.55);
    max-width: 28rem;
}
.empty-state a {
    font-weight: 600;
    color: #0c2850;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* === Filter tabs === */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.filter-tab:hover {
    border-color: rgba(15, 23, 42, 0.25);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.filter-tabs a.is-active,
.filter-tab[aria-current="true"],
.filter-tab.is-active {
    background: #0c2850;
    border-color: #0c2850;
    color: #fff;
    box-shadow: 0 1px 3px rgba(12, 40, 80, 0.25);
}
.filter-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}
.filter-tab[aria-current="true"] .tab-count,
.filter-tab.is-active .tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* === Card enhancements === */
.card-raise {
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card-raise:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

/* === Inline notice / info banner === */
.notice-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.notice-banner .notice-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: #0c2850;
}
.notice-banner .notice-icon .ui-icon {
    width: 1.25rem;
    height: 1.25rem;
}
.notice-banner p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(15, 23, 42, 0.75);
}
.notice-banner a {
    font-weight: 600;
    color: #0c2850;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.notice-banner.is-warning {
    border-color: rgba(217, 119, 6, 0.3);
    background: #fffbeb;
}
.notice-banner.is-warning .notice-icon {
    color: #d97706;
}

/* === Auth page enhancements === */
.auth-card {
    width: min(26rem, 100%);
    margin-top: auto;
    margin-bottom: auto;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1.25rem;
    background: #fff;
    padding: 1.75rem 1.25rem 1.4rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}
.auth-separator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0 0;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.4);
}
.auth-separator::before,
.auth-separator::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(15, 23, 42, 0.1);
}

/* === Responsive helpers === */
@media (max-width: 640px) {
    .filter-tabs {
        gap: 0.35rem;
    }
    .filter-tab {
        padding: 0.38rem 0.7rem;
        font-size: 0.8rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .empty-state {
        padding: 1.5rem 1rem;
    }
}

/* === Settings form grouping === */
.settings-group {
    margin-top: 1.75rem;
}
.settings-group:first-child {
    margin-top: 0;
}
.settings-group-title {
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.settings-card {
    margin-top: 0.85rem;
    padding: 1.15rem 1.1rem 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.order-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.order-card-head,
.order-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.order-card-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.order-card-meta,
.order-wait {
    margin-top: 0.2rem;
    color: rgba(15, 23, 42, 0.55);
    font-size: 0.8rem;
    line-height: 1.45;
}

.order-credential {
    margin-top: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.order-actions form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.order-actions input.order-field {
    width: 10rem !important;
    max-width: 100%;
    flex: 1 1 10rem;
}

.order-note {
    margin-top: 0.7rem;
    color: rgba(15, 23, 42, 0.72);
    font-size: 0.8rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.order-system {
    margin-top: 0.45rem;
    color: rgba(15, 23, 42, 0.5);
    font-size: 0.75rem;
    line-height: 1.4;
}

.order-card details summary {
    cursor: pointer;
    color: rgba(15, 23, 42, 0.55);
    font-size: 0.78rem;
    font-weight: 600;
}

.fund-sheet {
    max-width: 28rem;
    margin-top: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1.15rem;
    background: #fff;
    padding: 1.15rem 1.1rem 1.2rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.fund-balance {
    color: rgba(15, 23, 42, 0.62);
    font-size: 0.92rem;
}

.fund-balance strong {
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 700;
}

.fund-amount {
    position: relative;
    margin-top: 1rem;
}

.fund-amount > span {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: rgba(15, 23, 42, 0.45);
    font-weight: 700;
    pointer-events: none;
}

.fund-amount input {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.9rem;
    background: #f7f9fa;
    padding: 0.9rem 1rem 0.9rem 2rem;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 700;
    outline: none;
}

.fund-amount input:focus {
    border-color: #0c2850;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(12, 40, 80, 0.14);
}

.fund-amount input::-webkit-outer-spin-button,
.fund-amount input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.fund-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.fund-presets button {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    padding: 0.38rem 0.72rem;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
}

.fund-presets button.is-on,
.fund-presets button:hover {
    border-color: #0c2850;
}

.fund-presets button.is-on {
    background: #0c2850;
    color: #fff;
}

.fund-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-top: 1rem;
}

.fund-method {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 4.1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.65rem 0.7rem;
    cursor: pointer;
}

.fund-method:has(input:checked) {
    border-color: #0c2850;
    box-shadow: 0 0 0 2px rgba(12, 40, 80, 0.14);
}

.fund-method input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.fund-method .pay-method-logo {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
}

.fund-method strong,
.fund-method em {
    display: block;
    font-style: normal;
}

.fund-method strong {
    font-size: 0.9rem;
}

.fund-method em {
    margin-top: 0.1rem;
    color: rgba(15, 23, 42, 0.5);
    font-size: 0.72rem;
}

.fund-actions {
    display: flex;
    gap: 0.55rem;
    margin-top: 1rem;
}

.fund-actions > * {
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
}

.fund-hint {
    margin-top: 0.85rem;
    color: rgba(15, 23, 42, 0.48);
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: center;
}

.fund-qr {
    max-width: 24rem;
    margin: 1.25rem auto 0;
    text-align: center;
}

.fund-qr img {
    width: min(100%, 260px);
    height: auto;
    margin: 0.8rem auto 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1rem;
    background: #fff;
    padding: 0.7rem;
}

/* =====================================================================
   Modern design layer (v40)
   Indigo brand, soft surfaces, glass top bar, persistent admin sidebar.
   ===================================================================== */
:root {
    --brand: #0c2850;
    --brand-600: #081c3a;
    --brand-50: #e8f5f4;
    --brand-100: #cbeae8;
    --accent: #168f8d;
    --surface: #ffffff;
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.14);
    --muted: #64748b;
    --radius: 1rem;
    --radius-lg: 1.25rem;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 48px -20px rgba(12, 40, 80, 0.28);
    --sidebar-w: 16.5rem;
}

html, body {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(22, 143, 141, 0.08), transparent 60%),
        radial-gradient(900px 420px at -10% 0%, rgba(22, 143, 141, 0.06), transparent 60%),
        #f6f7fb;
    background-attachment: fixed;
}

body {
    font-feature-settings: "cv11", "ss01";
    letter-spacing: -0.005em;
}

::selection { background: var(--brand-100); color: #0c2850; }

.font-display { letter-spacing: -0.025em; font-weight: 750; }
main h1.font-display { font-weight: 800; }

/* ---------- Top bar ---------- */
.site-bar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-bar-inner { max-width: 76rem; padding: 0.6rem 1rem; gap: 1rem; }
.site-bar-tools { gap: 0.6rem; }

.nav-icon, .nav-close {
    width: 2.6rem; height: 2.6rem;
    border-radius: 0.85rem;
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-icon:hover, .nav-close:hover { background: #f8fafc; border-color: rgba(15, 23, 42, 0.22); }
.nav-icon span { left: 0.78rem; }
.nav-icon span:nth-child(1) { top: 0.9rem; }
.nav-icon span:nth-child(2) { top: 1.23rem; }
.nav-icon span:nth-child(3) { top: 1.56rem; }
.nav-drawer-toggle:checked ~ header .nav-icon span:nth-child(1),
.nav-drawer-toggle:checked ~ header .nav-icon span:nth-child(3) { top: 1.23rem; }

.top-nav {
    display: none;
    align-items: center;
    gap: 0.15rem;
    margin-right: auto;
    margin-left: 1rem;
}
.top-nav a {
    border-radius: 0.7rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.66);
    transition: color 0.15s ease, background 0.15s ease;
}
.top-nav a:hover { color: #0f172a; background: rgba(15, 23, 42, 0.04); }
.top-nav a.is-active { color: var(--brand); background: var(--brand-50); }

.top-link, .top-cta { display: none !important; }
.top-link { font-size: 0.9rem; font-weight: 600; color: rgba(15, 23, 42, 0.7); padding: 0.5rem 0.6rem; }
.top-link:hover { color: #0f172a; }

.wallet-pill {
    display: inline-flex; align-items: center; gap: 0.45rem;
    border: 1px solid var(--brand-100);
    background: var(--brand-50);
    color: #0c2850;
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    font-size: 0.86rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s ease;
}
.wallet-pill:hover { background: var(--brand-100); }
.wallet-pill .ui-icon { width: 1rem; height: 1rem; }

.bar-title { display: none; font-weight: 700; font-size: 1rem; color: #0f172a; margin-right: auto; }
.user-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    border-radius: 999px; padding: 0.2rem 0.75rem 0.2rem 0.2rem;
    border: 1px solid var(--line-strong); background: #fff;
    font-size: 0.85rem; font-weight: 600; color: #0f172a;
    box-shadow: var(--shadow-sm);
}
.user-chip-name { display: none; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar, .avatar-lg {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #168f8d, #168f8d);
    color: #fff; font-weight: 800;
}
.avatar { width: 2rem; height: 2rem; font-size: 0.85rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.35rem; box-shadow: var(--shadow); }

.notice-bell {
    border-radius: 0.85rem;
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

/* ---------- Drawer / sidebar ---------- */
.nav-backdrop { background: rgba(15, 23, 42, 0.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nav-drawer, .admin-sidebar {
    width: min(20rem, 86vw);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0.85rem 1.25rem;
}
.nav-drawer-links a, .drawer-logout, .admin-nav-link {
    border-radius: 0.75rem;
    padding: 0.62rem 0.8rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.72);
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-drawer-links a:hover, .drawer-logout:hover, .admin-nav-link:hover { background: rgba(15, 23, 42, 0.045); color: #0f172a; }
.nav-drawer-links a.is-active, .admin-nav-link.is-active {
    background: var(--brand-50);
    color: var(--brand-600);
    box-shadow: inset 3px 0 0 var(--brand);
}
.nav-drawer-links a .ui-icon, .admin-nav-link .ui-icon { color: rgba(15, 23, 42, 0.45); }
.nav-drawer-links a.is-active .ui-icon, .admin-nav-link.is-active .ui-icon { color: var(--brand); }
.admin-nav { gap: 0.1rem; }
.admin-nav-label { margin: 1rem 0.8rem 0.3rem; font-size: 0.66rem; color: rgba(15, 23, 42, 0.4); }
.drawer-foot { border-top-color: var(--line); }
.drawer-logout { color: #be123c; }
.drawer-logout .ui-icon { color: #e11d48; }

/* ---------- Page structure ---------- */
.page-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 1rem; margin-bottom: 0.5rem;
}
.page-lead { margin-top: 0.4rem; max-width: 42rem; font-size: 0.92rem; line-height: 1.55; color: var(--muted); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--brand);
}
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.5rem 1rem 2rem; color: rgba(15, 23, 42, 0.45); }

/* ---------- Surfaces ---------- */
.settings-card, .panel, .catalog-panel, .table-card, .stat-card, .terms-section,
main .rounded-2xl.border.bg-card, main .rounded-xl.border.bg-card {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.panel { padding: 1.35rem; }
.panel-title { display: flex; align-items: center; gap: 0.55rem; font-size: 1.15rem; font-weight: 750; letter-spacing: -0.015em; }
.panel-title .ui-icon { color: var(--brand); }
.settings-card { padding: 1.35rem; }
.settings-group { margin-top: 2.25rem; scroll-margin-top: 5.5rem; }
.settings-group-title { font-size: 1.1rem; font-weight: 750; }
.table-card { margin-top: 0.75rem; overflow-x: auto; }
.card-raise { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card-raise:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.25rem; }
.stat-card { padding: 1rem 1.1rem; }
.stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(15, 23, 42, 0.45); }
.stat-value { margin-top: 0.35rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 0.15rem; font-size: 0.8rem; color: var(--muted); }
.stat-link { margin-top: 0.2rem; font-size: 0.8rem; font-weight: 700; color: var(--brand); }
.stat-link:disabled { opacity: 0.5; }
.stat-chip { border-radius: 0.85rem; background: #f8fafc; border: 1px solid var(--line); padding: 0.7rem 0.85rem; }
.stat-chip dt { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(15, 23, 42, 0.45); }
.stat-chip dd { margin-top: 0.2rem; font-weight: 700; }

/* ---------- Inputs & buttons ---------- */
.ui-input { min-height: 2.75rem; }
select.ui-input { padding-right: 2.25rem; }
textarea.ui-input { min-height: 6rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 1rem; height: 1rem; }
.ui-btn { min-height: 2.6rem; letter-spacing: -0.005em; }
.ui-btn-primary {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 6px 16px -6px rgba(12, 40, 80, 0.55) !important;
}
.ui-btn-primary:hover { transform: translateY(-1px); }
.ui-btn:focus-visible { outline: 3px solid rgba(12, 40, 80, 0.35); outline-offset: 2px; }

.toggle-row {
    display: flex; align-items: flex-start; gap: 0.7rem;
    border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.8rem 0.9rem;
    background: #f8fbfb; cursor: pointer; transition: border-color 0.15s ease;
}
.toggle-row:hover { border-color: rgba(12, 40, 80, 0.35); }
.toggle-row input { margin-top: 0.15rem; }
.toggle-row b { display: block; font-size: 0.9rem; }
.toggle-row small { display: block; margin-top: 0.1rem; font-size: 0.8rem; color: var(--muted); }

.status-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    border-radius: 999px; padding: 0.25rem 0.7rem;
    font-size: 0.75rem; font-weight: 700;
    background: #f1f5f9; color: #475569;
}
.status-chip::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 999px; background: #94a3b8; }
.status-chip.is-on { background: #ecfdf5; color: #047857; }
.status-chip.is-on::before { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

.kind-chip { display: inline-flex; border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.72rem; font-weight: 700; }
.kind-rental { background: var(--brand-50); color: #081c3a; }
.kind-imei { background: #ecfeff; color: #0e7490; }
.kind-server { background: #fff7ed; color: #c2410c; }
.badge-new { display: inline-flex; margin-left: 0.3rem; border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: #fdf2f8; color: #be185d; vertical-align: middle; }

.meter-bar { height: 0.5rem; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-bottom: 0.4rem; }
.meter-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #168f8d, #168f8d); }

.notice-inline { border-radius: 0.75rem; padding: 0.6rem 0.8rem; font-size: 0.85rem; }
.notice-inline.is-error { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }

.help-box { border: 1px dashed var(--line-strong); border-radius: 0.9rem; padding: 0.75rem 0.95rem; background: #f8fbfb; font-size: 0.85rem; color: #334155; }
.help-box summary { cursor: pointer; font-weight: 700; color: var(--brand-600); }
.help-box ol { margin: 0.6rem 0 0.4rem 1.1rem; list-style: decimal; display: grid; gap: 0.3rem; }
.help-box a { color: var(--brand); font-weight: 600; text-decoration: underline; }
.help-box code, .settings-card code { font-size: 0.78rem; background: #f1f5f9; border-radius: 0.35rem; padding: 0.05rem 0.3rem; overflow-wrap: anywhere; }

/* ---------- Flash ---------- */
.flash {
    display: flex; align-items: flex-start; gap: 0.65rem;
    margin-bottom: 1rem; border-radius: 0.95rem; padding: 0.8rem 1rem;
    font-size: 0.9rem; line-height: 1.45; border: 1px solid;
    box-shadow: var(--shadow-sm);
    animation: flash-in 0.25s ease;
}
.flash-ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.flash-error { background: #fff1f2; border-color: #fecdd3; color: #881337; }
.flash-icon { display: inline-flex; width: 1.4rem; height: 1.4rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 999px; color: #fff; }
.flash-ok .flash-icon { background: #22c55e; }
.flash-error .flash-icon { background: #f43f5e; }
.flash-icon .ui-icon { width: 0.85rem; height: 0.85rem; stroke-width: 2.6; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Tabs, toolbar, tables ---------- */
.filter-tabs { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.3rem; border-radius: 0.95rem; background: rgba(15, 23, 42, 0.04); width: max-content; max-width: 100%; }
.filter-tab, .filter-tabs > a { border-radius: 0.7rem !important; padding: 0.45rem 0.9rem !important; font-size: 0.85rem; font-weight: 650; color: rgba(15, 23, 42, 0.62); background: transparent !important; box-shadow: none !important; white-space: nowrap; }
.filter-tab.is-active, .filter-tabs > a.is-active { background: #fff !important; color: #0f172a !important; box-shadow: var(--shadow-sm) !important; }
.filter-tab .tab-count { margin-left: 0.4rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.toolbar-search { flex: 1 1 16rem; max-width: 28rem; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1rem; padding: 0.65rem 0.9rem; border-radius: 0.95rem; border: 1px solid var(--brand-100); background: var(--brand-50); }
.price-input { width: 5.5rem !important; min-height: 2.25rem; padding: 0.35rem 0.6rem !important; font-size: 0.85rem !important; }

.orders-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.orders-table th {
    background: #f8fafc; color: rgba(15, 23, 42, 0.5);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.orders-table td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.orders-table tbody tr { transition: background 0.12s ease; }
.orders-table tbody tr:hover { background: #f7fbfb; }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.service-table td, .service-table th { padding: 0.7rem 0.8rem; }
main > .overflow-x-auto.rounded-xl, main .overflow-x-auto.rounded-xl { border-radius: var(--radius-lg) !important; border-color: var(--line) !important; box-shadow: var(--shadow); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }

.empty-state { border-radius: var(--radius-lg); border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, 0.7); }
.empty-state-icon { background: var(--brand-50); color: var(--brand); }

/* ---------- Settings navigation ---------- */
.settings-nav {
    position: sticky; top: 4.1rem; z-index: 20;
    display: flex; gap: 0.35rem; overflow-x: auto;
    margin: 1.25rem -0.25rem 0; padding: 0.4rem;
    border: 1px solid var(--line); border-radius: 1rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    scrollbar-width: none;
}
.settings-nav::-webkit-scrollbar { display: none; }
.settings-nav a { flex: 0 0 auto; border-radius: 0.7rem; padding: 0.45rem 0.85rem; font-size: 0.85rem; font-weight: 650; color: rgba(15, 23, 42, 0.65); }
.settings-nav a:hover { background: var(--brand-50); color: var(--brand-600); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    display: grid; gap: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    color: #fff;
    background:
        radial-gradient(600px 300px at 90% 0%, rgba(22, 143, 141, 0.45), transparent 60%),
        radial-gradient(500px 300px at 0% 100%, rgba(22, 143, 141, 0.35), transparent 60%),
        linear-gradient(135deg, #081c3a 0%, #0c2850 55%, #168f8d 100%);
    box-shadow: var(--shadow-lg);
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 85%);
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: #9fe0dc; }
.hero-title { margin-top: 0.6rem; font-size: clamp(1.9rem, 4.5vw, 3.1rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; max-width: 40rem; }
.hero-lead { margin-top: 0.85rem; max-width: 36rem; font-size: 1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.hero-actions .ui-btn-primary { background: #fff !important; color: #081c3a !important; }
.hero-actions .ui-btn-ghost { background: rgba(255, 255, 255, 0.1) !important; color: #fff !important; border-color: rgba(255, 255, 255, 0.3) !important; }
.hero-points { display: grid; gap: 0.6rem; align-content: center; }
.hero-points li {
    display: flex; gap: 0.75rem; align-items: flex-start;
    border-radius: 1rem; padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-size: 0.85rem; color: rgba(255, 255, 255, 0.8);
}
.hero-points li { align-items: center; }
.hero-points li .ui-icon { color: #7fdcd6; }
.hero-points b { display: block; color: #fff; font-size: 0.95rem; }
.hero-compact { padding: 1.5rem; align-items: center; }
.hero-compact .hero-title { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.hero-wallet {
    display: grid; gap: 0.2rem; align-self: stretch; align-content: center;
    border-radius: 1.1rem; padding: 1.1rem 1.25rem;
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: background 0.15s ease, transform 0.15s ease;
}
.hero-wallet:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.hero-wallet-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #9fe0dc; }
.hero-wallet-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-wallet-action { font-size: 0.85rem; font-weight: 700; color: #7fdcd6; }

/* ---------- Catalog ---------- */
.catalog-panel { padding: 1rem 1.1rem; }
.catalog-sections button { border-color: var(--line-strong); background: #fff; padding: 0.42rem 0.9rem; font-weight: 650; transition: all 0.15s ease; }
.catalog-sections button:hover { border-color: var(--brand); color: var(--brand); }
.catalog-sections button.is-on { box-shadow: 0 6px 14px -6px rgba(12, 40, 80, 0.6); color: #fff; }
.catalog-list { gap: 0.75rem; }
.product-card {
    border-radius: 1.1rem; gap: 1rem; min-height: 6rem;
    border-color: var(--line) !important;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.product-card:hover, .product-card:focus-visible { transform: translateY(-2px); border-color: rgba(12, 40, 80, 0.45) !important; box-shadow: var(--shadow-lg); }
.product-photo-wrap { flex-basis: 6rem; width: 6rem; background: linear-gradient(135deg, #e8f5f4, #ecfeff); }
.product-photo, .product-photo-empty { min-height: 6rem; }
.product-title { font-size: 0.98rem; font-weight: 700; }
.product-price { font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.product-hours { color: var(--brand); background: var(--brand-50); border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.74rem; }
@media (min-width: 1100px) { .catalog-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Orders ---------- */
.order-card { border-radius: var(--radius-lg) !important; border-color: var(--line) !important; box-shadow: var(--shadow); }
.order-card-title { font-weight: 750; }
.order-credential {
    border-radius: 0.8rem; background: #0f172a; color: #e2e8f0;
    padding: 0.8rem 0.95rem; font-size: 0.82rem;
}
.live-banner {
    display: flex; align-items: center; gap: 0.7rem;
    margin-top: 1rem; border-radius: 0.95rem; padding: 0.7rem 1rem;
    background: var(--brand-50); border: 1px solid var(--brand-100); color: #0c2850;
    font-size: 0.86rem; font-weight: 600;
}
.live-dot { width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 0 rgba(12, 40, 80, 0.6); animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(12, 40, 80, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(12, 40, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 40, 80, 0); } }

/* ---------- OTP ---------- */
.otp-box { margin-top: 0.75rem; border-radius: 1rem; border: 1px solid var(--brand-100); background: linear-gradient(180deg, #f2faf9, #fff); padding: 1.1rem; }
.otp-input { text-align: center; font-size: 1.6rem !important; font-weight: 800; letter-spacing: 0.6em; padding-left: 0.6em !important; font-variant-numeric: tabular-nums; min-height: 3.5rem; }

/* ---------- Auth ---------- */
.auth-screen {
    background:
        radial-gradient(700px 400px at 85% 10%, rgba(22, 143, 141, 0.18), transparent 60%),
        radial-gradient(600px 400px at 10% 90%, rgba(22, 143, 141, 0.14), transparent 60%);
}
.auth-card { border-radius: 1.5rem !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-lg) !important; }
.auth-title { font-weight: 800; }

/* ---------- Popups ---------- */
.popup-card { border-radius: 1.4rem !important; border: 1px solid var(--line); box-shadow: var(--shadow-lg) !important; }
.popup-backdrop { background: rgba(15, 23, 42, 0.38) !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .user-chip-name { display: inline; }
    .hero { padding: 2.75rem 2.5rem; }
}
@media (min-width: 860px) {
    .top-nav { display: flex; }
    .top-link, .top-cta { display: inline-flex !important; }
    .hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .hero-compact { grid-template-columns: minmax(0, 1fr) 18rem; }
}
@media (max-width: 859px) {
    .page-shell .site-bar-inner > .logo-mark { margin-right: auto; }
}
@media (min-width: 1024px) {
    .admin-shell { padding-left: var(--sidebar-w); }
    .admin-shell .admin-sidebar {
        transform: none;
        width: var(--sidebar-w);
        box-shadow: none;
        background: rgba(255, 255, 255, 0.86);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        z-index: 35;
    }
    .admin-shell .admin-sidebar .nav-close,
    .admin-shell .site-bar .nav-icon,
    .admin-shell .site-bar .logo-mark,
    .admin-shell .nav-backdrop { display: none !important; }
    .admin-shell .bar-title { display: block; }
    .admin-shell .site-bar-inner { max-width: none; padding: 0.7rem 1.5rem; }
    .admin-shell .site-bar-tools { width: 100%; }
    .admin-main > main { max-width: 80rem !important; padding: 1.5rem 2rem 2rem !important; }
    .settings-nav { top: 4.4rem; }
}
@media (max-width: 1023px) {
    .admin-shell .site-bar-inner > .logo-mark { margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .card-raise:hover, .product-card:hover, .hero-wallet:hover, .ui-btn-primary:hover { transform: none; }
    .live-dot, .flash { animation: none; }
}

/* ---------- Compact catalog for large service lists (v42) ---------- */
.catalog-group { margin-top: 1.4rem; }
.catalog-group-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.6rem; }
.catalog-group-name { font-size: 1rem; font-weight: 750; letter-spacing: -0.01em; color: #0c2850; }
.catalog-group-count { border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.72rem; font-weight: 700; background: #e8f5f4; color: #168f8d; }
.catalog-list { display: grid; gap: 0.55rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .catalog-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .catalog-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card { min-height: 4.25rem; gap: 0.75rem; border-radius: 0.9rem; }
.product-card:hover, .product-card:focus-visible { transform: translateY(-1px); }
.product-photo-wrap { flex: 0 0 4.25rem; width: 4.25rem; }
.product-photo, .product-photo-empty { min-height: 4.25rem; }
.product-photo-empty { background: linear-gradient(135deg, #e8f5f4, #eef2f7); }
.product-body { gap: 0.2rem; padding: 0.55rem 0.75rem 0.55rem 0; }
.product-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 0.86rem; font-weight: 650; line-height: 1.3;
}
.product-meta { gap: 0.2rem 0.5rem; align-items: center; }
.product-price { font-size: 0.92rem; }
.product-hours { font-size: 0.68rem; padding: 0.08rem 0.45rem; white-space: nowrap; }
.product-note { font-size: 0.68rem; }
.catalog-group:not(.is-expanded):not(.is-searching) .product-card.is-extra { display: none; }
.catalog-group.is-searching .catalog-more { display: none; }
.catalog-more {
    display: block; margin: 0.6rem auto 0; border-radius: 999px;
    border: 1px solid rgba(12, 40, 80, 0.18); background: #fff;
    padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 700; color: #0c2850;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); cursor: pointer;
}
.catalog-more:hover { border-color: #168f8d; color: #168f8d; }

/* ---------- Admin category rows (v43) ---------- */
.category-row { border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: var(--shadow-sm); }
.category-row[open] { box-shadow: var(--shadow); }
.category-row summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem;
    padding: 0.8rem 1rem; cursor: pointer; list-style: none;
}
.category-row summary::-webkit-details-marker { display: none; }
.category-row summary::before { content: "›"; font-size: 1.2rem; line-height: 1; color: rgba(15, 23, 42, 0.4); transition: transform 0.15s ease; }
.category-row[open] summary::before { transform: rotate(90deg); }
.category-row-name { font-weight: 700; }
.category-row-meta { font-size: 0.8rem; color: var(--muted); }
.category-row-link { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: #168f8d; }
.category-row-body { border-top: 1px solid var(--line); padding: 1rem; }
.add-panel { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.add-panel > summary { display: flex; align-items: center; gap: 0.55rem; padding: 0.95rem 1.2rem; font-weight: 700; cursor: pointer; list-style: none; color: #0c2850; }
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel > summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; line-height: 1; color: #168f8d; }
.add-panel[open] > summary::after { content: "–"; }
.add-panel[open] > summary { border-bottom: 1px solid var(--line); }

/* v45: supplier field detection */
.field-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; gap: 0.5rem; margin-top: 0.5rem; padding: 0.6rem; border: 1px solid rgba(12, 40, 80, 0.08); border-radius: 0.85rem; background: rgba(12, 40, 80, 0.02); }
.field-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; color: rgba(12, 40, 80, 0.55); background: rgba(22, 143, 141, 0.08); border-radius: 999px; padding: 0.2rem 0.55rem; }
.field-needs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-top: 0.35rem; font-size: 0.72rem; color: rgba(12, 40, 80, 0.55); }
.need-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.7rem; font-weight: 600; color: #0f6e6c; background: rgba(22, 143, 141, 0.12); border: 1px solid rgba(22, 143, 141, 0.25); }
.need-chip.is-optional { color: rgba(12, 40, 80, 0.6); background: transparent; border-style: dashed; border-color: rgba(12, 40, 80, 0.25); }
.need-chip.is-missing { color: #9f1239; background: rgba(244, 63, 94, 0.08); border-color: rgba(244, 63, 94, 0.3); }
.field-optional { font-weight: 400; color: rgba(12, 40, 80, 0.5); font-size: 0.85em; }
.rent-fields select { appearance: auto; }
.field-row > * { min-width: 0 !important; }
.field-row > input, .field-row > select { width: 100% !important; }
.field-row > [name="field_label[]"], .field-row > [name="field_placeholder[]"] { grid-column: span 3; }
.field-row > select { grid-column: span 2; }
.field-row > [name="field_options[]"] { grid-column: span 4; }
.field-row > .field-key { grid-column: 5; justify-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.field-row > [data-remove-field] { grid-column: 6; }
@media (max-width: 640px) {
    .field-row > [name="field_label[]"], .field-row > [name="field_placeholder[]"], .field-row > [name="field_options[]"] { grid-column: 1 / -1; }
    .field-row > .field-key { grid-column: span 3; }
    .field-row > [data-remove-field] { grid-column: span 3; }
}

/* v46: compact shop search bar + product icons */
.catalog-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.6rem 0.75rem; }
.catalog-bar .catalog-search { position: relative; flex: 1 1 16rem; margin: 0; }
.catalog-bar .catalog-search input { padding-left: 2.4rem; }
.catalog-search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: rgba(12, 40, 80, 0.4); pointer-events: none; }
.catalog-bar .catalog-sections { margin: 0; flex: 0 1 auto; }
.product-icon { display: flex; align-items: center; justify-content: center; color: #168f8d; }
.product-icon .ui-icon, .product-icon svg { width: 1.7rem; height: 1.7rem; }
.product-icon.is-rental { background: linear-gradient(135deg, #e3f4f3, #cdeceb); color: #0f6e6c; }
.product-icon.is-imei { background: linear-gradient(135deg, #e8eef8, #d6e1f2); color: #0c2850; }
.product-icon.is-server { background: linear-gradient(135deg, #eef0fb, #dfe3f6); color: #3b4a8f; }
.admin-thumb { width: 4rem; height: 3rem; border-radius: 0.5rem; flex: 0 0 auto; }
.admin-thumb svg { width: 1.4rem; height: 1.4rem; }
.product-logo { object-fit: contain !important; background: #fff; padding: 0.35rem; }
.product-photo-wrap:has(.product-logo) { background: #fff; border-right: 1px solid rgba(12, 40, 80, 0.06); }

/* v48: bulk select */
.category-row-check { width: 1rem; height: 1rem; flex: 0 0 auto; margin-right: 0.25rem; accent-color: #168f8d; cursor: pointer; }
.bulk-bar input[type="checkbox"], td > input[type="checkbox"] { accent-color: #168f8d; width: 1rem; height: 1rem; }
.bulk-bar [data-bulk-submit]:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* v49: refund approvals */
.refund-box { margin-top: 0.5rem; border-radius: 0.75rem; border: 1px solid #fcd34d; background: #fffbeb; padding: 0.6rem 0.75rem; }
.order-status-label.order-status-refund, .order-status-refund .order-status-label { background: #fef3c7; color: #92400e; }
.order-card.order-status-refund { border-color: #fcd34d; }
.product-processing { color: #b45309; font-weight: 600; }

/* v51: order history table, detail popup, floating bottom nav */
.history-card { background: #fff; border: 1px solid rgba(12, 40, 80, 0.08); border-radius: 1.1rem; box-shadow: 0 10px 30px -18px rgba(12, 40, 80, 0.35); overflow: hidden; }
.history-head { padding: 1.1rem 1.1rem 0.9rem; border-bottom: 1px solid rgba(12, 40, 80, 0.07); }
.history-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: #0c2850; }
.history-title span { font-weight: 700; color: rgba(12, 40, 80, 0.55); }
.history-crumbs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.3rem; font-size: 0.82rem; color: rgba(12, 40, 80, 0.55); }
.history-crumbs a:hover { color: #168f8d; }
.history-search { position: relative; margin-top: 0.8rem; }
.history-search input { padding-left: 2.4rem; }
.history-search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: rgba(12, 40, 80, 0.4); pointer-events: none; }
.history-live { margin: 0.75rem 1.1rem 0; }
.history-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.history-table { width: 100%; min-width: 58rem; border-collapse: collapse; font-size: 0.86rem; }
.history-table th { position: sticky; top: 0; background: #f8fafc; text-align: left; padding: 0.75rem 0.9rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #0c2850; border-bottom: 1px solid rgba(12, 40, 80, 0.08); white-space: nowrap; }
.history-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid rgba(12, 40, 80, 0.06); vertical-align: middle; }
.history-table tbody tr { cursor: pointer; transition: background 0.12s ease; }
.history-table tbody tr:hover, .history-table tbody tr:focus { background: rgba(22, 143, 141, 0.06); outline: none; }
.history-id { font-weight: 700; color: #0c2850; white-space: nowrap; }
.history-type { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; color: rgba(12, 40, 80, 0.7); }
.history-name { max-width: 20rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-fields { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(12, 40, 80, 0.65); }
.history-status { display: inline-flex; align-items: center; justify-content: center; min-width: 6.5rem; padding: 0.38rem 0.7rem; border-radius: 0.45rem; font-size: 0.78rem; font-weight: 700; color: #fff; background: #64748b; white-space: nowrap; }
.history-status.is-done, .history-status.is-active { background: #16a34a; }
.history-status.is-waiting { background: #f59e0b; }
.history-status.is-refund { background: #ea580c; }
.history-status.is-closed { background: #dc2626; }
.history-status.is-refunded { background: #0ea5e9; }
.history-status.is-expired { background: #94a3b8; }
.order-detail { padding: 0 !important; overflow: hidden; max-width: 30rem; }
.od-head { background: linear-gradient(135deg, #0c2850 0%, #12305e 55%, #168f8d 140%); color: #fff; padding: 1.1rem 1.25rem 1.2rem; }
.od-head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 0.85rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.od-id { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.od-close { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); cursor: pointer; }
.od-close svg { width: 1rem; height: 1rem; }
.od-name { margin-top: 0.85rem; font-size: 1.12rem; font-weight: 600; line-height: 1.35; }
.od-body { padding: 1.1rem 1.25rem 1.3rem; max-height: 65vh; overflow-y: auto; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.od-grid > div { padding: 0.7rem 0; border-bottom: 1px solid rgba(12, 40, 80, 0.08); }
.od-grid dt, .od-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(12, 40, 80, 0.5); }
.od-grid dd { margin-top: 0.2rem; font-size: 0.98rem; font-weight: 600; color: #0c2850; }
.od-block { margin-top: 0.9rem; }
.od-label-row { display: flex; align-items: center; justify-content: space-between; }
.od-copy { font-size: 0.8rem; font-weight: 700; color: #168f8d; }
.od-result { margin-top: 0.4rem; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 0.92rem; background: #f1f5f9; border-radius: 0.7rem; padding: 0.85rem 0.95rem; color: #0c2850; }
.od-text { margin-top: 0.25rem; font-size: 0.9rem; color: rgba(12, 40, 80, 0.8); word-break: break-word; }
.od-note { margin-top: 0.3rem; font-size: 0.88rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 0.6rem; padding: 0.6rem 0.75rem; color: #78350f; }
.od-ends { margin-top: 0.4rem; font-size: 0.8rem; color: rgba(12, 40, 80, 0.55); }

.bottom-nav { display: none; }
@media (max-width: 1023px) {
    .bottom-nav {
        display: grid; grid-template-columns: repeat(4, 1fr);
        position: fixed; z-index: 40; left: 0.75rem; right: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom));
        max-width: 32rem; margin: 0 auto;
        background: linear-gradient(135deg, #0c2850, #12305e);
        border-radius: 1.1rem; padding: 0.45rem 0.35rem;
        box-shadow: 0 14px 30px -10px rgba(12, 40, 80, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    }
    .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.35rem 0.2rem; border-radius: 0.8rem; color: rgba(255, 255, 255, 0.62); font-size: 0.7rem; font-weight: 600; }
    .bottom-nav a svg { width: 1.35rem; height: 1.35rem; }
    .bottom-nav a.is-active { color: #fff; background: rgba(22, 143, 141, 0.35); }
    .bottom-nav a.is-active svg { color: #7fdcd6; }
    .page-shell { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* v52: rental quantity stepper */
.rent-qty { display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.qty-stepper { display: inline-flex; align-items: stretch; width: max-content; border: 1px solid rgba(12, 40, 80, 0.15); border-radius: 0.75rem; overflow: hidden; background: #fff; }
.qty-stepper button { width: 2.6rem; font-size: 1.2rem; font-weight: 700; color: #0c2850; background: #f1f5f9; }
.qty-stepper button:hover { background: #e2e8f0; }
.qty-stepper input { width: 3.6rem; text-align: center; border: 0; font-size: 1rem; font-weight: 700; color: #0c2850; outline: none; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rent-qty-hint { font-size: 0.75rem; font-weight: 400; color: rgba(12, 40, 80, 0.55); }
.rent-fields label.rent-qty { display: grid !important; grid-template-columns: 1fr; gap: 0.4rem; align-items: start; }

/* Product instructions in the order popup */
.od-guide { margin-top: 1rem; padding: 0.9rem 0.95rem 1rem; border-radius: 0.8rem; background: #f0faf9; border: 1px solid rgba(22, 143, 141, 0.22); }
.od-guide-media { margin-top: 0.55rem; display: grid; gap: 0.6rem; }
.od-guide-media > img, .od-guide-media > video { display: block; width: 100%; max-height: 22rem; object-fit: contain; border-radius: 0.6rem; background: #0c2850; }
.od-guide-media > img { background: #fff; }
.od-guide-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 0.6rem; overflow: hidden; background: #0c2850; }
.od-guide-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.od-guide-text { margin-top: 0.55rem; font-size: 0.9rem; line-height: 1.55; color: #0c2850; white-space: pre-wrap; word-break: break-word; }
.od-guide-text a { color: #168f8d; font-weight: 600; text-decoration: underline; }
.od-guide-links { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.od-guide-link { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.5rem 1rem; border-radius: 999px; background: #168f8d; color: #fff; font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.od-guide-link:hover { background: #127a78; }
.guide-admin { margin-top: 0.5rem; padding: 1rem; border: 1px dashed rgba(12, 40, 80, 0.18); border-radius: 0.9rem; }
.guide-admin legend { padding: 0 0.35rem; }
.guide-admin-media { margin-top: 0.75rem; }
.guide-admin-media img, .guide-admin-media video { display: block; width: 100%; max-height: 14rem; object-fit: contain; border-radius: 0.6rem; background: #f1f5f9; }

/* Instructions under the Place order button (shop popup), like a product page */
.rent-guide { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid rgba(12, 40, 80, 0.1); }
.rent-guide .od-guide-text { margin-top: 0.45rem; }
.rent-guide .od-guide-media { margin-top: 0.8rem; }
.od-guide-text strong { font-weight: 800; }
.od-guide .od-guide-media { margin-top: 0.75rem; }

/* Instruction gallery (shop popup and Order history) */
.gal { position: relative; border-radius: 0.75rem; overflow: hidden; background: #0c2850; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #f1f5f9; }
.gal-slide.is-video { background: #0b1220; }
.gal-slide img, .gal-slide video { display: block; width: 100%; height: 100%; object-fit: contain; }
.gal-slide.is-zoomable { cursor: zoom-in; }
.gal-count { position: absolute; top: 0.55rem; right: 0.55rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: rgba(12, 40, 80, 0.72); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; pointer-events: none; }
.gal-dots { position: absolute; left: 0; right: 0; bottom: 0.5rem; display: flex; justify-content: center; gap: 0.35rem; pointer-events: none; }
.gal-dots button { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px rgba(12, 40, 80, 0.25); pointer-events: auto; transition: width 0.2s, background 0.2s; }
.gal-dots button.is-on { width: 1.1rem; background: #fff; }
.gal-slide.is-video ~ .gal-dots, .gal:has(.gal-slide.is-video) .gal-dots { bottom: 3.1rem; }
.od-guide-media .gal { width: 100%; }

/* Full-screen viewer */
html.gal-open, html.gal-open body { overflow: hidden; }
.gal-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 12, 26, 0.985); display: flex; align-items: center; justify-content: center; animation: gal-in 0.18s ease-out; }
@keyframes gal-in { from { opacity: 0; } to { opacity: 1; } }
.gal-lightbox .gal { width: 100%; height: 100%; border-radius: 0; background: transparent; }
.gal-lightbox .gal-track { height: 100%; }
.gal-lightbox .gal-slide { aspect-ratio: auto; height: 100%; background: transparent; padding: 3.5rem 0.75rem 3rem; }
.gal-lightbox .gal-slide img, .gal-lightbox .gal-slide video { max-height: 100%; }
.gal-lightbox .gal-count { top: calc(1rem + env(safe-area-inset-top)); left: 1rem; right: auto; background: rgba(255, 255, 255, 0.14); }
.gal-lightbox .gal-dots { bottom: calc(1.1rem + env(safe-area-inset-bottom)); }

/* Admin: instructions gallery editor */
.guide-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.guide-clear { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid #fecaca; background: #fff1f2; color: #be123c; font-size: 0.8rem; font-weight: 700; }
.guide-clear svg { width: 0.85rem; height: 0.85rem; }
.guide-clear:hover { background: #ffe4e6; }
.gtiles { margin-top: 0.6rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: 0.55rem; }
.gtile { position: relative; aspect-ratio: 1; border-radius: 0.7rem; overflow: hidden; background: #f1f5f9; border: 1px solid rgba(12, 40, 80, 0.1); }
.gtile > img, .gtile > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gtile.is-new { outline: 2px solid #168f8d; outline-offset: -2px; }
.gtile-num { position: absolute; top: 0.3rem; left: 0.3rem; min-width: 1.3rem; height: 1.3rem; padding: 0 0.3rem; border-radius: 999px; background: rgba(12, 40, 80, 0.78); color: #fff; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.gtile-new { position: absolute; top: 0.3rem; right: 0.3rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: #168f8d; color: #fff; font-size: 0.65rem; font-weight: 700; }
.gtile-play { position: absolute; inset: 0; margin: auto; width: 2rem; height: 2rem; border-radius: 999px; background: rgba(12, 40, 80, 0.7); pointer-events: none; }
.gtile-play::after { content: ""; position: absolute; left: 0.8rem; top: 0.6rem; border-left: 0.65rem solid #fff; border-top: 0.4rem solid transparent; border-bottom: 0.4rem solid transparent; }
.gtile-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 0.2rem; padding: 0.25rem; background: linear-gradient(transparent, rgba(12, 40, 80, 0.7)); }
.gtile-tools button { width: 1.6rem; height: 1.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #0c2850; font-size: 1rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; }
.gtile-tools .gtile-del { margin-left: auto; background: #e11d48; color: #fff; }
.gtile-tools .gtile-del svg { width: 0.8rem; height: 0.8rem; }
.gtile-add { border: 2px dashed rgba(22, 143, 141, 0.45); background: #f0faf9; }
.gtile-add label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; color: #168f8d; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.gtile-add .gtile-plus { font-size: 1.7rem; line-height: 1; font-weight: 400; }
.gtile-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gtile-add[hidden] { display: none; }
.gtile-add:hover { background: #e3f6f4; }

/* Gallery prev / next buttons: only built when there are 2 or more pictures or videos */
.gal-nav { position: absolute; top: 50%; z-index: 2; width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.9); color: #0c2850; border: 1px solid rgba(12, 40, 80, 0.08);
    box-shadow: 0 6px 18px rgba(12, 40, 80, 0.24); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: opacity 0.2s ease, transform 0.15s ease, background 0.15s ease; -webkit-tap-highlight-color: transparent; }
.gal-nav svg { display: block; }
.gal-nav.is-prev { left: 0.6rem; }
.gal-nav.is-next { right: 0.6rem; }
.gal-nav:hover { background: #fff; }
.gal-nav:active { transform: scale(0.9); }
.gal-nav:focus-visible { outline: 3px solid rgba(22, 143, 141, 0.55); outline-offset: 2px; }
.gal-nav:disabled { opacity: 0; pointer-events: none; transform: scale(0.8); }
.gal-lightbox .gal-nav { width: 3rem; height: 3rem; margin-top: -1.5rem; background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.18); box-shadow: none; }
.gal-lightbox .gal-nav:hover { background: rgba(255, 255, 255, 0.26); }
.gal-lightbox .gal-nav.is-prev { left: 0.85rem; }
.gal-lightbox .gal-nav.is-next { right: 0.85rem; }
.gal-close { position: absolute; top: calc(0.75rem + env(safe-area-inset-top)); right: 0.75rem; z-index: 3; width: 2.75rem; height: 2.75rem; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); transition: background 0.15s; }
.gal-close:hover { background: rgba(255, 255, 255, 0.26); }
@media (min-width: 640px) { .gal-lightbox .gal-nav { width: 3.4rem; height: 3.4rem; margin-top: -1.7rem; } .gal-lightbox .gal-nav.is-prev { left: 1.5rem; } .gal-lightbox .gal-nav.is-next { right: 1.5rem; } }

/* Admin orders: clickable rows and the order popup */
.admin-orders-scroll { margin-top: 0.6rem; }
.admin-orders-table { min-width: 68rem; }
.admin-orders-table tbody tr.needs-action { box-shadow: inset 3px 0 0 #f59e0b; }
.admin-cust span { display: block; font-weight: 600; color: #0c2850; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-cust small { display: block; font-size: 0.74rem; color: rgba(12, 40, 80, 0.5); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-flag { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: #ffedd5; color: #c2410c; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.admin-flag.is-wait { background: #fef3c7; color: #b45309; }
.admin-unpaid { display: block; font-size: 0.7rem; color: #b45309; font-weight: 600; }
.admin-order-modal { padding: 0; width: min(36rem, calc(100vw - 1.5rem)); max-height: min(90vh, 52rem); display: flex; flex-direction: column; overflow: hidden; }
.admin-order-modal > div { display: flex; flex-direction: column; min-height: 0; }
.admin-order-modal .od-body { max-height: none; flex: 1; overflow-y: auto; }
.od-grid .od-wide { grid-column: 1 / -1; }
.od-sub { display: block; font-size: 0.78rem; font-weight: 500; color: rgba(12, 40, 80, 0.55); word-break: break-all; }
.od-link { color: #168f8d; text-decoration: underline; }
.od-fields { margin-top: 0.35rem; border-radius: 0.7rem; background: #f1f5f9; padding: 0.3rem 0.85rem; }
.od-fields > div { display: grid; grid-template-columns: minmax(6rem, 34%) 1fr; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(12, 40, 80, 0.07); align-items: center; }
.od-fields > div:last-child { border-bottom: 0; }
.od-fields dt { font-size: 0.78rem; color: rgba(12, 40, 80, 0.55); }
.od-fields dd { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: #0c2850; word-break: break-all; }
.od-fields dd .ui-button, .od-fields dd button { flex-shrink: 0; }
.od-actions { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgba(12, 40, 80, 0.1); }
.od-actions:not(:has(form, details, .refund-box, .order-system)) { display: none; }
.od-actions .order-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.od-actions .order-system { margin-top: 0.5rem; font-size: 0.82rem; color: rgba(12, 40, 80, 0.65); }
.od-actions .refund-box { margin-top: 0.5rem; }
.od-actions form.order-actions .order-field { flex: 1 1 9rem; }
.od-note-form { padding-top: 0.9rem; border-top: 1px solid rgba(12, 40, 80, 0.1); }
.od-note-row { margin-top: 0.4rem; display: flex; gap: 0.5rem; }
.od-note-row input { flex: 1; }
.admin-orders-table td { white-space: nowrap; }
.admin-orders-table td.history-name, .admin-orders-table td.history-fields { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Income by source */
.income-tab-count { margin-left: .35rem; display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: rgb(0 0 0 / .07); font-size: .72rem; font-variant-numeric: tabular-nums; text-align: center; }
.filter-tabs .is-active .income-tab-count { background: rgb(255 255 255 / .22); }
.income-source { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; white-space: nowrap; background: #eef0f3; color: #4b5563; }
.income-source::before { content: ""; width: .42rem; height: .42rem; border-radius: 999px; background: currentColor; }
.income-source.is-own { background: #e7f6ee; color: #0f7a46; }
.income-source.is-supplier { background: #eaf1fd; color: #2456b8; }
.income-split { border: 1px solid rgb(0 0 0 / .08); border-radius: 1rem; background: var(--card, #fff); padding: 1rem; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.income-split-bar { display: flex; height: .6rem; margin-top: .65rem; border-radius: 999px; overflow: hidden; background: #eef0f3; }
.income-split-bar span { display: block; height: 100%; transition: width .3s ease; }
.income-split-bar .is-own, .income-split-legend i.is-own { background: #16a34a; }
.income-split-bar .is-supplier, .income-split-legend i.is-supplier { background: #3b82f6; }
.income-split-legend { display: grid; gap: .5rem; margin-top: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.income-split-legend a { display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; align-items: center; padding: .55rem .7rem; border-radius: .75rem; background: rgb(0 0 0 / .025); text-decoration: none; color: inherit; }
.income-split-legend a:hover { background: rgb(0 0 0 / .05); }
.income-split-legend i { width: .6rem; height: .6rem; border-radius: 999px; grid-row: span 4; align-self: start; margin-top: .3rem; }
.income-split-legend span { font-size: .8rem; color: rgb(0 0 0 / .6); }
.income-split-legend b { font-size: 1.15rem; }
.income-split-legend small { font-size: .72rem; color: rgb(0 0 0 / .5); }
.dash-income-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .7rem; }
.dash-income-src { display: flex; flex-direction: column; padding: .5rem .6rem; border-radius: .7rem; border-left: 3px solid #16a34a; background: rgb(22 163 74 / .06); min-width: 0; }
.dash-income-src.is-supplier { border-left-color: #3b82f6; background: rgb(59 130 246 / .07); }
.dash-income-src small { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: rgb(0 0 0 / .5); }
.dash-income-src b { font-size: 1.05rem; margin-top: .1rem; }
.dash-income-src em { font-style: normal; font-size: .7rem; color: rgb(0 0 0 / .55); }

/* Shop sections editor (Settings → Shop content) */
.ss-form { display: flex; flex-direction: column; gap: 1rem; }
.ss-list { display: flex; flex-direction: column; gap: .75rem; }
.ss-card { border: 1px solid rgb(0 0 0 / .09); border-radius: 1rem; padding: .75rem; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .03); }
.ss-card.is-new { border-style: dashed; border-color: rgb(180 132 60 / .55); }
.ss-head { display: flex; align-items: center; gap: .5rem; }
.ss-order { display: flex; flex-direction: column; gap: 2px; }
.ss-order button { display: grid; place-items: center; width: 1.7rem; height: 1.15rem; border-radius: .4rem; color: rgb(0 0 0 / .55); }
.ss-order button:hover:not(:disabled) { background: rgb(0 0 0 / .06); color: #000; }
.ss-order button:disabled { opacity: .25; }
.ss-order svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ss-head .ss-name { flex: 1; min-width: 0; font-weight: 600; margin: 0; }
.ss-count { flex-shrink: 0; font-size: .72rem; color: rgb(0 0 0 / .55); background: rgb(0 0 0 / .05); padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.ss-del { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; color: rgb(0 0 0 / .45); flex-shrink: 0; }
.ss-del:hover:not(:disabled) { background: #fee2e2; color: #b91c1c; }
.ss-del:disabled { opacity: .25; }
.ss-del svg { width: 1.05rem; height: 1.05rem; }
.ss-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; max-height: 15rem; overflow: auto; padding: 1px; }
.ss-chip { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .2rem .25rem .2rem .25rem; border-radius: .6rem; background: rgb(0 0 0 / .04); border: 1px solid rgb(0 0 0 / .06); font-size: .78rem; }
.ss-chip img { width: 1.35rem; height: 1.35rem; border-radius: .35rem; object-fit: cover; flex-shrink: 0; background: #fff; }
.ss-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }
.ss-chip em { font-style: normal; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: #92400e; background: #fef3c7; padding: 0 .3rem; border-radius: .3rem; }
.ss-chip.is-off { opacity: .7; }
.ss-chip button { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: .35rem; color: rgb(0 0 0 / .45); font-size: .95rem; line-height: 1; }
.ss-chip button:hover:not(:disabled) { background: rgb(0 0 0 / .08); color: #000; }
.ss-chip button:disabled { visibility: hidden; width: 0; }
.ss-chip .ss-chip-x:hover { background: #fee2e2; color: #b91c1c; }
.ss-empty { font-size: .8rem; color: rgb(0 0 0 / .5); padding: .3rem .1rem; }
.ss-tools { display: flex; gap: .5rem; margin-top: .65rem; }
.ss-pick, .ss-sort, .ss-new { font-size: .82rem; font-weight: 600; border-radius: .65rem; padding: .45rem .75rem; }
.ss-pick { background: rgb(180 132 60 / .12); color: #8a5a17; }
.ss-pick:hover { background: rgb(180 132 60 / .2); }
.ss-sort { color: rgb(0 0 0 / .55); }
.ss-sort:hover { background: rgb(0 0 0 / .05); color: #000; }
.ss-new { align-self: flex-start; border: 1px dashed rgb(0 0 0 / .2); color: rgb(0 0 0 / .65); }
.ss-new:hover { border-color: rgb(180 132 60 / .7); color: #8a5a17; }
.ss-unassigned { font-size: .8rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: .75rem; padding: .55rem .75rem; }
.popup-card.ss-picker { width: min(40rem, calc(100vw - 1.5rem)); max-height: min(90vh, 46rem); display: flex; flex-direction: column; gap: .65rem; overflow: hidden; }
.ss-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.ss-search { position: relative; display: block; }
.ss-search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: rgb(0 0 0 / .4); pointer-events: none; }
.ss-search input { padding-left: 2.3rem; margin: 0; }
.ss-filters { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: 2px; }
.ss-filters button { flex-shrink: 0; font-size: .76rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; background: rgb(0 0 0 / .05); color: rgb(0 0 0 / .65); }
.ss-filters button.is-on { background: #111827; color: #fff; }
.ss-bulk { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .76rem; color: rgb(0 0 0 / .55); }
.ss-bulk button { font-weight: 600; color: #8a5a17; padding: .15rem .4rem; border-radius: .4rem; }
.ss-bulk button:hover { background: rgb(180 132 60 / .12); }
.ss-rows { flex: 1; min-height: 8rem; overflow: auto; border: 1px solid rgb(0 0 0 / .07); border-radius: .8rem; }
.ss-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-top: 1px solid rgb(0 0 0 / .05); cursor: pointer; }
.ss-row:first-child { border-top: 0; }
.ss-row:hover { background: rgb(0 0 0 / .02); }
.ss-row.is-on { background: rgb(180 132 60 / .08); }
.ss-row input { width: 1.05rem; height: 1.05rem; accent-color: #b4843c; flex-shrink: 0; }
.ss-row img { width: 2rem; height: 2rem; border-radius: .5rem; object-fit: cover; flex-shrink: 0; background: #f3f4f6; }
.ss-row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ss-row-text b { font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-row-text small { font-size: .72rem; color: rgb(0 0 0 / .5); }
.ss-row-in { flex-shrink: 0; font-size: .68rem; color: #2456b8; background: #eaf1fd; padding: .1rem .45rem; border-radius: 999px; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-picker-foot { display: flex; justify-content: flex-end; gap: .5rem; }
@media (max-width: 640px) {
  .ss-chip-name { max-width: 10rem; }
  .ss-row-in { display: none; }
}
.prod-section { display: inline-block; margin-left: .25rem; padding: .05rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 600; vertical-align: middle; background: rgb(180 132 60 / .13); color: #8a5a17; }
.prod-section.is-none { background: #fef3c7; color: #92400e; }
.prod-section.is-pool { background: #e7f6ee; color: #0f7a46; }
.tidy-card { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 1rem; border: 1px solid rgb(180 132 60 / .35); background: linear-gradient(135deg, rgb(180 132 60 / .09), rgb(180 132 60 / .02)); }
.tidy-copy { flex: 1 1 22rem; display: flex; flex-direction: column; gap: .4rem; }
.tidy-kicker { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: #8a5a17; }
.tidy-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0; }
.tidy-stats li { font-size: .76rem; padding: .25rem .6rem; border-radius: 999px; background: #fff; border: 1px solid rgb(0 0 0 / .07); color: rgb(0 0 0 / .65); }
.tidy-stats b { color: #111827; }
@media (hover: hover) and (pointer: fine) {
  .ss-chip .ss-chip-move { width: 0; overflow: hidden; opacity: 0; transition: opacity .15s; }
  .ss-chip:hover .ss-chip-move:not(:disabled), .ss-chip:focus-within .ss-chip-move:not(:disabled) { width: 1.25rem; opacity: 1; }
}
@media (max-width: 640px) {
  .ss-head { flex-wrap: wrap; }
  .ss-head .ss-name { flex-basis: calc(100% - 5rem); }
  .ss-count { order: 5; margin-left: 2.2rem; }
}
.income-profit { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; margin-top: .6rem; padding-top: .55rem; border-top: 1px dashed rgb(0 0 0 / .1); font-size: .74rem; color: rgb(0 0 0 / .55); }
.income-profit b { color: #047857; font-weight: 700; }
.income-profit span:first-child b { color: rgb(0 0 0 / .7); font-weight: 600; }
.income-profit b.is-loss, .income-split-legend b.is-loss { color: #be123c; }
.income-split-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; }
.income-split-legend small b { font-size: .78rem; color: #047857; }

/* Shop search stays in view while scrolling */
.catalog-bar {
    position: sticky;
    top: var(--site-bar-h, 4rem);
    z-index: 25;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.catalog-bar.is-stuck {
    box-shadow: 0 10px 28px rgba(12, 40, 80, 0.14);
    border-color: rgba(12, 40, 80, 0.12);
}
.catalog-group { scroll-margin-top: calc(var(--site-bar-h, 4rem) + var(--catalog-bar-h, 4rem) + 1rem); }
@media (max-width: 640px) {
    .catalog-bar { padding: 0.5rem 0.55rem; gap: 0.45rem; }
    .catalog-bar .catalog-search { flex-basis: 100%; }
    .catalog-bar .catalog-sections {
        flex-wrap: nowrap; overflow-x: auto; width: 100%;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .catalog-bar .catalog-sections::-webkit-scrollbar { display: none; }
    .catalog-bar .catalog-sections button { flex-shrink: 0; }
}
/* Pinned: flush under the top bar, so nothing shows between them. */
.catalog-bar.is-stuck { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: transparent; }
/* Shop: the search card sits close under the top bar. */
main:has(.catalog-bar) { padding-top: 0.6rem; }
.catalog-bar.catalog-panel { margin-top: 0; }
/* Pinned: the search card stretches edge to edge under the top bar, like part of it. */
.catalog-bar.is-stuck {
    border-radius: 0;
    border-color: transparent !important;
    background: #fff;
    box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax rgba(15, 23, 42, 0.1);
    clip-path: inset(0 -100vmax -1px);
}
/* The search band is always full width with a thin outline above and below. */
.catalog-bar.catalog-panel {
    border-radius: 0;
    border-color: transparent !important;
    background: #fff;
    box-shadow: 0 0 0 100vmax #fff, 0 -1px 0 100vmax rgba(15, 23, 42, 0.18), 0 1px 0 100vmax rgba(15, 23, 42, 0.18);
    clip-path: inset(-1px -100vmax -1px);
}
.catalog-bar.catalog-panel.is-stuck {
    box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax rgba(15, 23, 42, 0.18);
    clip-path: inset(0 -100vmax -1px);
}
/* When the search band is the first thing on the page, it sits right under the top bar. */
main > .catalog-bar.catalog-panel:first-child,
main > [data-bar-sentinel]:first-child + .catalog-bar.catalog-panel {
    margin-top: -0.6rem;
    box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax rgba(15, 23, 42, 0.18);
    clip-path: inset(0 -100vmax -1px);
}

/* v71: customer first name in the top bar */
.nav-first-name {
    display: inline-flex; align-items: center; gap: 0.35rem; max-width: 9.5rem;
    padding: 0.42rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-strong, rgba(15, 23, 42, 0.12)); background: #fff;
    color: #0c2850; font-size: 0.86rem; font-weight: 700; white-space: nowrap;
}
.nav-first-name span { overflow: hidden; text-overflow: ellipsis; }
.nav-first-name .ui-icon { width: 1rem; height: 1rem; flex: none; }
.nav-first-name:hover { background: #f1f5f9; }
@media (max-width: 380px) { .nav-first-name { max-width: 6.5rem; padding: 0.42rem 0.55rem; } .nav-first-name .ui-icon { display: none; } }

/* v71: contact cards and floating message button */
.chat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.chat-list-page { margin-top: 1rem; max-width: 26rem; }
.chat-item {
    display: flex; align-items: center; gap: 0.85rem; min-height: 3.6rem;
    padding: 0.5rem 1.1rem 0.5rem 0.5rem; border-radius: 1rem; background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 8px 22px -12px rgba(15, 23, 42, 0.35);
    color: #0f172a; font-weight: 700; font-size: 1rem; text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-item:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(15, 23, 42, 0.45); }
.chat-item:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.chat-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-badge {
    flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.8rem;
    color: #fff; background: #0c2850; overflow: hidden;
}
.chat-badge svg { width: 1.35rem; height: 1.35rem; }
.chat-badge.has-image { background: #f1f5f9; }
.chat-badge.has-image img { width: 100%; height: 100%; object-fit: cover; }
.chat-badge.is-phone { background: #10b981; }
.chat-badge.is-email { background: #334155; }
.chat-badge.is-whatsapp { background: #22c55e; }
.chat-badge.is-telegram { background: #0ea5e9; }
.chat-badge.is-messenger { background: #0866ff; }
.chat-badge.is-viber { background: #7360f2; }
.chat-badge.is-zalo { background: #2563eb; }

.chat-fab {
    position: fixed; z-index: 45; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; pointer-events: none;
}
.chat-fab > * { pointer-events: auto; }
.chat-fab-button {
    display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 1.1rem; border: 0; cursor: pointer;
    color: #fff; background: #0f172a; box-shadow: 0 14px 28px -10px rgba(15, 23, 42, 0.6);
    transition: background 0.2s ease, transform 0.15s ease;
}
.chat-fab-button:hover { transform: translateY(-1px); }
.chat-fab-button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.chat-fab-button svg { width: 1.6rem; height: 1.6rem; }
.chat-fab-close { display: none; }
.chat-fab.is-open .chat-fab-button { background: #075985; }
.chat-fab.is-open .chat-fab-open { display: none; }
.chat-fab.is-open .chat-fab-close { display: grid; }
.chat-fab-list { width: min(19rem, calc(100vw - 2rem)); max-height: calc(100vh - 12rem); overflow-y: auto; padding: 0.25rem; }
.chat-fab-list[hidden] { display: none; }
.chat-fab-list li { opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.16s ease, transform 0.16s ease; transition-delay: calc(var(--i, 0) * 30ms); }
.chat-fab.is-open .chat-fab-list li { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .chat-fab-list li { transition: none; } }
@media (max-width: 1023px) {
    /* sit above the floating bottom menu on phones */
    body:has(.bottom-nav) .chat-fab { bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
    .chat-fab-button { width: 3.3rem; height: 3.3rem; border-radius: 1rem; }
}
@media print { .chat-fab { display: none; } }

/* v71: contacts editor */
.cc-rows { display: grid; gap: 0.75rem; }
.cc-row { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; padding: 0.85rem; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 1rem; background: #f8fafc; }
.cc-preview { grid-column: 1 / -1; max-width: 19rem; }
.cc-preview .chat-item { pointer-events: none; box-shadow: none; }
.cc-fields { display: grid; gap: 0.6rem; min-width: 0; }
@media (min-width: 768px) { .cc-fields { grid-template-columns: 1fr 1.4fr; } .cc-image { grid-column: 1 / -1; } }
.cc-actions { display: flex; flex-direction: column; gap: 0.35rem; }
.cc-btn { width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; border: 1px solid rgba(15, 23, 42, 0.12); background: #fff; font-weight: 700; color: #0c2850; }
.cc-btn:hover { background: #f1f5f9; }
.cc-btn.is-danger { color: #be123c; }
.cc-btn.is-danger:hover { background: #fff1f2; }

/* v71: search band lines up with the product cards; even control sizes */
.catalog-bar.catalog-panel { padding: 0.6rem 0; gap: 0.55rem 0.9rem; }
.catalog-bar .catalog-search input { height: 2.75rem; padding-top: 0; padding-bottom: 0; border-radius: 0.85rem; font-size: 15px; }
.catalog-bar .catalog-sections { gap: 0.4rem; }
.catalog-bar .catalog-sections button { display: inline-flex; align-items: center; height: 2.25rem; padding: 0 0.95rem; font-size: 0.84rem; white-space: nowrap; }
@media (max-width: 640px) {
    .catalog-bar.catalog-panel { padding: 0.55rem 0 0.6rem; gap: 0.5rem; }
    .catalog-bar .catalog-search input { height: 2.6rem; }
    .catalog-bar .catalog-sections button { height: 2.1rem; padding: 0 0.85rem; font-size: 0.82rem; }
    /* chips scroll to the screen edge and fade out there instead of being cut */
    .catalog-bar .catalog-sections {
        width: calc(100% + 1rem); margin-right: -1rem; padding-right: 1rem;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent);
    }
}

/* v71: Shop dropdown (shop sections) in the top bar and the menu drawer */
.nav-dd { position: relative; display: inline-flex; align-items: center; }
.nav-dd > a { padding-right: 0.35rem; }
.nav-dd-toggle {
    display: grid; place-items: center; width: 1.7rem; height: 2.1rem; margin-left: -0.15rem; border: 0; background: transparent;
    border-radius: 0.6rem; color: rgba(15, 23, 42, 0.55); cursor: pointer; transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.nav-dd-toggle:hover { color: #0f172a; background: rgba(15, 23, 42, 0.04); }
.nav-dd-toggle svg { transition: transform 0.15s ease; }
.nav-dd.is-open .nav-dd-toggle svg, .nav-dd:hover .nav-dd-toggle svg { transform: rotate(180deg); }
.nav-dd-menu {
    position: absolute; top: calc(100% + 0.35rem); left: 0; z-index: 60; min-width: 14rem; max-height: min(70vh, 28rem); overflow-y: auto;
    display: grid; gap: 0.1rem; padding: 0.4rem; border-radius: 0.9rem; background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1); box-shadow: 0 18px 40px -16px rgba(12, 40, 80, 0.35);
    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
/* a small bridge so the menu stays open while the pointer moves down to it */
.nav-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -0.45rem; height: 0.45rem; }
.nav-dd.is-open .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .nav-dd:hover .nav-dd-menu { opacity: 1; visibility: visible; transform: none; } }
.top-nav .nav-dd-menu a { display: block; padding: 0.55rem 0.75rem; border-radius: 0.6rem; font-size: 0.9rem; font-weight: 600; color: #0f172a; white-space: nowrap; }
.top-nav .nav-dd-menu a:hover, .top-nav .nav-dd-menu a:focus-visible { background: var(--brand-50, #eef6f6); color: var(--brand, #0c2850); outline: none; }
.top-nav .nav-dd-menu a:first-child { color: rgba(15, 23, 42, 0.6); border-bottom: 1px solid rgba(15, 23, 42, 0.06); border-radius: 0.6rem 0.6rem 0.2rem 0.2rem; margin-bottom: 0.15rem; }

.drawer-sub { display: grid; gap: 0.05rem; margin: -0.1rem 0 0.35rem 2.35rem; padding-left: 0.6rem; border-left: 2px solid rgba(15, 23, 42, 0.08); }
.nav-drawer-links .drawer-sub a { padding: 0.45rem 0.7rem; font-size: 0.88rem; font-weight: 600; color: rgba(15, 23, 42, 0.68); min-height: 0; }
.nav-drawer-links .drawer-sub a:hover { color: #0f172a; }
/* the message button steps aside while the menu drawer is open */
body:has(#site-menu:checked) .chat-fab { display: none; }

/* v72: search card — chips the same width as the search box, more room above and below */
.catalog-bar.catalog-panel { padding: 0.9rem 0 0.95rem; }
@media (max-width: 640px) {
    .catalog-bar.catalog-panel { padding: 0.8rem 0 0.85rem; gap: 0.6rem; }
    .catalog-bar .catalog-sections { width: 100%; margin-right: 0; padding-right: 0; }
}

/* v73: the search card is a contained card again (same width as the product list), with space around it */
.catalog-bar.catalog-panel,
.catalog-bar.catalog-panel.is-stuck,
main > .catalog-bar.catalog-panel:first-child,
main > [data-bar-sentinel]:first-child + .catalog-bar.catalog-panel {
    margin-top: 1.25rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    clip-path: none;
}
main > .catalog-bar.catalog-panel:first-child,
main > [data-bar-sentinel]:first-child + .catalog-bar.catalog-panel { margin-top: 0.4rem; }
/* the space above is held by the marker before the card, so pinning starts exactly when the card reaches the top */
[data-bar-sentinel] + .catalog-bar.catalog-panel,
main > [data-bar-sentinel]:first-child + .catalog-bar.catalog-panel { margin-top: 0; }
[data-bar-sentinel] { height: 1.25rem; }
main > [data-bar-sentinel]:first-child { height: 0.4rem; }
.catalog-bar { top: calc(var(--site-bar-h, 4rem) + 0.5rem); }
.catalog-bar.catalog-panel.is-stuck { box-shadow: 0 12px 30px -10px rgba(12, 40, 80, 0.28); border-color: rgba(12, 40, 80, 0.14) !important; }
.catalog-group { scroll-margin-top: calc(var(--site-bar-h, 4rem) + var(--catalog-bar-h, 4rem) + 1.5rem); }
@media (max-width: 640px) {
    .catalog-bar.catalog-panel,
    .catalog-bar.catalog-panel.is-stuck { padding: 0.65rem 0.7rem; }
}

/* v74: two suppliers — switch, order of filling, product picks */
.supplier-num {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 1.6rem; height: 1.6rem; border-radius: 999px;
    background: var(--brand-50, #eef2ff); color: #0c2850; font-size: 0.8rem; font-weight: 800;
}
.supplier-switch { display: grid; gap: 0.6rem; margin-top: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.supplier-switch-tab {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 1rem;
    border-radius: 1rem; border: 1px solid rgba(15, 23, 42, 0.1); background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.supplier-switch-tab:hover { border-color: rgba(12, 40, 80, 0.35); }
.supplier-switch-tab.is-active { border-color: #0c2850; box-shadow: 0 0 0 3px rgba(12, 40, 80, 0.12); }
.supplier-switch-tab.is-active .supplier-num { background: #0c2850; color: #fff; }
.supplier-switch-name { display: flex; flex-direction: column; min-width: 0; }
.supplier-switch-name b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-switch-name small { font-size: 0.75rem; color: rgba(15, 23, 42, 0.55); }

.supplier-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.flow-step {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 0.2rem 0.65rem;
    font-size: 0.78rem; font-weight: 700; background: #eef2f7; color: #0f172a;
}
.flow-step.is-own { background: #ecfdf5; color: #047857; }
.flow-step.is-off { opacity: 0.55; text-decoration: line-through; }
.flow-arrow { color: rgba(15, 23, 42, 0.4); font-weight: 700; }

.order-pick { display: grid; gap: 0.6rem; margin-top: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.order-pick-card {
    position: relative; display: flex; flex-direction: column; gap: 0.4rem; cursor: pointer;
    padding: 0.8rem 0.9rem 0.8rem 2.4rem; border-radius: 0.9rem; border: 1px solid rgba(15, 23, 42, 0.12); background: #fff;
}
.order-pick-card input { position: absolute; left: 0.9rem; top: 0.95rem; accent-color: #0c2850; }
.order-pick-card:has(input:checked) { border-color: #0c2850; box-shadow: 0 0 0 3px rgba(12, 40, 80, 0.12); }
.order-pick-card small { font-size: 0.75rem; color: rgba(15, 23, 42, 0.55); }

.supplier-pick { border-top: 1px solid rgba(15, 23, 42, 0.08); padding-top: 1rem; }
.supplier-pick-box { border-radius: 0.9rem; border: 1px solid rgba(15, 23, 42, 0.1); padding: 0.8rem; background: rgba(246, 247, 251, 0.6); }
.supplier-pick-box > p:first-child { display: flex; align-items: center; gap: 0.45rem; }

.supplier-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-top: 0.3rem; }
.supplier-chip {
    display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.1rem 0.5rem 0.1rem 0.15rem;
    font-size: 0.72rem; font-weight: 600; background: #eef2f7; color: #0f172a;
}
.supplier-chip b { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border-radius: 999px; background: #0c2850; color: #fff; font-size: 0.65rem; }
.supplier-chip.is-off { opacity: 0.55; }
.bulk-order { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

.supplier-cards { display: grid; gap: 0.6rem; }
.supplier-card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; padding: 0.7rem 0; }
.supplier-card-row + .supplier-card-row { border-top: 1px solid rgba(15, 23, 42, 0.08); }

/* v75: admin list sort + live search */
.sort-pick { position: relative; display: inline-flex; align-items: center; }
.sort-pick .ui-icon { position: absolute; left: 0.75rem; width: 1rem; height: 1rem; color: rgba(15, 23, 42, 0.5); pointer-events: none; }
.sort-pick select { padding-left: 2.1rem; }
form[data-live-search].is-searching input[type=search] { background-image: linear-gradient(90deg, rgba(12, 40, 80, 0.06), rgba(12, 40, 80, 0.12), rgba(12, 40, 80, 0.06)); background-size: 200% 100%; animation: live-search 0.9s linear infinite; }
@keyframes live-search { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* v76: download / share the QR Ph code */
.fund-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; }
.fund-qr-actions .ui-icon { width: 1.1rem; height: 1.1rem; }
.fund-qr-help { margin-top: 0.7rem; font-size: 0.8rem; line-height: 1.45; color: rgba(15, 23, 42, 0.62); }

/* ==========================================================================
   v77: Admin shell and dashboard.
   Everything here is scoped to .admin-shell, so the shop and public pages
   are not affected.
   ========================================================================== */
.admin-shell {
    --adm-bg: #f4f5f8;
    --adm-surface: #ffffff;
    --adm-line: #e4e7ec;
    --adm-line-soft: #eef0f4;
    --adm-text: #0f172a;
    --adm-muted: #667085;
    --adm-faint: #98a2b3;
    --adm-brand: #0c2850;
    --adm-brand-soft: #eaf0f8;
    --adm-accent: #168f8d;
    --adm-warn: #b45309;
    --adm-warn-soft: #fff7e6;
    --adm-warn-line: #f5d490;
    --adm-radius: 0.875rem;
    --adm-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    --adm-top-h: 3.5rem;
    --adm-tab-h: 3.75rem;
    --sidebar-w: 15.5rem;
    color: var(--adm-text);
}
html:has(.admin-shell),
html:has(.admin-shell) body { background: #f4f5f8; }

/* ---------- Shared small parts ---------- */
.admin-shell .adm-icon-btn {
    position: relative;
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem;
    border: 1px solid var(--adm-line); border-radius: 0.625rem;
    background: var(--adm-surface); color: #344054;
    box-shadow: var(--adm-shadow); cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-shell .adm-icon-btn:hover { background: #f9fafb; border-color: #d0d5dd; color: var(--adm-text); }
.admin-shell .adm-icon-btn.is-plain { border-color: transparent; background: transparent; box-shadow: none; color: var(--adm-muted); }
.admin-shell .adm-icon-btn.is-plain:hover { background: rgba(15, 23, 42, 0.06); color: var(--adm-text); }
.admin-shell .adm-icon-btn .ui-icon { width: 1.25rem; height: 1.25rem; }
.admin-shell .adm-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.25rem; height: 1.25rem; padding: 0 0.4rem;
    border-radius: 999px; background: #d92d20; color: #fff;
    font-size: 0.6875rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.admin-shell .adm-badge.is-soft { background: var(--adm-line-soft); color: #475467; }
.admin-shell .avatar { background: var(--adm-brand); font-weight: 700; }
.admin-shell a:focus-visible,
.admin-shell label:focus-visible,
.admin-shell button:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.admin-shell .adm-topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--adm-line);
}
.admin-shell .adm-topbar-inner {
    display: flex; align-items: center; gap: 0.75rem;
    height: var(--adm-top-h); padding: 0 1rem;
}
.admin-shell .adm-topbar-logo { display: inline-flex; flex: 0 0 auto; line-height: 0; }
.admin-shell .adm-topbar-logo img { height: 2rem; width: auto; }
.admin-shell .adm-menu-btn { display: none; }
.admin-shell .adm-crumbs {
    display: flex; align-items: center; gap: 0.4rem; min-width: 0; margin-right: auto;
    font-size: 0.875rem; color: var(--adm-muted);
}
.admin-shell .adm-crumbs .ui-icon { width: 0.8rem; height: 0.8rem; color: var(--adm-faint); stroke-width: 2; }
.admin-shell .adm-crumb-group { display: none; }
.admin-shell .adm-crumb-group + .ui-icon { display: none; }
.admin-shell .adm-crumb-page { font-weight: 650; color: var(--adm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-topbar-tools { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }
.admin-shell .adm-clock { display: none; font-size: 0.8125rem; color: var(--adm-muted); font-variant-numeric: tabular-nums; margin-right: 0.25rem; }
.admin-shell .notice-bell .notice-badge {
    top: -0.35rem; right: -0.35rem; min-width: 1.125rem; height: 1.125rem; padding: 0 0.25rem;
    background: #d92d20; box-shadow: 0 0 0 2px #fff;
    font-size: 0.625rem; line-height: 1.125rem;
}
.admin-shell .adm-user-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    height: 2.5rem; padding: 0 0.25rem; border-radius: 999px;
    font-size: 0.875rem; font-weight: 600; color: var(--adm-text);
}
.admin-shell .adm-user-chip:hover .avatar { box-shadow: 0 0 0 3px var(--adm-brand-soft); }
.admin-shell .adm-user-chip-name { display: none; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 0.4rem; }

/* ---------- Sidebar / drawer ---------- */
.admin-shell .nav-backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.admin-shell .admin-sidebar {
    width: min(18.5rem, 86vw); padding: 0;
    background: var(--adm-surface);
    border-right: 1px solid var(--adm-line);
    box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.25);
    transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}
.admin-shell .adm-brand {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    flex: 0 0 auto; height: var(--adm-top-h); padding: 0 0.75rem 0 1rem;
    border-bottom: 1px solid var(--adm-line-soft);
}
.admin-shell .adm-brand-link { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.admin-shell .adm-brand-link img { height: 2rem; width: auto; flex: 0 0 auto; }
.admin-shell .adm-brand-link span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.admin-shell .adm-brand-link b { font-size: 0.875rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-brand-link small { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--adm-faint); }
.admin-shell .admin-sidebar .drawer-body { padding: 0.5rem 0.625rem 1rem; scrollbar-width: thin; scrollbar-color: #d0d5dd transparent; }
.admin-shell .admin-nav { gap: 1px; padding: 0; }
.admin-shell .admin-nav-label {
    margin: 0.9rem 0.625rem 0.3rem; font-size: 0.6875rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--adm-faint);
}
.admin-shell .admin-nav-label:first-child { margin-top: 0.4rem; }
.admin-shell .admin-nav-link {
    display: flex; align-items: center; gap: 0.65rem;
    min-height: 2.25rem; margin: 0; padding: 0.35rem 0.625rem;
    border-radius: 0.5rem; box-shadow: none;
    font-size: 0.875rem; font-weight: 550; color: #475467;
    transition: background 0.12s ease, color 0.12s ease;
}
.admin-shell .admin-nav-link .ui-icon { width: 1.2rem; height: 1.2rem; color: var(--adm-faint); transition: color 0.12s ease; }
.admin-shell .admin-nav-link .adm-nav-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .admin-nav-link:hover { background: #f4f5f8; color: var(--adm-text); }
.admin-shell .admin-nav-link:hover .ui-icon { color: #475467; }
.admin-shell .admin-nav-link.is-active { background: var(--adm-brand); color: #fff; font-weight: 650; box-shadow: none; }
.admin-shell .admin-nav-link.is-active .ui-icon { color: #fff; }
.admin-shell .admin-nav-link.is-active .adm-badge { background: #fff; color: var(--adm-brand); }
.admin-shell .adm-user {
    display: flex; align-items: center; gap: 0.625rem; flex: 0 0 auto;
    padding: 0.75rem 0.625rem 0.75rem 0.875rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--adm-line-soft);
}
.admin-shell .adm-user .avatar { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; }
.admin-shell .adm-user-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.admin-shell .adm-user-text b { font-size: 0.875rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-user-text small { font-size: 0.75rem; color: var(--adm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-logout:hover { background: #fef3f2; color: #b42318; }

/* ---------- Notifications ---------- */
.admin-shell .notice-backdrop { background: rgba(15, 23, 42, 0.25); backdrop-filter: none; -webkit-backdrop-filter: none; }
.admin-shell .adm-notices {
    top: calc(var(--adm-top-h) + 0.5rem); right: 0.5rem; left: 0.5rem; width: auto;
    max-height: min(32rem, calc(100vh - var(--adm-top-h) - 5.5rem));
    display: flex; flex-direction: column; overflow: hidden; padding: 0;
    border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
    box-shadow: 0 20px 40px -12px rgba(16, 24, 40, 0.25);
}
.admin-shell .adm-notices-head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 1rem; border-bottom: 1px solid var(--adm-line-soft);
}
.admin-shell .adm-notices-head h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 700; }
.admin-shell .adm-notices-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 0.375rem; list-style: none; }
.admin-shell .adm-notices-list a { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem; border-radius: 0.625rem; }
.admin-shell .adm-notices-list a:hover { background: #f4f5f8; }
.admin-shell .adm-notices-list a > .ui-icon { width: 0.9rem; height: 0.9rem; color: var(--adm-faint); stroke-width: 2; }
.admin-shell .adm-notice-icon {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: 0.625rem;
    background: var(--adm-warn-soft); color: var(--adm-warn);
}
.admin-shell .adm-notice-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.admin-shell .adm-notice-text b { font-size: 0.875rem; font-weight: 650; }
.admin-shell .adm-notice-text small { font-size: 0.8125rem; color: var(--adm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-notices-empty,
.admin-shell .adm-clear { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.75rem 1rem; text-align: center; font-size: 0.875rem; color: var(--adm-muted); }
.admin-shell .adm-notices-empty > span,
.admin-shell .adm-clear > span { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: #ecfdf3; color: #067647; }
.admin-shell .adm-notices-allow {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex: 0 0 auto;
    width: 100%; padding: 0.75rem 1rem; border-top: 1px solid var(--adm-line-soft);
    font-size: 0.8125rem; font-weight: 600; color: var(--adm-brand); background: #fafbfc;
}
.admin-shell .adm-notices-allow:hover { background: #f4f5f8; }
.admin-shell .adm-notices-allow .ui-icon { width: 1rem; height: 1rem; }

/* ---------- Phone tab bar ---------- */
.admin-shell .adm-tabbar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--adm-tab-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--adm-line);
}
.admin-shell .adm-tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
    min-width: 0; font-size: 0.6875rem; font-weight: 600; color: var(--adm-muted); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.admin-shell .adm-tab-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 1.75rem; border-radius: 999px; transition: background 0.15s ease; }
.admin-shell .adm-tab-icon .ui-icon { width: 1.35rem; height: 1.35rem; }
.admin-shell .adm-tab-icon .adm-badge { position: absolute; top: -0.25rem; left: 1.7rem; min-width: 1.1rem; height: 1.1rem; padding: 0 0.3rem; font-size: 0.625rem; border: 2px solid #fff; box-sizing: content-box; }
.admin-shell .adm-tab.is-active { color: var(--adm-brand); }
.admin-shell .adm-tab.is-active .adm-tab-icon { background: var(--adm-brand-soft); }
.admin-shell .adm-tab:active .adm-tab-icon { background: var(--adm-line-soft); }

/* ---------- Main area: shared polish for every admin page ---------- */
.admin-shell .admin-main { padding-bottom: calc(var(--adm-tab-h) + env(safe-area-inset-bottom, 0px)); }
.admin-shell .admin-main > main { max-width: 82rem !important; padding: 1.125rem 1rem 1.5rem !important; }
.admin-shell .site-footer { margin-top: 1rem; padding: 1rem; border-top: 0; font-size: 0.75rem; color: var(--adm-faint); }
.admin-shell .admin-main h1.font-display,
.admin-shell .adm-page-title { font-size: 1.375rem; line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; color: var(--adm-text); }
.admin-shell .admin-main h2.font-display { font-size: 1.0625rem; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
.admin-shell .admin-main .settings-card, .admin-shell .admin-main .panel, .admin-shell .admin-main .table-card, .admin-shell .admin-main .stat-card,
.admin-shell .admin-main .rounded-2xl.border.bg-card, .admin-shell .admin-main .rounded-xl.border.bg-card {
    border: 1px solid var(--adm-line) !important; border-radius: var(--adm-radius); box-shadow: var(--adm-shadow);
}
.admin-shell .admin-main .overflow-x-auto.rounded-xl,
.admin-shell .admin-main .table-scroll { border-radius: var(--adm-radius) !important; border-color: var(--adm-line) !important; box-shadow: var(--adm-shadow); }
.admin-shell .admin-main .card-raise:hover { transform: none; box-shadow: var(--adm-shadow); border-color: #c9ced8 !important; }
.admin-shell .admin-main .ui-input { min-height: 2.5rem; border-radius: 0.625rem; border-color: #d0d5dd; box-shadow: var(--adm-shadow); }
.admin-shell .admin-main .ui-btn { min-height: 2.5rem; border-radius: 0.625rem; }
.admin-shell .admin-main .ui-btn.\!py-1\.5 { min-height: 2rem; }
.admin-shell .admin-main .ui-btn-primary { background-image: none; box-shadow: var(--adm-shadow) !important; }
.admin-shell .admin-main .ui-btn-primary:hover { transform: none; }
.admin-shell .admin-main .ui-btn-ghost { border-color: #d0d5dd; box-shadow: var(--adm-shadow); }
.admin-shell .admin-main .orders-table th { background: #f9fafb; color: var(--adm-muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.05em; border-bottom: 1px solid var(--adm-line); }
.admin-shell .admin-main .orders-table td { border-color: var(--adm-line-soft); }
.admin-shell .admin-main .orders-table tbody tr:hover { background: #f9fafb; }
.admin-shell .admin-main .filter-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; border-radius: 0.75rem; }
.admin-shell .admin-main .filter-tabs::-webkit-scrollbar { display: none; }
.admin-shell .admin-main .filter-tabs > * { flex: 0 0 auto; }
.admin-shell .admin-main .flash { border-radius: 0.75rem; box-shadow: none; }
.admin-shell .admin-main .empty-state { border-radius: var(--adm-radius); background: var(--adm-surface); }
.admin-shell .settings-nav { top: calc(var(--adm-top-h) + 0.5rem); border-radius: 0.75rem; box-shadow: var(--adm-shadow); }

/* ---------- Dashboard ---------- */
.admin-shell .adm-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; }
.admin-shell .adm-page-sub { margin-top: 0.15rem; font-size: 0.875rem; color: var(--adm-muted); }
.admin-shell .adm-page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-shell .adm-section { margin-top: 1.125rem; }
.admin-shell .adm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.admin-shell .adm-section-head h2 { font-size: 0.9375rem; font-weight: 700; }
.admin-shell .adm-section-head a,
.admin-shell .adm-card-link { display: inline-flex; align-items: center; gap: 0.2rem; flex: 0 0 auto; font-size: 0.8125rem; font-weight: 600; color: var(--adm-brand); }
.admin-shell .adm-section-head a .ui-icon,
.admin-shell .adm-card-link .ui-icon { width: 0.8rem; height: 0.8rem; stroke-width: 2.2; }
.admin-shell .adm-section-head a:hover,
.admin-shell a.adm-card-link:hover { text-decoration: underline; }
.admin-shell .adm-grid-main { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.admin-shell .adm-stack { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.admin-shell .adm-card {
    display: block; min-width: 0; padding: 1rem;
    border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
    background: var(--adm-surface); box-shadow: var(--adm-shadow);
}
.admin-shell a.adm-card { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.admin-shell a.adm-card:hover { border-color: #c9ced8; box-shadow: 0 4px 12px -4px rgba(16, 24, 40, 0.1); }
.admin-shell .adm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.admin-shell .adm-card-head h2 { display: flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: 0.9375rem; font-weight: 700; }
.admin-shell .adm-card-head h2 > .ui-icon { color: var(--adm-faint); }
.admin-shell .adm-card-note { margin-top: 0.25rem; font-size: 0.8125rem; color: var(--adm-muted); }
.admin-shell .adm-kicker { display: block; font-size: 0.75rem; font-weight: 600; color: var(--adm-muted); }
.admin-shell .adm-muted { font-size: 0.8125rem; color: var(--adm-muted); }
.admin-shell .adm-big { margin: 0.15rem 0; font-size: 2rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.admin-shell .adm-delta { font-weight: 700; }
.admin-shell .adm-delta.is-up { color: #067647; }
.admin-shell .adm-delta.is-down, .admin-shell .adm-row-amount.is-down { color: #b42318; }

/* To-do tiles */
.admin-shell .adm-todo-grid { display: grid; gap: 0.625rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-shell .adm-todo {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.5rem 0.75rem;
    padding: 0.875rem; border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
    background: var(--adm-surface); box-shadow: var(--adm-shadow);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-shell .adm-todo:hover { border-color: #c9ced8; box-shadow: 0 4px 12px -4px rgba(16, 24, 40, 0.1); }
.admin-shell .adm-todo-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; background: var(--adm-line-soft); color: var(--adm-muted); }
.admin-shell .adm-todo-icon .ui-icon { width: 1.3rem; height: 1.3rem; }
.admin-shell .adm-todo-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.admin-shell .adm-todo-body b { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--adm-faint); }
.admin-shell .adm-todo-body span { font-size: 0.8125rem; font-weight: 550; color: var(--adm-muted); }
.admin-shell .adm-todo-go { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 0.2rem; padding-top: 0.5rem; border-top: 1px solid var(--adm-line-soft); font-size: 0.75rem; font-weight: 600; color: var(--adm-faint); }
.admin-shell .adm-todo-go .ui-icon { width: 0.75rem; height: 0.75rem; stroke-width: 2.4; }
.admin-shell .adm-todo.is-hot { border-color: var(--adm-warn-line); background: var(--adm-warn-soft); }
.admin-shell .adm-todo.is-hot .adm-todo-icon { background: #fde9b8; color: var(--adm-warn); }
.admin-shell .adm-todo.is-hot .adm-todo-body b { color: var(--adm-text); }
.admin-shell .adm-todo.is-hot .adm-todo-body span { color: #7a4a06; }
.admin-shell .adm-todo.is-hot .adm-todo-go { border-top-color: #f3dca8; color: var(--adm-warn); }

/* Income */
.admin-shell .adm-income-top { display: grid; gap: 0.875rem; margin-top: 0.875rem; }
.admin-shell .adm-income-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
.admin-shell .adm-income-periods > div { padding: 0.625rem 0.75rem; border-radius: 0.625rem; background: #f9fafb; border: 1px solid var(--adm-line-soft); min-width: 0; }
.admin-shell .adm-income-periods dt { font-size: 0.75rem; font-weight: 600; color: var(--adm-muted); }
.admin-shell .adm-income-periods dd { font-size: 1.125rem; font-weight: 750; letter-spacing: -0.01em; }
.admin-shell .adm-income-periods small { display: block; font-size: 0.75rem; color: var(--adm-muted); }
.admin-shell .adm-income .dash-income-split { margin-top: 0.875rem; gap: 0.625rem; }
.admin-shell .adm-income .dash-income-src { padding: 0.625rem 0.75rem; border-radius: 0.625rem; }
.admin-shell .adm-income .dash-income-src small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--adm-muted); }
.admin-shell .adm-income .dash-income-src em { font-size: 0.75rem; color: var(--adm-muted); }

/* Supplier wallets */
.admin-shell .adm-wallet { display: flex; align-items: center; gap: 0.75rem; }
.admin-shell .adm-wallet-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; background: var(--adm-brand-soft); color: var(--adm-brand); }
.admin-shell .adm-wallet-icon .ui-icon { width: 1.3rem; height: 1.3rem; }
.admin-shell .adm-wallet-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.admin-shell .adm-wallet-body .adm-kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-wallet-body b { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.admin-shell .adm-wallet-body b.is-off { font-size: 1rem; font-weight: 600; color: var(--adm-faint); }
.admin-shell .adm-wallet > .ui-icon { width: 0.9rem; height: 0.9rem; color: var(--adm-faint); stroke-width: 2; }

/* Account status tiles */
.admin-shell .adm-stat-grid { display: grid; gap: 0.625rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-shell .adm-stat {
    display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 0.875rem;
    border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
    background: var(--adm-surface); box-shadow: var(--adm-shadow);
    transition: border-color 0.15s ease;
}
.admin-shell .adm-stat:hover { border-color: #c9ced8; }
.admin-shell .adm-stat-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8125rem; font-weight: 600; color: var(--adm-muted); }
.admin-shell .adm-stat-label i { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--adm-faint); }
.admin-shell .adm-stat.is-green i { background: #12b76a; }
.admin-shell .adm-stat.is-blue i { background: #2e90fa; }
.admin-shell .adm-stat.is-amber i { background: #f79009; }
.admin-shell .adm-stat.is-red i { background: #f04438; }
.admin-shell .adm-stat b { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }

/* Row lists (used instead of tables so they fit a phone) */
.admin-shell .adm-rows { margin: 0.625rem -1rem -1rem; padding: 0; list-style: none; border-top: 1px solid var(--adm-line-soft); }
.admin-shell .adm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.625rem 1rem; border-bottom: 1px solid var(--adm-line-soft); }
.admin-shell .adm-row:last-child { border-bottom: 0; }
.admin-shell .adm-row-main { flex: 1 1 10rem; min-width: 0; }
.admin-shell .adm-row-title { display: block; min-width: 0; font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .adm-row-id { color: var(--adm-faint); font-weight: 550; font-variant-numeric: tabular-nums; }
.admin-shell a.adm-row-title:hover { color: var(--adm-brand); text-decoration: underline; }
.admin-shell .adm-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-top: 0.2rem; font-size: 0.75rem; color: var(--adm-muted); }
.admin-shell .adm-row-code { flex: 0 1 auto; max-width: 100%; padding: 0.2rem 0.5rem; border-radius: 0.375rem; background: #f4f5f8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: #344054; overflow-wrap: anywhere; }
.admin-shell .adm-row-actions { display: flex; flex: 0 0 auto; gap: 0.4rem; margin-left: auto; }
.admin-shell .adm-row.is-simple { flex-wrap: nowrap; }
.admin-shell .adm-row.is-simple > .adm-row-title { flex: 1 1 auto; }
.admin-shell .adm-row-amount { flex: 0 0 auto; margin-left: auto; font-size: 0.875rem; font-weight: 700; }
.admin-shell .adm-row-amount.is-muted { font-weight: 500; color: var(--adm-muted); }
.admin-shell .adm-pay .font-display { font-weight: 750; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
    .admin-shell .adm-topbar-inner { padding: 0 1.25rem; }
    .admin-shell .admin-main > main { padding: 1.5rem 1.25rem 1.5rem !important; }
    .admin-shell .adm-notices { left: auto; right: 1rem; width: 24rem; }
    .admin-shell .adm-user-chip-name { display: inline; }
    .admin-shell .adm-todo-grid,
    .admin-shell .adm-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
    .admin-shell .adm-income-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; }
    .admin-shell .admin-main h1.font-display,
    .admin-shell .adm-page-title { font-size: 1.5rem; }
}
@media (min-width: 768px) {
    .admin-shell .adm-tabbar { display: none; }
    .admin-shell .admin-main { padding-bottom: 0; }
    .admin-shell .adm-menu-btn { display: inline-flex; }
    .admin-shell .adm-topbar-logo { display: none; }
    .admin-shell .adm-clock { display: inline; }
}
@media (max-width: 767px) {
    .admin-shell .adm-page-actions { width: 100%; }
    .admin-shell .adm-page-actions > * { flex: 1 1 0; }
    .admin-shell .adm-row:not(.is-simple) .adm-row-main { flex-basis: 100%; }
    .admin-shell .adm-row-code { flex: 1 1 0; min-width: 0; }
    .admin-shell .admin-nav-link { min-height: 2.75rem; font-size: 0.9375rem; }
}

/* ---------- Phones: every list stays a table, tightened so more of it fits; the rest scrolls sideways ---------- */
@media (max-width: 639px) {
    .admin-shell .admin-main main table:not(.admin-orders-table):not(.income-table) { font-size: 0.8125rem; }
    .admin-shell .admin-main main table:not(.admin-orders-table):not(.income-table) th,
    .admin-shell .admin-main main table:not(.admin-orders-table):not(.income-table) td { padding: 0.5rem 0.6rem !important; }
    .admin-shell .admin-main main table:not(.admin-orders-table):not(.income-table) th { font-size: 0.625rem; letter-spacing: 0.04em; white-space: nowrap; }
    .admin-shell .admin-main main table .ui-btn { min-height: 1.9rem; padding: 0.3rem 0.6rem !important; font-size: 0.75rem; }
    .admin-shell .admin-main main table .ui-input { min-height: 2rem; padding: 0.25rem 0.5rem; font-size: 0.8125rem; }
    .admin-shell .admin-main main table select.ui-input { padding-right: 1.6rem; }
    .admin-shell .admin-main main table td > .flex.flex-wrap { flex-wrap: nowrap; }
    .admin-shell .admin-main main table td .mt-1 { margin-top: 0.15rem; }
}

/* ---------- Phones: the orders list stays a table, trimmed to the columns that fit.
   Tapping a row opens the order with everything else. ---------- */
@media (max-width: 639px) {
    .admin-shell .admin-orders-scroll { overflow: hidden; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: #fff; box-shadow: var(--adm-shadow); }
    .admin-shell .admin-orders-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 0.75rem; }
    .admin-shell .admin-orders-table th,
    .admin-shell .admin-orders-table td { padding: 0.55rem 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-shell .admin-orders-table th { font-size: 0.625rem; letter-spacing: 0.04em; }
    .admin-shell .admin-orders-table th:first-child,
    .admin-shell .admin-orders-table td:first-child { padding-left: 0.5rem; }
    .admin-shell .admin-orders-table th:nth-child(4), .admin-shell .admin-orders-table td:nth-child(4),
    .admin-shell .admin-orders-table th:nth-child(5), .admin-shell .admin-orders-table td:nth-child(5),
    .admin-shell .admin-orders-table th:nth-child(8), .admin-shell .admin-orders-table td:nth-child(8),
    .admin-shell .admin-orders-table th:nth-child(9), .admin-shell .admin-orders-table td:nth-child(9) { display: none; }
    .admin-shell .admin-orders-table th:nth-child(1) { width: 5.5rem; }
    .admin-shell .admin-orders-table th:nth-child(2) { width: 2.7rem; }
    .admin-shell .admin-orders-table th:nth-child(3) { width: 21%; }
    .admin-shell .admin-orders-table th:nth-child(6) { width: 3.5rem; }
    .admin-shell .admin-orders-table td:nth-child(6) { text-align: right; padding-right: 0.5rem; font-weight: 600; }
    .admin-shell .admin-orders-table th:nth-child(6) { text-align: right; padding-right: 0.5rem; }
    .admin-shell .admin-orders-table .history-status { display: flex; min-width: 0; padding: 0.28rem 0.2rem; border-radius: 0.375rem; font-size: 0.6875rem; overflow: hidden; text-overflow: ellipsis; }
    .admin-shell .admin-orders-table .admin-flag,
    .admin-shell .admin-orders-table .admin-cust small { display: none; }
    .admin-shell .admin-orders-table .admin-cust span { max-width: none; }
    .admin-shell .admin-orders-table .admin-unpaid { font-size: 0.5625rem; }
    .admin-shell .admin-orders-table td.history-name { max-width: none; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
    .admin-shell .admin-orders-table .history-status.is-refund { font-size: 0.625rem; letter-spacing: -0.01em; }
}

/* ---------- Rows that open a detail card ---------- */
.admin-shell tr.adm-row-click { cursor: pointer; transition: background 0.12s ease; }
.admin-shell tr.adm-row-click:hover,
.admin-shell tr.adm-row-click:focus-visible { background: #f9fafb; outline: none; }
.admin-shell [data-row-popup-card] .od-grid dd { overflow-wrap: anywhere; }
.admin-shell [data-row-popup-card] .od-grid dd a { text-decoration: underline; }

/* ---------- Phones: dashboard shows the account tiles first; income stays a table ---------- */
.admin-shell .adm-dash { display: flex; flex-direction: column; }
@media (max-width: 767px) {
    .admin-shell .adm-dash > .adm-sec-accounts { order: -1; }
}
@media (max-width: 639px) {
    .admin-shell .income-table { min-width: 0 !important; table-layout: fixed; font-size: 0.75rem; }
    .admin-shell .income-table th,
    .admin-shell .income-table td { padding: 0.55rem 0.3rem !important; overflow: hidden; text-overflow: ellipsis; }
    .admin-shell .income-table th { font-size: 0.625rem; letter-spacing: 0.04em; white-space: nowrap; }
    .admin-shell .income-table th:first-child,
    .admin-shell .income-table td:first-child { padding-left: 0.6rem !important; }
    .admin-shell .income-table th:last-child,
    .admin-shell .income-table td:last-child { padding-right: 0.6rem !important; }
    .admin-shell .income-table th:nth-child(3), .admin-shell .income-table td:nth-child(3):not([colspan]),
    .admin-shell .income-table th:nth-child(4), .admin-shell .income-table td:nth-child(4),
    .admin-shell .income-table th:nth-child(6), .admin-shell .income-table td:nth-child(6),
    .admin-shell .income-table th:nth-child(8), .admin-shell .income-table td:nth-child(8) { display: none; }
    .admin-shell .income-table th:nth-child(1) { width: 5rem; }
    .admin-shell .income-table td:nth-child(1):not([colspan]) { white-space: normal; line-height: 1.25; color: var(--adm-muted); }
    .admin-shell .income-table th:nth-child(2) { width: 5.4rem; }
    .admin-shell .income-table th:nth-child(7),
    .admin-shell .income-table th:nth-child(9) { width: 3.6rem; }
    .admin-shell .income-table td:nth-child(5) { white-space: nowrap; }
    .admin-shell .income-table .income-source { font-size: 0.625rem; padding: 0.1rem 0.4rem; }
}

/* ---------- Desktop: fixed sidebar ---------- */
@media (min-width: 1024px) {
    .admin-shell { padding-left: var(--sidebar-w); }
    .admin-shell .admin-sidebar {
        transform: none; width: var(--sidebar-w); z-index: 35;
        background: var(--adm-surface); box-shadow: none;
        backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .admin-shell .adm-menu-btn,
    .admin-shell .adm-drawer-close,
    .admin-shell .nav-backdrop { display: none !important; }
    .admin-shell .adm-topbar-inner { padding: 0 2rem; }
    .admin-shell .adm-crumb-group,
    .admin-shell .adm-crumb-group + .ui-icon { display: inline-flex; }
    .admin-shell .admin-main > main { padding: 1.75rem 2rem 2rem !important; }
    .admin-shell .adm-grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1rem; }
    .admin-shell .adm-stack { gap: 1rem; }
    .admin-shell .adm-section { margin-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-shell .admin-sidebar { transition: none; }
}

/* ---------- v81: daily income chart (Income page) ---------- */
.inc-chart { --inc-own: #16a34a; --inc-supplier: #3b82f6; --inc-other: #98a2b3; }
.inc-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.inc-chart-head h2 { font-size: 0.9375rem; font-weight: 700; }
.inc-chart-head p { margin-top: 0.1rem; font-size: 0.8125rem; color: #667085; }
.inc-chart-total { flex: 0 0 auto; text-align: right; line-height: 1.2; }
.inc-chart-total b { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: #0f172a; }
.inc-chart-total span { font-size: 0.75rem; color: #667085; }
.inc-chart-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0.75rem 0 0; padding: 0; list-style: none; font-size: 0.8125rem; color: #475467; }
.inc-chart-legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.inc-chart-legend i, .inc-chart-tip i { display: inline-block; flex: 0 0 auto; width: 0.625rem; height: 0.625rem; border-radius: 0.15rem; }
.inc-chart i.is-own, .inc-chart-bar .is-own { background: var(--inc-own); }
.inc-chart i.is-supplier, .inc-chart-bar .is-supplier { background: var(--inc-supplier); }
.inc-chart i.is-other, .inc-chart-bar .is-other { background: var(--inc-other); }
.inc-chart-frame { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; margin-top: 1rem; padding-top: 0.5rem; }
.inc-chart-axis { position: relative; width: 3rem; height: 11rem; font-size: 0.6875rem; color: #667085; font-variant-numeric: tabular-nums; }
.inc-chart-axis span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.inc-chart-plot { position: relative; height: 11rem; margin-bottom: 1.5rem; }
.inc-chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: #eef0f4; }
.inc-chart-grid.is-zero { background: #d0d5dd; }
.inc-chart-cols { position: absolute; inset: 0; display: flex; }
.inc-chart-col { position: relative; flex: 1 1 0; min-width: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.inc-chart-col.is-on, .inc-chart-col:focus-visible { background: rgba(15, 23, 42, 0.05); }
.inc-chart-bar { position: absolute; top: 0; bottom: 0; left: 50%; width: min(24px, calc(100% - 2px)); transform: translateX(-50%); }
.inc-chart-bar span { position: absolute; left: 0; right: 0; min-height: 2px; box-sizing: border-box; }
.inc-chart-bar span.is-stacked { border-bottom: 2px solid #fff; background-clip: padding-box; }
.inc-chart-bar span.is-cap { border-radius: 4px 4px 0 0; }
.inc-chart-bar span.is-foot { border-radius: 0 0 4px 4px; }
.inc-chart-col.is-on .inc-chart-bar span { filter: brightness(1.12); }
.inc-chart-col em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 0.35rem; font-style: normal; font-size: 0.6875rem; color: #667085; white-space: nowrap; }
.inc-chart-col em.is-last { left: auto; right: 0; transform: none; }
.inc-chart-tip {
    position: absolute; z-index: 5; top: -0.25rem; min-width: 10.5rem; padding: 0.6rem 0.7rem; pointer-events: none;
    border: 1px solid #e4e7ec; border-radius: 0.625rem; background: #fff; box-shadow: 0 8px 24px -8px rgba(16, 24, 40, 0.25);
    font-size: 0.75rem; color: #475467;
}
.inc-chart-tip strong { display: block; margin-bottom: 0.3rem; font-size: 0.75rem; font-weight: 700; color: #0f172a; }
.inc-chart-tip p { display: flex; align-items: center; gap: 0.4rem; line-height: 1.5; }
.inc-chart-tip p i { width: 0.75rem; height: 0.1875rem; border-radius: 999px; }
.inc-chart-tip p span { flex: 1 1 auto; }
.inc-chart-tip p b { font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
.inc-chart-table { margin-top: 0.25rem; font-size: 0.8125rem; }
.inc-chart-table summary { display: inline-block; cursor: pointer; font-weight: 600; color: #0c2850; }
.inc-chart-table table { width: 100%; margin-top: 0.5rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.inc-chart-table th { padding: 0.4rem 0.5rem; text-align: right; font-size: 0.6875rem; font-weight: 600; color: #667085; border-bottom: 1px solid #e4e7ec; white-space: nowrap; }
.inc-chart-table td { padding: 0.4rem 0.5rem; text-align: right; border-bottom: 1px solid #eef0f4; white-space: nowrap; }
.inc-chart-table th:first-child, .inc-chart-table td:first-child { text-align: left; }
@media (max-width: 639px) {
    .inc-chart-axis { width: 2.6rem; font-size: 0.625rem; }
    .inc-chart-axis, .inc-chart-plot { height: 9.5rem; }
    .inc-chart-bar { width: min(24px, calc(100% - 2px)); }
}

/* ==========================================================================
   v82: Customers page — list, manage popup, add / deduct / set funds
   ========================================================================== */
.admin-shell .cust-search { display: flex; gap: 0.5rem; align-items: center; }
.admin-shell .cust-search-box { position: relative; flex: 1 1 auto; min-width: 0; display: block; }
.admin-shell .cust-search-box > .ui-icon { position: absolute; left: 0.8rem; top: 50%; width: 1.05rem; height: 1.05rem; transform: translateY(-50%); color: var(--adm-faint); pointer-events: none; }
.admin-shell .cust-search-box input { padding-left: 2.35rem; }
.admin-shell .cust-search .sort-pick { flex: 0 0 auto; }
.admin-shell .cust-search.is-searching { opacity: 0.6; }

.admin-shell .cust-empty { padding: 2.25rem 1rem; text-align: center; border: 1px dashed var(--adm-line); border-radius: var(--adm-radius); background: var(--adm-surface, #fff); color: var(--adm-muted); font-size: 0.875rem; }
.admin-shell .cust-empty b { color: var(--adm-text); font-size: 1rem; }
.admin-shell .cust-empty .ui-btn { margin-top: 0.9rem; }

.admin-shell .cust-scroll { overflow-x: auto; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: #fff; box-shadow: var(--adm-shadow); }
.admin-shell .cust-table { width: 100%; min-width: 46rem; font-size: 0.875rem; }
.admin-shell .cust-table th,
.admin-shell .cust-table td { padding: 0.65rem 0.75rem; white-space: nowrap; text-align: left; }
.admin-shell .cust-table th:first-child,
.admin-shell .cust-table td:first-child { padding-left: 1rem; }
.admin-shell .cust-table .is-num { text-align: right; }
.admin-shell .cust-table tr.is-off .cust-who,
.admin-shell .cust-table tr.is-off .cust-bal { opacity: 0.55; }
.admin-shell .cust-who { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.admin-shell .cust-who .avatar { flex: 0 0 auto; width: 2.1rem; height: 2.1rem; background: var(--adm-brand-soft); color: var(--adm-brand); }
.admin-shell .cust-who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.admin-shell .cust-who-text b { max-width: 17rem; overflow: hidden; text-overflow: ellipsis; font-weight: 650; color: var(--adm-text); }
.admin-shell .cust-who-text small { max-width: 17rem; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; color: var(--adm-muted); }
.admin-shell .cust-none { color: var(--adm-faint); }
.admin-shell .cust-bal { font-weight: 700; color: var(--adm-text); }
.admin-shell .cust-bal.is-zero { font-weight: 500; color: var(--adm-faint); }
.admin-shell .cust-date { color: var(--adm-muted); }
.admin-shell .cust-act { text-align: right; width: 1%; }
.admin-shell .cust-add { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2rem; padding: 0.3rem 0.7rem 0.3rem 0.5rem; border: 1px solid var(--adm-line); border-radius: 0.6rem; background: #fff; color: var(--adm-brand); font-size: 0.8125rem; font-weight: 650; box-shadow: var(--adm-shadow); cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.admin-shell .cust-add:hover { background: var(--adm-brand-soft); border-color: #c5d3e8; }
.admin-shell .cust-add .ui-icon { width: 1rem; height: 1rem; }

.admin-shell .cust-pill { display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 650; line-height: 1.5; white-space: nowrap; background: #eef0f4; color: #475467; }
.admin-shell .cust-pill.is-reseller { background: #efe9fd; color: #5b33b6; }
.admin-shell .cust-pill.is-active { background: #e7f6ee; color: #0f7a46; }
.admin-shell .cust-pill.is-disabled { background: #fde8e7; color: #b42318; }

/* ---------- Manage popup ---------- */
.admin-shell .popup-card.cust-card { padding: 0; width: min(31rem, calc(100vw - 1.5rem)); max-height: min(92vh, 52rem); display: flex; flex-direction: column; overflow: hidden; }
.admin-shell .cust-card-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 0.75rem 0.9rem 1.1rem; border-bottom: 1px solid var(--adm-line); }
.admin-shell .cust-card-head .avatar { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; font-size: 1.05rem; }
.admin-shell .cust-card-id { flex: 1 1 auto; min-width: 0; }
.admin-shell .cust-card-id h2 { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--adm-text); overflow-wrap: anywhere; }
.admin-shell .cust-card-id p { margin-top: 0.15rem; font-size: 0.8125rem; color: var(--adm-muted); }
.admin-shell .cust-card-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.35rem 1.1rem 1.1rem; -webkit-overflow-scrolling: touch; }
.admin-shell .cust-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--adm-muted); }
.admin-shell .cust-label em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--adm-faint); }
.admin-shell .cust-quiet { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--adm-muted); }

.admin-shell .cust-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.admin-shell .cust-facts > div { padding: 0.55rem 0; border-bottom: 1px solid var(--adm-line-soft); min-width: 0; }
.admin-shell .cust-facts > .is-wide { grid-column: 1 / -1; }
.admin-shell .cust-facts dt { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--adm-muted); }
.admin-shell .cust-facts dd { margin-top: 0.1rem; font-size: 0.9rem; font-weight: 600; color: var(--adm-text); overflow-wrap: anywhere; }
.admin-shell .cust-facts dd a { color: inherit; text-decoration: underline; text-decoration-color: #c9d1dc; text-underline-offset: 2px; }
.admin-shell .cust-facts dd small { font-size: 0.75rem; font-weight: 500; color: var(--adm-muted); }

.admin-shell .cust-facts.is-after { margin-top: 0.6rem; }
.admin-shell .cust-wallet { margin-top: 0.75rem; padding: 0.9rem; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: #f9fafb; }
.admin-shell .cust-wallet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.admin-shell .cust-wallet-top > .ui-icon { width: 1.4rem; height: 1.4rem; color: var(--adm-faint); }
.admin-shell .cust-wallet-now { margin-top: 0.1rem; font-size: 1.75rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; color: var(--adm-text); }
.admin-shell .cust-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.2rem; margin-top: 0.8rem; padding: 0.2rem; border-radius: 0.7rem; background: #eceef2; }
.admin-shell .cust-modes label { position: relative; display: block; cursor: pointer; }
.admin-shell .cust-modes input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.admin-shell .cust-modes span { display: block; padding: 0.5rem 0.25rem; border-radius: 0.55rem; text-align: center; font-size: 0.8125rem; font-weight: 650; color: #475467; white-space: nowrap; transition: background 0.15s ease, color 0.15s ease; }
.admin-shell .cust-modes input:checked + span { background: #fff; color: var(--adm-text); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.admin-shell .cust-modes input:focus-visible + span { outline: 2px solid var(--adm-brand); outline-offset: 1px; }
.admin-shell .cust-field { display: block; margin-top: 0.8rem; }
.admin-shell .cust-field .ui-input { margin-top: 0.3rem; }
.admin-shell .cust-amount { position: relative; display: block; margin-top: 0.3rem; }
.admin-shell .cust-amount i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 1.15rem; font-weight: 650; color: var(--adm-muted); pointer-events: none; }
.admin-shell .cust-amount .ui-input { margin-top: 0; padding-left: 2.1rem; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.admin-shell .cust-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.admin-shell .cust-chips[hidden] { display: none; }
.admin-shell .cust-chips button { min-height: 2rem; padding: 0.25rem 0.7rem; border: 1px solid var(--adm-line); border-radius: 999px; background: #fff; font-size: 0.8125rem; font-weight: 650; font-variant-numeric: tabular-nums; color: #344054; cursor: pointer; }
.admin-shell .cust-chips button:hover { border-color: #c5d3e8; background: var(--adm-brand-soft); color: var(--adm-brand); }
.admin-shell .cust-chips button.is-clear { margin-left: auto; border-color: transparent; background: transparent; color: var(--adm-muted); font-weight: 500; }
.admin-shell .cust-preview { margin-top: 0.8rem; padding: 0.55rem 0.75rem; border-radius: 0.6rem; background: #fff; border: 1px solid var(--adm-line); font-size: 0.875rem; color: var(--adm-muted); }
.admin-shell .cust-preview b { color: var(--adm-text); font-size: 1rem; }
.admin-shell .cust-preview.is-bad { border-color: #f5c2bd; background: #fef3f2; color: #b42318; }
.admin-shell .cust-submit { width: 100%; margin-top: 0.7rem; min-height: 2.75rem; }
.admin-shell .cust-submit.is-deduct:not(:disabled) { background: #b42318; }

.admin-shell .cust-block { margin-top: 1.1rem; }
.admin-shell .cust-history { margin-top: 0.35rem; }
.admin-shell .cust-history li { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--adm-line-soft); }
.admin-shell .cust-history li:last-child { border-bottom: 0; }
.admin-shell .cust-history-what { display: flex; flex-direction: column; min-width: 0; }
.admin-shell .cust-history-what b { font-size: 0.875rem; font-weight: 600; color: var(--adm-text); }
.admin-shell .cust-history small { font-size: 0.75rem; color: var(--adm-muted); overflow-wrap: anywhere; }
.admin-shell .cust-history-amt { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.admin-shell .cust-history-amt b { font-size: 0.875rem; font-weight: 700; }
.admin-shell .cust-history-amt b.is-up { color: #0f7a46; }
.admin-shell .cust-history-amt b.is-down { color: #b42318; }
.admin-shell .cust-access { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.5rem; align-items: end; margin-top: 0.4rem; }
.admin-shell .cust-access label span { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--adm-muted); }

/* ---------- Phones: name, balance and the add button; the rest is in the popup ---------- */
@media (max-width: 639px) {
    .admin-shell .cust-search .sort-pick select { width: 10.4rem !important; padding-right: 1.5rem; font-size: 0.875rem; }
    .admin-shell .cust-chips { gap: 0.3rem; }
    .admin-shell .cust-chips button { padding: 0.25rem 0.55rem; font-size: 0.78rem; }
    .admin-shell .cust-chips button.is-clear { padding: 0.25rem 0.3rem; }
    .admin-shell .admin-main main table.cust-table { min-width: 0; table-layout: fixed; font-size: 0.8125rem; }
    .admin-shell .admin-main main table.cust-table th,
    .admin-shell .admin-main main table.cust-table td { padding: 0.5rem 0.35rem; }
    .admin-shell .admin-main main table.cust-table th:first-child,
    .admin-shell .admin-main main table.cust-table td:first-child { padding-left: 0.6rem; }
    .admin-shell .cust-table th:nth-child(2), .admin-shell .cust-table td:nth-child(2),
    .admin-shell .cust-table th:nth-child(5), .admin-shell .cust-table td:nth-child(5),
    .admin-shell .cust-table th:nth-child(6), .admin-shell .cust-table td:nth-child(6) { display: none; }
    .admin-shell .cust-table th:nth-child(3) { width: 4.4rem; }
    .admin-shell .cust-table th:nth-child(4) { width: 4.9rem; }
    .admin-shell .cust-table th:nth-child(7) { width: 2.9rem; }
    .admin-shell .cust-table td:nth-child(3) { white-space: normal; line-height: 1.7; }
    .admin-shell .cust-table td:nth-child(7) { padding-right: 0.5rem !important; width: auto; }
    .admin-shell .cust-who .avatar,
    .admin-shell .cust-mail { display: none; }
    .admin-shell .cust-who-text b,
    .admin-shell .cust-who-text small { max-width: none; }
    .admin-shell .cust-pill { font-size: 0.625rem; padding: 0.05rem 0.4rem; }
    .admin-shell .cust-add { width: 2.1rem; height: 2.1rem; min-height: 0; padding: 0 !important; justify-content: center; }
    .admin-shell .cust-add span { display: none; }
    .admin-shell .cust-add .ui-icon { width: 1.15rem; height: 1.15rem; }
    .admin-shell .popup-card.cust-card { width: calc(100vw - 1rem); max-height: 92vh; max-height: 92dvh; }
    .admin-shell .cust-card-body { padding: 0.25rem 0.9rem 1rem; }
    .admin-shell .cust-amount .ui-input { font-size: 1.25rem; min-height: 2.9rem; }
    .admin-shell .cust-access { grid-template-columns: 1fr 1fr; }
    .admin-shell .cust-access .ui-btn { grid-column: 1 / -1; }
}

/* v83: a single payment method sits in the middle instead of the left column */
.fund-methods > .fund-method:only-child,
.pay-methods-grid > .pay-method-card:only-child,
.pay-choices > label:only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 17rem);
}
.fund-methods > .fund-method:only-child { justify-content: center; }
.fund-methods > .fund-method:only-child > span { flex: 0 1 auto; }

/* v84: Add funds — the card sits in the middle of the page; preset amounts form an even grid */
.fund-sheet,
.fund-balance,
h1:has(+ .fund-balance) {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
.fund-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}
.fund-presets button {
    min-height: 2.4rem;
    padding: 0.4rem 0.3rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* v85: add and remove suppliers in Settings */
.supplier-add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(15, 23, 42, 0.08); }
.supplier-add > span { flex: 1 1 14rem; }
.supplier-remove-btn { color: #b42318 !important; cursor: pointer; }
.supplier-remove-btn:hover { background: #fef3f2 !important; }
.supplier-remove-list { margin-top: 0.9rem; padding-left: 1.1rem; list-style: disc; font-size: 0.875rem; line-height: 1.5; color: rgba(15, 23, 42, 0.75); }
.supplier-remove-list li + li { margin-top: 0.25rem; }
@media (max-width: 639px) {
    .supplier-card-row { flex-wrap: wrap; }
}

/* v87: fourth service type — gift cards and codes */
.kind-card { background: #f5f0ff; color: #6d28d9; }
