/* Shared topbar contract for every standard client/app page. */
.pa-theme #header.pa-shared-topbar {
    display:block !important; position:sticky; inset:auto; top:0; height:auto;
    min-height:88px; padding:23px 0; margin-block:0 !important;
    max-width:none; margin-inline:0 !important; border-radius:0; box-sizing:border-box;
    background:var(--pa-surface); border:0; border-bottom:1px solid var(--pa-border); z-index:1030;
}
.pa-theme.pa-shared-shell #header.pa-shared-topbar { margin-inline-start:var(--pa-sidebar-width) !important; }
.pa-theme .pa-shared-topbar>.site-container { display:flex; align-items:center; flex-wrap:wrap; gap:18px; direction:ltr; height:auto; }
.pa-theme .pa-shared-topbar .pa-topbar-actions { display:flex; align-items:center; gap:12px; direction:rtl; order:0; margin:0 auto 0 0; }
.pa-theme .pa-shared-topbar .pa-site-search { display:flex; order:1; margin:0 0 0 auto; }
.pa-theme .pa-shared-topbar .pa-account-nav,.pa-theme .pa-shared-topbar .top-nav { display:flex; align-items:center; }
.pa-theme .pa-shared-topbar .pa-support-link,.pa-theme .pa-shared-topbar .pa-cart-link { display:inline-flex; }
.pa-theme .pa-shared-topbar .pa-support-link { align-items:center; justify-content:center; gap:8px; }
.pa-theme .pa-shared-topbar .pa-support-link > i {
    display:inline-flex; align-items:center; justify-content:center; flex:0 0 16px;
    width:16px; height:16px; margin:0; padding:0; font-size:16px; line-height:1;
}
.pa-theme .pa-shared-topbar .pa-support-link > i::before { display:block; line-height:1; }
.pa-theme .pa-shared-topbar .logo { display:none; order:2; margin:0; }
.pa-theme .pa-shared-topbar .pa-menu-toggle { display:none; }
.pa-theme .pa-shared-topbar .pa-menu-toggle>span { background:var(--pa-primary); }
.pa-theme.pa-shared-shell #main-body,.pa-theme.pa-shared-shell.pa-auth #main-body { direction:inherit; margin-inline-start:var(--pa-sidebar-width) !important; margin-inline-end:0 !important; }
.pa-theme.pa-shared-shell:is(.pa-page-login,.pa-page-clientregister,.pa-page-password-reset-container) .pa-page-content,
.pa-theme.pa-shared-shell:has(.phm-otp-page) .pa-page-content { container-type:inline-size; }
.pa-theme.pa-shared-shell:is(.pa-auth,.pa-page-clientregister) #main-body,
.pa-theme.pa-shared-shell:has(.phm-otp-page) #main-body { min-height:calc(100svh - var(--pa-topbar-height,88px)); }
@media(max-width:1250px) {
 .pa-theme #header.pa-shared-topbar { padding-block:20px; }
 .pa-theme .pa-shared-topbar>.site-container { gap:10px; }
 .pa-theme .pa-shared-topbar .pa-site-search { display:flex; }
 .pa-theme .pa-shared-topbar .pa-topbar-actions { gap:9px; }
}
@media(max-width:800px) {
 .pa-theme.pa-shared-shell { padding-top:74px; }
 .pa-theme #header.pa-shared-topbar {
    position:fixed; inset:0 0 auto; width:auto; min-height:74px; padding:8px 0;
    margin-inline:0 !important;
 }
 .pa-theme .pa-shared-topbar>.site-container { height:58px; flex-wrap:nowrap; gap:8px; }
 .pa-theme .pa-shared-topbar .pa-site-search { display:none; }
 .pa-theme .pa-shared-topbar .pa-topbar-actions { gap:5px; order:2; flex:1 1 0; min-width:0; margin:0; justify-content:flex-end; }
 .pa-theme .pa-shared-topbar .logo { display:block; flex-shrink:0; order:1; }
 .pa-theme .pa-shared-topbar .logo img { width:40px; height:44px; max-height:44px; object-fit:contain; }
 .pa-theme .pa-shared-topbar .pa-support-link { display:inline-flex; align-items:center; justify-content:center; flex:0 0 36px; width:36px; min-width:36px; min-height:38px; padding:8px; }
 .pa-theme .pa-shared-topbar .pa-support-link > span { display:none; }
 .pa-theme .pa-shared-topbar .pa-menu-toggle { display:flex; order:0; margin:0; }
 html[dir=rtl] .pa-theme .pa-shared-topbar .pa-topbar-actions { order:0; }
 html[dir=rtl] .pa-theme .pa-shared-topbar .logo { order:1; }
 html[dir=rtl] .pa-theme .pa-shared-topbar .pa-menu-toggle { order:2; }
 .pa-theme.pa-shared-shell .pa-sidebar { display:flex; }
 .pa-theme.pa-shared-shell .pa-drawer-overlay:not([hidden]) { display:block; }
}
@media(max-width:360px) {
 .pa-theme .pa-shared-topbar>.site-container { gap:6px; }
 .pa-theme .pa-shared-topbar .pa-topbar-actions { gap:3px; }
 .pa-theme .pa-shared-topbar .logo img { width:34px; }
}
@container(max-width:800px) {
 .pa-theme .phm-login-shell,.pa-theme .phm-register-shell,.pa-theme .phm-auth-frame,.pa-theme .phm-otp-page { grid-template-columns:minmax(0,1fr); min-height:0; }
 .pa-theme .phm-login-welcome { grid-column:1; grid-row:1; }
 .pa-theme .phm-login-options { grid-column:1; grid-row:2; padding:30px 24px; }
 .pa-theme .phm-register-welcome { grid-row:1; }
 .pa-theme .phm-register-main { grid-row:2; }
}
@media print { .pa-theme #header.pa-shared-topbar { display:none !important; } }

.pa-theme .pa-mobile-menu-header { display:none; }
@media(max-width:800px) {
 html.pa-document.pa-menu-open { overflow:hidden; }
 .pa-theme.pa-shared-shell { min-width:0; }
 .pa-theme.pa-shared-shell .pa-sidebar {
    inset:0; width:100%; max-width:none; height:100svh; height:100dvh;
    max-height:none; min-height:0; padding:0 20px 24px; border:0; border-radius:0;
    z-index:1050; overflow-y:auto; overscroll-behavior:contain;
    visibility:hidden; pointer-events:none;
    transition:transform .22s ease,visibility 0s linear .22s;
 }
 .pa-theme.pa-shared-shell .pa-sidebar.pa-is-open { visibility:visible; pointer-events:auto; transition-delay:0s; }
 .pa-theme .pa-sidebar > :is(.pa-mobile-menu-header,#nav,.pa-sidebar-account) { flex-shrink:0; }
 .pa-theme .pa-mobile-menu-header {
    position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between;
    gap:16px; min-height:74px; margin-bottom:16px; padding:12px 0;
    background:var(--pa-surface); border-bottom:1px solid var(--pa-border); color:var(--pa-primary);
 }
 .pa-theme .pa-mobile-menu-brand { display:flex; align-items:center; gap:12px; min-width:0; color:inherit; text-decoration:none; }
 .pa-theme .pa-mobile-menu-brand img { flex:0 0 48px; width:48px; height:48px; object-fit:contain; }
 .pa-theme .pa-mobile-menu-brand strong { min-width:0; overflow-wrap:anywhere; font-size:16px; line-height:1.7; }
 .pa-theme .pa-mobile-menu-close {
    display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:0;
    border:1px solid var(--pa-border); border-radius:12px; color:var(--pa-primary);
    background:var(--pa-subtle); font-size:28px; line-height:1;
 }
 .pa-theme .pa-mobile-menu-close:focus-visible { outline:2px solid var(--pa-link); outline-offset:3px; }
 .pa-theme .pa-sidebar-account { margin-top:auto; padding-top:24px; padding-bottom:env(safe-area-inset-bottom,0px); }
 .pa-theme #primary-nav > .navbar-nav > li > a { min-height:48px; padding:12px; border-radius:12px; }
}
@media(prefers-reduced-motion:reduce) { .pa-theme.pa-shared-shell .pa-sidebar { transition:none; } }
/* Equal-sized mobile controls and one spacing token across nested action groups. */
@media(max-width:800px) {
 .pa-theme #header.pa-shared-topbar > .site-container { padding-inline:var(--site-horizontal-padding); width:100%; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions { gap:6px; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-account-nav,.top-nav) { gap:6px; margin:0; padding:0; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-account-nav,.top-nav)::before,
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-account-nav,.top-nav)::after { display:none; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-account-nav,.top-nav) > li { margin:0; padding:0; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-support-link,.pa-cart-link,.pa-color-toggle,.pa-account-nav > li > a,#accountNotifications,.choose-language) {
    display:inline-flex; align-items:center; justify-content:center; flex:0 0 40px;
    width:40px; min-width:40px; height:40px; min-height:40px; margin:0; padding:0; box-sizing:border-box;
 }
 .pa-theme .pa-mobile-menu-brand:focus-visible { outline:2px solid var(--pa-link); outline-offset:4px; border-radius:6px; }
}
@media(max-width:800px) {
 .pa-theme #header.pa-shared-topbar .pa-topbar-guest .pa-account-nav > li:has(.pa-guest-register-button) { display:none !important; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-guest .pa-guest-login-button > span { display:none; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-guest .pa-guest-login-button > i { display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; font-size:18px; line-height:1; }
}

/* Mobile login focuses on the methods instead of stacking the welcome panel. */
.pa-theme .pa-mobile-login-title { display:none; }
@media(max-width:800px) {
 .pa-theme.pa-auth.pa-page-login #main-body {
    min-height:calc(100svh - var(--pa-topbar-height,88px));
    padding:16px 0 !important; align-items:center; min-width:0;
 }
 .pa-theme.pa-auth.pa-page-login .phm-login-welcome { display:none; }
 .pa-theme.pa-auth.pa-page-login .phm-login-shell {
    display:grid; grid-template-columns:minmax(0,1fr); min-height:0;
    width:100%; max-width:480px; margin-inline:auto; container-type:normal;
 }
 .pa-theme.pa-auth.pa-page-login .phm-login-options {
    grid-column:1; grid-row:1; min-width:0; width:100%; padding:24px 20px;
 }
 .pa-theme.pa-auth.pa-page-login .phm-login-options > div { min-width:0; max-width:100%; }
 .pa-theme.pa-auth.pa-page-login .pa-mobile-login-title { display:block; margin:0 0 6px; text-align:center; font-size:22px; font-weight:700; line-height:1.7; color:var(--pa-primary); }
 .pa-theme.pa-auth.pa-page-login #phmLoginMethods > h2 { display:none; }
 .pa-theme.pa-auth.pa-page-login .phm-method-list { margin-top:18px; gap:10px; }
 .pa-theme.pa-auth.pa-page-login .phm-method { min-width:0; min-height:64px; padding:10px 12px; gap:10px; }
 .pa-theme.pa-auth.pa-page-login .phm-method-copy { overflow-wrap:anywhere; }
 .pa-theme.pa-auth.pa-page-login .phm-login-register { margin-top:18px; padding-top:16px; flex-wrap:wrap; justify-content:center; gap:12px; }
}
@media(max-width:800px) and (max-height:700px) {
 .pa-theme.pa-auth.pa-page-login #main-body { padding-block:12px !important; }
 .pa-theme.pa-auth.pa-page-login .phm-login-options { padding:18px 16px; }
 .pa-theme.pa-auth.pa-page-login .phm-method { min-height:58px; padding:8px 10px; }
 .pa-theme.pa-auth.pa-page-login .phm-method-list { gap:8px; margin-top:14px; }
 .pa-theme.pa-auth.pa-page-login .phm-login-register { margin-top:14px; padding-top:12px; }
}
/* Focused authorization actions share the same header frame and responsive tokens. */
@media(max-width:800px) {
 .pa-theme .phm-auth-frame > .phm-auth-story,
 .pa-theme .phm-otp-page > .phm-auth-story { display:none; }
 .pa-theme.pa-page-password-reset-container #main-body,
 .pa-theme:has(.phm-otp-page) #main-body {
    display:flex; align-items:center; min-width:0;
    min-height:calc(100svh - var(--pa-topbar-height,88px)); padding:16px 0 !important;
 }
 .pa-theme :is(.phm-auth-frame,.phm-otp-page) {
    grid-template-columns:minmax(0,1fr); width:100%; max-width:480px; min-width:0;
    min-height:0; margin-inline:auto;
 }
 .pa-theme .phm-auth-frame > .logincontainer,
 .pa-theme .phm-otp-page > .phm-otp-card { grid-column:1; grid-row:1; width:100%; min-width:0; padding:24px 20px; }
 .pa-theme :is(.phm-auth-frame,.phm-otp-card) h1 { font-size:22px; }
 .pa-theme .phm-otp-card .pa-otp-digits { gap:6px; }
}

.pa-theme #header.pa-topbar-oauth > .site-container { justify-content:space-between; direction:inherit; height:auto; flex-wrap:wrap; }
.pa-theme .pa-shared-topbar .pa-oauth-brand { display:flex; align-items:center; gap:12px; min-width:0; order:0; font-size:16px; font-weight:700; color:var(--pa-primary); text-decoration:none; overflow-wrap:anywhere; }
.pa-theme .pa-shared-topbar .pa-oauth-brand img { width:68px; height:44px; object-fit:contain; }
.pa-theme .pa-shared-topbar .pa-oauth-header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; min-width:0; order:1; }
.pa-theme .pa-shared-topbar .pa-oauth-header-actions form { margin:0; min-width:0; }
.pa-theme .pa-shared-topbar .pa-oauth-header-actions p { margin:0; max-width:420px; color:var(--pa-muted); font-size:12px; line-height:1.9; overflow-wrap:anywhere; }
.pa-theme .pa-shared-topbar .pa-oauth-switch-account { display:inline-flex; align-items:center; min-height:40px; min-width:44px; border:0; padding:6px 4px; background:transparent; color:var(--pa-link); font:inherit; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
[dir=ltr] .pa-theme .pa-shared-topbar #frmReturnToApp .fa-arrow-right { transform:rotate(180deg); }
/* Passport verification shares the account menu in both desktop and mobile layouts. */
.pa-theme #header .pa-account-nav .pa-passport-status-link { display:flex; align-items:center; gap:8px; min-height:44px; white-space:normal; }
.pa-theme #header .pa-passport-status-label { flex:1; min-width:0; }
.pa-theme #header .pa-passport-status-badge { flex:none; padding:3px 7px; border-radius:6px; font-size:11px; line-height:1.6; font-weight:600; }
.pa-theme #header .pa-account-nav .pa-verification-approved { color:#216b16 !important; background:#e5f5dc !important; border:1px solid #b5dda4; }
.pa-theme #header .pa-verification-pending { color:var(--pa-muted,#526881); background:var(--pa-subtle,#f0f5fb); }
.pa-theme #header .pa-account-nav .pa-verification-rejected { color:#b42318 !important; background:#fff0ee !important; border:1px solid #f3b8b2; }
@media(max-width:600px) { .pa-theme .pa-shared-topbar .pa-oauth-header-actions { width:100%; justify-content:space-between; } }

/* Service ordering and icon-only ticket creation share the existing topbar. */
.pa-theme #header.pa-shared-topbar .pa-topbar-actions { --pa-action-gap:8px; gap:var(--pa-action-gap); }
.pa-theme #header.pa-shared-topbar .pa-topbar-actions > :is(.pa-account-nav,.top-nav) { gap:var(--pa-action-gap); margin:0; padding:0; }
.pa-theme #header.pa-shared-topbar .pa-topbar-actions > :is(.pa-account-nav,.top-nav) > li { margin:0; padding:0; }
.pa-theme #header.pa-shared-topbar .pa-topbar-actions > :is(.pa-account-nav,.top-nav)::before,
.pa-theme #header.pa-shared-topbar .pa-topbar-actions > :is(.pa-account-nav,.top-nav)::after { display:none; }
.pa-theme.pa-has-admin-return #header.pa-shared-topbar .pa-topbar-actions { margin-left:0; }
@media(min-width:801px) {
 .pa-theme #header.pa-shared-topbar > .site-container { width:100%; padding-left:12px; padding-right:20px; flex-wrap:nowrap; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions { flex:0 0 auto; }
 .pa-theme #header.pa-shared-topbar .pa-site-search {
    display:flex; flex:1 1 420px; width:auto; min-width:120px; max-width:600px;
 }
}
@media(max-width:800px) { .pa-theme #header.pa-shared-topbar .pa-topbar-actions { --pa-action-gap:4px; } }
@media(max-width:360px) { .pa-theme #header.pa-shared-topbar .pa-topbar-actions { --pa-action-gap:3px; } }
.pa-theme #header.pa-shared-topbar .pa-new-service-link { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; order:0; }
.pa-theme #header.pa-shared-topbar .pa-new-service-link > i { margin:0; }
.pa-theme #header.pa-shared-topbar .pa-topbar-icon { display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; padding:0; border:1px solid var(--pa-border); border-radius:8px; background:var(--pa-surface); color:var(--pa-primary); text-decoration:none; }
.pa-theme #header.pa-shared-topbar .pa-topbar-icon > i { width:auto; height:auto; font-size:20px; }
.pa-theme #header.pa-shared-topbar :is(.pa-topbar-icon,.pa-new-service-link):focus-visible { outline:2px solid var(--brand-blue); outline-offset:3px; }
@media(max-width:800px) {
 .pa-theme #header.pa-shared-topbar .pa-new-service-link { width:36px; min-width:36px; height:38px; min-height:38px; flex:0 0 36px; padding:8px; }
 .pa-theme #header.pa-shared-topbar .pa-new-service-link > span { display:none; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-icon { width:36px; min-width:36px; height:38px; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions { flex-wrap:nowrap; }
}
@media(max-width:360px) {
 .pa-theme #header.pa-shared-topbar :is(.pa-new-service-link,.pa-topbar-icon) { width:32px; min-width:32px; flex-basis:32px; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-new-service-link,.pa-support-link,.pa-cart-link,.pa-color-toggle,.pa-account-nav > li > a,#accountNotifications,.choose-language,.pa-admin-return) { width:32px; min-width:32px; height:38px; min-height:38px; flex-basis:32px; padding:0; }
}

@media(min-width:361px) and (max-width:420px) {
 .pa-theme #header.pa-shared-topbar > .site-container { padding-inline:12px; }
}

@media(max-width:360px) {
 .pa-theme #header.pa-shared-topbar > .site-container { padding-inline:12px; }
}

@media(min-width:1251px) { .pa-theme #header.pa-shared-topbar .pa-site-search { flex-basis:420px; } }

/* Keep action icons, logo and menu toggle on a single mobile row. */
@media(max-width:800px) {
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-new-service-link,.pa-support-link,.pa-cart-link,.pa-color-toggle,.pa-account-nav > li > a,#accountNotifications,.choose-language) { width:38px; min-width:38px; height:38px; min-height:38px; flex-basis:38px; padding:0; }
}
@media(max-width:600px) {
 .pa-theme #header.pa-shared-topbar > .site-container { height:58px; flex-wrap:nowrap; gap:6px; padding-inline:12px; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions { flex:1 1 0; width:auto; flex-wrap:nowrap; }
 .pa-theme #header.pa-shared-topbar .logo { margin:0; }
 .pa-theme #header.pa-shared-topbar .logo img { width:32px; height:36px; }
 .pa-theme #header.pa-shared-topbar .pa-menu-toggle { flex:0 0 27px; width:27px; min-width:27px; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-new-service-link,.pa-support-link,.pa-cart-link,.pa-color-toggle,.pa-account-nav > li > a,#accountNotifications,.choose-language) { width:38px; min-width:38px; height:38px; min-height:38px; flex-basis:38px; padding:0; }
}
@media(max-width:360px) {
 .pa-theme #header.pa-shared-topbar > .site-container { gap:4px; }
 .pa-theme #header.pa-shared-topbar .logo img { width:28px; }
 .pa-theme #header.pa-shared-topbar .pa-topbar-actions :is(.pa-new-service-link,.pa-support-link,.pa-cart-link,.pa-color-toggle,.pa-account-nav > li > a,#accountNotifications,.choose-language) { width:36px; min-width:36px; height:36px; min-height:36px; flex-basis:36px; }
}
