/* Shared desktop rhythm and native BaseApp component sizing. */
#root { --tbx-content-width: 1180px; }
#root .pg-layout { background:#f6f8fb; min-height:calc(100vh - 140px); }
#root #tbx-onboarding, #root .pg-profile-page, #root .pg-wallet,
#root #tbx-wallet-heading, #root #tbx-network-help { box-sizing:border-box; width:calc(100% - 64px)!important; max-width:var(--tbx-content-width)!important; }
#root #tbx-onboarding { margin:32px auto 20px; padding:28px 32px; border-radius:14px; }
#tbx-onboarding>p { max-width:800px; color:#68758a; }
#tbx-onboarding form { max-width:850px; }
#tbx-onboarding form>label:first-child { max-width:417px; }
#tbx-onboarding .tbx-form-grid { gap:4px 20px; }
#tbx-onboarding label { margin:8px 0!important; }
#tbx-onboarding input:not([type=checkbox]), #tbx-onboarding select { height:44px; padding:10px 12px!important; }
#tbx-onboarding .tbx-form-actions { margin-top:16px; }
#tbx-onboarding .tbx-security-note { margin-top:16px; }
#root .pg-profile-page { padding:0; margin:0 auto 40px!important; height:auto; }
#root .pg-profile-page__details, #root .pg-profile-page__api-keys, #root .pg-profile-page__activity { margin:0 0 20px; border:1px solid #e1e7ef; border-radius:14px; box-shadow:none; overflow:hidden; background:#fff; }
#root .pg-profile-page-header { padding:4px 24px; background:#fff; }
#root .pg-profile-page h3 { font-size:18px; font-weight:600; }
#root .pg-profile-page__details-box { padding:24px; gap:32px; }
#root .pg-profile-page__details>.row:not(.pg-profile-page-header) { margin:0; padding:24px 16px; }
#root .pg-profile-page__details>.row>.col-md-6 { padding:0 16px; }
#root .pg-profile-page__details .row.col-12 { padding:0; }
#root .pg-profile-page__box { padding:0; min-width:0; }
#root .pg-profile-page__details-user p { font-size:18px; }
#root .pg-profile-page__left-col__basic__info-row h2 { font-size:13px; color:#6b778a; }
#root .pg-profile-page__label { font-size:14px; }
#root .pg-profile-page__row { gap:12px; }
#root .pg-profile-page__activity .cr-table th, #root .pg-profile-page__activity .cr-table td { padding:14px 16px!important; font-size:12px; background:#fff; }
#root #tbx-network-help { margin:24px auto 0!important; padding:14px 18px!important; line-height:1.65; }
#root #tbx-wallet-heading { margin:24px auto 20px; padding:0; }
#root .pg-wallet { min-height:0; padding:0!important; align-items:stretch!important; }
#root .pg-wallet__tabs-content { min-height:0!important; background:#fff; }
#root .pg-wallet__tabs-content>.col-md-5 { flex:0 0 320px; max-width:320px; background:#f8fafc; border-right:1px solid #e1e7ef; }
#root .pg-wallet__tabs-content>.col-md-7 { flex:1; max-width:calc(100% - 320px); min-width:0; }
#root .pg-wallet .cr-wallet-list { padding:12px!important; border:0!important; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item { height:auto; min-height:104px; display:flex!important; flex-wrap:wrap; gap:8px; padding:14px!important; border:1px solid transparent!important; border-radius:10px!important; box-shadow:none; color:#101d3a; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item--active { border-color:#e9b9be!important; background:#fff4f4!important; }
#root .pg-wallet .cr-wallet-item--active:before, #root .pg-wallet .cr-wallet-item--active:after { display:none; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__info { width:100%; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__icon { flex:0 0 32px; margin:0 10px 0 0; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__icon img { width:30px; margin:0; opacity:1; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__description { margin:0; padding:0; line-height:1.5; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__description span { opacity:1; font-size:14px; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__description span+span { font-size:11px; color:#68758a; margin:1px 0 0; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__balance { margin:0 0 0 42px; font-size:14px; text-align:left; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__balance, #root .pg-wallet .cr-wallet-list .cr-wallet-item__balance span { opacity:1; color:#526078; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__balance-locked { display:inline-block; margin-left:12px; padding:0; }
#root .pg-wallet .cr-wallet-list .cr-wallet-item__amount-locked { font-size:11px; opacity:1; color:#68758a; }
#root .pg-wallet .cr-tab-content { padding:24px; background:#fff; }
#root .pg-wallet .cr-wallet-item__single { margin:0 0 24px; padding:0 0 20px; border-bottom:1px solid #e4e9f0; min-height:0; height:auto; }
#root .pg-wallet .cr-wallet-item__single>.cr-crypto-icon img { width:44px; margin-right:20px; }
#root .pg-wallet .cr-wallet-item__single .cr-wallet-item__amount-locked, #root .pg-wallet .cr-wallet-item__single .cr-wallet-item__balance { font-size:13px; line-height:20px; font-weight:400; color:#68758a; }
#root .pg-wallet .cr-wallet-item__single .cr-wallet-item__balance-locked, #root .pg-wallet .cr-wallet-item__single .cr-wallet-item__balance-amount { font-size:28px; line-height:38px; color:#101d3a; }
#root #tbx-rub-manual { margin:0; padding:0; border:0; box-shadow:none; width:100%; }
#root #tbx-rub-manual h2 { font-size:22px; margin:0 0 10px; }
#root #tbx-rub-manual form { max-width:520px; }
#root .pg-wallet__enable-2fa-message { font-size:15px; line-height:1.8; max-width:500px; margin:28px auto; padding:24px; background:#f6f8fb; border-radius:12px; }
#root .cr-deposit-crypto__copyable fieldset { border:0; padding:0; margin:0; }
#root .cr-deposit-crypto__copyable-area { border:0; padding:0; }
#root .cr-deposit-crypto__copyable-area>.input-group { flex-wrap:nowrap; align-items:flex-end; gap:12px; }
#root .cr-deposit-crypto__copyable-area .custom-input { display:block!important; flex:1; width:auto!important; min-width:0; }
#root .cr-deposit-crypto__copyable-area label { display:block!important; position:static!important; margin:0 0 8px!important; padding:0!important; width:100%; font-size:12px; line-height:18px; color:#68758a; background:transparent!important; }
#root .cr-deposit-crypto__copyable-area .input-group-lg { border:1px solid #dce3ec; border-radius:8px; }
#root .cr-deposit-crypto__copyable-area input { font-family:Consolas,monospace; font-size:13px; padding:0 12px; height:44px; }
#root .cr-deposit-crypto__copyable-area button { height:46px; margin:0; border-radius:8px; font-size:13px; }
/* Each order control has one border and a label in normal flow. */
#root .pg-trading-screen .cr-order-form { padding:18px 20px!important; }
#root .pg-trading-screen .pg-order .cr-tab-content { padding:0!important; }
#root .pg-trading-screen .cr-order-form { display:grid; gap:12px; margin:0; }
#root .pg-trading-screen .cr-order-form .cr-order-item { margin:0; }
#root .pg-trading-screen .cr-order-form .cr-order-item__percentage-buttons { margin:0; }
#root .pg-trading-screen .cr-order-form label { margin:0; }
#root .pg-trading-screen .cr-order-item { display:flex; flex-wrap:wrap; position:relative; margin:0 0 12px; }
#root .pg-trading-screen .cr-order-item__dropdown__label { position:static; inset:auto; margin:0 0 7px; padding:0; width:100%; font-size:12px; color:#68758a; background:none; }
#root .pg-trading-screen .cr-order-form .dropdown-toggle { height:44px; min-height:44px; padding:10px 12px; background:#f8fafc; border:1px solid #dce3ec; border-radius:8px; font-size:14px; color:#101d3a; box-shadow:none; }
#root .pg-trading-screen .cr-order-input { height:46px; border:1px solid #dce3ec; border-radius:8px; overflow:hidden; background:#fff; }
#root .pg-trading-screen .cr-order-input:focus-within { border-color:#d91c26; box-shadow:0 0 0 2px #d91c2610; }
#root .pg-trading-screen .cr-order-input__fieldset { margin:0; padding:0!important; height:44px; min-width:0; border:0!important; background:transparent; border-radius:8px; flex:1; }
#root .pg-trading-screen .cr-order-input .custom-input { width:100%; padding:0; }
#root .pg-trading-screen .cr-order-input .custom-input label { display:none; }
#root .pg-trading-screen .cr-order-input input { width:100%; height:44px!important; padding:0 12px; background:transparent!important; font-size:14px; box-shadow:none!important; border:0; }
#root .pg-trading-screen .cr-order-input .input-group { height:44px; background:transparent; border:0; }
#root .pg-trading-screen .cr-order-input__fieldset:has(legend) { position:relative; display:block; padding:18px 12px 4px!important; }
#root .pg-trading-screen .cr-order-input__fieldset legend { position:absolute; inset:3px auto auto 12px; margin:0; padding:0; width:auto; font-size:10px; line-height:12px; }
#root .pg-trading-screen .cr-order-input__fieldset__input { margin:0; padding:0; font-size:13px; line-height:20px; }
#root .pg-trading-screen .cr-order-input__fieldset__input__price { margin:0; }
#root .pg-profile-page__referral>fieldset { border:0; padding:0; }
#root .pg-profile-page__referral>.cr-copyable-text-field { border:0; padding:0; }
#root .pg-profile-page__referral label { position:static; display:block; margin:0 0 8px; padding:0; font-size:12px; }
#root .pg-profile-page__referral .input-group { flex-wrap:nowrap; align-items:flex-end; gap:8px; }
#root .pg-profile-page__referral .custom-input { display:block!important; min-width:0; flex:1; }
#root .pg-profile-page__referral input { height:44px!important; font-size:12px; border:1px solid #dce3ec; padding:0 10px; }
#root .pg-profile-page__referral button { height:44px; font-size:12px; }
#root .cr-email-form__form-content { padding:24px!important; background:#fff; }
#root .cr-email-form__header { height:auto!important; width:auto!important; font-size:14px!important; line-height:1.65!important; margin:0 0 24px!important; }
#root .cr-email-form__option-inner { text-transform:none; font-size:16px; }
#root .cr-sign-up-form .custom-control { padding-left:28px; }
#root .cr-sign-up-form .custom-control-label { display:block; width:100%; font-size:13px; line-height:20px; }
#root .cr-sign-up-form .custom-control-label::before, #root .cr-sign-up-form .custom-control-label::after { left:-28px; top:1px; }
#root .pg-sign-in-screen input:focus-visible, #root .pg-sign-up-screen input:focus-visible, #root .pg-forgot-password-screen input:focus-visible { outline:2px solid #d91c2640!important; outline-offset:1px; box-shadow:none!important; }
#root .pg-change-forgotten-password-screen, #root .pg-emailverification-container { background:radial-gradient(ellipse at 15% 85%,#faeeee,transparent 45%),#f5f7fa; min-height:calc(100vh - 140px); height:auto; padding:54px 20px 70px; align-items:flex-start; }
#root .pg-change-forgotten-password-screen__container { max-width:460px; width:100%; margin:24px auto 0; }
#root .pg-change-forgotten-password-screen .pg-mobile-change-password { background:#fff; border:1px solid #e1e7ef; border-radius:14px; overflow:hidden; }
#root .pg-change-forgotten-password-screen .pg-mobile-change-password__wrapper { padding:24px; background:#fff; }
#root .pg-change-forgotten-password-screen .pg-mobile-change-password__body { padding:0; background:#fff; }
#root .pg-change-forgotten-password-screen .pg-mobile-change-password__footer { background:#fff; }
#root .pg-emailverification { width:460px; max-width:100%; border:1px solid #e1e7ef; border-radius:14px; overflow:hidden; box-shadow:none; }
#root .pg-profile-page__activity .cr-table { table-layout:fixed; }
#root .pg-profile-page__activity .cr-table th { width:20%!important; }
#root .pg-trading-screen .cr-order-input__crypto-icon { height:44px; margin:0; flex:0 0 58px; border:0; background:#f8fafc; border-radius:0 8px 8px 0; font-size:12px; color:#68758a; }
#root .pg-trading-screen .cr-order-item .error-message { display:none; position:static; height:auto; margin:6px 0 0; width:100%; padding:6px 8px; background:#fff0f0; color:#b8121d; }
#root .pg-trading-screen .cr-order-item .error-message--visible { display:block; opacity:1; }
#root .pg-trading-screen .cr-order-item__percentage-buttons { gap:6px; }
#root .pg-trading-screen .cr-percentage-button { height:32px; margin:0; flex:1; border-radius:6px; background:#f2f5f9; color:#526078; font-size:12px; }
#root .pg-trading-screen .cr-order-item__total, #root .pg-trading-screen .cr-order-item__available { font-size:13px; }
#root .pg-trading-screen .cr-order-item>button { height:42px; font-size:14px; border-radius:8px; margin:0!important; }
/* Anchor the market menu to the actual two-row header, not the viewport. */
#root .pg-trading-header-selector-list-container-open { position:absolute; top:var(--tbx-header-bottom,166px); left:24px; bottom:auto; width:500px; max-width:calc(100vw - 48px); height:auto; max-height:420px; padding:16px; border:1px solid #e1e7ef; border-radius:0 0 12px 12px; background:#fff; z-index:60; overflow:auto; box-shadow:0 16px 40px #101d3a20; animation:none; }
#root .pg-trading-header-fast-search-container { position:static; height:36px; margin:0 0 12px; display:flex; gap:8px; }
#root .pg-trading-header-fast-search-button { height:32px; border-radius:6px; padding:6px 14px; font-size:12px; }
#root .pg-dropdown-markets-list-container { height:auto; max-height:240px; padding:0; overflow:auto; }
#root .pg-dropdown-markets-list-container .cr-table__head, #root .pg-dropdown-markets-list-container th { position:static; }
#root .pg-dropdown-markets-list-container .cr-table-background { display:none; }
#root .pg-dropdown-markets-list-container th, #root .pg-dropdown-markets-list-container td { padding:12px 8px!important; font-size:12px; }
#root .pg-dropdown-markets-list-container th:first-child, #root .pg-dropdown-markets-list-container td:first-child { text-align:left; }
#root .pg-trading-header-selector-search-wrapper { position:static; width:100%; animation:none; margin:14px 0 0; }
#root .pg-trading-header-selector-search { margin:0; height:40px; border:1px solid #dce3ec; border-radius:8px; }
@media(max-width:767px){
 #root #tbx-onboarding, #root .pg-profile-page, #root .pg-wallet, #root #tbx-wallet-heading, #root #tbx-network-help { width:calc(100% - 28px)!important; }
 #root #tbx-onboarding { margin-top:20px; padding:20px; }
 #root .pg-profile-page__details-box { flex-direction:column; padding:20px; }
 #root .pg-profile-page__right-col { width:100%; }
 #root .pg-wallet__tabs-content>.col-md-5, #root .pg-wallet__tabs-content>.col-md-7 { flex:0 0 100%; max-width:100%; }
 #root .pg-wallet .cr-tab-content { padding:18px; }
}
