/* User pages only. Existing grids, order, navigation and brand artwork are retained. */

html[data-cafe-ui="user"] {
    min-width: 0;
    --cafe-espresso: #3B221A;
    --cafe-gold: #C99642;
    --cafe-background: #F4D66F;
    --cafe-cream: #FFF8E9;
    --cafe-muted: #715B48;
    --cafe-line: #DCC49B;
    --cafe-shadow: 0 5px 18px rgba(59, 34, 26, .09);
    color-scheme: light;
    scroll-padding-bottom: 88px;
    -webkit-text-size-adjust: 100%;
}

html[data-cafe-ui="user"] body {
    min-width: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--cafe-espresso);
    background-color: var(--cafe-background);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html[data-cafe-ui="user"] :where(input, textarea, select, button) {
    font-family: inherit;
}

html[data-cafe-ui="user"] :where(input, textarea, select) {
    box-sizing: border-box;
}

html[data-cafe-ui="user"] :where(button, a, input, select, textarea):focus-visible {
    outline: 3px solid var(--cafe-espresso);
    outline-offset: 3px;
}

html[data-cafe-ui="user"] :where(.top-header, .page-header, .header) :focus-visible {
    outline-color: var(--cafe-gold);
}

html[data-cafe-ui="user"] :where(button, a) {
    -webkit-tap-highlight-color: rgba(201, 150, 66, .22);
}

html[data-cafe-ui="user"] :where(.top-header, .page-header, .van-nav-bar, .uni-page-head) {
    background-color: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .header {
    background-color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] .bg-green-600 {
    background-color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] .bg-blue-500 {
    background-color: var(--cafe-gold);
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] .bg-gradient-to-r.from-blue-500 {
    background: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .px-4.text-white {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] .uni-page-head {
    background: var(--cafe-espresso) !important;
    color: var(--cafe-cream) !important;
}

html[data-cafe-ui="user"] :where(.my_btn, .my-btn, .bpay-body-button button) {
    background: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] :where(.top-header, .page-header) :where(.page-title, .header-title, .back-btn, .back-link) {
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] :where(.header-left, .header-titles, .page-title, .header-title, .page-wrap, .page-content, .content, .container) {
    min-width: 0;
}

html[data-cafe-ui="user"] :where(.login-box, .input-group, .country-tabs, .captcha-box) {
    border-color: var(--cafe-line);
}

html[data-cafe-ui="user"] .lang-switch {
    position: relative;
}

html[data-cafe-ui="user"] .login-head img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    content: url('/klyrolabs/cfb-home/brand.png');
    background-color: var(--cafe-background);
}

html[data-cafe-ui="user"] .top {
    background: var(--cafe-espresso) !important;
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .topTit {
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .otpBtn {
    background: var(--cafe-espresso) !important;
    color: var(--cafe-cream) !important;
    border-color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] .menu-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-cafe-ui="user"] .menu-section :where(.menu-item,
.menu-body) {
    min-width: 0;
}

html[data-cafe-ui="user"] .menu-section .menu-body {
    flex: 1 1 0;
    padding-right: 10px;
}

html[data-cafe-ui="user"] .menu-section :where(.menu-label,
.menu-sub) {
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
}

html[data-cafe-ui="user"] .menu-section .menu-item {
    background: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .page-wraper img[src*="devroki"] {
    max-width: calc(100% - 24px);
}

html[data-cafe-ui="user"] .page-wraper>.header {
    background: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .page-wraper>.header .cafe-language-compact {
    position: absolute;
    right: 12px;
    top: 12px;
}

html[data-cafe-ui="user"] :where(.login-box,
.country-tabs) {
    background-color: var(--cafe-cream);
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.login-box .field-icon,
.forgot-link,
.register-link,
.bottom-links a) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.page-title,
.header-title) {
    overflow-wrap: break-word;
}

html[data-cafe-ui="user"] :where(.glass-card,
.form-card,
.salary-card,
.rules-card,
.history-card,
.transaction-card,
.team-card,
.invite-card,
.level-card,
.product-box,
.action-card,
.quick-tile,
.wallet-item,
.balance-card,
.overview-card,
.stats-card,
.panel,
.faq-item) {
    background: var(--cafe-cream);
    color: var(--cafe-espresso);
    border-color: var(--cafe-line);
    box-shadow: var(--cafe-shadow);
    border-radius: 18px;
}

html[data-cafe-ui="user"] :where(.glass-card,
.form-card,
.salary-card,
.rules-card,
.history-card,
.transaction-card,
.team-card,
.invite-card,
.level-card,
.product-box,
.action-card,
.wallet-item) :where(div,
p,
span,
label,
td,
th,
h1,
h2,
h3,
h4,
h5,
strong,
b,
.label,
.value,
.info-label,
.info-value) {
    color: var(--cafe-espresso);
    text-shadow: none;
}

html[data-cafe-ui="user"] :is(.glass-card,
.team-card,
.invite-card,
.level-card,
.wallet-item) :is(div,
p,
span,
label,
strong,
b) {
    color: var(--cafe-espresso);
    text-shadow: none;
}

html[data-cafe-ui="user"] :is(.glass-card,
.team-card,
.invite-card,
.level-card) :is(button,
a[class*="-btn"]) :is(span,
i,
div) {
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .salary-row .val,
html[data-cafe-ui="user"] .standard-row.current span,
html[data-cafe-ui="user"] .standard-row span:last-child {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :is(.submit-btn,
.login-btn,
.add-btn,
.claim-btn,
.join-btn,
.receive-btn,
.confirm-btn,
.view-plans-btn,
.menu-btn,
.aptamil-join-btn,
button[type="submit"],
input[type="submit"]) {
    background: var(--cafe-espresso) !important;
    color: var(--cafe-cream) !important;
    border-color: var(--cafe-espresso) !important;
    box-shadow: 0 3px 10px rgba(59, 34, 26, .12);
    text-shadow: none;
}

html[data-cafe-ui="user"] :where(.submit-btn,
.login-btn,
.add-btn,
.claim-btn,
.join-btn,
.receive-btn,
.confirm-btn,
.view-plans-btn,
.menu-btn,
.aptamil-join-btn,
button[type="submit"]) :where(span,
i) {
    color: inherit;
}

html[data-cafe-ui="user"] :where(.menu-label,
.quick-chip .qtxt) {
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] :where(.team-card-btn,
.invite-card-btn,
.connect-btn,
.pay-btn) {
    background: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] :where(.team-card-btn,
.invite-card-btn,
.connect-btn,
.pay-btn) :where(span,
i) {
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] .team-card-btn,
html[data-cafe-ui="user"] .team-card-btn i {
    color: var(--cafe-cream) !important;
}

html[data-cafe-ui="user"] :is(.empty,
.no-more,
.empty-state) {
    color: var(--cafe-muted);
}

html[data-cafe-ui="user"] :where(.tab-btn,
.tab-button,
.tab-item):not(.active) {
    background: var(--cafe-cream);
    color: var(--cafe-espresso);
    border-color: var(--cafe-line);
}

html[data-cafe-ui="user"] :where(.empty,
.empty-state,
.no-data,
.no-more,
.section-label,
.section-min,
.levels-heading) {
    color: var(--cafe-muted);
}

html[data-cafe-ui="user"] :where(.empty,
.empty-state,
.no-data) :where(p,
span,
div) {
    color: inherit;
}

html[data-cafe-ui="user"] :where(.amount-value,
.wallet-value,
.val,
.stat-value,
.current-stat-val,
.timer-display) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.menu-icon,
.action-card-icon,
.quick-tile-icon,
.announce-icon,
.wallet-icon,
.icon-bg) {
    background-color: var(--cafe-gold);
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.menu-icon,
.action-card-icon,
.quick-tile-icon,
.announce-icon,
.wallet-icon,
.icon-bg) i {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :is(button,
input[type="submit"]):disabled {
    background: #E3D5BD !important;
    color: #68533F !important;
    border-color: #D4C3A5 !important;
    box-shadow: none;
    cursor: not-allowed;
}

html[data-cafe-ui="user"] :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
textarea) {
    max-width: 100%;
    color: var(--cafe-espresso);
    background-color: var(--cafe-cream);
    border-color: var(--cafe-line);
    caret-color: var(--cafe-espresso);
    font-size: 16px;
}

html[data-cafe-ui="user"] :where(input,
textarea)::placeholder {
    color: #7A6551;
    opacity: 1;
}

html[data-cafe-ui="user"] :where(input,
textarea,
select)[aria-invalid="true"] {
    border-color: #9B2D30;
}

html[data-cafe-ui="user"] :where(label,
.field-label,
.input-label,
.input_lable) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.form-card,
.login,
.auth-card) :where(.submit-btn,
.login-btn,
button[type="submit"]) {
    min-height: 44px;
}

html[data-cafe-ui="user"] :where(.empty-state,
.no-data,
.no-more,
.empty-text,
.footer-note,
.form-note,
.help-text,
.hint,
.claim-note) {
    color: var(--cafe-muted);
    overflow-wrap: break-word;
}

html[data-cafe-ui="user"] :where(.icon-title,
.icon-subtitle) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] body:has(>.container>#countdown) {
    background: var(--cafe-background);
}

html[data-cafe-ui="user"] .container:has(>#countdown) {
    background: var(--cafe-cream);
    box-shadow: var(--cafe-shadow);
}

html[data-cafe-ui="user"] #countdown {
    color: var(--cafe-espresso);
    border-color: var(--cafe-gold);
    background: #F2E3C7;
}

html[data-cafe-ui="user"] body:has(.mission-grid) {
    background: var(--cafe-background);
}

html[data-cafe-ui="user"] body:has(.mission-grid) .section {
    background: linear-gradient(rgba(244, 214, 111, .9), rgba(244, 214, 111, .9)), url('/klyrolabs/coffee-heritage-background.png') center/cover;
}

html[data-cafe-ui="user"] body:has(.mission-grid) :where(.section-body,
.section-title,
.stat-label,
.stat-num,
.brand-name,
.section-eyebrow) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.mission-card,
.address-block,
.income-item,
.value-pill) {
    background: var(--cafe-cream);
    color: var(--cafe-espresso);
    border-color: var(--cafe-gold);
}

html[data-cafe-ui="user"] :where(.mission-card,
.address-block,
.income-item,
.value-pill) :where(p,
span,
strong,
a,
h3,
h4) {
    color: var(--cafe-espresso);
    text-shadow: none;
}

html[data-cafe-ui="user"] .popup :where(button,
.button,
.join-btn) {
    background: var(--cafe-espresso) !important;
    color: var(--cafe-cream) !important;
}

html[data-cafe-ui="user"] :where(.modal-content,
.bind-email-content,
.aptamil-popup,
.popup-content,
.modal-box) {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--cafe-espresso);
    background-color: var(--cafe-cream);
    border-color: var(--cafe-gold);
}

html[data-cafe-ui="user"] :where(.bind-email-content,
.modal-content,
.popup-content) button {
    color: var(--cafe-cream);
    background-color: var(--cafe-espresso);
    border-color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.error,
.error-message,
.text-danger,
.status-rejected,
.badge.rejected) {
    color: #9B2D30;
}

html[data-cafe-ui="user"] :where(.success-message,
.status-approved,
.badge.approved) {
    color: #27633F;
}

html[data-cafe-ui="user"] :where(.status-pending,
.badge.pending) {
    color: #79520F;
}

html[data-cafe-ui="user"] :where(.toast,
.loaderMessage) {
    overflow-wrap: break-word;
}

html[data-cafe-ui="user"] :where(.tabbar,
.quick-grid,
.bottom-nav) {
    background-color: var(--cafe-cream);
    border-color: var(--cafe-line);
}

html[data-cafe-ui="user"] :where(.tabbar,
.bottom-nav) :where(a,
button) {
    min-width: 0;
}

html[data-cafe-ui="user"] .tabbar:has(.back-wrap) {
    background: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] :where(.tabbar,
.bottom-nav) :where(.bartext,
.nav-label) {
    overflow-wrap: break-word;
}

html[data-cafe-ui="user"] .bartext {
    font-size: 12px;
    line-height: 14px;
}

html[data-cafe-ui="user"] .baritem:not(.active) :where(i,
.bartext) {
    color: var(--cafe-muted);
}

html[data-cafe-ui="user"] .baritem.active :where(i,
.bartext) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] body:has(.tabbar) {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

html[data-cafe-ui="user"] :where(.table-wrap,
.table-responsive,
.history-table-wrap) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Preserve the supplementary gateway template; localize its existing skin only. */

html[data-cafe-ui="user"] :where(.bpay-container,
.bpay-body) {
    background-color: var(--cafe-cream);
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(.background-top,
.bpay-timer,
.bpay-body-button button) {
    background-color: var(--cafe-espresso);
    color: var(--cafe-cream);
}

html[data-cafe-ui="user"] :where(.bpay-body-label,
.bpay-body-table) {
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] table {
    border-color: var(--cafe-line);
}

html[data-cafe-ui="user"] th {
    background-color: #F2E3C7;
    color: var(--cafe-espresso);
}

html[data-cafe-ui="user"] :where(td,
th) {
    border-color: var(--cafe-line);
}

@media (max-width: 767px) {
    html[data-cafe-ui="user"] :where(.page-wrap,
    .page-content,
    .content,
    .container,
    .warp,
    .main) {
        max-width: 100%;
        box-sizing: border-box;
    }
    html[data-cafe-ui="user"] :where(.bank-card,
    .transaction-card,
    .record-item,
    .history-item,
    .wallet-item) {
        min-width: 0;
        overflow-wrap: break-word;
    }
    html[data-cafe-ui="user"] table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    html[data-cafe-ui="user"] :where(.top-header,
    .page-header) {
        gap: 8px;
    }
    html[data-cafe-ui="user"] :where(.top-header,
    .page-header) :where(.page-title,
    .header-title) {
        font-size: clamp(14px, 4vw, 18px);
    }
}

@media (max-width: 359px) {
    html[data-cafe-ui="user"] :where(.top-header,
    .page-header) {
        padding-inline: 12px;
    }
    html[data-cafe-ui="user"] .menu-label {
        font-size: 11.5px;
        line-height: 15px;
    }
    html[data-cafe-ui="user"] .lang-pill {
        padding-inline: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-cafe-ui="user"] {
        scroll-behavior: auto;
    }
    html[data-cafe-ui="user"] :where(button,
    a,
    input,
    select,
    textarea) {
        transition: none;
    }
}

/* Reuse the current homepage canvas on user pages only; preserve panel surfaces. */

html[data-cafe-ui="user"] body {
    background: #F4D66F url('/klyrolabs/vintage-gold-background-v2.webp') top center / cover no-repeat fixed !important;
}

/* Page shells must reveal the single body canvas, rather than restart/crop it. */

html[data-cafe-ui="user"] body> :is(.page-wrap,
.page-wraper,
.warp,
.contact-container,
.team-main,
#app,
uni-app),
html[data-cafe-ui="user"] :is(uni-page,
uni-page-wrapper,
uni-page-body),
html[data-cafe-ui="user"] body:has(.mission-grid)>.section,
html[data-cafe-ui="user"] body>.min-h-screen {
    background: transparent !important;
}

/* Retire only the decorative body overlay that previously hid the page canvas. */

html[data-cafe-ui="user"] body::before {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Keep existing header and unboxed empty-state text readable over the texture. */

html[data-cafe-ui="user"] body>.page-wraper>.header {
    background-color: var(--cafe-espresso) !important;
}

html[data-cafe-ui="user"] .page-wrap>div[style*="color:rgba(255, 248, 233"] {
    color: var(--cafe-espresso) !important;
}

/* Language selection is available only on login and registration. */

html[data-cafe-ui="user"][data-cafe-language-switcher="off"] :is(.lang-pill,
.lang-switch,
.cafe-language-select,
.cafe-language-compact) {
    display: none !important;
}

html[data-cafe-ui="user"][data-cafe-language-switcher="off"] .cafe-profile .welcome-label {
    padding-right: 0;
    min-height: 0;
}

/* Keep the approved brand-name capitalization on user-facing brand labels. */

html[data-cafe-ui="user"] :is(.header-brand,
.brand-name) {
    text-transform: none;
}