/* BOF Dashboard overview page (index.php) */
.dashboard_page,
.dashboard_page * {
    box-sizing: border-box;
}

.dashboard_page .dash_section {
    margin-bottom: 24px;
}

.dashboard_page .section_heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard_page .section_heading h2 {
    flex: 1;
    margin: 0;
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 19px;
    line-height: 24px;
    color: #f4f2ed;
}

.dashboard_page .section_note {
    font-family: var(--font-primary-500);
    font-size: 11px;
    color: #a0a4a3;
}

.dashboard_page .status_badge img {
    width: 14px;
    height: 14px;
    display: block;
}

.dashboard_page .divider_line {
    width: 100%;
    height: 1px;
    margin: 0;
    border: none;
    background: #2d3031;
}

/* Amount rows (shared by overview + card panel) */
.dashboard_page .amount_row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
    font-family: 'roboto-mono-medium';
}

.dashboard_page .amount_row strong {
    font-weight: normal;
    color: #ceb48b;
    letter-spacing: -0.5px;
}

.dashboard_page .amount_row span {
    font-family: var(--font-primary-500);
    font-size: 11px;
    color: #a0a4a3;
}

.dashboard_page .amount_row--lg strong {
    font-size: 28px;
    line-height: 36px;
}

.dashboard_page .amount_row--md strong {
    font-size: 22px;
    line-height: 28px;
}

.dashboard_page .amount_row--sm strong {
    font-size: 18px;
    line-height: 26px;
}

/* Account overview */
.dashboard_page .overview_card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: #1d2022;
    border-radius: 28px;
}

.dashboard_page .overview_total,
.dashboard_page .overview_metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard_page .overview_metrics {
    display: flex;
    gap: 16px;
}

.dashboard_page .overview_metric {
    flex: 1;
    min-width: 0;
}

.dashboard_page .overview_label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard_page .overview_label span:last-child {
    flex: 1;
    min-width: 0;
    font-family: var(--font-primary-400);
    font-size: 13px;
    color: #a0a4a3;
}

.dashboard_page .overview_icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #28241d;
    border-radius: 12px;
}

.dashboard_page .overview_icon img {
    width: 18px;
    height: 18px;
    display: block;
}

.dashboard_page .overview_icon--sm {
    width: 24px;
    height: 24px;
    border-radius: 12px;
}

.dashboard_page .overview_icon--sm img {
    width: 14px;
    height: 14px;
}

/* My cards */
.dashboard_page .my_cards_body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.dashboard_page .card_carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.dashboard_page .card_carousel_viewport {
    width: 100%;
    padding: 0px;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
}

.dashboard_page .card_carousel_viewport.is_dragging {
    cursor: grabbing;
}

.dashboard_page .card_carousel_track {
    display: flex;
    align-items: center;
    width: 500%;
    will-change: transform;
}

.dashboard_page .card_slide {
    flex: 0 0 20%;
    width: 20%;
    min-width: 0;
    padding: 15px;
}

.dashboard_page .card_carousel_image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.dashboard_page .card_carousel_nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.dashboard_page .carousel_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: none;
    font-family: var(--font-primary-600);
    font-size: 13px;
    color: #a0a4a3;
    cursor: pointer;
}

.dashboard_page .carousel_btn--next {
    justify-content: flex-end;
}

.dashboard_page .carousel_arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.dashboard_page .carousel_arrow img {
    display: block;
    width: 18px;
    height: 18px;
}

.dashboard_page .carousel_btn--prev .carousel_arrow img {
    transform: rotate(180deg);
}

.dashboard_page .carousel_position {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dashboard_page .carousel_count {
    font-family: var(--font-primary-500);
    font-size: 11px;
    color: #a0a4a3;
}

.dashboard_page .carousel_dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard_page .carousel_dots .dot {
    width: 6px;
    height: 6px;
    background: #a0a4a3;
    border-radius: 3px;
    opacity: 0.45;
    transition: width ease 0.2s, opacity ease 0.2s;
}

.dashboard_page .carousel_dots .dot.is_active {
    width: 18px;
    background: #ceb48b;
    opacity: 1;
}

.dashboard_page .card_actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.dashboard_page .card_action {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: none;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
}

.dashboard_page .card_action_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #1d2022;
    border: 1px solid #2d3031;
    border-radius: 12px;
}

.dashboard_page .card_action_icon--gold {
    background: #ceb48b;
    border: none;
}

.dashboard_page .card_action_icon img {
    width: 26px;
    height: 26px;
}

.dashboard_page .card_action span {
    font-family: var(--font-primary-600);
    font-size: 13px;
    color: #d8c3a2;
    text-align: center;
}

.dashboard_page .no_card_panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
    padding: 20px;
    overflow: hidden;
    background: #141719;
    border: 1px solid #ceb48b;
    border-radius: 28px;
}

.dashboard_page .no_card_accent {
    position: absolute;
    top: -40px;
    right: -20px;
    width: 160px;
    height: 160px;
    opacity: 0.3;
    object-fit: contain;
    pointer-events: none;
}

.dashboard_page .no_card_panel p {
    position: relative;
    margin: 0;
    max-width: 240px;
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 19px;
    letter-spacing: 1.5px;
    line-height: 1.4;
    color: #d8c3a2;
    text-align: center;
}

.dashboard_page .card_panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background: #141719;
    border-radius: 28px;
}

.dashboard_page .card_panel_balance {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard_page .card_panel_balance_label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary-400);
    font-size: 13px;
    color: #a0a4a3;
}

.dashboard_page .balance_toggle {
    display: flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.dashboard_page .balance_toggle img {
    display: block;
    width: 20px;
    height: 20px;
}

.dashboard_page .card_panel_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dashboard_page .card_panel_row span:first-child {
    flex: 1;
    min-width: 0;
    font-family: var(--font-primary-400);
    font-size: 13px;
    color: #a0a4a3;
}

.dashboard_page .card_panel_row_value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.dashboard_page .card_panel_row_value strong {
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 13px;
    color: #f4f2ed;
}

.dashboard_page .card_panel_row_value small {
    font-family: var(--font-primary-500);
    font-size: 11px;
    font-style: normal;
    color: #a0a4a3;
}

/* Rebate rates */
.dashboard_page .rebate_tables {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard_page .rebate_card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #141719;
    border-radius: 28px;
}

.dashboard_page .rebate_card h3 {
    margin: 0;
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 19px;
    line-height: 24px;
    color: #f4f2ed;
}

.dashboard_page .rebate_table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard_page .rebate_table th {
    height: 28px;
    padding: 0;
    font-family: var(--font-primary-500);
    font-weight: normal;
    font-size: 11px;
    color: #a0a4a3;
    text-align: left;
}

.dashboard_page .rebate_table td {
    height: 44px;
    padding: 0;
    border-top: 1px solid rgba(45, 48, 49, 0.65);
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 13px;
    color: #f4f2ed;
    text-align: left;
}

.dashboard_page .rebate_table .cell_rank {
    font-family: var(--font-primary-400);
    color: #a0a4a3;
    text-align: center;
}

.dashboard_page .rebate_table .cell_cashback {
    font-size: 15px;
    color: #a0a4a3;
    text-align: right;
}

.dashboard_page .rebate_table th.cell_rank {
    text-align: center;
}

.dashboard_page .rebate_table th.cell_cashback {
    text-align: right;
}

.dashboard_page .rebate_table tr.is_current .cell_tier,
.dashboard_page .rebate_table tr.is_current .cell_rank,
.dashboard_page .rebate_table tr.is_current .cell_cashback {
    color: #ceb48b;
}

/* Card details bottom sheet (rendered as a sibling of .dashboard_page, not a descendant) */
.sheet_overlay,
.sheet_overlay * {
    box-sizing: border-box;
}

.sheet_overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity ease 0.2s, visibility ease 0.2s;
}

.sheet_overlay.show {
    opacity: 1;
    visibility: visible;
}

.sheet_overlay.show .bottom_sheet {
    transform: translateY(0);
}

.bottom_sheet {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 430px;
    max-height: 85vh;
    padding: 12px 20px calc(32px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: #1d2022;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%);
    transition: transform ease 0.25s;
    font-family: var(--font-primary-400);
}

.sheet_handle {
    width: 36px;
    height: 4px;
    margin: 0 auto;
    background: #a0a4a3;
    opacity: 0.6;
    border-radius: 2px;
}

.sheet_heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sheet_title {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sheet_heading .sheet_title h2 {
    flex: 0 1 auto;
}

.sheet_heading h2 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 19px;
    line-height: 24px;
    color: #f4f2ed;
}

.sheet_close {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #141719;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.sheet_close img {
    width: 20px;
    height: 20px;
}

.sheet_group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet_subheading {
    margin: 0;
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 13px;
    color: #f4f2ed;
}

.sheet_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sheet_label {
    flex: 1;
    min-width: 0;
    font-family: var(--font-primary-400);
    font-size: 13px;
    color: #a0a4a3;
}

.sheet_value {
    flex-shrink: 0;
    white-space: nowrap;
    color: #f4f2ed;
}

.sheet_value--identity {
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 15px;
}

.sheet_value--amount {
    font-family: 'roboto-mono-medium';
    font-size: 18px;
    letter-spacing: -0.5px;
}

.sheet_value--fee {
    font-family: 'roboto-mono-medium';
    font-size: 15px;
    letter-spacing: -0.5px;
}

.sheet_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    margin-top: 4px;
    background: #1d2022;
    border: 1px solid #2d3031;
    border-radius: 12px;
    font-family: var(--font-primary-600);
    font-size: 15px;
    color: #f4f2ed;
    text-decoration: none;
    cursor: pointer;
    transition: background ease 0.2s, border-color ease 0.2s, color ease 0.2s;
}

.sheet_btn:hover {
    background: #28241d;
    border-color: #ceb48b;
    color: #ceb48b;
}

/* Individual dashboard page (index-individual.php) */
.dashboard_page .card_preview {
    position: relative;
}

.dashboard_page .card_preview_number {
    position: absolute;
    left: 20px;
    bottom: 24px;
    font-family: var(--font-primary-600);
    font-weight: normal;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #181a1b;
}
/* EOF Dashboard overview page (index.php) */

/* BOF Captcha (login.php, register.php, forgot-password.php) */
.access_wrapper .captcha_img img {
    display: none;
}

.access_wrapper .captcha_code {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'roboto-mono-medium';
    font-size: 15px;
    letter-spacing: 4px;
    color: #d8c3a2;
}

.access_wrapper .captcha_code span {
    display: inline-block;
}
/* EOF Captcha */


.access_wrapper.support_page .chat_bubble p,
.access_wrapper.support_page .chat_note {
    font-size: 14px;
}

/* BOF Support pages body text standardized to 14px (support.php, support-chat.php, support-chat-sent.php, support-history.php, support-new.php) */
.app_wrapper.support_page .support_intro,
.app_wrapper.support_page .support_item_text strong,
.app_wrapper.support_page .support_meta,
.app_wrapper.support_page .support_preview,
.access_wrapper.support_page .support_new p,
.access_wrapper.support_page .support_notice h3,
.access_wrapper.support_page .support_notice p,
.access_wrapper.support_page .chat_date,
.access_wrapper.support_page .chat_sender,
.access_wrapper.support_page .chat_time,
.access_wrapper.support_page .chat_input {
    font-size: 14px;
}

/* BOF Preloader */
.app_preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #15130f 0%, var(--background-color, #090B0C) 65%);
    transition: opacity .6s ease, visibility .6s ease, transform .6s ease;
    /* Safety net: hide even if JS never runs */
    animation: app_preloader_fallback 0s linear 10s forwards;
}

.app_preloader.is_hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.06);
}

.app_preloader_logo {
    display: block;
    width: 220px;
    max-width: 60vw;
    height: auto;
    overflow: visible;
    animation: app_preloader_logo_glow 4s ease-in-out infinite;
}

.app_preloader_letter {
    fill: #fff;
    fill-opacity: 0;
    stroke: var(--primary-color, #CEB48B);
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: app_preloader_draw 4s ease-in-out var(--d, 0s) infinite both;
}

.app_preloader_x {
    fill: #BFAC8A;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}

.app_preloader_x_top {
    animation: app_preloader_x_top 4s infinite both;
}

.app_preloader_x_bottom {
    animation: app_preloader_x_bottom 4s infinite both;
}

.app_preloader_flash {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: app_preloader_flash 4s ease-out infinite both;
}

.app_preloader_shine {
    animation: app_preloader_shine 4s ease-in-out infinite both;
}

body.preloader_active {
    overflow: hidden;
}

/* Keyframes (all logo parts share the same 4s cycle so the sequence stays in sync) */
@keyframes app_preloader_draw {
    0% { stroke-dashoffset: 1; fill-opacity: 0; stroke-opacity: 1; opacity: 1; }
    30% { stroke-dashoffset: 0; fill-opacity: 0; stroke-opacity: 1; }
    45% { fill-opacity: 1; stroke-opacity: 0; }
    85% { stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; opacity: 1; }
    95%, 100% { stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; opacity: 0; }
}

@keyframes app_preloader_x_top {
    0%, 28% { opacity: 0; transform: translate(90px, -120px) rotate(-90deg) scale(.4); animation-timing-function: cubic-bezier(.2, 1.5, .4, 1); }
    42% { opacity: 1; transform: none; }
    88% { opacity: 1; transform: none; }
    98%, 100% { opacity: 0; transform: none; }
}

@keyframes app_preloader_x_bottom {
    0%, 28% { opacity: 0; transform: translate(-90px, 120px) rotate(90deg) scale(.4); animation-timing-function: cubic-bezier(.2, 1.5, .4, 1); }
    42% { opacity: 1; transform: none; }
    88% { opacity: 1; transform: none; }
    98%, 100% { opacity: 0; transform: none; }
}

@keyframes app_preloader_flash {
    0%, 40% { opacity: 0; transform: scale(.2); }
    44% { opacity: 1; transform: scale(1); }
    58%, 100% { opacity: 0; transform: scale(2.2); }
}

@keyframes app_preloader_shine {
    0%, 52% { transform: translateX(0) skewX(-20deg); }
    75%, 100% { transform: translateX(1000px) skewX(-20deg); }
}

@keyframes app_preloader_logo_glow {
    0%, 40% { filter: drop-shadow(0 0 0 rgba(206, 180, 139, 0)); }
    55% { filter: drop-shadow(0 0 14px rgba(206, 180, 139, .7)); }
    80% { filter: drop-shadow(0 0 6px rgba(206, 180, 139, .35)); }
    100% { filter: drop-shadow(0 0 0 rgba(206, 180, 139, 0)); }
}

@keyframes app_preloader_fallback {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* Reduced motion: static, fully drawn logo */
@media (prefers-reduced-motion: reduce) {
    .app_preloader * {
        animation: none !important;
    }

    .app_preloader_letter {
        fill-opacity: 1;
        stroke-opacity: 0;
    }

    .app_preloader_x {
        opacity: 1;
    }
}
/* EOF Preloader */

/* Support chat: growing message box, failed send, admin-reply badge (findings 07-11-2026, FE 7) */
.access_wrapper.support_page .chat_composer {
    height: auto;
    min-height: 50px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.access_wrapper.support_page .chat_input {
    height: 36px;
    max-height: 120px;
    padding: 9px 0;
    line-height: 18px;
    resize: none;
    outline: none;
    overflow-y: auto;
}
.access_wrapper.support_page .chat_bubble.is_failed .chat_time {
    color: #E5484D;
}
.support_item .support_reply_badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    background: #C8B693;
    color: #161A1B;
    font-size: 11px;
    font-family: var(--font-primary-600);
}

/* Profile referral code (findings 07-11-2026, FE 8.1) */
.profile_card .profile_referral {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    font-size: 12px;
    color: #A0A2A4;
}
.profile_card .profile_referral span {
    color: #F4F2ED;
    font-family: var(--font-primary-600);
}
.profile_card .profile_copy {
    display: inline-flex;
    padding: 2px;
    border: none;
    background: transparent;
    color: #C8B693;
    cursor: pointer;
}
.profile_card .profile_copy svg {
    width: 14px;
    height: 14px;
}
.profile_card .profile_copy.is_copied {
    color: #4CC38A;
}
.profile_card .profile_referral .profile_copied {
    margin-left: 4px;
    color: #4CC38A;
    font-size: 12px;
}

/* Card image uploaded in BO Card Tier Settings: keep the card shape whatever size was uploaded. */
.card_image_uploaded {
    aspect-ratio: 700 / 422;
    object-fit: cover;
}
