/*
 * SmartCoin mobile UI foundation
 * Shared by legacy ThinkPHP mobile views. Keep feature-specific pages scoped to
 * their own body class; this file only normalizes pages marked .sc-mobile-page.
 */
:root {
    --sc-bg: #f4f5f7;
    --sc-surface: #ffffff;
    --sc-surface-soft: #f8f9fa;
    --sc-text: #1b1f25;
    --sc-muted: #7d858f;
    --sc-border: #e0e3e7;
    --sc-gold: #c58c12;
    --sc-gold-dark: #8e650b;
    --sc-gold-soft: #fff4d5;
    --sc-green: #0baa78;
    --sc-red: #df4d5f;
    --sc-shadow: 0 8px 24px rgba(25, 31, 40, .055);
    --sc-radius: 16px;
}

html {
    color-scheme: light;
    background: var(--sc-bg);
}

body.sc-mobile-page {
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 !important;
    overflow-x: hidden;
    color: var(--sc-text) !important;
    background: var(--sc-bg) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.sc-mobile-page *,
.sc-mobile-page *::before,
.sc-mobile-page *::after { box-sizing: border-box; }

.sc-mobile-page a,
.sc-mobile-page a:hover,
.sc-mobile-page a:active,
.sc-mobile-page a:visited {
    color: inherit;
    text-decoration: none !important;
}

.sc-mobile-page img,
.sc-mobile-page svg { max-width: 100%; }

.sc-mobile-page button,
.sc-mobile-page input,
.sc-mobile-page select,
.sc-mobile-page textarea { font: inherit; }

.sc-mobile-page .container,
.sc-mobile-page .container-fluid,
.sc-mobile-page .ctbox {
    width: 100% !important;
    max-width: 520px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto !important;
    padding-right: 12px !important;
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    padding-left: 12px !important;
    background: var(--sc-bg) !important;
}

/* Login and registration use the same white/gold visual language. */
body.auth-gold-page {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 !important;
    color: var(--sc-text) !important;
    background: radial-gradient(circle at 92% 4%, rgba(233, 195, 92, .24), transparent 31%), var(--sc-bg) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.auth-gold-page .mobile-login-page,
.auth-gold-page .mobile-register-page { min-height: 100dvh; background: transparent !important; }
.auth-gold-page .mobile-login-page::before,
.auth-gold-page .mobile-login-page::after,
.auth-gold-page .mobile-register-page::before,
.auth-gold-page .mobile-register-page::after { border-color: rgba(177, 127, 17, .1) !important; }
.auth-gold-page .mobile-topbar { max-width: 520px; }
.auth-gold-page .mobile-topbar__button,
.auth-gold-page .mobile-topbar__language {
    color: #333941 !important;
    border-color: var(--sc-border) !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 5px 16px rgba(25, 31, 40, .04);
}
.auth-gold-page .mobile-topbar__title { color: var(--sc-text) !important; }
.auth-gold-page .mobile-brand__logo {
    color: #2d2107 !important;
    border-color: rgba(255, 255, 255, .55) !important;
    background: linear-gradient(145deg, #edca69, #bd810d) !important;
    box-shadow: 0 16px 32px rgba(177, 126, 14, .2) !important;
}
.auth-gold-page .mobile-brand h1 { color: var(--sc-text) !important; }
.auth-gold-page .mobile-brand p { color: var(--sc-muted) !important; }
.auth-gold-page .mobile-brand strong { color: var(--sc-gold-dark) !important; }
.auth-gold-page .mobile-login-card,
.auth-gold-page .mobile-register-card {
    border-color: var(--sc-border) !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 14px 38px rgba(25, 31, 40, .075) !important;
}
.auth-gold-page .mobile-auth-tabs,
.auth-gold-page .mobile-register-methods { border-color: var(--sc-border) !important; background: var(--sc-surface-soft) !important; }
.auth-gold-page .mobile-auth-tab,
.auth-gold-page .mobile-method { color: var(--sc-muted) !important; }
.auth-gold-page .mobile-auth-tab.active,
.auth-gold-page .mobile-method.active {
    color: var(--sc-gold-dark) !important;
    border-color: #e3c87d !important;
    background: var(--sc-gold-soft) !important;
    box-shadow: 0 5px 14px rgba(174, 124, 14, .1) !important;
}
.auth-gold-page .mobile-form-label { color: #555d67 !important; }
.auth-gold-page .mobile-input-wrap {
    border-color: var(--sc-border) !important;
    background: var(--sc-surface-soft) !important;
}
.auth-gold-page .mobile-input-wrap:focus-within {
    border-color: #d0a12e !important;
    box-shadow: 0 0 0 3px rgba(208, 161, 46, .1) !important;
}
.auth-gold-page .mobile-input-icon,
.auth-gold-page .mobile-password-toggle { color: #9198a1 !important; }
.auth-gold-page .mobile-form-input { color: var(--sc-text) !important; background: transparent !important; }
.auth-gold-page .mobile-form-input::placeholder { color: #a0a6ae !important; }
.auth-gold-page .mobile-link,
.auth-gold-page .mobile-login-note a { color: var(--sc-gold-dark) !important; }
.auth-gold-page .mobile-remember,
.auth-gold-page .mobile-login-footer,
.auth-gold-page .mobile-login-note { color: var(--sc-muted) !important; }
.auth-gold-page .mobile-submit {
    color: #251a04 !important;
    background: linear-gradient(135deg, #e1b43e, #c58c12) !important;
    box-shadow: 0 9px 20px rgba(197, 140, 18, .2) !important;
}
.auth-gold-page .mobile-security {
    color: #7c6229 !important;
    border-color: #efdfa9 !important;
    background: #fff9e8 !important;
}
.auth-gold-page .mobile-security i { color: var(--sc-gold) !important; }

/* Header */
.sc-mobile-page .no_header,
.sc-mobile-page .header_box,
.sc-mobile-page .no_headers {
    position: fixed !important;
    z-index: 9000 !important;
    top: 0 !important;
    left: 50% !important;
    width: 100% !important;
    max-width: 520px;
    height: calc(58px + env(safe-area-inset-top)) !important;
    min-height: 58px;
    padding: env(safe-area-inset-top) 14px 0 !important;
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    transform: translateX(-50%);
    border-bottom: 1px solid var(--sc-border);
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 4px 18px rgba(25, 31, 40, .045) !important;
    backdrop-filter: blur(14px);
}

.sc-mobile-page .no_header > div,
.sc-mobile-page .header_box > div,
.sc-mobile-page .no_headers > div {
    width: auto !important;
    height: auto !important;
    float: none !important;
    line-height: normal !important;
}

.sc-mobile-page .no_header > div:first-child,
.sc-mobile-page .header_box > div:first-child,
.sc-mobile-page .no_headers > div:first-child {
    grid-column: 1;
    width: 38px !important;
    height: 38px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sc-border);
    border-radius: 11px;
    background: var(--sc-surface-soft);
}

.sc-mobile-page #centerbox,
.sc-mobile-page .header-title {
    grid-column: 2;
    min-width: 0;
    text-align: center !important;
}

.sc-mobile-page #centerbox span,
.sc-mobile-page .header-title,
.sc-mobile-page .title_txt {
    overflow: hidden;
    color: var(--sc-text) !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-mobile-page .no_header > div:last-child:not(:first-child),
.sc-mobile-page .no_header > a:last-child,
.sc-mobile-page .header_box > div:last-child:not(:first-child),
.sc-mobile-page .no_headers > div:last-child:not(:first-child) {
    grid-column: 3;
    justify-self: end;
}

.sc-mobile-page .no_header i,
.sc-mobile-page .header_box i,
.sc-mobile-page .no_headers i {
    color: #363b43 !important;
    font-size: 19px !important;
}

/* Page content */
.sc-mobile-page .no_content {
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vh - 70px) !important;
    margin: 0 auto !important;
    padding: calc(72px + env(safe-area-inset-top)) 0 30px !important;
    background: transparent !important;
}

.sc-mobile-page .no_title {
    width: 100% !important;
    height: auto !important;
    min-height: 42px;
    margin: 0 0 10px !important;
    padding: 4px 3px !important;
    line-height: 1.35 !important;
    background: transparent !important;
}

.sc-mobile-page .no_title .title_txt,
.sc-mobile-page .no_title > span:first-child {
    color: var(--sc-text) !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    letter-spacing: -.35px;
}

.sc-mobile-page .no_inbox {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px !important;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    background: var(--sc-surface) !important;
    box-shadow: var(--sc-shadow);
}

/* Form controls */
.sc-mobile-page .inputbox,
.sc-mobile-page .inputbox.boxh {
    width: 100% !important;
    height: auto !important;
    min-height: 82px;
    margin: 0 0 10px !important;
}

.sc-mobile-page .input_title {
    width: 100% !important;
    height: auto !important;
    min-height: 25px;
    padding: 0 2px 6px;
    color: var(--sc-muted) !important;
    font-size: 12px;
    font-weight: 700;
}

.sc-mobile-page .input_title span { color: var(--sc-muted) !important; }

.sc-mobile-page .input_div,
.sc-mobile-page .tx_inputbox,
.sc-mobile-page .zz_inputbox,
.sc-mobile-page .addressinput,
.sc-mobile-page .dong_find_box,
.sc-mobile-page .topbox_1_b {
    width: 100% !important;
    height: 50px !important;
    min-height: 50px;
    padding: 0 13px !important;
    overflow: hidden;
    border: 1px solid var(--sc-border) !important;
    border-radius: 11px !important;
    background: var(--sc-surface-soft) !important;
    line-height: 48px !important;
}

.sc-mobile-page .input_div:focus-within,
.sc-mobile-page .tx_inputbox:focus-within,
.sc-mobile-page .zz_inputbox:focus-within,
.sc-mobile-page .addressinput:focus-within {
    border-color: #d3a329 !important;
    box-shadow: 0 0 0 3px rgba(197, 140, 18, .1);
}

.sc-mobile-page input,
.sc-mobile-page select,
.sc-mobile-page textarea,
.sc-mobile-page .cinput,
.sc-mobile-page .zz_input,
.sc-mobile-page .xjinput,
.sc-mobile-page .sybolc,
.sc-mobile-page .dong_symbox {
    max-width: 100%;
    border: 0 !important;
    outline: 0 !important;
    color: var(--sc-text) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.sc-mobile-page input::placeholder,
.sc-mobile-page textarea::placeholder { color: #a0a6ae !important; font-size: 13px !important; }

.sc-mobile-page .allbtn,
.sc-mobile-page .alltn,
.sc-mobile-page .showbtn,
.sc-mobile-page .small_hs_btn,
.sc-mobile-page .bmbtn_r,
.sc-mobile-page .imgbox_10,
.sc-mobile-page input[type="submit"] {
    min-height: 46px !important;
    border: 0 !important;
    border-radius: 11px !important;
    color: #251a04 !important;
    background: linear-gradient(135deg, #e1b43e, #c58c12) !important;
    box-shadow: 0 8px 18px rgba(197, 140, 18, .18);
    font-weight: 850 !important;
    cursor: pointer;
}

.sc-mobile-page .allbtn { height: 46px !important; margin-top: 14px !important; line-height: 46px !important; }
.sc-mobile-page .bmbtn_l { border: 1px solid var(--sc-border); background: var(--sc-surface-soft) !important; }

/* Common cards and rows */
.sc-mobile-page .contentbox,
.sc-mobile-page .infobox {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: calc(72px + env(safe-area-inset-top)) 0 25px !important;
}

.sc-mobile-page .contentbox_top,
.sc-mobile-page .coinlistbox_top,
.sc-mobile-page .findbox_1 {
    position: static !important;
    height: auto !important;
    min-height: 45px;
    margin: 0 !important;
    padding: 0 4px !important;
    display: flex;
    align-items: center;
    color: var(--sc-text) !important;
    background: transparent !important;
}

.sc-mobile-page .contentbox_top span,
.sc-mobile-page .coinlistbox_top span,
.sc-mobile-page .findbox_1 span { color: var(--sc-text) !important; font-weight: 850; }

.sc-mobile-page .lbox,
.sc-mobile-page .coinlistbox_info_list,
.sc-mobile-page .trade_list,
.sc-mobile-page .timer_t_box_list,
.sc-mobile-page .list_box_item {
    width: 100% !important;
    min-height: 60px !important;
    margin: 0 0 9px !important;
    padding: 10px 13px !important;
    overflow: hidden;
    border: 1px solid var(--sc-border) !important;
    border-radius: 13px !important;
    color: var(--sc-text) !important;
    background: var(--sc-surface) !important;
    box-shadow: 0 5px 16px rgba(25, 31, 40, .035);
}

.sc-mobile-page .lbox_l,
.sc-mobile-page .lbox_r,
.sc-mobile-page .coinlistbox_info_list_l,
.sc-mobile-page .coinlistbox_info_list_c,
.sc-mobile-page .coinlistbox_info_list_r {
    min-height: 38px !important;
    line-height: 38px !important;
}

.sc-mobile-page .fcc,
.sc-mobile-page .fch,
.sc-mobile-page .fe6im,
.sc-mobile-page .fe6 { color: var(--sc-text) !important; }
.sc-mobile-page .fcch,
.sc-mobile-page .fccs,
.sc-mobile-page .fcfs { color: var(--sc-muted) !important; }
.sc-mobile-page .fcy { color: var(--sc-gold-dark) !important; }
.sc-mobile-page .green,
.sc-mobile-page .fgreen,
.sc-mobile-page .rzgreen { color: var(--sc-green) !important; }
.sc-mobile-page .red,
.sc-mobile-page .fred,
.sc-mobile-page .rzred { color: var(--sc-red) !important; }

/* Search / coin picker */
.sc-mobile-page .topbox {
    position: fixed !important;
    z-index: 9000;
    top: 0 !important;
    left: 50%;
    width: 100% !important;
    max-width: 520px;
    height: calc(62px + env(safe-area-inset-top)) !important;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px !important;
    transform: translateX(-50%);
    border-bottom: 1px solid var(--sc-border);
    background: rgba(255, 255, 255, .97) !important;
}

.sc-mobile-page .topbox_1 { width: calc(100% - 66px) !important; padding: 0 !important; }
.sc-mobile-page .topbox_2 { width: 58px !important; color: var(--sc-gold-dark) !important; font-size: 12px; font-weight: 800; }
.sc-mobile-page .coinlistbox { width: 100% !important; margin: 0 !important; padding-top: calc(72px + env(safe-area-inset-top)); }
.sc-mobile-page .coinlistbox_info { width: 100% !important; height: auto !important; padding: 0 !important; }
.sc-mobile-page .lmcoin { border-color: #d8ae43 !important; color: var(--sc-gold-dark) !important; background: var(--sc-gold-soft) !important; }

/* Mining / issue cards */
.sc-mobile-page .oreimgbox {
    width: calc(100% + 24px) !important;
    height: 154px !important;
    margin: 0 -12px !important;
    padding: calc(74px + env(safe-area-inset-top)) 16px 12px !important;
    overflow: hidden;
    background: radial-gradient(circle at 90% 0, rgba(247, 214, 110, .48), transparent 42%), linear-gradient(145deg, #2a2417, #17191d) !important;
}

.sc-mobile-page .oreimgbox span,
.sc-mobile-page .oreimgbox p,
.sc-mobile-page .oreimgbox h1,
.sc-mobile-page .oreimgbox h2 { color: #fff !important; }

.sc-mobile-page .oplist {
    position: relative;
    z-index: 2;
    width: 100% !important;
    min-height: 54px;
    margin-top: -12px;
    padding: 0 15px !important;
    border-radius: 18px 18px 0 0 !important;
    background: var(--sc-surface) !important;
}

.sc-mobile-page .orebox {
    width: 100% !important;
    height: auto !important;
    margin: 0 0 10px !important;
    padding: 14px !important;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius) !important;
    background: var(--sc-surface) !important;
    box-shadow: var(--sc-shadow) !important;
}

.sc-mobile-page .progress { height: 8px !important; overflow: hidden; background: #eceef1 !important; }
.sc-mobile-page .progress-bar { border: 0 !important; color: transparent !important; background: linear-gradient(90deg, #e3b841, #bd820d) !important; }
.sc-mobile-page .issuebox,
.sc-mobile-page #zlbox,
.sc-mobile-page #dzbox,
.sc-mobile-page #myorebox { background: transparent !important; }

/* Bottom navigation never obscures content */
.sc-mobile-page:has(.footer),
.sc-mobile-page:has(.bmbtn) { padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; }

.sc-mobile-page .footer,
.sc-mobile-page .bmbtn {
    position: fixed !important;
    z-index: 8000 !important;
    right: 0;
    bottom: 0 !important;
    left: 0;
    width: 100% !important;
    max-width: 520px;
    height: calc(72px + env(safe-area-inset-bottom)) !important;
    margin: 0 auto;
    padding: 8px 10px calc(7px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--sc-border);
    border-radius: 18px 18px 0 0 !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 -8px 22px rgba(25, 31, 40, .06);
    backdrop-filter: blur(14px);
}

.sc-mobile-page .footer_op { height: 56px !important; }
.sc-mobile-page .f_op_t { height: 31px !important; }
.sc-mobile-page .f_op_b { height: 20px !important; line-height: 20px !important; }
.sc-mobile-page .footer img { width: 23px !important; height: 23px !important; object-fit: contain; }
.sc-mobile-page .footer span { color: var(--sc-muted) !important; font-size: 10px !important; }

/* Dialogs and empty states */
.sc-mobile-page .dongbox {
    z-index: 10000 !important;
    background: rgba(18, 21, 26, .38) !important;
    backdrop-filter: blur(4px);
}

.sc-mobile-page .dongbox_cbox,
.sc-mobile-page .dong_order_c,
.sc-mobile-page .dong_con,
.sc-mobile-page .addressinfo {
    max-width: 492px;
    border: 1px solid var(--sc-border) !important;
    color: var(--sc-text) !important;
    background: var(--sc-surface) !important;
    box-shadow: 0 20px 60px rgba(22, 27, 34, .2) !important;
}

.sc-mobile-page .dongbox_cbox { border-radius: 18px !important; }
.sc-mobile-page .dong_order_c,
.sc-mobile-page .addressinfo { border-radius: 20px 20px 0 0 !important; }
.sc-mobile-page .dong_order_option_list,
.sc-mobile-page .dong_money_list_box_option { border: 1px solid var(--sc-border); color: var(--sc-text) !important; background: var(--sc-surface-soft) !important; }
.sc-mobile-page .option_list_active { border-color: #d3a329 !important; background: var(--sc-gold-soft) !important; }

.sc-mobile-page [class*="empty"],
.sc-mobile-page .notitile { color: var(--sc-muted); }

@media (min-width: 521px) {
    body.sc-mobile-page { background: #e9ebee !important; }
    .sc-mobile-page .container,
    .sc-mobile-page .container-fluid,
    .sc-mobile-page .ctbox { border-right: 1px solid var(--sc-border); border-left: 1px solid var(--sc-border); }
}

@media (max-width: 359px) {
    .sc-mobile-page .container,
    .sc-mobile-page .container-fluid,
    .sc-mobile-page .ctbox { padding-right: 9px !important; padding-left: 9px !important; }
    .sc-mobile-page .no_inbox { padding: 13px !important; }
    .sc-mobile-page .fzmmm { font-size: 13px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-mobile-page *,
    .sc-mobile-page *::before,
    .sc-mobile-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
