:root {
    --tp-primary: #0070C0;
    --tp-secondary: #818181;
    --tp-dark: #4A4F57;
    --tp-light: #F5F7FA;

    --tp-warning: #F6C23E;
    --tp-success: #1CC88A;
    --tp-danger: #E74A3B;
    --tp-white: #FFFFFF;

    --tp-primary-dark: #005A9E;
    --tp-secondary-dark: #6b6b6b;
    --tp-warning-dark: #D9A23B;
    --tp-success-dark: #17A673;
    --tp-danger-dark: #D93B2E;

    --tp-primary-soft: #E3F2FD;
    --tp-warning-soft: #FFF4E5;
    --tp-success-soft: #E6F9F4;
    --tp-danger-soft: #FDECEA;

    --tp-font-family: 'Inter', sans-serif;
    --tp-heading-font-family: 'Manrope', sans-serif;

    --tp-shadow: 0 8px 22px rgba(31, 45, 61, 0.06);
    --tp-border: #E3EAF2;
    --tp-shell-top-space: calc(78px + env(safe-area-inset-top, 0px));
    --tp-shell-bottom-space: calc(98px + env(safe-area-inset-bottom, 0px));
    --tp-shell-content-height: calc(100svh - var(--tp-shell-top-space) - var(--tp-shell-bottom-space));
    --tp-page-nav-height: 52px;
    --tp-tab-bar-height: calc(80px + env(safe-area-inset-bottom, 0px));
    --tp-teebo-hero-h: 68px;
    --tp-teebo-composer-h: 62px;

    /* Bootstrap overrides */
    --bs-primary: var(--tp-primary);
    --bs-secondary: var(--tp-secondary);
    --bs-success: var(--tp-success);
    --bs-danger: var(--tp-danger);
    --bs-warning: var(--tp-warning);
    --bs-info: var(--tp-primary);
    --bs-light: var(--tp-light);
    --bs-dark: var(--tp-dark);

    /* font-colors */
    --tp-text-primary: var(--tp-primary);
    --tp-text-secondary: var(--tp-secondary);
    --tp-text-muted: #6c757d;
    --tp-text-danger: var(--tp-danger);
    --tp-text-info: var(--bs-info);
    --tp-text-success: var(--tp-success);
    --tp-text-light: var(--tp-light);
    --tp-text-white: var(--tp-white);
    --tp-text-warning: var(--tp-warning);

    /* Swal */
    --swal2-border-radius: 16px;
    --swal2-confirm-button-border-radius: 12px;
    --swal2-cancel-button-border-radius: 12px;
    --swal2-deny-button-border-radius: 12px;
}

/* Base */
html,
body {
    font-family: var(--tp-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    background-color: var(--tp-light);
    color: var(--tp-dark);
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
}

/* Prevent iOS/Android zoom-on-focus by keeping all form controls at >= 16px.
   The browser only auto-zooms when the focused element has font-size < 16px. */
input,
textarea,
select {
    font-size: max(16px, 1em);
}

body {
    box-sizing: border-box;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    padding-top: var(--tp-shell-top-space);
    padding-bottom: 0;
    overscroll-behavior-y: contain;
}

.main {
    box-sizing: border-box;
    height: calc(100svh - var(--tp-shell-top-space));
    min-height: calc(100svh - var(--tp-shell-top-space));
    padding-bottom: var(--tp-shell-bottom-space);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.main>.container-fluid {
    max-width: 430px;
    min-height: 100%;
    margin: 0 auto;
    padding-right: 0;
    padding-left: 0;
    transform: translateY(var(--tp-pull-distance, 0px));
    transition: transform 0.18s ease;
    will-change: transform, opacity;
}

.tp-pull-refresh {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 50%;
    z-index: 1200;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(227, 234, 242, 0.94);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.97);
    color: var(--tp-primary);
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-54px + var(--tp-pull-distance, 0px) * 0.62)) scale(0.88);
    transition: opacity 0.16s ease, transform 0.18s ease;
}

.tp-pull-refresh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transform: rotate(calc(var(--tp-pull-distance, 0px) * 2.5deg));
}

html.tp-pull-refresh-visible .tp-pull-refresh,
html.tp-pull-refresh-loading .tp-pull-refresh {
    opacity: 1;
}

html.tp-pull-refresh-ready .tp-pull-refresh {
    color: #fff;
    background: var(--tp-primary);
    transform: translate(-50%, calc(-10px + var(--tp-pull-distance, 0px) * 0.25)) scale(1);
}

html.tp-pull-refresh-loading .tp-pull-refresh {
    color: #fff;
    background: var(--tp-primary);
    opacity: 1;
    transform: translate(-50%, 6px) scale(1);
}

html.tp-pull-refresh-loading .tp-pull-refresh-icon {
    animation: tpPullRefreshSpin 0.72s linear infinite;
}

.tp-ripple-host {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.tp-ripple {
    position: absolute;
    z-index: 0;
    width: var(--tp-ripple-size, 44px);
    height: var(--tp-ripple-size, 44px);
    left: var(--tp-ripple-x, 50%);
    top: var(--tp-ripple-y, 50%);
    border-radius: 50%;
    background: rgba(0, 112, 192, 0.16);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: tpRipple 520ms ease-out both;
}

.btn-primary .tp-ripple,
.bottom-tab-bar-item.active .tab-bar-link .tp-ripple {
    background: rgba(255, 255, 255, 0.28);
}

.tp-register-check-wrap .tp-ripple,
.tp-login-support-link .tp-ripple,
.tp-login-link .tp-ripple,
.tab-bar-link .tp-ripple {
    background: rgba(0, 112, 192, 0.12);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6,
.tp-auth-title,
.tp-auth-brand h1 {
    font-family: var(--tp-heading-font-family);
}

/* Optional utility */
.tp-heading-font {
    font-family: var(--tp-heading-font-family);
}

/* Buttons */
.btn.btn-primary,
.btn.btn-secondary,
.btn.btn-info,
.btn.btn-warning,
.btn.btn-success,
.btn.btn-danger {
    padding: 6px 18px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
}



a.btn {
    text-decoration: none !important;
}

a.btn:hover {
    text-decoration: none !important;
}


.border-none {
    border: none !important;
}

.bg-transparent {
    background-color: transparent !important;
}

/* Primary */
.btn.btn-primary {
    background-color: var(--tp-primary);
    color: #fff;
}

.btn.btn-primary:hover {
    background-color: var(--tp-primary-dark);
    color: #fff;
}

/* Secondary */
.btn.btn-secondary {
    background-color: var(--tp-secondary);
    color: #fff;
}

.btn.btn-secondary:hover {
    background-color: var(--tp-secondary-dark);
    color: #fff;
}

/* Info */
.btn.btn-info {
    background-color: var(--tp-primary);
    color: #fff;
}

.btn.btn-info:hover {
    background-color: var(--tp-primary-dark);
    color: #fff;
}

/* Danger */
.btn.btn-danger {
    background-color: var(--tp-danger);
    color: #fff;
}

.btn.btn-danger:hover {
    background-color: var(--tp-danger-dark);
    color: #fff;
}

/* Button elevation (modern feel) */
.btn {
    box-shadow: 0 2px 5px rgba(74, 79, 87, 0.05);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 9px rgba(74, 79, 87, 0.08);
}

/* Forms */
.form-control {
    border-radius: 14px;
    border: 1px solid rgba(74, 79, 87, 0.15);
    min-height: 48px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 112, 192, 0.12);
}

.tp-field {
    min-width: 0;
}

.tp-input-wrap {
    position: relative;
}

.tp-input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 2;
    color: var(--tp-secondary);
    font-size: 1rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.tp-input,
.tp-select {
    width: 100%;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    border: 1px solid rgba(74, 79, 87, 0.13);
    border-radius: 18px;
    background: #fff;
    color: var(--tp-dark);
    font-size: 1rem;
    font-weight: 500;
    padding: 7px 18px 7px 48px;
    box-shadow: 0 2px 7px rgba(74, 79, 87, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tp-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
}

.tp-input::placeholder {
    color: transparent;
}

.tp-input:focus,
.tp-select:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 0.16rem rgba(0, 112, 192, 0.10);
    outline: none;
}

.tp-input.is-invalid,
.tp-select.is-invalid {
    border-color: var(--tp-danger);
    box-shadow: 0 0 0 0.16rem rgba(231, 74, 59, 0.10);
}

.tp-input.is-invalid~.tp-float-label,
.tp-select.is-invalid~.tp-float-label {
    color: var(--tp-danger);
}

.tp-input--password {
    padding-right: 56px;
}

.tp-float-label {
    position: absolute;
    left: 42px;
    top: 50%;
    z-index: 3;
    max-width: calc(100% - 92px);
    padding: 0 7px;
    border-radius: 8px;
    background: #fff;
    color: #6a7681;
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.2;
    pointer-events: none;
    transform: translateY(-50%);
    transition:
        top 0.18s ease-in-out,
        left 0.18s ease-in-out,
        transform 0.18s ease-in-out,
        color 0.18s ease-in-out,
        font-size 0.18s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-input:focus~.tp-float-label,
.tp-input:not(:placeholder-shown)~.tp-float-label,
.tp-select:focus~.tp-float-label,
.tp-select~.tp-float-label {
    top: 0;
    left: 18px;
    color: #33414b;
    font-size: 0.74rem;
    transform: translateY(-50%);
}

.tp-input:focus~.tp-float-label,
.tp-select:focus~.tp-float-label {
    color: var(--tp-primary);
}

.tp-error {
    display: none;
    margin: 7px 2px 0;
    color: var(--tp-danger);
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.35;
}

.tp-field.has-error .tp-error,
.tp-check-field.has-error .tp-error {
    display: block;
}

.tp-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--tp-secondary);
    font-size: 1.14rem;
    line-height: 1;
    transform: translateY(-50%);
}

.tp-password-toggle:focus,
.tp-password-toggle:hover {
    color: var(--tp-primary);
    background: var(--tp-primary-soft);
    outline: none;
}

/* Cards (you’ll use this everywhere soon) */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 5px 14px rgba(74, 79, 87, 0.05);
}

/* Links */
a {
    color: var(--tp-primary);
    text-decoration: none;
}

a:hover {
    color: var(--tp-primary-dark);
}

/* Keep motion intentional and avoid animating layout-sensitive properties globally */
.dropdown-menu,
.swal2-container,
.swal2-popup,
.swal2-backdrop-show,
.swal2-backdrop-hide,
body.swal2-shown,
body.swal2-height-auto {
    transition: none !important;
    animation: none !important;
}

.swal2-container {
    z-index: 2147483647 !important;
}

body.swal2-shown,
body.modal-open {
    padding-right: 0 !important;
}

.text-primary,
a.text-primary {
    color: var(--tp-text-primary) !important;
}

.text-secondary,
a.text-secondary {
    color: var(--tp-text-secondary) !important;
}

.text-muted,
a.text-muted {
    color: var(--tp-text-muted) !important;
}

.text-danger,
a.text-danger {
    color: var(--tp-text-danger) !important;
}

.text-info,
a.text-info {
    color: var(--tp-text-info) !important;
}

.text-success,
a.text-success {
    color: var(--tp-text-success) !important;
}

.text-light,
a.text-light {
    color: var(--tp-text-light) !important;
}

.text-white,
a.text-white {
    color: var(--tp-text-white) !important;
}

.text-warning,
a.text-warning {
    color: var(--tp-text-warning) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    max-width: 95% !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background: var(--tp-primary-soft) !important;
}

.swal2-confirm {
    background-color: var(--tp-primary) !important;
    color: #fff !important;
    border-radius: 12px !important;
    border: none !important;
}

.bottom-tab-bar {
    position: fixed !important;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 80px;
    padding: 0px 9px 5px 9px;
    border: 1px solid rgba(227, 234, 242, 0.92);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -2px 14px rgba(31, 45, 61, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    display: grid;
    gap: 0;
    z-index: 1099;
    transform: none;
    will-change: auto;
    overflow: hidden;
}

.bottom-tab-bar.guest {
    grid-template-columns: repeat(4, 1fr);
}
.bottom-tab-bar.tenant {
    grid-template-columns: repeat(4, 1fr);
}

.bottom-tab-bar.tenant .tab-bar-link {
    min-height: 75px;
}

.bottom-tab-bar-item {
    position: relative;
    z-index: 1;
    text-align: center;
    min-width: 0;
    border-top: 2px solid transparent;
}

.tab-bar-link {
    position: relative;
    min-height: 65px;
    width: 100%;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px;
    color: var(--tp-secondary);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.tab-bar-link:active {
    transform: scale(0.94);
}

.tab-bar-link:focus,
.tab-bar-link:hover {
    color: var(--tp-primary);
    text-decoration: none;
    outline: none;
}

.page-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: var(--tp-page-nav-height);
    background: var(--tp-light);
    border-bottom: 1px solid var(--tp-border);
    box-shadow: 0 2px 8px rgba(31, 45, 61, 0.06);
    position: fixed;
    top: var(--tp-shell-top-space);
    left: 0;
    right: 0;
    z-index: 1098;
}

.page-nav-back {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--tp-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.18s ease;
}

.page-nav-back:hover {
    background: var(--tp-primary-soft);
}

.page-nav-back i {
    font-size: 18px;
}

.top-tab-bar {
    position: fixed;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 1099;
}

.top-tab-bar.guest {
    top: calc(env(safe-area-inset-top, 0px) + 4px);

}

.top-tab-bar.user {
    top: 0;
}

.top-tab-bar.guest .top-tab-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 62px;
    width: min(430px, calc(100% - 22px));
    border: 1px solid rgba(227, 234, 242, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.04);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.top-tab-bar.user .top-tab-bar-item {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    text-align: center;
    min-height: calc(env(safe-area-inset-top, 0px) + 80px);
    width: min(100vw, 100%);
    border: 1px solid rgba(227, 234, 242, 0.92);
    border-radius: 0px;
    background: #000;
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.04);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    padding: 0 16px 1rem;
}

.bottom-tab-bar-item.active {
    border-top-color: var(--tp-primary);
}

.bottom-tab-bar-item.active .tab-bar-link {
    color: var(--tp-primary);
}

.tab-bar-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.2rem;
    color: currentColor;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.bottom-tab-bar-item.active .tab-bar-icon {
    color: var(--tp-primary-dark);
    transform: translateY(-1px);
}

.tab-bar-label {
    max-width: 100%;
    color: currentColor;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-bar-logo {
    display: block;
    width: min(176px, 58vw);
    height: auto;
}

.tp-user-topbar {
    position: relative;
    gap: 12px;
}

.tp-user-topbar-logo-link {
    min-width: 0;
    max-width: min(238px, calc(100% - 116px));
    display: inline-flex;
    align-items: center;
}

.tp-user-topbar-logo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
}

.tp-user-topbar-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.tp-user-notification-action {
    position: relative;
    overflow: visible;
}

/* portal.js adds .tp-ripple-host on pointer down. Keep top-bar controls
   from clipping the notification badge while preserving the ripple effect. */
.tp-user-topbar-action.tp-ripple-host {
    overflow: visible;
    isolation: isolate;
}

.tp-user-topbar-action .tp-ripple {
    z-index: 0;
    border-radius: inherit;
}

.tp-user-topbar-action > i {
    position: relative;
    z-index: 1;
}

.tp-user-notification-badge {
    position: absolute;
    top: -8px;
    right: -9px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid #fff;
    border-radius: 999px;
    background: var(--tp-danger);
    color: #fff;
    font-size: 0.61rem;
    font-weight: 900;
    line-height: 1;
    z-index: 3;
    pointer-events: none;
}

/* Allow the bell badge to extend beyond the rounded top-bar surface. */
.top-tab-bar.user .top-tab-bar-item {
    overflow: visible;
}

.tp-user-topbar-action,
.tp-user-menu-close {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
    font-size: 1.35rem;
    flex: 0 0 46px;
    text-decoration: none;
}

.tp-user-menu-button {
    appearance: none;
    -webkit-appearance: none;
}

.tp-user-menu-close {
    background: #f8fafc;
    color: var(--tp-dark);
    font-size: 1.05rem;
}

.tp-user-topbar-action:focus,
.tp-user-topbar-action:hover,
.tp-user-menu-close:focus,
.tp-user-menu-close:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
    text-decoration: none;
    outline: none;
}

.tp-user-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1088;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.tp-user-dropdown-menu {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 72px);
    right: 12px;
    z-index: 1200;
    width: min(228px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid rgba(227, 234, 242, 0.94);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 45, 61, 0.16);
    opacity: 0;
    transform: translate3d(0, -8px, 0) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

html.tp-user-menu-open .tp-user-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

html.tp-user-menu-open .tp-user-dropdown-menu {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
}

.tp-user-dropdown-item {
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 13px;
    color: var(--tp-dark);
    font-size: 0.93rem;
    font-weight: 820;
    text-align: left;
    text-decoration: none;
}

.tp-user-dropdown-item:focus,
.tp-user-dropdown-item:hover {
    color: var(--tp-primary);
    background: var(--tp-primary-soft);
    text-decoration: none;
    outline: none;
}

.tp-user-dropdown-item i {
    color: currentColor;
    font-size: 1.05rem;
}

.tp-more-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(31, 45, 61, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.tp-more-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 2147483010;
    width: min(430px, 100%);
    max-height: calc(100svh - env(safe-area-inset-top, 0px) - 12px);
    padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
    border: 1px solid rgba(227, 234, 242, 0.96);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -10px 26px rgba(31, 45, 61, 0.12);
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
    touch-action: pan-y;
    transform: translate(-50%, 104%);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html.tp-more-sheet-open .tp-more-sheet-backdrop {
    opacity: 1;
    pointer-events: auto;
}

html.tp-more-sheet-open .tp-more-sheet {
    transform: translate(-50%, 0);
}

html.tp-more-sheet-open,
html.tp-more-sheet-open body {
    overflow: hidden;
    overscroll-behavior: none;
}

html.tp-more-sheet-expanded .tp-more-sheet {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    min-height: calc(100svh - env(safe-area-inset-top, 0px) - 10px);
    transform: translate(-50%, 0);
}

html.tp-more-sheet-open .bottom-tab-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 22px));
    transition: opacity 0.16s ease, transform 0.2s ease;
}

/* Hide bottom tab bar while soft keyboard is open — display:none so the
   space is fully reclaimed and the keyboard doesn't push anything up. */
.bottom-tab-bar.tp-keyboard-open {
    display: none !important;
}

/* Keep bottom sheets inside the space left above the software keyboard.
   resizes-content handles modern Android PWAs; these visual-viewport values
   cover Samsung/WebView and iOS implementations that only resize or pan the
   visual viewport. */
html.tp-keyboard-visible body .wf-sheet,
html.tp-keyboard-visible body .tp-edit-sheet,
html.tp-keyboard-visible body .up-sheet,
html.tp-keyboard-visible body .vs-sheet,
html.tp-keyboard-visible body .tp-forgot-sheet,
html.tp-keyboard-visible body .tp-more-sheet {
    top: auto;
    bottom: var(--tp-keyboard-inset, 0px);
    min-height: 0;
    max-height: calc(var(--tp-visual-viewport-height, 100dvh) - env(safe-area-inset-top, 0px) - 12px);
}

.tp-more-sheet-handle {
    width: 42px;
    height: 24px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-more-sheet-handle::before {
    content: "";
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: rgba(31, 45, 61, 0.16);
}

.tp-more-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.tp-more-sheet-title {
    margin: 0 0 4px;
    color: var(--tp-dark);
    font-family: var(--tp-heading-font-family);
    font-size: 1.28rem;
    font-weight: 850;
    line-height: 1.18;
}

.tp-more-sheet-subtitle {
    margin: 0;
    color: var(--tp-secondary);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.35;
}

.tp-more-sheet-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: var(--tp-light);
    color: var(--tp-dark);
    font-size: 1rem;
}

.tp-more-sheet-close:focus,
.tp-more-sheet-close:hover {
    color: var(--tp-primary);
    background: var(--tp-primary-soft);
    outline: none;
}

.tp-more-sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tp-more-sheet-action {
    min-height: 104px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
    padding: 12px 8px;
    border: 1px solid rgba(227, 234, 242, 0.96);
    border-radius: 18px;
    background: #fff;
    color: var(--tp-dark);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.05);
}

.tp-more-sheet-action:focus,
.tp-more-sheet-action:hover {
    border-color: rgba(0, 112, 192, 0.22);
    color: var(--tp-primary);
    background: #fbfdff;
    text-decoration: none;
    outline: none;
}

.tp-more-sheet-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-primary-soft);
    color: var(--tp-primary);
    font-size: 1.28rem;
}

.tp-user-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(227, 234, 242, 0.86);
}

.tp-user-menu-kicker {
    margin: 0 0 3px;
    color: var(--tp-secondary);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.1;
    text-transform: uppercase;
}

.tp-user-menu-title {
    margin: 0;
    color: var(--tp-dark);
    font-family: var(--tp-heading-font-family);
    font-size: 1.16rem;
    font-weight: 850;
    line-height: 1.22;
}

.tp-user-menu-list {
    display: grid;
    gap: 10px;
    padding-top: 16px;
}

.tp-user-menu-item {
    min-height: 58px;
    display: grid;
    grid-template-columns: 42px 1fr 22px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(227, 234, 242, 0.95);
    border-radius: 18px;
    background: #fff;
    color: var(--tp-dark);
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
}

.tp-user-menu-item:focus,
.tp-user-menu-item:hover {
    color: var(--tp-primary);
    background: #fbfdff;
    text-decoration: none;
    outline: none;
}

.tp-user-menu-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-primary-soft);
    color: var(--tp-primary);
    font-size: 1.16rem;
}

.tp-user-menu-chevron {
    color: var(--tp-secondary);
    font-size: 0.9rem;
}

.tp-user-menu-item--danger {
    color: var(--tp-danger-dark);
}

.tp-user-menu-item--danger .tp-user-menu-icon {
    background: var(--tp-danger-soft);
    color: var(--tp-danger);
}

.tp-user-menu-item--secondary {
    color: var(--tp-secondary-dark);
}

.tp-user-menu-item--secondary .tp-user-menu-icon {
    background: var(--tp-light);
    color: var(--tp-secondary);
}

@media (prefers-reduced-motion: reduce) {

    .tp-user-menu-backdrop,
    .tp-user-dropdown-menu,
    .tp-more-sheet-backdrop,
    .tp-more-sheet {
        transition: none;
    }
}

@keyframes tpAuthSlideFromRight {
    from {
        opacity: 0.55;
        transform: translate3d(34px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes tpAuthSlideFromLeft {
    from {
        opacity: 0.55;
        transform: translate3d(-34px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes tpPullRefreshSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes tpRipple {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

html.tp-tab-enter-right .main>.container-fluid,
html.tp-auth-enter-right .main>.container-fluid {
    animation: tpAuthSlideFromRight 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

html.tp-tab-enter-left .main>.container-fluid,
html.tp-auth-enter-left .main>.container-fluid {
    animation: tpAuthSlideFromLeft 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {

    .tp-ripple,
    html.tp-pull-refresh-loading .tp-pull-refresh-icon,
    html.tp-tab-enter-right .main>.container-fluid,
    html.tp-tab-enter-left .main>.container-fluid,
    html.tp-auth-enter-right .main>.container-fluid,
    html.tp-auth-enter-left .main>.container-fluid {
        animation: none;
    }
}
