/* cleaned & deduplicated in later section */

.bottom-nav {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0px 0 0px;
    border-top: 1px solid #ececec;
    background: #ffffff;
}

#debug-icon {
    display: none !important;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    color: #a1a2b3;
    border: none;
    padding: 20px;
}

.nav-item.active {
    color: #111111;
    font-weight: 600;
}

.nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid #e4e4ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.nav-item.active .nav-icon {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

@media (max-width: 480px) {
    .app-shell {
        box-shadow: none;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 15px;
    background: #f2f2f6;
    display: flex;
    justify-content: center;
}

.app-shell {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    flex-direction: column;
}

.tab-header {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid #f0f0f0;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
    color: #999999;
}

.tab.active {
    color: #111111;
    font-weight: 600;
    border-bottom: 2px solid #111111;
}

.wrap {
    max-width: 420px;
    margin: 5rem auto;
    padding: 2rem;
    background: #fff;
    text-align: center;
    border: 1px solid #efefef;
    border-radius: 0.5rem;
    position: relative;
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 80px;
}

.qr-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 18px;
}

.qr-box {
    width: 140px;
    height: 140px;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-box img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.label-row {
    display: flex;
    align-items: center;
    font-size: 13px;
    margin-bottom: 6px;
}

.label-row span {
    margin-left: 6px;
}

.wallet-row {
    margin-top: 8px;
}

.wallet-label {
    font-size: 15px;
    color: #999999;
    margin-bottom: 4px;
}

.wallet-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    padding: 10px 15px;
    font-size: 15px;
    background: #fafafa;
}

.wallet-text {
    word-break: break-all;
    margin-right: 8px;
}

.copy-btn {
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    cursor: pointer;
    font-size: 16px;
}

.info-box {
    margin-top: 16px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    background: #fafafa;
    padding: 10px 15px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-row {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.calc-input {
    margin-top: 8px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    padding: 10px 15px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.calc-text {
    margin-top: 10px;
    font-size: 15px;
}

.auth-wrapper {
    max-width: 420px;
    width: 100%;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f9fb;
    border: 1px solid #f0f1f5;
}

.input-wrapper input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    font-size: 15px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #555;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #444;
}

.error-text {
    color: #d9534f;
    font-size: 13px;
    margin-top: 4px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-error {
    background: #ffe6e6;
    color: #b30000;
}

.alert-success {
    background: #e7f7ec;
    color: #1c7c3c;
}

.auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
}

.auth-switch a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.main {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 80px;
}

.profile-header {
    display: block;
    align-items: center;
    margin-bottom: 10px;
}

.profile-title-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.profile-title {
    font-size: 16px;
    font-weight: 600;
}

.profile-caret {
    font-size: 14px;
    color: #111111;
}

.profile-id {
    font-size: 12px;
    color: #777777;
    margin-top: 4px;
}

.quota-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 12px;
}

.quota-label {
    font-size: 12px;
    color: #777777;
    margin-top: 12px;
}

.quota-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
}

.quota-amount {
    font-size: 28px;
    font-weight: 700;
}

.quota-currency {
    font-size: 14px;
    font-weight: 600;
}

.reward-ratio {
    font-size: 12px;
    color: #777777;
    margin-top: 4px;
}

.topup-btn {
    margin-left: 12px;
    border-radius: 18px;
    padding: 8px 18px;
    border: none;
    background: #111111;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.list-card {
    margin-top: 18px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    font-size: 14px;
    cursor: pointer;
}

.list-item+.list-item {
    border-top: 1px solid #f5f5f5;
}

.list-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-icon {
    width: 20px;
    text-align: center;
}

.list-chevron {
    font-size: xx-large;
    color: #bbbbbb;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.title {
    font-size: 16px;
    font-weight: 700;
}

.main {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px 16px;
}

.tx-group {
    margin-bottom: 18px;
}

.tx-type {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    background: #f1fffe;
    width: fit-content;
    padding: 2px 6px;
    border-radius: 5px;
    color: #00c2b7;
}

.tx-row,
.tx-time {
    font-size: 13px;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.tx-label {
    color: #999999;
}

.main {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 80px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card {
    border-radius: 12px;
    background: #333333;
    color: #ffffff;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.card-value {
    font-size: 20px;
    font-weight: 700;
}

.card-label {
    font-size: 12px;
    color: #d0d0d0;
}

.invite-box {
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 20px;
}

.invite-url {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.copy-btn {
    border: none;
    border-radius: 6px;
    background: #f5f5f7;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
}

.no-data {
    text-align: center;
    margin-top: 40px;
    color: #777777;
    font-size: 13px;
}

.member-list {
    margin-top: 10px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
    font-size: 13px;
}

.member-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.title {
    font-size: 16px;
    font-weight: 700;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    background: #ffffff;
    cursor: pointer;
}

.main {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px 16px;
}

.tx-group {
    margin-bottom: 18px;
}

.tx-type {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tx-type.transfer_out {

    background: #ffe9ed;
    width: fit-content;
    padding: 2px 5px;
    border-radius: 5px;
    color: #fe5b79;
}

.tx-type.activity_reward {
    background: #f1fffe;
    width: fit-content;
    padding: 2px 5px;
    border-radius: 5px;
    color: #00c2b7;

}

.tx-type.reward {
    background: #f1fffe;
    width: fit-content;
    padding: 2px 5px;
    border-radius: 5px;
    color: #00c2b7;

}

.tx-type.recharge {
    background: #f1fffe;
    width: fit-content;
    padding: 2px 5px;
    border-radius: 5px;
    color: #00c2b7;

}

.tx-type.receive {
    background: #ffe9ed;
    width: fit-content;
    padding: 2px 5px;
    border-radius: 5px;
    color: #fe5b79;
}

.tx-row,
.tx-time {
    font-size: 13px;
    margin-bottom: 2px;
    justify-content: space-between;
    display: flex;
    font-weight: 500;
}

.tx-label {
    display: inline-block;
    width: 70px;
    color: #999999;
}

.tx-time {
    font-size: 12px;
    color: #777777;
    margin-top: 4px;
}

.filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 40;
}

.filter-sheet {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    padding: 12px 16px 18px;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
}

.filter-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    font-size: 14px;
    cursor: pointer;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.filter-item.active .filter-check {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* ===== Account info page ===== */
.account-main {
    padding-top: 24px;
}

.account-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    margin-top: 8px;
}

.account-avatar .material-icons {
    font-size: 80px;
    color: #666666;
}

.account-list {
    margin: 0 12px;
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    font-size: 14px;
    margin-bottom: 10px;
}

.account-label {
    color: #555555;
}

.account-value {
    color: #999999;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.account-row-clickable {
    cursor: pointer;
}

.account-chevron {
    font-size: 16px;
    color: #bbbbbb;
}

/* ===== Change password page ===== */
.change-pass-main {
    padding: 24px 16px 40px;
}

.change-pass-field {
    margin-bottom: 14px;
}

.change-pass-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    background: #fafafa;
    font-size: 14px;
    box-sizing: border-box;
}

.change-pass-submit {
    margin-top: 18px;
    width: 100%;
    border-radius: 999px;
    border: none;
    padding: 13px 0;
    font-size: 15px;
    font-weight: 600;
    background: #000000;
    color: #ffffff;
    cursor: pointer;
}

/* ===== Contact Us Modal ===== */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.contact-modal.active {
    display: flex;
}

.contact-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.contact-modal-content {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 32px;
    z-index: 1001;
    animation: slideUp 0.3s ease-out;
    max-width: 420px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.contact-options {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

.contact-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.contact-icon:active {
    transform: scale(0.95);
}

.telegram-icon {
    background: #0088cc;
}

.whatsapp-icon {
    background: #25d366;
}

.contact-label {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
}