/* Shared FlowPass visual language. Existing auth and checkout workflows remain intact. */
body.reference-account{--bg:#09151c;--card:#13252e;--line:#2c4550;--green:#9cf875;--muted:#a4b6bf;background:radial-gradient(850px 500px at 80% 5%,#15362c,transparent 70%),#09151c!important;color:#f1f6f5;font:15px/1.5 "Segoe UI Variable","Segoe UI",Arial,sans-serif}
.reference-account header{width:min(1460px,calc(100% - 48px))!important;max-width:1460px!important;height:82px!important;padding:0 22px!important;margin:18px auto 0!important;border:1px solid var(--line)!important;border-radius:16px;background:#10212acc;box-shadow:0 12px 40px #0003;position:relative}
.reference-account header .brand{font-size:27px!important;letter-spacing:-1px;position:static!important;transform:none!important;visibility:visible!important;margin-right:auto!important}
.reference-account .brand span{color:#f1f6f5}.reference-account .brand b{color:var(--green)}.reference-account .brand-mark{display:none}
.reference-account .login-language{margin-left:auto;margin-right:15px}.reference-account .account-status-link{font-size:12px;border:1px solid var(--line);min-height:36px;padding:7px 12px}
.reference-account button,.reference-account .button,.reference-account .secondary{border-radius:9px;min-height:42px;font-size:14px;transition:background .18s,border-color .18s,box-shadow .18s;box-shadow:none}
.reference-account button:hover,.reference-account .button:hover,.reference-account .secondary:hover{transform:none!important;box-shadow:none!important}
.reference-account .secondary{background:#213641;border:1px solid #3a535f;color:#eef5f5}
.reference-account button:focus-visible,.reference-account a:focus-visible,.reference-account summary:focus-visible{outline:0;box-shadow:0 0 0 3px #9cf87577!important}
.reference-account .layout,.reference-account #cabinet:not([hidden]){display:grid!important;grid-template-columns:210px minmax(0,1fr);gap:26px;width:min(1460px,calc(100% - 48px))!important;max-width:1460px!important;margin:24px auto!important;padding:0!important;min-height:660px}
.reference-account #cabinet aside{display:flex!important;position:sticky;top:22px;align-self:start;min-height:660px;min-width:0;padding:15px!important;border:1px solid var(--line);border-radius:15px;background:linear-gradient(170deg,#152832,#0f2028);box-shadow:none}
.reference-account #cabinet nav{display:grid;grid-template-columns:1fr;gap:6px}.reference-account #cabinet nav button{height:45px!important;min-height:45px;padding:10px 12px!important;justify-content:flex-start!important;gap:12px;font-size:14px!important;color:#c9d8de;border:1px solid transparent;white-space:nowrap}
.reference-account #cabinet nav button svg{width:19px;height:19px;flex:none}.reference-account #cabinet nav button.active{background:#263d47;color:#f2f8f5;border-color:#3b565b;box-shadow:inset 3px 0 var(--green)}.reference-account #cabinet nav button.active svg{color:var(--green)}
.reference-account #cabinet nav button:hover{background:#213640}.reference-account #cabinet .logout{margin-top:auto!important;padding:14px 10px!important;font-size:12px!important;color:#98acb6!important;gap:9px!important}.reference-account #cabinet .logout svg{width:19px;height:19px}
.reference-account #content{min-width:0;outline:none}.reference-account h1{font-size:30px!important;line-height:1.2;margin:4px 0 7px;letter-spacing:-.8px}.reference-account h2{font-size:20px;line-height:1.3}.reference-account p{color:var(--muted)}
.reference-account .page-subtitle{font-size:13px;margin:0 0 22px}.reference-account .card{background:linear-gradient(140deg,#172c35,#11232c)!important;border:1px solid var(--line)!important;border-radius:13px!important;box-shadow:inset 0 1px #caffc407;padding:22px!important;margin-bottom:16px}
.reference-account .card-label{display:block;color:#cfdbdf;font-size:13px;font-weight:500}.reference-account .overview-grid{display:grid;grid-template-columns:1fr 1.23fr 1fr;gap:14px;margin-top:22px}.reference-account .overview-grid .card{margin:0;min-height:224px;display:flex;flex-direction:column;min-width:0;padding:20px!important}
.reference-account .access-status{display:flex;gap:10px;align-items:center;font-size:24px!important;margin:15px 0 18px;color:var(--green)}.reference-account .access-status.inactive{color:#c3ccd0}.reference-account .access-status i{width:9px;height:9px;border-radius:50%;background:currentColor;box-shadow:0 0 12px currentColor}
.reference-account .subscription-dates{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:20px}.reference-account .subscription-dates small{display:block;font-size:11px;margin-bottom:4px}.reference-account .subscription-dates b{display:block;font-size:12px;font-weight:600}.reference-account .overview-status button{margin-top:auto;font-size:12px;min-height:36px;padding:8px}
.reference-account .access-key-field{display:flex;align-items:center;gap:9px;margin:20px 0 12px;padding:10px;background:#233a44;border:1px solid #3d5661;border-radius:8px}.reference-account .access-key-field svg{width:24px;height:24px;flex:none}.reference-account .access-key-field input{width:100%;min-width:0;max-width:100%;border:0;background:transparent;color:#dae9ee;font-size:13px;outline:none;overflow:hidden}
.reference-account .access-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.reference-account .access-buttons button{font-size:12px;min-height:36px;padding:7px}.reference-account .text-action{min-height:30px;background:none!important;border:0!important;padding:0!important;color:#bde3f5!important;font-weight:500;font-size:12px;width:auto!important;box-shadow:none!important}.reference-account .text-action:hover{color:var(--green)!important}.reference-account .overview-key>.text-action{justify-content:flex-start;margin-top:auto;text-align:left;gap:6px}
.reference-account .overview-devices .device-count{display:flex;align-items:baseline;gap:7px;margin:19px 0 0}.reference-account .device-count b{font-size:36px;line-height:1.25;font-weight:700}.reference-account .device-count span{font-size:24px;color:#9aaeb8}.reference-account .overview-devices p{font-size:12px;margin:3px 0 20px}.reference-account .overview-devices button{margin-top:auto;font-size:12px;min-height:36px;padding:8px}
.reference-account .overview-band{display:grid;grid-template-columns:1.2fr 1fr 1fr 1.2fr;gap:20px;align-items:center;margin-top:16px;min-height:95px}.reference-account .overview-band>div{display:flex;align-items:center;gap:10px;min-width:0;font-size:13px}.reference-account .overview-band>div:first-child{display:block}.reference-account .overview-band .card-label{font-size:11px;margin-bottom:5px;color:#a7bbc4}.reference-account .overview-band strong{font-size:18px;display:flex;align-items:center;gap:11px}.reference-account .overview-band svg{color:var(--green);width:23px;height:23px;flex:none}.reference-account .overview-band small{display:block;color:#99acb6;font-size:11px;margin-top:3px}.reference-account .status-badge{display:inline-flex;padding:3px 7px;border:1px solid #365b43;border-radius:99px;background:#19372d;color:var(--green);font-size:10px;font-weight:600}.reference-account .status-badge.inactive{background:#27323a;border-color:#41515b;color:#afc1ca}.reference-account .balance-value{font-weight:700;color:var(--green);font-size:18px;white-space:nowrap}
.reference-account .overview-lists{display:grid;grid-template-columns:1fr 1fr;gap:14px}.reference-account .overview-list{min-width:0;padding:19px!important}.reference-account .card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}.reference-account .card-heading h2{font-size:16px;margin:0}.reference-account .card-heading .muted{font-size:12px}.reference-account .card-heading button{font-size:11px;white-space:nowrap}.reference-account .account-table-wrap{overflow-x:auto}.reference-account .account-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}.reference-account .account-table th{background:#1b313b;color:#91a8b5;font-size:10px;font-weight:500;padding:9px 10px;white-space:nowrap}.reference-account .account-table th:first-child{border-radius:7px 0 0 7px}.reference-account .account-table th:last-child{border-radius:0 7px 7px 0}.reference-account .account-table td{padding:14px 8px;border-bottom:1px solid #263e48;vertical-align:middle}.reference-account .account-table tr:last-child td{border:0}.reference-account .account-table .amount{white-space:nowrap;text-align:right}.reference-account .account-table .positive{color:var(--green)}.reference-account .operation-symbol{display:inline-grid;place-items:center;width:22px;height:22px;background:#263d47;border-radius:6px;margin-right:7px;color:#bcdbec}.reference-account .operation-symbol.credit{color:var(--green);background:#19372c}
.reference-account .device-table td:first-child{display:flex;align-items:center;gap:9px}.reference-account .device-table td:first-child b{display:block;font-weight:500}.reference-account .device-table small{display:block;font-size:10px}.reference-account .device-platform{display:inline-flex;color:#71cafe}.reference-account .device-platform svg{width:21px;height:21px;flex:none}.reference-account .account-empty{padding:22px 0;color:#95aab5;font-size:13px;line-height:1.5}.reference-account .account-quicklinks{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.reference-account .account-quicklinks a,.reference-account .account-quicklinks button{display:flex;gap:8px;align-items:center;min-height:38px;background:none;color:#c3d5df;font-size:12px;padding:6px 0}.reference-account .account-quicklinks svg{width:18px;height:18px;color:var(--green)}
.reference-account .subscription{min-height:160px!important}.reference-account .subscription:before,.reference-account .subscription:after{display:none}.reference-account .profile-subscription h2{font-size:27px}.reference-account .profile-account,.reference-account .profile-referral{padding:26px!important}.reference-account .profile-account #link-telegram{background:var(--green);color:#18251a;border:0}.reference-account .profile-referral button{background:#233c46;color:#d5e5ed;border:1px solid #3a5662}.reference-account .referral-counts{font-size:13px}.reference-account .device-guide-steps>div{background:#132832;border-color:#2b4752;border-radius:10px}.reference-account .device-guide-steps img{background:#122029}.reference-account .secret{background:#0c1d26;border-color:#36515d;border-radius:9px}
.reference-account .checkout{grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr);gap:22px;margin-top:26px}.reference-account.checkout-page #cabinet:not([hidden]){display:block!important;width:min(1120px,calc(100% - 48px))!important;max-width:1120px!important;margin:32px auto!important;min-height:570px}.reference-account.checkout-page #cabinet aside{display:none!important}.reference-account.checkout-page header .checkout-back{display:flex;position:static;color:#a6bac5;font-size:12px;order:2;margin-left:20px;margin-right:20px}.reference-account.checkout-page .login-language{order:3;margin-left:auto}.reference-account.checkout-page header .account-status-link{display:none}
.reference-account.checkout-page h1{font-size:32px!important;display:inline-block;margin-top:4px}.reference-account .checkout-back-inline{display:flex;margin:0 0 10px!important;font-size:13px}.reference-account .checkout-progress{display:flex;gap:26px;justify-content:flex-end;align-items:center;list-style:none;margin:10px 0 0;padding:0;color:#718e9c;font-size:12px}.reference-account .checkout-progress li{display:flex;gap:7px;align-items:center}.reference-account .checkout-progress span{display:grid;place-items:center;width:24px;height:24px;border:1px solid #425b68;border-radius:50%;font-size:11px}.reference-account .checkout-progress .complete{color:#afc5cb}.reference-account .checkout-progress .complete span{color:var(--green);border-color:#497246}.reference-account .checkout-progress .current{color:#d9e8e8}.reference-account .checkout-progress .current span{background:var(--green);color:#152818;border-color:var(--green)}
.reference-account .receipt-card h2,.reference-account .checkout-methods h2{font-size:18px;margin-bottom:16px}.reference-account .checkout-field input{background:#203943!important;border-color:#3a5663!important;color:#f2f7f5!important;border-radius:9px}.reference-account .checkout-field>span{font-size:12px;color:#b6c8d0}.reference-account .receipt-hint{font-size:12px;margin-bottom:0}.reference-account .payment-method-options{gap:10px}.reference-account .payment-method-option{background:#10232c!important;border:1px solid #38545f!important;border-radius:10px!important;min-height:80px;padding:15px!important}.reference-account .payment-method-option.is-selected{background:#19302c!important;border-color:var(--green)!important;box-shadow:0 0 0 1px #9cf87533!important}.reference-account .payment-method-copy b{font-size:14px}.reference-account .payment-method-copy small{font-size:12px;color:#9cb5bf}.reference-account .payment-method-icon{border-radius:8px;background:#e5f3e5;padding:6px;display:grid;place-items:center;width:58px;height:40px}.reference-account .payment-method-icon img{width:46px;height:28px}.reference-account .payment-method-radio{width:18px;height:18px}.reference-account .checkout-submit{font-size:16px!important;min-height:50px!important;border-radius:9px!important}.reference-account .checkout-summary{position:sticky;top:24px}.reference-account .checkout-summary h2{font-size:21px}.reference-account .checkout-summary-plan{padding:18px 15px;background:#203640!important;border-color:#324b57!important;border-radius:10px}.reference-account .checkout-summary-plan strong{font-size:16px}.reference-account .checkout-summary-plan b{font-size:19px}.reference-account .checkout-summary-plan small{font-size:12px}.reference-account .checkout-total{display:flex;justify-content:space-between;align-items:center;margin:22px 0 8px;padding-top:17px;border-top:1px solid #36505a;font-size:16px}.reference-account .checkout-total strong{font-size:26px}.reference-account .checkout-once{font-size:12px}.reference-account .checkout-benefits{margin-top:24px}.reference-account .checkout-benefits h3{font-size:16px}.reference-account .checkout-benefits li,.reference-account .tariff-benefits li{font-size:13px;font-weight:400;line-height:1.5}.reference-account .checkout .legal{font-size:12px!important;color:#8ba5b0!important;padding:0!important}.reference-account .checkout .legal a{color:#b4d694}
.reference-account .tariff-card .plan{background:#12252e;border-color:#34515d;min-height:72px;border-radius:10px!important;padding:16px!important;gap:14px}.reference-account .plan:has(input:checked){background:#1d322c!important;border-color:var(--green)!important}.reference-account .plan input:checked{box-shadow:inset 0 0 0 4px #163028}.reference-account .trial-plan{border-color:#527e51!important}.reference-account .trial-plan .plan-badge{background:#2a4a31;color:var(--green)}.reference-account .plan-description strong{font-size:16px}.reference-account .plan-description small{font-size:12px}.reference-account .plan b{font-size:18px}.reference-account .tariff-note{font-size:12px!important;color:#9db4bf}.reference-account .plan .plan-badge{font-size:10px}
.reference-account .login{background:linear-gradient(145deg,#172c35,#10212a)!important;border:1px solid #34535f!important;border-radius:18px!important;box-shadow:0 25px 80px #0005!important;max-width:480px!important;padding:42px!important;margin:60px auto!important}.reference-account .login h1{font-size:29px!important}.reference-account .login p{font-size:14px}.reference-account .key-field{height:56px;background:#223a44;border-color:#3d5863;border-radius:9px;margin-top:24px}.reference-account .key-field input{font-size:15px}.reference-account .login #key-submit,.reference-account .login #register-start{height:48px;font-size:15px;border-radius:9px}.reference-account .login #register-start{background:#203943;color:#d9e8e8;border:1px solid #3c5762}.reference-account .login-divider{font-size:13px;margin:22px 0 0}.reference-account .login-divider:before,.reference-account .login-divider:after{background:#34515b}.reference-account .login-help{font-size:14px;margin:22px 0 0}.reference-account .login #login-extra{font-size:12px;border-top:1px solid #304b56;padding-top:16px}.reference-account .login small{font-size:11px}.reference-account .generated-key{background:#213b45!important;border-color:#3e5a65!important;border-radius:11px!important}.reference-account .generated-key output{color:var(--green)!important;font-size:18px!important}.reference-account #register-yes{background:var(--green)!important;color:#192719!important}.reference-account .key-tools button{background:#25404a!important;border-color:#44606c!important;min-height:44px!important;height:auto!important;font-size:13px!important;border-radius:9px!important}.reference-account .key-warning{border-radius:10px!important}.reference-account .key-saved input{accent-color:var(--green)!important}
.reference-account dialog{background:#162b34;border:1px solid #3c5b67;color:#edf5f3;border-radius:16px;padding:28px;box-shadow:0 24px 70px #0009}.reference-account dialog::backdrop{background:#020a10bf;backdrop-filter:blur(5px)}.reference-account #access-qr-dialog{width:min(360px,calc(100% - 32px));text-align:center;overflow:hidden}.reference-account #access-qr-dialog h2{font-size:21px;margin-top:16px}.reference-account #access-qr-dialog p{font-size:13px;margin:10px 0 19px}.reference-account #access-qr-dialog small{font-size:11px;display:block;margin-top:18px}.reference-account .qr-close{position:absolute;top:8px;right:8px;width:32px;min-height:32px;background:none;color:#a8c0c9;font-size:24px;padding:0;border-radius:50%}.reference-account #access-qr{background:white;border-radius:10px;width:224px;min-height:224px;margin:auto;padding:8px}.reference-account #access-qr svg{display:block}.reference-account #logout-dialog{max-width:440px;padding:28px;border-radius:16px}.reference-account #logout-dialog h2{font-size:23px}.reference-account #logout-dialog button{font-size:14px;min-height:44px}
.reference-account footer{width:min(1460px,calc(100% - 48px));max-width:1460px!important;border-color:#243c47;margin:35px auto 0;font-size:12px;padding:22px 0}.reference-account #notice{background:#2c3b32;border-color:#607e55;border-radius:10px;font-size:13px;color:#e0efda}.reference-account #notice[data-kind=error]{background:#352925;border-color:#75514b;color:#ffe1d6}
@media(max-width:1150px){.reference-account .layout,.reference-account #cabinet:not([hidden]){grid-template-columns:180px minmax(0,1fr);gap:18px}.reference-account .overview-grid{grid-template-columns:1fr 1fr}.reference-account .overview-devices{grid-column:1/-1;display:grid!important;grid-template-columns:1fr auto;min-height:115px!important}.reference-account .overview-devices .device-count{grid-row:1/4;grid-column:2;margin:0;align-self:center}.reference-account .overview-devices p{margin-bottom:9px}.reference-account .overview-devices button{width:max-content;padding:7px 18px}.reference-account .overview-band{grid-template-columns:1fr 1fr}.reference-account .overview-lists{grid-template-columns:1fr}.reference-account .overview-list{margin-bottom:0}.reference-account .account-quicklinks{margin-top:16px}}
@media(max-width:800px){.reference-account header{width:calc(100% - 28px)!important;height:66px!important;margin-top:12px!important;padding:0 16px!important;border-radius:12px}.reference-account header .brand{font-size:23px!important}.reference-account .account-status-link{display:none}.reference-account .login-language{margin-right:0}.reference-account .layout,.reference-account #cabinet:not([hidden]){width:calc(100% - 28px))!important;width:calc(100% - 28px)!important;grid-template-columns:1fr;gap:18px;margin:16px auto!important;min-height:0}.reference-account #cabinet aside{position:static;min-height:0!important;padding:8px!important;overflow:visible;border-radius:12px}.reference-account #cabinet nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.reference-account #cabinet nav button{justify-content:center!important;gap:6px;font-size:12px!important;height:40px!important;min-height:40px;padding:8px!important}.reference-account #cabinet nav button svg{width:16px;height:16px}.reference-account #cabinet .logout{margin-top:7px!important;min-height:30px;align-self:flex-end;padding:6px!important;font-size:11px!important}.reference-account .overview-grid{margin-top:18px}.reference-account h1{font-size:26px!important}.reference-account .card{padding:18px!important;border-radius:12px!important}.reference-account .overview-band{gap:15px;padding:18px!important}.reference-account .overview-band>div{font-size:12px}.reference-account .overview-band strong{font-size:16px}.reference-account .overview-band .balance-value{font-size:16px}.reference-account .profile-account{flex-wrap:wrap}.reference-account .profile-account .telegram-action{min-width:0!important;width:100%}.reference-account .checkout{grid-template-columns:1fr;margin-top:20px}.reference-account .checkout-summary{position:static;order:-1}.reference-account.checkout-page #cabinet:not([hidden]){width:calc(100% - 28px)!important;margin:25px auto!important}.reference-account .checkout-summary .checkout-benefits{display:none}.reference-account .checkout-summary-plan{margin-bottom:0}.reference-account .checkout-total{margin-top:15px}.reference-account .checkout-progress{justify-content:flex-start;gap:20px;font-size:11px}.reference-account.checkout-page h1{font-size:28px!important}.reference-account.checkout-page header .checkout-back{margin:0 0 0 10px;white-space:nowrap;font-size:11px}.reference-account.checkout-page header .checkout-back span{font-size:0}.reference-account.checkout-page header .checkout-back span:after{content:'В кабинет';font-size:11px}.reference-account.checkout-page .login-language{margin-left:10px}.reference-account .tariff-benefits{display:none}.reference-account footer{width:calc(100% - 28px);gap:14px;flex-wrap:wrap;font-size:11px}.reference-account .login{padding:30px 24px!important;width:calc(100% - 28px)!important;margin:36px auto!important}.reference-account .device-guide-steps{grid-template-columns:1fr}.reference-account .profile-account,.reference-account .profile-referral,.reference-account .profile-subscription{padding:20px!important}}
@media(max-width:480px){.reference-account .overview-grid{grid-template-columns:1fr}.reference-account .overview-grid .card{min-height:200px}.reference-account .overview-devices{grid-column:auto;min-height:130px!important}.reference-account .overview-key>.text-action{margin-top:15px}.reference-account .overview-band{grid-template-columns:1fr 1fr;gap:17px 8px}.reference-account .overview-band>div:first-child{grid-column:1/-1}.reference-account .overview-band>div:last-child{grid-column:1/-1;border-top:1px solid #2c4651;padding-top:13px}.reference-account .subscription-dates b{font-size:14px}.reference-account .account-table{font-size:11px}.reference-account .account-table td{padding:13px 5px}.reference-account .account-table th{padding:8px 5px;font-size:9px}.reference-account .operation-symbol{display:none}.reference-account .device-table td:first-child{gap:7px}.reference-account .device-table small{font-size:9px}.reference-account .card-heading h2{font-size:15px}.reference-account .card-heading button{font-size:10px}.reference-account .payment-method-option{padding:12px!important;gap:10px}.reference-account .payment-method-copy b{font-size:13px}.reference-account .payment-method-copy small{font-size:10px}.reference-account .payment-method-icon{width:45px;height:34px;flex:none;padding:5px}.reference-account .payment-method-icon img{width:35px;height:24px}.reference-account .plan .plan-badge{display:none}.reference-account .tariff-card .plan{padding:13px!important;gap:9px}.reference-account .plan-description strong{font-size:14px}.reference-account .plan b{font-size:16px}.reference-account .account-quicklinks{display:grid;gap:0}.reference-account .key-tools{display:grid;grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){.reference-account *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Override legacy cabinet selectors that contain :has() and two IDs. */
.reference-account #cabinet:not([hidden]){grid-template-columns:210px minmax(0,1fr)!important;gap:26px!important}
.reference-account #cabinet:not([hidden]) aside{background:linear-gradient(170deg,#152832,#0f2028)!important;border:1px solid var(--line)!important;border-radius:15px!important;min-height:660px!important}
.reference-account #cabinet:not([hidden]) nav button{height:45px!important;min-height:45px!important;background:transparent!important;border-radius:8px!important}
.reference-account #cabinet:not([hidden]) nav button.active{background:#263d47!important;color:#f2f8f5!important;border-color:#3b565b!important;box-shadow:inset 3px 0 var(--green)!important}
.reference-account #content>h1{margin:4px 0 7px!important}
@media(max-width:1150px){.reference-account #cabinet:not([hidden]){grid-template-columns:180px minmax(0,1fr)!important;gap:18px!important}}
@media(max-width:800px){.reference-account #cabinet:not([hidden]){grid-template-columns:minmax(0,1fr)!important;gap:18px!important}.reference-account #cabinet:not([hidden]) aside{min-height:0!important;border-radius:12px!important}.reference-account #cabinet:not([hidden]) nav button{height:40px!important;min-height:40px!important}}

/* Hidden auth panels must stay hidden even when the modern grid is active. */
body.reference-account [hidden],body.reference-account #cabinet[hidden],body.reference-account #login[hidden]{display:none!important}
/* The language control already has its own SVG; remove the legacy CSS chevron. */
body.reference-account.checkout-page .account-language summary::after{content:none!important;display:none!important}
body.reference-account .account-language summary::-webkit-details-marker{display:none}
body.reference-account .account-language summary{list-style:none}


/* Group related header actions; keep back navigation beside the page title. */
body.reference-account header { gap:12px; }
body.reference-account .account-header-actions { display:flex; align-items:center; gap:10px; flex:none; margin-left:auto; }
body.reference-account .account-header-actions .login-language { display:flex; margin:0; }
body.reference-account .account-header-actions .account-status-link { margin:0; min-height:46px; padding:10px 15px; font-size:15px; }
body.reference-account .account-language summary { display:flex; align-items:center; justify-content:center; width:auto; height:46px; min-width:94px; gap:7px; padding:0 12px; border:1px solid #3f5c66; border-radius:11px; background:#172c35; color:#f0f7f5; }
body.reference-account .account-language summary::after { content:none!important; display:none!important; }
body.reference-account .account-language summary .account-language-label { display:inline; font-size:15px; font-weight:650; }
body.reference-account .account-language summary svg { display:block; width:20px; height:20px; flex:none; }
body.reference-account .account-language summary:hover { background:#223d46; border-color:#6e948a; }
body.reference-account .account-language[open] summary { background:#244037; border-color:#8dbb8e; }
body.reference-account .account-language-menu { top:calc(100% + 10px); width:210px; padding:8px; border-radius:15px; background:#142a34; border:1px solid #3b5661; box-shadow:0 18px 48px #02090dcc; }
body.reference-account .account-language-menu button { min-height:48px; padding:12px; font-size:16px; border:1px solid transparent; border-radius:9px; color:#e3edf0; text-align:left; background:transparent; }
body.reference-account .account-language-menu button:hover { background:#233f49; }
body.reference-account .account-language-menu button[aria-pressed=true] { background:#274237; border-color:#4b7450; color:#e2ffd4; }
body.reference-account .account-language-menu button span { display:block; visibility:hidden; color:#a3f880; }
body.reference-account .account-language-menu button[aria-pressed=true] span { visibility:visible; }
body.reference-account #content>.checkout-back-inline { display:flex; justify-content:flex-start; min-height:44px; font-size:15px; padding:0; margin:0 0 12px!important; width:max-content!important; background:transparent; color:#bcd0d8; }
body.reference-account #content>.checkout-back-inline:hover { color:#9cf875; }
@media(max-width:800px) {
 body.reference-account .account-header-actions { gap:8px; }
 body.reference-account .account-language summary { height:44px; min-width:0; padding-inline:10px; }
 body.reference-account .account-language summary .account-language-label { font-size:14px; }
}

/* Cabinet cards and actions follow the public site's spacing and typography. */
body.reference-account #cabinet #content { font-size:16px; line-height:1.6; }
body.reference-account #cabinet #content h1 { margin:0 0 22px; font-family:'Noto Sans',Arial,sans-serif!important; }
body.reference-account #cabinet #content h2 { font-size:20px; font-weight:600; line-height:1.4; }
body.reference-account #cabinet #content .card { background:linear-gradient(145deg,#142a33,#102129)!important; border-color:#2c4550!important; border-radius:16px!important; padding:24px!important; }
body.reference-account #cabinet #content :is(button,.button) { font-family:'Noto Sans',Arial,sans-serif; font-size:15px; font-weight:650; line-height:1.3; min-height:44px; border-radius:10px; }
body.reference-account #cabinet aside { min-height:0!important; }
body.reference-account #cabinet .logout { margin-top:24px!important; }
body.reference-account #content .profile-subscription { gap:24px; align-items:center; margin-bottom:20px; }
body.reference-account #content .profile-subscription .details { min-width:0; }
body.reference-account #content .profile-subscription .details>div { max-width:520px; color:#b7c7cf; font-size:16px; }
body.reference-account #content .profile-subscription h2 { font-size:28px; margin:8px 0 12px; }
body.reference-account #content .profile-subscription>button { flex:none; padding-inline:22px; }
body.reference-account #content .profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
body.reference-account #content .profile-grid>.card { display:flex; flex-direction:column; align-items:stretch; gap:18px; margin:0; min-width:0; }
body.reference-account #content .profile-card-title { display:flex; align-items:center; gap:12px; margin:0 0 18px; }
body.reference-account #content .profile-card-title>svg { width:24px; height:24px; flex:none; color:var(--green); }
body.reference-account #content .profile-card-title h2 { margin:0; font-size:20px; }
body.reference-account #content .profile-account p { margin:12px 0; font-size:16px; line-height:1.6; }
body.reference-account #content .profile-account .profile-account-id { margin-top:20px; font-size:13px; color:#97afb9; }
body.reference-account #content .profile-account code { font:inherit; color:#c8d7dc; }
body.reference-account #content .profile-account>button { margin-top:auto; align-self:flex-start; min-width:140px; padding-inline:22px; }
body.reference-account #content .profile-referral .profile-card-title { margin-bottom:0; }
body.reference-account #content .referral-link-row { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid #2f4a55; border-radius:10px; background:#0e2028; }
body.reference-account #content .referral-link-row .value { min-width:0; margin:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#d4e3e7; font-size:14px; }
body.reference-account #content .referral-link-row>button { flex:none; min-height:38px; padding:8px 12px; font-size:13px; }
body.reference-account #content .referral-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:auto; }
body.reference-account #content .referral-counts>span { display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:12px; border:1px solid #28414b; border-radius:10px; background:#10242c; color:#a9bec6; font-size:12px; }
body.reference-account #content .referral-counts b { color:var(--green); font-size:24px; font-weight:600; line-height:1.3; }
@media(max-width:1100px) {
 body.reference-account #content .profile-grid { grid-template-columns:1fr; }
}
@media(max-width:720px) {
 body.reference-account #cabinet #content .card { padding:20px!important; }
 body.reference-account #content .profile-subscription { flex-direction:column; align-items:stretch; gap:18px; }
 body.reference-account #content .profile-subscription>button { width:100%; }
 body.reference-account #content .profile-grid { gap:16px; }
 body.reference-account #content .profile-account>button { width:100%; align-self:stretch; }
 body.reference-account #content .referral-link-row { flex-wrap:wrap; }
 body.reference-account #content .referral-link-row .value { width:100%; }
 body.reference-account #content .referral-link-row>button { width:100%; }
 body.reference-account #content .referral-counts { gap:8px; }
 body.reference-account #content .referral-counts>span { padding:10px; }
}

/* Owner-scoped device removal and explicit confirmation. */
body.reference-account .login #telegram-link:not([hidden]) { display:flex!important; align-items:center; justify-content:center; min-height:48px; margin-top:18px; border:1px solid #4a7160; border-radius:9px; background:#284c39; color:#e6ffda; font-size:15px; }
body.reference-account .login #login-state:not(:empty) { display:block!important; margin-top:16px; font-size:15px; line-height:1.6; color:#d2e1e4; }
body.reference-account .login #login-state:empty { display:none!important; }
body.reference-account .device-table .device-actions { width:120px; text-align:right; }
body.reference-account .device-remove { display:inline-flex; align-items:center; gap:7px; width:auto; min-height:40px; padding:8px 11px; margin:0; border:1px solid #805b5b; border-radius:9px; background:#352c2e; color:#ffd8d1; font-size:14px; }
body.reference-account .device-remove:hover { background:#493235; border-color:#c18888; }
body.reference-account .device-remove svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
body.reference-account .device-legacy { font-size:12px; color:#a4b8c0; }
body.reference-account #device-remove-dialog { width:min(460px,calc(100% - 32px)); padding:26px; border:1px solid #3b5661; border-radius:17px; background:#132932; color:#edf5f2; }
body.reference-account #device-remove-dialog h2 { margin:0 0 16px; font-size:24px; }
body.reference-account #device-remove-dialog p { margin:12px 0; font-size:15px; line-height:1.6; color:#bfd0d5; }
body.reference-account #device-remove-name { font-weight:600; color:#f2f7f4!important; overflow-wrap:anywhere; }
body.reference-account #device-remove-error { color:#ffbcb4!important; }
body.reference-account .device-dialog-actions { display:flex; gap:12px; margin-top:22px; }
body.reference-account .device-dialog-actions button { width:auto; flex:1; margin:0; padding:10px 12px; font-size:15px; }
body.reference-account #device-remove-confirm { background:#da6962; color:#1c1514; }
@media(max-width:600px) {
 body.reference-account[data-account-page=access] .device-table { min-width:0; }
 body.reference-account[data-account-page=access] .device-table thead { display:none; }
 body.reference-account[data-account-page=access] .device-table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; padding:16px 0; border-bottom:1px solid #2a434c; }
 body.reference-account[data-account-page=access] .device-table td { width:auto; padding:6px 0; border:0; }
 body.reference-account[data-account-page=access] .device-table td:first-child { grid-column:1/-1; }
 body.reference-account[data-account-page=access] .device-table .device-actions { width:auto; }
 body.reference-account .device-dialog-actions { flex-direction:column-reverse; }
}
