/* PaisaNow Reference UI — light, responsive social-commerce shell. UI-only overrides. */
:root{
  --pn-ref-blue:#0866ff;--pn-ref-blue-dark:#0754d6;--pn-ref-bg:#f4f7fb;
  --pn-ref-card:#fff;--pn-ref-line:#e2e8f0;--pn-ref-text:#111827;
  --pn-ref-muted:#64748b;--pn-ref-radius:14px;--pn-ref-shadow:0 2px 10px rgba(15,23,42,.055);
}
html,body{max-width:100%;overflow-x:hidden}
body[data-user-id]:not([data-user-id="0"]){background:var(--pn-ref-bg)!important;color:var(--pn-ref-text)}
body[data-user-id]:not([data-user-id="0"]) .card{background:var(--pn-ref-card);border:1px solid var(--pn-ref-line);border-radius:var(--pn-ref-radius);box-shadow:var(--pn-ref-shadow)}

/* Header */
.user-header.topbar{height:68px!important;padding:0 18px!important;gap:18px!important;background:rgba(255,255,255,.98)!important;border-bottom:1px solid #e5eaf2!important;box-shadow:0 2px 12px rgba(15,23,42,.05)!important}
.user-header .brand{min-width:185px;font-size:22px;letter-spacing:-.03em}
.user-header .brand-mark{width:38px;height:38px;border-radius:50%;background:var(--pn-ref-blue);box-shadow:none}
.user-header .site-logo{max-width:40px;max-height:40px;object-fit:contain}
.user-header .brand-copy small,.production-label{display:none!important}
.user-header .global-search{max-width:310px;min-width:190px}
.user-header .global-search input{height:40px;background:#f7f9fc;border-color:#edf1f6;font-size:12px}
.desktop-primary-nav{height:100%;display:flex;align-items:stretch;justify-content:center;gap:3px;flex:1;min-width:0}
.desktop-primary-nav a{position:relative;min-width:72px;padding:10px 12px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#334155;font-size:10px;font-weight:700;border-radius:8px}
.desktop-primary-nav a i{font-size:17px}
.desktop-primary-nav a:hover{background:#f5f8fd;color:var(--pn-ref-blue)}
.desktop-primary-nav a.active{color:var(--pn-ref-blue)}
.desktop-primary-nav a.active:after{content:"";position:absolute;left:7px;right:7px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--pn-ref-blue)}
.user-header .top-actions{gap:7px}
.user-header .top-actions>a:not(.mini-avatar),.user-header .theme-toggle{width:38px!important;min-width:38px!important;height:38px!important;padding:0!important;border-radius:50%!important;background:#f4f7fb!important;color:#0f172a!important}
.user-header .top-actions>a:hover,.user-header .theme-toggle:hover{background:#e9f1ff!important;color:var(--pn-ref-blue)!important}
.user-header .language-switcher,.user-header .mobile-header-shortcut,.user-header .top-actions>a[href*="news"],.user-header .top-actions>a[href*="daily-exam"],.user-header .top-actions>a[href*="wallet"],.user-header .top-actions>a[href*="analytics"]{display:none!important}
.user-header .profile-dropdown summary .mini-avatar{width:38px;height:38px;border:2px solid #fff;box-shadow:0 0 0 1px #dbe3ee}

/* Main desktop shell */
.app-layout{width:min(100% - 24px,1536px)!important;max-width:1536px!important;margin:14px auto 90px!important;padding:0!important;grid-template-columns:minmax(190px,220px) minmax(520px,1fr) minmax(250px,285px)!important;gap:14px!important;align-items:start}
.left-sidebar,.right-sidebar{top:82px!important}
.left-sidebar{padding:0 0 12px!important;border:1px solid var(--pn-ref-line)!important;border-radius:var(--pn-ref-radius)!important;background:#fff!important;box-shadow:var(--pn-ref-shadow)!important;overflow:hidden}
.sidebar-user-card{display:flex;align-items:center;gap:10px;padding:16px 14px 13px;border-bottom:1px solid #edf1f6;background:linear-gradient(180deg,#fff,#fbfcff)}
.sidebar-user-card .sidebar-avatar{width:42px;height:42px}
.sidebar-user-card span{min-width:0;flex:1}
.sidebar-user-card strong,.sidebar-user-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-user-card strong{font-size:13px}.sidebar-user-card small{margin-top:2px;color:var(--pn-ref-muted);font-size:10px}
.sidebar-user-card>i{color:var(--pn-ref-blue);font-size:12px}
.left-sidebar .smart-sidebar-nav{padding:8px!important;max-height:calc(100vh - 245px);overflow:auto;scrollbar-width:thin}
.left-sidebar .sidebar-group{border:0!important}
.left-sidebar .sidebar-group summary{padding:8px 9px!important;color:#94a3b8!important;font-size:9px!important;letter-spacing:.1em;text-transform:uppercase}
.left-sidebar nav a{min-height:38px;padding:9px 10px!important;gap:10px!important;border-radius:8px!important;color:#334155!important;font-size:12px!important;font-weight:650!important}
.left-sidebar nav a i{width:20px!important;font-size:14px!important;color:#64748b}
.left-sidebar nav a:hover,.left-sidebar nav a.active{background:#eef4ff!important;color:var(--pn-ref-blue)!important}
.left-sidebar nav a.active i{color:var(--pn-ref-blue)!important}
.left-sidebar .create-button{width:calc(100% - 16px);min-height:42px;margin:8px!important;border:0;border-radius:8px!important;background:var(--pn-ref-blue)!important;box-shadow:none;font-size:12px}
.left-sidebar .logout-link,.left-sidebar .sidebar-ai-shortcut{margin:3px 8px!important;padding:9px 10px!important;border-radius:8px;font-size:11px}
.content{gap:12px!important;width:100%;min-width:0}
.content>.card,.content>section.card,.content>article.card{border-radius:var(--pn-ref-radius)!important}
.right-sidebar{gap:12px!important}.right-sidebar .card{padding:14px!important;border-radius:var(--pn-ref-radius)!important}.right-sidebar h3{font-size:13px!important}

/* Universal page refinement */
.content h1{font-size:clamp(22px,2.3vw,32px);letter-spacing:-.035em}.content h2{letter-spacing:-.025em}
.content input,.content select,.content textarea{border-color:#dce3ec!important;border-radius:10px!important;background:#fff!important}
.content input:focus,.content select:focus,.content textarea:focus{border-color:#8bb6ff!important;box-shadow:0 0 0 3px rgba(8,102,255,.1)!important;outline:0}
.content .button{border-radius:9px!important;background:var(--pn-ref-blue)!important;box-shadow:none!important}
.content .button:hover{background:var(--pn-ref-blue-dark)!important}
.content .button.ghost,.content .button.secondary{background:#fff!important;color:var(--pn-ref-blue)!important;border:1px solid #b9d2ff!important}
.table-scroll,.admin-table{border-radius:12px;overflow:auto}.content table{width:100%;border-collapse:collapse}.content th{background:#f8fafc;color:#475569;font-size:11px}.content th,.content td{padding:11px;border-bottom:1px solid #edf1f5}
.empty-state{padding:34px!important;text-align:center}

/* Feed, composer, stories */
.stories{padding:12px!important;gap:10px!important;border-radius:var(--pn-ref-radius)!important}.story{min-width:72px}.story-ring,.add-story i{width:58px!important;height:58px!important}
.composer{padding:14px!important}.composer-head{align-items:center}.composer-head button{height:42px;background:#f5f7fa!important;font-size:12px}.composer-actions{margin-top:11px!important;padding-top:10px!important}.composer-actions button,.composer-actions a{font-size:11px!important}
.feed{gap:12px!important}.post{border-radius:var(--pn-ref-radius)!important;overflow:hidden}.post header{padding:14px!important}.post .post-body{line-height:1.6}.post-media img,.post-media video{width:100%;max-height:680px;object-fit:cover}.post-actions{padding:3px 8px 8px!important}.post-actions button,.post-actions a{border-radius:8px!important}

/* Marketplace, groups, jobs, pages and profile cards */
.marketplace-grid,.product-grid,.community-card-grid,.smart-jobs-list,.page-card-grid,.group-strip{gap:12px!important}
.product-card,.marketplace-card,.community-card,.job-card{border:1px solid var(--pn-ref-line)!important;border-radius:12px!important;background:#fff!important;box-shadow:0 2px 8px rgba(15,23,42,.04)!important;overflow:hidden}
.product-card:hover,.marketplace-card:hover,.community-card:hover,.job-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.09)!important}
.profile-cover,.community-hero{border-radius:14px 14px 0 0!important}.profile-tabs,.fb-tabs,.community-tabs{overflow-x:auto;flex-wrap:nowrap!important;scrollbar-width:none}.profile-tabs a,.fb-tabs a,.community-tabs a{white-space:nowrap}

/* Modal and menu polish */
.create-hub,.modal,.report-post-modal{backdrop-filter:blur(5px)}
.create-hub-panel,.modal-card{border-radius:18px!important;box-shadow:0 24px 70px rgba(15,23,42,.22)!important}
.mobile-menu-sheet>div{background:#fff!important}

/* Tablet */
@media(max-width:1240px){
 .user-header .brand{min-width:auto}.user-header .brand-copy{display:none}.user-header .global-search{max-width:260px}
 .desktop-primary-nav a{min-width:61px;padding-inline:8px}.desktop-primary-nav a span{font-size:9px}
 .app-layout{grid-template-columns:190px minmax(0,1fr) 250px!important}
}
@media(max-width:1040px){
 .desktop-primary-nav{display:none}.user-header .global-search{max-width:none}
 .app-layout{grid-template-columns:190px minmax(0,1fr)!important}.right-sidebar{display:none!important}
}

/* Mobile app-like view */
@media(max-width:760px){
 body[data-user-id]:not([data-user-id="0"]){background:#fff!important;padding-bottom:74px!important}
 .user-header.topbar{position:relative!important;height:58px!important;padding:0 11px!important;gap:9px!important;border-bottom:1px solid #edf0f4!important;box-shadow:none!important}
 .user-header .brand{font-size:18px;color:var(--pn-ref-blue)}.user-header .brand-mark,.user-header .site-logo{width:30px!important;height:30px!important}.user-header .brand-copy{display:inline!important}.user-header .brand-copy small{display:none!important}
 .user-header .global-search{margin-left:auto;flex:0 0 34px;min-width:34px}.user-header .global-search input{position:absolute;width:0;opacity:0;pointer-events:none}.user-header .global-search i{position:static;transform:none;width:34px;height:34px;display:grid;place-items:center;color:#0f172a}
 .user-header .top-actions{margin-left:0!important;gap:2px}.user-header .top-actions>a:not(.message-link):not(.notification-header-link),.user-header .theme-toggle,.user-header .profile-dropdown{display:none!important}
 .user-header .top-actions>a.message-link,.user-header .top-actions>a.notification-header-link{display:flex!important;width:34px!important;min-width:34px!important;height:34px!important;background:transparent!important;font-size:16px}
 .app-layout{display:block!important;width:100%!important;margin:0!important;padding:0!important}
 .left-sidebar,.right-sidebar{display:none!important}.content{display:grid!important;gap:8px!important;width:100%!important;padding:8px 0 0!important}
 .content>.card,.content>section.card,.content>article.card,.content>.feed,.content>.page-shell,.content>.settings-page,.content>.pn-checkout-page{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}
 .card{border-left:0!important;border-right:0!important;border-radius:0!important;box-shadow:none!important}
 .approval-notice,.profile-completion-nudge{margin:0 8px;border-radius:12px!important}
 .stories{border-top:0!important;padding:10px 8px!important}.story{min-width:66px}.story-ring,.add-story i{width:54px!important;height:54px!important}
 .composer{padding:11px!important}.composer-head button{height:39px}.composer-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.composer-actions button,.composer-actions a{padding:7px 2px!important;font-size:10px!important}.composer-actions i{margin-right:3px!important}
 .feed{gap:8px!important}.post{border-radius:0!important}.post header{padding:12px!important}.post-body,.post .body{padding-left:12px!important;padding-right:12px!important}.post-stats{margin-inline:12px!important}.post-actions button,.post-actions a{font-size:11px!important}
 .content h1{font-size:23px}.content h2{font-size:19px}.content .button:not(.tiny){min-height:39px!important;padding:8px 12px!important;font-size:12px!important}
 .marketplace-grid,.product-grid,.community-card-grid,.smart-jobs-list,.page-card-grid,.group-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding-inline:8px!important;gap:8px!important}
 .product-card,.marketplace-card,.community-card,.job-card{border:1px solid #e6ebf2!important;border-radius:10px!important}
 .profile-cover,.community-hero{border-radius:0!important}.profile-tabs,.fb-tabs,.community-tabs{margin-inline:0!important;border-radius:0!important;padding-inline:8px!important}
 .bottom-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;height:58px!important;margin:0!important;border:0!important;border-top:1px solid #dfe5ed!important;border-radius:0!important;background:rgba(255,255,255,.98)!important;box-shadow:0 -2px 12px rgba(15,23,42,.07)!important;backdrop-filter:blur(15px);display:grid!important;grid-template-columns:repeat(5,1fr)!important;padding:4px 5px calc(4px + env(safe-area-inset-bottom))!important}
 .bottom-nav a,.bottom-nav button{position:relative;width:auto!important;height:49px!important;display:grid!important;place-items:center!important;border:0!important;background:transparent!important;color:#475569!important;font-size:19px!important}
 .bottom-nav a.active{color:var(--pn-ref-blue)!important}.bottom-nav a.active:after{content:"";position:absolute;top:1px;width:26px;height:3px;border-radius:999px;background:var(--pn-ref-blue)}
 .bottom-nav a:nth-child(3),.bottom-nav button:nth-child(3){margin-top:-12px;width:48px!important;height:48px!important;justify-self:center;border-radius:50%!important;background:var(--pn-ref-blue)!important;color:#fff!important;box-shadow:0 6px 18px rgba(8,102,255,.3)!important}
 .mobile-menu-sheet:not([hidden]){z-index:99999!important}.mobile-menu-sheet>div{max-height:88vh!important;border-radius:20px 20px 0 0!important;padding:16px 12px calc(18px + env(safe-area-inset-bottom))!important}.mobile-category-menu{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.mobile-category-menu h4{grid-column:1/-1;margin:10px 2px 2px;color:#64748b;font-size:10px;text-transform:uppercase;letter-spacing:.1em}.mobile-category-menu a{min-height:46px!important;border:1px solid #edf1f5;background:#f8fafc!important;border-radius:11px!important;font-size:12px!important}
}
@media(max-width:430px){.marketplace-grid,.product-grid,.community-card-grid,.smart-jobs-list,.page-card-grid,.group-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}.user-header .brand-mark{display:none!important}.user-header .brand-copy{font-size:18px}}

/* Dark mode keeps contrast while retaining the same geometry */
body.dark-mode{--pn-ref-bg:#0f172a;--pn-ref-card:#172033;--pn-ref-line:#2b374c;--pn-ref-text:#f8fafc;--pn-ref-muted:#a8b3c7}
body.dark-mode .user-header.topbar,body.dark-mode .left-sidebar,body.dark-mode .card,body.dark-mode .mobile-menu-sheet>div{background:#172033!important;color:#f8fafc!important;border-color:#2b374c!important}
body.dark-mode .desktop-primary-nav a,body.dark-mode .left-sidebar nav a{color:#d8e0ec!important}

/* ======================================================================
   Screenshot correction patch — 2026-07-21
   Layout-only refinements. Existing actions, routes and PHP logic remain intact.
====================================================================== */
body[data-page] .content{min-width:0!important}
body[data-page] .content *{box-sizing:border-box}
body[data-page] .content img{max-width:100%}

/* Marketplace: restore structured header/search/menu/hero/filter layout. */
body[data-page="marketplace"] .marketplace-m2{display:flex!important;flex-direction:column!important;gap:14px!important;width:100%!important;min-width:0!important}
body[data-page="marketplace"] .market-topbar{display:grid!important;grid-template-columns:minmax(220px,auto) minmax(320px,1fr) 42px!important;align-items:center!important;gap:14px!important;padding:14px!important;overflow:visible!important}
body[data-page="marketplace"] .market-brand{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;text-decoration:none!important;color:#0f172a!important}
body[data-page="marketplace"] .market-brand>span{display:grid!important;place-items:center!important;flex:0 0 42px!important;width:42px!important;height:42px!important;color:#fff!important}
body[data-page="marketplace"] .market-brand div{display:flex!important;flex-direction:column!important;min-width:0!important}
body[data-page="marketplace"] .market-brand strong{font-size:14px!important;line-height:1.2!important;white-space:nowrap!important}
body[data-page="marketplace"] .market-brand small{display:block!important;margin-top:3px!important;color:#64748b!important;font-size:10px!important;white-space:nowrap!important}
body[data-page="marketplace"] .market-quick-search{display:grid!important;grid-template-columns:20px minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;min-height:44px!important;padding:4px 5px 4px 13px!important;overflow:hidden!important}
body[data-page="marketplace"] .market-quick-search input{width:100%!important;min-width:0!important;height:36px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
body[data-page="marketplace"] .market-quick-search button{height:36px!important;padding:0 17px!important;border:0!important;border-radius:10px!important;color:#fff!important;font-weight:800!important}
body[data-page="marketplace"] .market-filter-toggle{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border:1px solid #dce4ef!important;border-radius:12px!important;background:#fff!important;color:#334155!important}
body[data-page="marketplace"] .market-menu{display:flex!important;align-items:center!important;gap:5px!important;padding:6px!important;overflow-x:auto!important;white-space:nowrap!important;scrollbar-width:none!important}
body[data-page="marketplace"] .market-menu::-webkit-scrollbar{display:none!important}
body[data-page="marketplace"] .market-menu a{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:38px!important;padding:8px 12px!important;border-radius:10px!important;color:#475569!important;font-size:11px!important;font-weight:750!important;text-decoration:none!important}
body[data-page="marketplace"] .market-menu a b{display:grid!important;place-items:center!important;min-width:18px!important;height:18px!important;padding:0 5px!important;border-radius:999px!important;background:#e8efff!important;color:#0866ff!important;font-size:9px!important}
body[data-page="marketplace"] .market-hero{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;gap:28px!important;padding:34px!important;color:#fff!important;overflow:hidden!important}
body[data-page="marketplace"] .market-hero h1{max-width:760px!important;margin:6px 0 12px!important;color:#fff!important;font-size:clamp(28px,3vw,44px)!important;line-height:1.08!important}
body[data-page="marketplace"] .market-hero p{max-width:760px!important;margin:0!important;color:rgba(255,255,255,.88)!important;line-height:1.6!important}
body[data-page="marketplace"] .market-hero .eyebrow{color:#dbeafe!important}
body[data-page="marketplace"] .market-hero-actions{display:flex!important;flex-wrap:wrap!important;gap:9px!important;margin-top:20px!important}
body[data-page="marketplace"] .market-hero-actions .button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important;padding:10px 16px!important}
body[data-page="marketplace"] .market-hero-stats{display:grid!important;grid-template-columns:repeat(3,minmax(94px,1fr))!important;gap:10px!important}
body[data-page="marketplace"] .market-hero-stats>div{padding:14px!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:14px!important;background:rgba(255,255,255,.12)!important;backdrop-filter:blur(8px)!important}
body[data-page="marketplace"] .market-hero-stats strong,body[data-page="marketplace"] .market-hero-stats span{display:block!important;color:#fff!important}
body[data-page="marketplace"] .market-hero-stats strong{font-size:20px!important}.market-hero-stats span{margin-top:2px!important;font-size:10px!important}
body[data-page="marketplace"] .market-products-layout{display:grid!important;gap:14px!important;align-items:start!important}
body[data-page="marketplace"] .market-filter-panel{padding:16px!important}
body[data-page="marketplace"] .market-filter-panel label{display:grid!important;gap:6px!important;margin-bottom:12px!important;font-size:11px!important;font-weight:700!important}

/* Seller Center: keep metrics, tabs and panels aligned instead of collapsing to text. */
body[data-page="seller-center"] .seller-center{display:flex!important;flex-direction:column!important;gap:14px!important;width:100%!important;min-width:0!important}
body[data-page="seller-center"] .seller-center-head{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:18px!important;padding:22px 24px!important;border:1px solid #dfe6ef!important;border-radius:18px!important;background:#fff!important;box-shadow:0 4px 18px rgba(15,23,42,.06)!important}
body[data-page="seller-center"] .seller-center-head h1{margin:5px 0 6px!important;font-size:34px!important}
body[data-page="seller-center"] .seller-center-head p{margin:0!important;color:#64748b!important}
body[data-page="seller-center"] .seller-head-actions{display:flex!important;flex-wrap:wrap!important;gap:9px!important}
body[data-page="seller-center"] .seller-center-nav{display:flex!important;align-items:center!important;gap:5px!important;padding:7px!important;border:1px solid #dfe6ef!important;border-radius:15px!important;background:#fff!important;overflow-x:auto!important;white-space:nowrap!important;scrollbar-width:none!important}
body[data-page="seller-center"] .seller-center-nav a{display:inline-flex!important;align-items:center!important;gap:7px!important;min-height:38px!important;padding:8px 11px!important;border-radius:9px!important;color:#475569!important;font-size:11px!important;font-weight:750!important;text-decoration:none!important}
body[data-page="seller-center"] .seller-center-nav a.active,body[data-page="seller-center"] .seller-center-nav a:hover{background:#edf4ff!important;color:#0866ff!important}
body[data-page="seller-center"] .seller-metrics{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important}
body[data-page="seller-center"] .seller-metrics>.card{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:10px!important;align-items:center!important;padding:16px!important;min-height:92px!important}
body[data-page="seller-center"] .seller-metrics i{grid-row:1/3!important;display:grid!important;place-items:center!important;width:40px!important;height:40px!important;border-radius:12px!important;background:#eaf3ff!important;color:#0866ff!important;font-size:17px!important}
body[data-page="seller-center"] .seller-metrics strong{font-size:21px!important;line-height:1.1!important}.seller-metrics span{color:#64748b!important;font-size:10px!important}
body[data-page="seller-center"] .seller-panel{padding:20px!important}
body[data-page="seller-center"] .seller-section-title,body[data-page="seller-center"] .market-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:14px!important}
body[data-page="seller-center"] .seller-table{overflow:auto!important;border:1px solid #e5eaf1!important;border-radius:12px!important}
body[data-page="seller-center"] .seller-table-row{display:grid!important;grid-template-columns:1.2fr 1.5fr .8fr .8fr .8fr!important;gap:12px!important;align-items:center!important;min-width:700px!important;padding:11px 13px!important;border-bottom:1px solid #edf1f5!important}

/* Pages directory: prevent wrapped search button and improve cards. */
body[data-page="pages"] .pn-pages-list-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding:16px 4px!important}
body[data-page="pages"] .pn-pages-list-head .pn-btn{min-width:140px!important;white-space:nowrap!important}
body[data-page="pages"] .pn-pages-search{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(190px,.65fr) auto!important;gap:10px!important;align-items:center!important}
body[data-page="pages"] .pn-pages-search button{min-width:96px!important;white-space:nowrap!important}
body[data-page="pages"] .pn-page-card,body[data-page="pages"] .pn-pages-own-card{min-width:0!important}

/* Analytics: restore KPI cards and two-column content grid. */
body[data-page="analytics"] .pn-p8-heading{align-items:center!important;gap:18px!important;padding:8px 4px!important}
body[data-page="analytics"] .pn-p8-heading select{min-width:132px!important}
body[data-page="analytics"] .pn-p8-kpis{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
body[data-page="analytics"] .pn-p8-kpis article{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-items:center!important;gap:2px 11px!important;min-height:94px!important;padding:16px!important}
body[data-page="analytics"] .pn-p8-kpis article i{grid-row:1/3!important;display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:13px!important;background:#eaf3ff!important;color:#0866ff!important;font-size:17px!important}
body[data-page="analytics"] .pn-p8-kpis article span{color:#64748b!important;font-size:11px!important}
body[data-page="analytics"] .pn-p8-kpis article strong{font-size:24px!important;line-height:1.1!important}
body[data-page="analytics"] .pn-p8-grid{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr)!important;gap:12px!important}
body[data-page="analytics"] .pn-p8-grid>.card{padding:18px!important;min-width:0!important}
body[data-page="analytics"] .pn-p8-empty{padding:28px 12px!important;color:#64748b!important;text-align:center!important}
body[data-page="analytics"] .pn-p8-table>div,body[data-page="analytics"] .pn-p8-device-list>div{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:11px 0!important;border-bottom:1px solid #edf1f5!important}

/* Mobile header and page spacing corrections. */
@media(max-width:760px){
 body[data-page] .content{padding:8px 8px 12px!important}
 .user-header .brand{min-width:0!important;gap:7px!important}.user-header .brand-copy{display:inline!important;max-width:104px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:17px!important}.user-header .site-logo{width:34px!important;height:34px!important}
 .user-header .top-actions .message-link,.user-header .top-actions .notification-header-link{display:grid!important;width:34px!important;min-width:34px!important;height:34px!important}
 .user-header .top-actions .profile-dropdown{display:none!important}
 body[data-page="marketplace"] .market-topbar{grid-template-columns:minmax(0,1fr) 42px!important;padding:10px!important}
 body[data-page="marketplace"] .market-brand small{display:none!important}
 body[data-page="marketplace"] .market-quick-search{grid-column:1/-1!important}
 body[data-page="marketplace"] .market-hero{grid-template-columns:1fr!important;padding:22px 16px!important;gap:18px!important}
 body[data-page="marketplace"] .market-hero-stats{grid-template-columns:repeat(3,1fr)!important}
 body[data-page="marketplace"] .market-hero-stats>div{padding:10px!important}
 body[data-page="seller-center"] .seller-center-head{align-items:flex-start!important;flex-direction:column!important;padding:17px!important}
 body[data-page="seller-center"] .seller-center-head h1{font-size:27px!important}
 body[data-page="seller-center"] .seller-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-page="seller-center"] .seller-metrics>.card:last-child{grid-column:1/-1!important}
 body[data-page="pages"] .pn-pages-list-head{align-items:flex-start!important;flex-direction:column!important}
 body[data-page="pages"] .pn-pages-list-head .pn-btn{width:100%!important}
 body[data-page="pages"] .pn-pages-search{grid-template-columns:1fr!important}
 body[data-page="pages"] .pn-pages-search button{width:100%!important}
 body[data-page="analytics"] .pn-p8-heading{align-items:flex-start!important;flex-direction:column!important}
 body[data-page="analytics"] .pn-p8-heading form,body[data-page="analytics"] .pn-p8-heading select{width:100%!important}
 body[data-page="analytics"] .pn-p8-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-page="analytics"] .pn-p8-grid{grid-template-columns:1fr!important}
}
@media(max-width:430px){
 .user-header .brand-mark{display:grid!important}.user-header .brand-copy{display:inline!important}
 body[data-page="marketplace"] .market-hero-stats{grid-template-columns:1fr!important}
 body[data-page="seller-center"] .seller-metrics,body[data-page="analytics"] .pn-p8-kpis{grid-template-columns:1fr!important}
 body[data-page="seller-center"] .seller-metrics>.card:last-child{grid-column:auto!important}
}

/* === Final responsive repair pass 2026-07-21c === */
/* Keep the full-screen branded loader mathematically centered on every viewport. */
#pn-loader{inset:0!important;width:100vw!important;height:100dvh!important;display:grid!important;place-items:center!important;padding:0!important;margin:0!important}
#pn-loader .pn-loader-box{position:static!important;width:min(90vw,320px)!important;margin:0 auto!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;transform:none!important}
#pn-loader .pn-loader-box img{display:block!important;margin:0 auto!important}
#pn-loader .pn-loader-bar{margin-inline:auto!important}
.page-loader{inset:0!important;width:100vw!important;height:100dvh!important;place-items:center!important}

/* Desktop card rhythm and clean vertical separation. */
.content{gap:16px!important}
.content>.card,.content>section,.content>article,.content>.composer,.content>.stories{margin:0!important}
.content>*+*{margin-top:0!important}
body[data-page="home"] .content{gap:14px!important}
body[data-page="home"] .stories,body[data-page="home"] .composer,body[data-page="home"] .feed-filter,body[data-page="home"] .nearby-opportunities{margin-bottom:0!important}

/* Sidebar: circular profile, icon-led categories, hidden scrollbar while retaining scroll. */
.sidebar-user-card .sidebar-avatar,.sidebar-user-card .avatar{width:52px!important;height:52px!important;min-width:52px!important;aspect-ratio:1!important;border-radius:50%!important;object-fit:cover!important;overflow:hidden!important}
.left-sidebar .smart-sidebar-nav{overflow-y:auto!important;scrollbar-width:none!important;-ms-overflow-style:none!important}
.left-sidebar .smart-sidebar-nav::-webkit-scrollbar,.left-sidebar::-webkit-scrollbar,.sidebar-group::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.sidebar-group summary{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
.sidebar-group summary>span{display:inline-flex!important;align-items:center!important;gap:8px!important}
.sidebar-group summary>span>i{width:18px!important;color:#64748b!important;font-size:12px!important}
.sidebar-group[open] summary>span>i{color:var(--pn-ref-blue)!important}

/* Order cards: light, readable surfaces rather than heavy dark blocks. */
body[data-page="orders"] .order-hero,body[data-page="orders"] .orders-hero{background:linear-gradient(135deg,#eef5ff,#f6f2ff)!important;color:#172554!important;border:1px solid #d9e5ff!important;box-shadow:0 6px 18px rgba(37,99,235,.08)!important}
body[data-page="orders"] .order-hero *,body[data-page="orders"] .orders-hero *{color:inherit!important}
body[data-page="orders"] .order-card,body[data-page="orders"] .market-order-card,body[data-page="orders"] .card{background:#fff!important;border-color:#e2e8f0!important;color:#172033!important}

/* Network always uses the shared desktop sidebar shell. */
@media(min-width:961px){
 body[data-page="network"] .app-layout{display:grid!important;grid-template-columns:minmax(190px,220px) minmax(0,1fr) minmax(250px,285px)!important}
 body[data-page="network"] .left-sidebar{display:block!important}
}

/* Marketplace: full professional responsive canvas, no collisions. */
body[data-page="marketplace"] .marketplace-shell,body[data-page="marketplace"] .marketplace-page{display:flex!important;flex-direction:column!important;gap:14px!important;min-width:0!important}
body[data-page="marketplace"] .market-topbar{display:grid!important;grid-template-columns:auto minmax(260px,1fr) auto!important;align-items:center!important;gap:12px!important;padding:14px!important;overflow:visible!important}
body[data-page="marketplace"] .market-brand{display:flex!important;align-items:center!important;gap:10px!important;min-width:max-content!important}
body[data-page="marketplace"] .market-brand h1,body[data-page="marketplace"] .market-brand p,body[data-page="marketplace"] .market-brand small{margin:0!important}
body[data-page="marketplace"] .market-quick-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;min-width:0!important}
body[data-page="marketplace"] .market-quick-search input{width:100%!important;min-width:0!important}
body[data-page="marketplace"] .market-nav{display:flex!important;align-items:center!important;gap:6px!important;padding:7px!important;overflow-x:auto!important;white-space:nowrap!important;scrollbar-width:none!important;border:1px solid #e2e8f0!important;border-radius:13px!important;background:#fff!important}
body[data-page="marketplace"] .market-nav::-webkit-scrollbar{display:none!important}
body[data-page="marketplace"] .market-nav a{display:inline-flex!important;align-items:center!important;gap:6px!important;min-height:38px!important;padding:8px 11px!important;border-radius:9px!important;font-size:11px!important;text-decoration:none!important}
body[data-page="marketplace"] .market-hero{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:24px!important;align-items:center!important;padding:28px!important;border-radius:20px!important;overflow:hidden!important}
body[data-page="marketplace"] .market-hero-copy{min-width:0!important}.market-hero-copy h1{font-size:clamp(28px,3.2vw,46px)!important;line-height:1.08!important}
body[data-page="marketplace"] .market-hero-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important}
body[data-page="marketplace"] .market-products-layout{grid-template-columns:minmax(210px,260px) minmax(0,1fr)!important}
body[data-page="marketplace"] .marketplace-grid,body[data-page="marketplace"] .product-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important}

/* Seller center: ensure every section remains card based and never collapses to raw text. */
body[data-page="seller-center"] .content{overflow:visible!important}
body[data-page="seller-center"] .seller-center{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
body[data-page="seller-center"] .seller-center>*{min-width:0!important}
body[data-page="seller-center"] .seller-center-nav::-webkit-scrollbar{display:none!important}
body[data-page="seller-center"] .seller-metrics>.card{overflow:hidden!important;background:#fff!important}
body[data-page="seller-center"] .seller-panel,body[data-page="seller-center"] .seller-section,body[data-page="seller-center"] .seller-dashboard-section{border:1px solid #e2e8f0!important;border-radius:16px!important;background:#fff!important;box-shadow:0 3px 14px rgba(15,23,42,.05)!important}

/* Pages directory: proper button label, widths and responsive cards. */
body[data-page="pages"] .pn-pages-shell,body[data-page="pages"] .pn-pages-directory{display:flex!important;flex-direction:column!important;gap:14px!important;min-width:0!important}
body[data-page="pages"] .pn-pages-list-head{padding:10px 4px!important}
body[data-page="pages"] .pn-pages-list-head .pn-btn,body[data-page="pages"] .pn-pages-search button{writing-mode:horizontal-tb!important;word-break:normal!important;overflow-wrap:normal!important;white-space:nowrap!important;line-height:1.2!important;height:auto!important}
body[data-page="pages"] .pn-pages-search{padding:10px!important;border:1px solid #e2e8f0!important;border-radius:15px!important;background:#fff!important}
body[data-page="pages"] .pn-pages-search input,body[data-page="pages"] .pn-pages-search select{height:48px!important}
body[data-page="pages"] .pn-pages-search button{min-width:110px!important;height:48px!important;padding-inline:18px!important}
body[data-page="pages"] .pn-pages-own,body[data-page="pages"] .pn-pages-results{padding:18px!important;border:1px solid #e2e8f0!important;border-radius:15px!important;background:#fff!important}
body[data-page="pages"] .pn-pages-own-grid,body[data-page="pages"] .pn-pages-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))!important;gap:12px!important}

/* Mobile header: visible search row plus exactly three useful action icons. */
@media(max-width:760px){
 body[data-user-id]:not([data-user-id="0"]){padding-top:0!important}
 .user-header.topbar{height:auto!important;min-height:106px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-rows:50px 44px!important;align-items:center!important;padding:4px 10px 8px!important;column-gap:8px!important;row-gap:4px!important}
 .user-header .brand{grid-column:1/3!important;grid-row:1!important;min-width:0!important}
 .user-header .top-actions{grid-column:3!important;grid-row:1!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important}
 .user-header .global-search{grid-column:1/-1!important;grid-row:2!important;position:relative!important;width:100%!important;max-width:none!important;min-width:0!important;display:block!important;margin:0!important;flex:none!important}
 .user-header .global-search input{position:static!important;width:100%!important;height:42px!important;opacity:1!important;pointer-events:auto!important;padding-left:38px!important;border:1px solid #e2e8f0!important;border-radius:13px!important;background:#f6f8fc!important}
 .user-header .global-search>i{position:absolute!important;left:13px!important;top:50%!important;transform:translateY(-50%)!important;width:auto!important;height:auto!important;z-index:2!important}
 .user-header .top-actions>*{display:none!important}
 .user-header .top-actions>.message-link,.user-header .top-actions>.notification-header-link,.user-header .top-actions>.shortcut-scan{display:grid!important;width:34px!important;min-width:34px!important;height:34px!important;border-radius:10px!important;background:#f3f6fb!important}
 .user-header .brand-copy{display:inline!important;max-width:112px!important}
 .app-layout{margin:0!important}
 .content{gap:12px!important;padding:12px 8px 16px!important}
 .content>.card,.content>section,.content>article,.content>.composer,.content>.stories{margin:0!important}
 body[data-page="home"] .stories,body[data-page="home"] .composer,body[data-page="home"] .feed-filter,body[data-page="home"] .nearby-opportunities{border-radius:14px!important;border:1px solid #e6ebf2!important;box-shadow:0 2px 8px rgba(15,23,42,.04)!important}
 body[data-page="home"] .stories{padding:11px 8px!important}
 body[data-page="home"] .composer{padding:12px!important}
 body[data-page="marketplace"] .market-topbar{grid-template-columns:1fr auto!important;padding:12px!important}
 body[data-page="marketplace"] .market-brand{min-width:0!important}.market-brand>div{min-width:0!important}
 body[data-page="marketplace"] .market-quick-search{grid-column:1/-1!important;grid-template-columns:1fr!important}
 body[data-page="marketplace"] .market-quick-search button{width:100%!important}
 body[data-page="marketplace"] .market-nav{margin-inline:0!important}
 body[data-page="marketplace"] .market-hero{grid-template-columns:1fr!important;padding:20px 16px!important}
 body[data-page="marketplace"] .market-products-layout{grid-template-columns:1fr!important}
 body[data-page="marketplace"] .market-filter-panel{position:static!important;width:100%!important}
 body[data-page="marketplace"] .marketplace-grid,body[data-page="marketplace"] .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body[data-page="seller-center"] .seller-center{gap:12px!important}
 body[data-page="seller-center"] .seller-center-head{padding:16px!important}
 body[data-page="seller-center"] .seller-head-actions{width:100%!important}.seller-head-actions>*{flex:1!important}
 body[data-page="seller-center"] .seller-center-nav{width:100%!important}
 body[data-page="seller-center"] .seller-metrics{grid-template-columns:1fr 1fr!important;gap:10px!important}
 body[data-page="seller-center"] .seller-metrics>.card{min-height:86px!important;padding:13px!important}
 body[data-page="pages"] .pn-pages-list-head{gap:10px!important}
 body[data-page="pages"] .pn-pages-list-head .pn-btn{width:100%!important;min-width:0!important}
 body[data-page="pages"] .pn-pages-search{grid-template-columns:1fr!important;padding:10px!important}
 body[data-page="pages"] .pn-pages-search button{width:100%!important;min-width:0!important}
 body[data-page="pages"] .pn-pages-own-grid,body[data-page="pages"] .pn-pages-grid{grid-template-columns:1fr!important}
}
@media(max-width:430px){
 body[data-page="marketplace"] .marketplace-grid,body[data-page="marketplace"] .product-grid{grid-template-columns:1fr!important}
 body[data-page="seller-center"] .seller-metrics{grid-template-columns:1fr!important}
}

/* Header + sidebar refinement requested from screenshots — 2026-07-21 */
.sidebar-user-card .sidebar-avatar-wrap{position:relative;display:block;flex:0 0 52px;width:52px;height:52px;border-radius:50%;overflow:visible}
.sidebar-user-card .sidebar-avatar-wrap .sidebar-avatar,.sidebar-user-card .sidebar-avatar-wrap img{display:block;width:52px!important;height:52px!important;min-width:52px!important;border-radius:50%!important;object-fit:cover!important;clip-path:circle(50%)!important}
.sidebar-user-card .sidebar-presence-dot{position:absolute;right:0;bottom:1px;width:14px;height:14px;border:3px solid #fff;border-radius:50%;box-shadow:0 1px 3px rgba(15,23,42,.2)}
.sidebar-user-card .sidebar-presence-dot.is-online{background:#16c784}.sidebar-user-card .sidebar-presence-dot.is-offline{background:#94a3b8}
.sidebar-user-card .sidebar-user-copy{display:block;min-width:0;flex:1}
.sidebar-user-card .sidebar-user-copy em{display:inline-flex;align-items:center;gap:4px;margin-top:5px;color:#16a34a;font-size:9px;font-style:normal;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.sidebar-user-card .sidebar-user-copy em:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.left-sidebar .smart-sidebar-nav{scrollbar-width:none!important;-ms-overflow-style:none!important}.left-sidebar .smart-sidebar-nav::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.header-tools-dropdown{position:relative;flex:0 0 auto}
.header-tools-dropdown>summary{list-style:none;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#f4f7fb;color:#0f172a;cursor:pointer}
.header-tools-dropdown>summary::-webkit-details-marker{display:none}.header-tools-dropdown[open]>summary{background:#e8f0ff;color:#0866ff}
.header-tools-panel{position:absolute;z-index:10050;top:48px;right:0;width:320px;padding:12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;border:1px solid #dfe6ef;border-radius:16px;background:#fff;box-shadow:0 20px 55px rgba(15,23,42,.2)}
.header-tools-panel:before{content:"";position:absolute;right:12px;top:-7px;width:13px;height:13px;background:#fff;border-left:1px solid #dfe6ef;border-top:1px solid #dfe6ef;transform:rotate(45deg)}
.header-tools-panel a{position:relative;z-index:1;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0!important;width:auto!important;height:72px!important;padding:8px!important;border-radius:12px!important;background:#f7f9fc!important;color:#334155!important;font-size:10px;font-weight:750;text-align:center}
.header-tools-panel a:hover{background:#eaf2ff!important;color:#0866ff!important}.header-tools-panel a i{font-size:18px}
@media(min-width:761px){
 .user-header .top-actions>a[href*="news"],.user-header .top-actions>a[href*="daily-exam"],.user-header .top-actions>a[href*="wallet"],.user-header .top-actions>a[href*="analytics"]{display:none!important}
}
@media(max-width:760px){
 .user-header.topbar{height:60px!important;padding:7px 10px!important;gap:8px!important}
 .user-header .brand{flex:0 0 42px!important;min-width:42px!important}.user-header .brand-copy{display:none!important}.user-header .site-logo,.user-header .brand-mark{display:block!important;width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;border-radius:11px!important;object-fit:contain!important}
 .user-header .global-search{position:relative!important;display:flex!important;align-items:center!important;flex:1 1 auto!important;min-width:0!important;max-width:none!important;height:40px!important;margin:0!important;padding:0 10px!important;border-radius:13px!important;background:#f4f7fb!important}
 .user-header .global-search i{position:static!important;display:grid!important;place-items:center!important;flex:0 0 24px!important;width:24px!important;height:24px!important;color:#64748b!important}
 .user-header .global-search input{position:static!important;width:100%!important;min-width:0!important;height:38px!important;padding:0 4px!important;border:0!important;opacity:1!important;pointer-events:auto!important;background:transparent!important;font-size:12px!important;box-shadow:none!important}
 .user-header .top-actions{display:flex!important;align-items:center!important;gap:5px!important;flex:0 0 auto!important}
 .user-header .top-actions>a.message-link,.user-header .top-actions>a.notification-header-link,.user-header .theme-toggle,.user-header .profile-dropdown,.user-header .header-tools-dropdown,.user-header .language-switcher{display:none!important}
 .user-header .mobile-header-shortcut{display:grid!important;place-items:center!important;width:38px!important;min-width:38px!important;height:38px!important;padding:0!important;border-radius:11px!important;font-size:15px!important}
 .user-header .shortcut-scan{background:#e9f3ff!important;color:#0866ff!important}.user-header .shortcut-engage{background:#e8fff4!important;color:#168f62!important}.user-header .shortcut-astro{background:#fff3db!important;color:#c27200!important}
}
@media(max-width:430px){
 .user-header .top-actions{gap:4px!important}.user-header .mobile-header-shortcut{width:36px!important;min-width:36px!important;height:36px!important}.user-header .global-search input{font-size:11px!important}
}
@media(max-width:365px){.user-header .shortcut-astro{display:none!important}.user-header .global-search input{font-size:10px!important}}
body.dark-mode .header-tools-panel{background:#172033!important;border-color:#2b374c!important}body.dark-mode .header-tools-panel:before{background:#172033!important;border-color:#2b374c!important}body.dark-mode .header-tools-panel a{background:#202b40!important;color:#e5edf8!important}

/* Header + sidebar precision update — 2026-07-21 */
@media(min-width:761px){
  .user-header.topbar{min-height:72px!important;padding:8px 18px!important;gap:14px!important}
  .user-header .brand{display:flex!important;align-items:center!important;gap:9px!important;min-width:245px!important}
  .user-header .site-logo,.user-header .brand-mark{width:44px!important;height:44px!important;min-width:44px!important;border-radius:12px!important;object-fit:contain!important}
  .user-header .brand-copy{display:flex!important;flex-direction:column!important;line-height:1.05!important;font-size:22px!important;font-weight:800!important;color:#17213b!important}
  .user-header .brand-copy small{display:block!important;margin-top:5px!important;font-size:8px!important;font-weight:700!important;color:#64748b!important;letter-spacing:.01em!important}
  .user-header .production-label{display:inline-flex!important;align-items:center!important;gap:5px!important;margin-left:5px!important;padding:5px 10px!important;border:1px solid #9decc7!important;border-radius:999px!important;background:#ecfff6!important;color:#07945f!important;font-size:9px!important;white-space:nowrap!important}
  .user-header .production-label i{font-size:6px!important}
  .desktop-primary-nav{gap:5px!important;overflow:visible!important}
  .desktop-primary-nav .header-language-inline{display:block!important;margin-left:6px!important;align-self:center!important}
  .desktop-primary-nav .header-language-inline select{height:40px!important;min-width:102px!important;padding:0 28px 0 12px!important;border:1px solid #d8e0eb!important;border-radius:11px!important;background:#f8fafc!important;color:#111827!important;font-size:11px!important;font-weight:700!important}
  .user-header .admin-header-link{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border-radius:50%!important;background:#f4f7fb!important;color:#334155!important}
  .user-header .admin-header-link:hover{background:#eaf2ff!important;color:#0866ff!important}
  .header-tools-panel{width:320px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
.sidebar-user-card .sidebar-verified-badge{position:absolute;right:-1px;bottom:0;display:grid;place-items:center;width:17px;height:17px;border:3px solid #fff;border-radius:50%;background:#0866ff;color:#fff;box-shadow:0 1px 4px rgba(15,23,42,.22);font-size:7px}
.sidebar-user-card .sidebar-user-copy em{color:#16a34a!important}
.sidebar-user-card .sidebar-user-copy em.is-offline{color:#64748b!important}
.left-sidebar .sidebar-group summary{color:#475569!important;font-size:11px!important;font-weight:850!important;letter-spacing:.08em!important}
.left-sidebar .sidebar-group summary>span>i{color:#334155!important}

@media(max-width:760px){
  .user-header.topbar{height:62px!important;padding:8px 10px!important;gap:7px!important;border-top:3px solid #0866ff!important}
  .user-header .brand{flex:0 0 44px!important;min-width:44px!important}
  .user-header .site-logo,.user-header .brand-mark{width:42px!important;height:42px!important;max-width:42px!important;max-height:42px!important;border-radius:11px!important}
  .user-header .global-search{height:40px!important;padding:0 9px!important;border-radius:14px!important}
  .user-header .global-search input{font-size:12px!important}
  .desktop-primary-nav,.user-header .admin-header-link{display:none!important}
  .user-header .top-actions{gap:5px!important}
  .user-header .mobile-header-shortcut{width:39px!important;min-width:39px!important;height:39px!important;border-radius:12px!important}
}
@media(max-width:420px){
  .user-header.topbar{gap:5px!important;padding-inline:8px!important}
  .user-header .brand{flex-basis:43px!important;min-width:43px!important}
  .user-header .site-logo,.user-header .brand-mark{width:41px!important;height:41px!important}
  .user-header .mobile-header-shortcut{width:37px!important;min-width:37px!important;height:37px!important}
  .user-header .global-search{padding-inline:7px!important}
  .user-header .global-search input{font-size:11px!important}
}


/* Header/sidebar correction pass 2026-07-21 */
.left-sidebar .sidebar-ai-shortcut{display:none!important}
.left-sidebar .create-button{
  background:linear-gradient(135deg,#dbeafe 0%,#ede9fe 35%,#fce7f3 68%,#fef3c7 100%)!important;
  color:#1e3a8a!important;border:1px solid #c7d2fe!important;
  box-shadow:0 8px 20px rgba(99,102,241,.13)!important;
}
.left-sidebar .create-button i{color:#2563eb!important}
.left-sidebar .sidebar-group:not([open])>a{display:none!important}

.user-header .header-language-menu{position:relative!important;display:block!important;flex:0 0 auto!important}
.user-header .header-language-menu>summary{
  list-style:none!important;display:grid!important;place-items:center!important;
  width:40px!important;height:40px!important;border-radius:12px!important;
  background:#f2f6fc!important;color:#243b5a!important;cursor:pointer!important;
}
.user-header .header-language-menu>summary::-webkit-details-marker{display:none!important}
.user-header .header-language-panel{
  position:absolute!important;top:calc(100% + 10px)!important;right:0!important;left:auto!important;
  width:220px!important;max-width:min(220px,calc(100vw - 24px))!important;
  max-height:360px!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:8px!important;border:1px solid #dbe4f0!important;border-radius:16px!important;
  background:#fff!important;box-shadow:0 18px 45px rgba(15,23,42,.18)!important;z-index:9999!important;
}
.user-header .header-language-panel button{
  width:100%!important;min-height:42px!important;display:flex!important;align-items:center!important;
  justify-content:space-between!important;padding:8px 11px!important;border:0!important;border-radius:10px!important;
  background:transparent!important;color:#334155!important;text-align:left!important;white-space:nowrap!important;
}
.user-header .header-language-panel button:hover,.user-header .header-language-panel button.active{background:#eff6ff!important;color:#1d4ed8!important}
.user-header .header-language-panel::-webkit-scrollbar{width:5px!important}
.user-header .header-language-panel::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:99px!important}

@media (min-width:761px){
  .user-header .top-actions{display:flex!important;align-items:center!important;gap:6px!important}
  .user-header .header-language-menu{order:-10!important}
  .user-header .message-link{order:-9!important}
  .user-header .notification-header-link{order:-8!important}
}

@media (max-width:760px){
  .topbar.user-header{
    display:grid!important;grid-template-columns:42px minmax(0,1fr) repeat(3,36px)!important;
    align-items:center!important;gap:6px!important;width:100%!important;min-height:64px!important;
    padding:8px 10px!important;overflow:visible!important;
  }
  .topbar.user-header .brand{grid-column:1!important;min-width:0!important;margin:0!important}
  .topbar.user-header .brand .brand-copy,.topbar.user-header .production-label{display:none!important}
  .topbar.user-header .site-logo,.topbar.user-header .brand-mark{width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;object-fit:cover!important}
  .topbar.user-header .global-search{
    display:block!important;grid-column:2!important;min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;
  }
  .topbar.user-header .global-search input{
    width:100%!important;height:38px!important;min-width:0!important;padding:0 10px 0 34px!important;
    border-radius:14px!important;font-size:11px!important;white-space:nowrap!important;text-overflow:ellipsis!important;
  }
  .topbar.user-header .global-search>i{left:12px!important;font-size:12px!important}
  .topbar.user-header .top-actions{
    display:contents!important;margin:0!important;
  }
  .topbar.user-header .top-actions>*{display:none!important}
  .topbar.user-header .top-actions>.mobile-header-shortcut{
    display:grid!important;place-items:center!important;position:static!important;
    width:36px!important;height:36px!important;min-width:36px!important;margin:0!important;padding:0!important;
    border-radius:11px!important;overflow:hidden!important;
  }
  .topbar.user-header .top-actions>.shortcut-scan{grid-column:3!important;background:#eaf2ff!important;color:#1671ff!important}
  .topbar.user-header .top-actions>.shortcut-engage{grid-column:4!important;background:#e7f8ef!important;color:#0f9f61!important}
  .topbar.user-header .top-actions>.shortcut-astro{grid-column:5!important;background:#fff2d8!important;color:#b86900!important}
  .topbar.user-header .header-language-menu{display:none!important}
}

@media (max-width:390px){
  .topbar.user-header{grid-template-columns:38px minmax(0,1fr) repeat(3,32px)!important;gap:4px!important;padding-inline:6px!important}
  .topbar.user-header .site-logo,.topbar.user-header .brand-mark{width:36px!important;height:36px!important;min-width:36px!important}
  .topbar.user-header .top-actions>.mobile-header-shortcut{width:32px!important;height:32px!important;min-width:32px!important;border-radius:10px!important;font-size:13px!important}
  .topbar.user-header .global-search input{height:36px!important;font-size:10px!important;padding-left:31px!important}
}

/* Create button: placed above the main menu with subtle motion */
.left-sidebar>.pn-create-animated{
  position:relative!important;
  isolation:isolate;
  overflow:hidden;
  margin:12px 10px 8px!important;
  width:calc(100% - 20px)!important;
  min-height:48px;
  border:1px solid rgba(255,255,255,.62)!important;
  background:linear-gradient(120deg,#dbeafe 0%,#ede9fe 35%,#fce7f3 68%,#fef3c7 100%)!important;
  color:#1e3a8a!important;
  box-shadow:0 10px 24px rgba(59,130,246,.16)!important;
  animation:pnCreateFloat 2.8s ease-in-out infinite;
}
.left-sidebar>.pn-create-animated>i,.left-sidebar>.pn-create-animated>span:not(.pn-create-glow){position:relative;z-index:2}
.left-sidebar>.pn-create-animated .pn-create-glow{
  position:absolute;inset:-60% auto -60% -35%;width:34%;z-index:1;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.92),transparent);
  transform:rotate(18deg);animation:pnCreateShine 3.2s ease-in-out infinite;pointer-events:none;
}
.left-sidebar>.pn-create-animated:hover{transform:translateY(-2px) scale(1.01);box-shadow:0 14px 30px rgba(99,102,241,.24)!important}
.left-sidebar>.pn-create-animated:active{transform:scale(.98)}
@keyframes pnCreateFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes pnCreateShine{0%,45%{left:-45%;opacity:0}55%{opacity:1}75%,100%{left:120%;opacity:0}}
@media (prefers-reduced-motion:reduce){.left-sidebar>.pn-create-animated,.left-sidebar>.pn-create-animated .pn-create-glow{animation:none!important}}


/* Final mobile-header and overlay fixes — 2026-07-21 */
.mobile-header-actions{display:none}
@media (max-width:760px){
  .topbar.user-header{
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) 112px!important;
    gap:7px!important;
    min-height:64px!important;
    height:64px!important;
    padding:7px 9px!important;
    overflow:visible!important;
  }
  .topbar.user-header>.brand{grid-column:1!important;grid-row:1!important;width:42px!important;min-width:42px!important;margin:0!important}
  .topbar.user-header>.global-search{grid-column:2!important;grid-row:1!important;display:block!important;width:100%!important;min-width:0!important;height:42px!important;margin:0!important;position:relative!important}
  .topbar.user-header>.global-search>i{position:absolute!important;left:12px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important;line-height:1!important;z-index:2!important}
  .topbar.user-header>.global-search>input{display:block!important;width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;padding:0 9px 0 34px!important;line-height:normal!important;font-size:11px!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .topbar.user-header>.mobile-header-actions{grid-column:3!important;grid-row:1!important;display:grid!important;grid-template-columns:repeat(3,34px)!important;gap:5px!important;align-items:center!important;justify-content:end!important;width:112px!important;min-width:112px!important;margin:0!important}
  .topbar.user-header>.mobile-header-actions>a{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;padding:0!important;margin:0!important;border-radius:11px!important;font-size:14px!important;visibility:visible!important;opacity:1!important;overflow:hidden!important}
  .topbar.user-header>.mobile-header-actions>.shortcut-scan{background:#eaf2ff!important;color:#1671ff!important}
  .topbar.user-header>.mobile-header-actions>.shortcut-engage{background:#e7f8ef!important;color:#0f9f61!important}
  .topbar.user-header>.mobile-header-actions>.shortcut-astro{background:#fff2d8!important;color:#b86900!important}
  .topbar.user-header>.top-actions{display:none!important}
}
@media (max-width:390px){
  .topbar.user-header{grid-template-columns:38px minmax(0,1fr) 100px!important;gap:5px!important;padding-inline:6px!important}
  .topbar.user-header>.brand{width:38px!important;min-width:38px!important}
  .topbar.user-header>.brand .site-logo,.topbar.user-header>.brand .brand-mark{width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important}
  .topbar.user-header>.global-search,.topbar.user-header>.global-search>input{height:38px!important;min-height:38px!important}
  .topbar.user-header>.global-search>input{font-size:10px!important;padding-left:30px!important}
  .topbar.user-header>.global-search>i{left:10px!important;font-size:11px!important}
  .topbar.user-header>.mobile-header-actions{grid-template-columns:repeat(3,30px)!important;gap:5px!important;width:100px!important;min-width:100px!important}
  .topbar.user-header>.mobile-header-actions>a{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;border-radius:9px!important;font-size:12px!important}
}
/* Keep the quick-create FAB behind/away from an open account dropdown. */
body:has(.profile-dropdown[open]) .pn-fab-wrap{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:scale(.9)!important}
.pn-fab-wrap{transition:opacity .16s ease,transform .16s ease,visibility .16s ease}
/* The first Create Story tile remains; remove the extra plus badge from the user's existing story. */
.story-own-add{display:none!important}

/* ======================================================================
   Composer privacy + Marketplace product repair — 2026-07-21
   Visual-only patch. Existing forms, actions and PHP logic remain intact.
====================================================================== */
/* Create Post audience pill: remove nested white select background. */
.qb-popup .pn-audience-pill{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  width:auto!important;
  min-width:118px!important;
  min-height:34px!important;
  padding:5px 10px!important;
  border:0!important;
  border-radius:9px!important;
  background:#e4e6eb!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.qb-popup .pn-audience-pill select{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:0 18px 0 0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  color:#111827!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.2!important;
}
.qb-popup .pn-audience-pill>i:last-child{margin-left:-17px!important;pointer-events:none!important}

/* Marketplace top: menu first; duplicate search card removed. */
body[data-page="marketplace"] .market-topbar{display:none!important}
body[data-page="marketplace"] .market-menu{
  order:-5!important;
  position:relative!important;
  z-index:3!important;
  width:100%!important;
  margin:0!important;
  padding:8px!important;
  border:1px solid #e4e9f1!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 4px 16px rgba(15,23,42,.06)!important;
}
body[data-page="marketplace"] .market-menu a{flex:0 0 auto!important;min-width:max-content!important}

/* Marketplace results and filter structure. */
body[data-page="marketplace"] .market-products-layout{
  display:grid!important;
  grid-template-columns:260px minmax(0,1fr)!important;
  gap:16px!important;
  align-items:start!important;
  width:100%!important;
}
body[data-page="marketplace"] .market-filter-panel{
  position:sticky!important;
  top:88px!important;
  padding:18px!important;
  border:1px solid #e3e8f0!important;
  border-radius:18px!important;
  background:#fff!important;
  overflow:hidden!important;
}
body[data-page="marketplace"] .market-filter-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin-bottom:14px!important}
body[data-page="marketplace"] .market-filter-head strong{font-size:17px!important}
body[data-page="marketplace"] .market-filter-head button{display:none!important}
body[data-page="marketplace"] .market-filter-panel input,
body[data-page="marketplace"] .market-filter-panel select{
  width:100%!important;
  min-height:42px!important;
  padding:0 12px!important;
  border:1px solid #dbe3ee!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:none!important;
}
body[data-page="marketplace"] .market-price-fields{display:grid!important;grid-template-columns:1fr!important;gap:0!important}
body[data-page="marketplace"] .market-results{min-width:0!important;width:100%!important}
body[data-page="marketplace"] .market-section-head{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:14px!important;margin:0 0 12px!important}
body[data-page="marketplace"] .market-section-head h2{margin:4px 0!important;font-size:25px!important;line-height:1.15!important}
body[data-page="marketplace"] .market-section-head p{margin:0!important;color:#64748b!important;font-size:12px!important}

/* Production-grade product grid/cards. */
body[data-page="marketplace"] .market-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
  width:100%!important;
}
body[data-page="marketplace"] .market-item{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:100%!important;
  overflow:hidden!important;
  border:1px solid #e3e8f0!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 7px 22px rgba(15,23,42,.07)!important;
}
body[data-page="marketplace"] .market-product-link{display:flex!important;flex:1!important;min-width:0!important;flex-direction:column!important;color:inherit!important;text-decoration:none!important}
body[data-page="marketplace"] .market-image{
  position:relative!important;
  width:100%!important;
  height:210px!important;
  min-height:210px!important;
  overflow:hidden!important;
  background:#f2f5f9!important;
}
body[data-page="marketplace"] .market-image img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
body[data-page="marketplace"] .market-category,
body[data-page="marketplace"] .market-condition{
  position:absolute!important;
  top:12px!important;
  z-index:2!important;
  max-width:calc(100% - 24px)!important;
  padding:6px 9px!important;
  border-radius:999px!important;
  color:#334155!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 3px 10px rgba(15,23,42,.12)!important;
  font-size:10px!important;
  font-weight:800!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body[data-page="marketplace"] .market-category{left:12px!important}
body[data-page="marketplace"] .market-condition{right:12px!important;left:auto!important;color:#4f46e5!important}
body[data-page="marketplace"] .market-body{display:flex!important;flex:1!important;flex-direction:column!important;min-width:0!important;padding:15px 15px 10px!important}
body[data-page="marketplace"] .market-seller{display:block!important;margin-bottom:7px!important;color:#475569!important;font-size:11px!important;font-weight:700!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body[data-page="marketplace"] .market-seller i{color:#0f9f6e!important}
body[data-page="marketplace"] .market-body h3{display:-webkit-box!important;min-height:42px!important;margin:0 0 7px!important;overflow:hidden!important;color:#0f172a!important;font-size:16px!important;line-height:1.3!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
body[data-page="marketplace"] .market-body p{display:-webkit-box!important;min-height:38px!important;margin:0 0 9px!important;overflow:hidden!important;color:#64748b!important;font-size:12px!important;line-height:1.55!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
body[data-page="marketplace"] .market-location{display:block!important;margin-top:auto!important;color:#64748b!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body[data-page="marketplace"] .market-wishlist-form{position:absolute!important;top:162px!important;right:12px!important;z-index:5!important;margin:0!important}
body[data-page="marketplace"] .market-wishlist-form button{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,23,42,.16)!important;font-size:16px!important}
body[data-page="marketplace"] .market-price-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:12px 15px 15px!important;border-top:1px solid #edf1f5!important}
body[data-page="marketplace"] .market-price-row>div{min-width:0!important}
body[data-page="marketplace"] .market-price-row strong{display:block!important;color:#0f172a!important;font-size:18px!important;line-height:1.15!important}
body[data-page="marketplace"] .market-price-row small{display:block!important;margin-top:3px!important;color:#16a34a!important;font-size:10px!important}
body[data-page="marketplace"] .market-price-row small.out{color:#dc2626!important}
body[data-page="marketplace"] .market-price-row .button{flex:0 0 auto!important;min-height:38px!important;padding:0 14px!important;border-radius:10px!important;white-space:nowrap!important}

@media(max-width:1180px){
  body[data-page="marketplace"] .market-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:800px){
  body[data-page="marketplace"] .market-products-layout{grid-template-columns:1fr!important}
  body[data-page="marketplace"] .market-filter-panel{display:none!important;position:fixed!important;inset:68px 10px 76px!important;z-index:500!important;overflow-y:auto!important}
  body[data-page="marketplace"] .market-filter-panel.open{display:block!important}
  body[data-page="marketplace"] .market-filter-head button{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;border:0!important;border-radius:9px!important;background:#eef2f7!important}
  body[data-page="marketplace"] .market-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body[data-page="marketplace"] .market-image{height:160px!important;min-height:160px!important}
  body[data-page="marketplace"] .market-wishlist-form{top:116px!important;right:9px!important}
  body[data-page="marketplace"] .market-body{padding:11px 11px 8px!important}
  body[data-page="marketplace"] .market-body h3{min-height:36px!important;font-size:14px!important}
  body[data-page="marketplace"] .market-body p{display:none!important}
  body[data-page="marketplace"] .market-price-row{padding:10px 11px 12px!important;align-items:flex-end!important}
  body[data-page="marketplace"] .market-price-row strong{font-size:15px!important}
  body[data-page="marketplace"] .market-price-row .button{min-height:34px!important;padding:0 10px!important;font-size:10px!important}
}
@media(max-width:390px){
  body[data-page="marketplace"] .market-grid{grid-template-columns:1fr!important}
  body[data-page="marketplace"] .market-image{height:210px!important;min-height:210px!important}
  body[data-page="marketplace"] .market-wishlist-form{top:166px!important}
}

/* Marketplace complete repair pass — 2026-07-21 */
body[data-page="orders"] .m3-head{color:#172033!important;background:linear-gradient(135deg,#eef2ff 0%,#fff1f2 48%,#fff7d6 100%)!important;border:1px solid #dfe5f2!important;box-shadow:0 12px 32px rgba(15,23,42,.08)!important}
body[data-page="orders"] .m3-head .eyebrow{color:#5b4cf0!important}body[data-page="orders"] .m3-head h1,body[data-page="orders"] .m3-head p{color:#172033!important}
body[data-page="orders"] .m3-actions .button,body[data-page="orders"] .m3-actions summary.button{color:#fff!important;background:#176bff!important;border-color:#176bff!important}
body[data-page="orders"] .m3-actions .button:hover,body[data-page="orders"] .m3-actions summary.button:hover{background:#0f57d8!important}
body[data-page="orders"] .m3-dispute-dialog[open]>summary{display:none!important}
body[data-page="orders"] .m3-dispute-dialog[open]{position:fixed!important;inset:0!important;z-index:5000!important;display:grid!important;place-items:center!important;padding:16px!important;background:rgba(15,23,42,.62)!important}
body[data-page="orders"] .m3-dispute-shell{position:relative!important;width:min(540px,100%)!important;padding:22px!important;border-radius:22px!important;background:#fff!important;box-shadow:0 30px 80px rgba(2,8,23,.28)!important}
body[data-page="orders"] .m3-dispute-shell form{display:grid!important;gap:10px!important}body[data-page="orders"] .m3-dispute-shell select,body[data-page="orders"] .m3-dispute-shell input,body[data-page="orders"] .m3-dispute-shell textarea{width:100%!important;border:1px solid #d8e0eb!important;border-radius:12px!important;background:#fff!important}
body[data-page="orders"] .m3-dispute-close{position:absolute!important;right:12px!important;top:10px!important;width:34px!important;height:34px!important;border:0!important;border-radius:50%!important;background:#eef2f7!important;color:#172033!important;font-size:24px!important;line-height:1!important;cursor:pointer!important}
.flash{position:fixed!important;z-index:7000!important;top:84px!important;right:18px!important;left:auto!important;width:min(390px,calc(100vw - 24px))!important;margin:0!important;padding:14px 16px!important;border-radius:14px!important;box-shadow:0 18px 45px rgba(15,23,42,.18)!important;animation:pnToastIn .25s ease both!important}.flash.success{background:#eafbf2!important;border:1px solid #99e2ba!important;color:#087346!important}.flash.error,.flash.danger{background:#fff0f0!important;border:1px solid #f3aaaa!important;color:#a91e2c!important}.flash.warning{background:#fff8df!important;border:1px solid #f2d777!important;color:#875d00!important}@keyframes pnToastIn{from{opacity:0;transform:translateY(-10px) translateX(10px)}to{opacity:1;transform:none}}

body[data-page="marketplace"] .market-category-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;margin-top:20px!important}
body[data-page="marketplace"] .market-category-grid>a{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:3px 12px!important;align-items:center!important;padding:18px!important;border:1px solid #dfe6f0!important;border-radius:18px!important;background:#fff!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important;text-decoration:none!important;overflow:hidden!important}
body[data-page="marketplace"] .market-category-grid>a i{grid-row:1/3!important;display:grid!important;place-items:center!important;width:48px!important;height:48px!important;border-radius:14px!important;color:#5b4cf0!important;background:#f0edff!important;font-size:19px!important}body[data-page="marketplace"] .market-category-grid>a strong{color:#15203a!important;font-size:15px!important}body[data-page="marketplace"] .market-category-grid>a span{color:#6b778c!important;font-size:11px!important;line-height:1.35!important}

body[data-page="product"] .pn-product-page{max-width:1180px!important;margin:0 auto!important}body[data-page="product"] .pn-product-breadcrumb{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;margin-bottom:12px!important;color:#64748b!important;font-size:12px!important}
body[data-page="product"] .pn-product-hero{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) 330px!important;gap:22px!important;padding:22px!important;border-radius:22px!important;background:#fff!important;box-shadow:0 12px 35px rgba(15,23,42,.07)!important}.pn-main-image{min-height:420px!important;border-radius:18px!important;background:#f4f7fb!important;overflow:hidden!important}.pn-main-image img{width:100%!important;height:420px!important;object-fit:contain!important}.pn-product-summary h1{font-size:32px!important;line-height:1.15!important;margin:10px 0!important}.pn-price{font-size:30px!important;font-weight:900!important;color:#135eea!important}.pn-quick-facts,.pn-trust-strip{display:flex!important;flex-wrap:wrap!important;gap:8px!important}.pn-quick-facts span,.pn-trust-strip span{padding:8px 10px!important;border-radius:10px!important;background:#f4f7fb!important}.pn-buy-card{align-self:start!important;padding:18px!important;border:1px solid #e2e8f0!important;border-radius:18px!important;background:#fbfdff!important;box-shadow:0 10px 28px rgba(15,23,42,.06)!important}.pn-buy-form{display:grid!important;gap:10px!important}.pn-buy-form input{width:100%!important}.pn-product-content{display:grid!important;grid-template-columns:minmax(0,1fr) 320px!important;gap:18px!important;margin-top:18px!important}

body[data-page="cart"] .pn-cart-page{max-width:1120px!important;margin:0 auto!important}.pn-cart-hero{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:20px!important;padding:24px!important;border:1px solid #dfe6f0!important;border-radius:22px!important;background:linear-gradient(135deg,#eef4ff,#fff7f2)!important}.pn-cart-hero h1{margin:5px 0!important;font-size:34px!important}.pn-cart-page>.card{margin-top:16px!important;padding:24px!important;border-radius:20px!important;box-shadow:0 10px 28px rgba(15,23,42,.06)!important}

body[data-page="seller-center"] .seller-center-page{max-width:1180px!important;margin:0 auto!important}.seller-center-head{padding:24px!important;border:1px solid #dfe6f0!important;border-radius:22px!important;background:linear-gradient(135deg,#f0f5ff,#fff7ed)!important}.seller-center-nav{padding:8px!important;border-radius:16px!important;background:#fff!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important}.seller-stat-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:14px!important;margin:16px 0!important}.seller-stat-grid>article{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;padding:18px!important;border:1px solid #dfe6f0!important;border-radius:16px!important;background:#fff!important;box-shadow:0 8px 22px rgba(15,23,42,.05)!important}.seller-stat-grid>article>i{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;color:#176bff!important;background:#eaf2ff!important}.seller-stat-grid strong,.seller-stat-grid span{display:block!important}.seller-stat-grid strong{font-size:22px!important;color:#172033!important}.seller-stat-grid span{font-size:11px!important;color:#667085!important}.seller-panel{padding:22px!important;border-radius:20px!important}.seller-settings-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}.seller-settings-grid>a{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:3px 11px!important;padding:16px!important;border:1px solid #dfe6f0!important;border-radius:15px!important;background:#fff!important}.seller-settings-grid>a i{grid-row:1/3!important;display:grid!important;place-items:center!important;width:44px!important;height:44px!important;border-radius:12px!important;background:#eef4ff!important;color:#176bff!important}

@media(max-width:1050px){body[data-page="marketplace"] .market-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body[data-page="product"] .pn-product-hero{grid-template-columns:1fr 1fr!important}.pn-buy-card{grid-column:1/-1!important}.seller-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:760px){.flash{top:72px!important;right:10px!important}.pn-product-hero{grid-template-columns:1fr!important;padding:14px!important}.pn-main-image,.pn-main-image img{height:300px!important;min-height:300px!important}.pn-product-content{grid-template-columns:1fr!important}.pn-product-summary h1{font-size:25px!important}.pn-cart-hero{display:block!important;padding:18px!important}.pn-cart-hero .button{margin-top:14px!important;width:100%!important}.seller-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.seller-settings-grid{grid-template-columns:1fr!important}body[data-page="marketplace"] .market-category-grid{grid-template-columns:1fr!important}}

/* PaisaNow timeline welcome card + mobile card spacing fix — 2026-07-21 */
body[data-page="home"] .pn-welcome-hero{
  background:linear-gradient(135deg,#fff7ed 0%,#eef6ff 48%,#f5f3ff 100%)!important;
  border:1px solid #dfe7f3!important;
  color:#172033!important;
  box-shadow:0 10px 28px rgba(15,23,42,.06)!important;
}
body[data-page="home"] .pn-welcome-hero:after{
  background:rgba(37,99,235,.07)!important;
}
body[data-page="home"] .pn-welcome-copy span,
body[data-page="home"] .pn-welcome-copy h2,
body[data-page="home"] .pn-welcome-copy p,
body[data-page="home"] .pn-progress-head{
  color:#172033!important;
  opacity:1!important;
}
body[data-page="home"] .pn-welcome-copy p{color:#5f6f85!important}
body[data-page="home"] .pn-welcome-avatar{
  background:#fff!important;
  border-color:#dbeafe!important;
  box-shadow:0 6px 18px rgba(37,99,235,.12)!important;
}
body[data-page="home"] .pn-progress-track{
  background:#dbe6f4!important;
}
body[data-page="home"] .pn-progress-track span{
  background:linear-gradient(90deg,#2563eb,#8b5cf6,#f59e0b)!important;
}

@media(max-width:768px){
  body[data-page="home"] .content{
    gap:12px!important;
  }
  body[data-page="home"] .content>.card,
  body[data-page="home"] .content>section,
  body[data-page="home"] .content>article,
  body[data-page="home"] .content>.composer,
  body[data-page="home"] .content>.stories,
  body[data-page="home"] .content>.timeline-category-tabs,
  body[data-page="home"] .content>.pn-feed-module,
  body[data-page="home"] .post.card,
  body[data-page="home"] .pn-feed-module,
  body[data-page="home"] .pn-welcome-dashboard,
  body[data-page="home"] .pn-dashboard-grid,
  body[data-page="home"] .pn-local-discovery,
  body[data-page="home"] .pn-smart-panel,
  body[data-page="home"] .pn-people-strip{
    margin-top:0!important;
    margin-bottom:12px!important;
  }
  body[data-page="home"] .pn-feed-module:last-child,
  body[data-page="home"] .post.card:last-child{
    margin-bottom:0!important;
  }
  body[data-page="home"] .pn-welcome-dashboard{gap:12px!important}
  body[data-page="home"] .pn-dashboard-grid{gap:12px!important}
  body[data-page="home"] .pn-welcome-hero,
  body[data-page="home"] .pn-mission-card,
  body[data-page="home"] .pn-start-card{
    border-radius:16px!important;
  }
}

/* ======================================================================
   PaisaNow User Panel Design Stabilization — 2026-07-21
   Scope: authenticated/public user-facing panel only. Admin assets untouched.
   ====================================================================== */
body[data-page]{--pn-ui-gutter:14px;--pn-ui-gap:14px;--pn-ui-control:42px;--pn-ui-radius:14px}
body[data-page] *,body[data-page] *::before,body[data-page] *::after{box-sizing:border-box}
body[data-page] img,body[data-page] video,body[data-page] canvas,body[data-page] iframe{max-width:100%}
body[data-page] img,body[data-page] video{height:auto}
body[data-page] button,body[data-page] .button,body[data-page] a.button{max-width:100%;min-width:0;line-height:1.2;text-align:center;overflow-wrap:anywhere}
body[data-page] input,body[data-page] select,body[data-page] textarea{max-width:100%;min-width:0;color:#172033;background:#fff}
body[data-page] input::placeholder,body[data-page] textarea::placeholder{color:#8a94a6;opacity:1}
body[data-page] .content,body[data-page] .main-content,body[data-page] .app-layout,body[data-page] main,body[data-page] section,body[data-page] article,body[data-page] form{min-width:0}
body[data-page] .content>*{max-width:100%}
body[data-page] .card{overflow-wrap:anywhere}
body[data-page] .button,body[data-page] button[type="submit"],body[data-page] input[type="submit"]{min-height:var(--pn-ui-control)}
body[data-page] .button:not(.ghost):not(.ghost-dark):not(.secondary){color:#fff!important}
body[data-page] .button.ghost-dark,body[data-page] .button.secondary{color:#1d4ed8!important;background:#eef5ff!important;border:1px solid #bfd6ff!important;box-shadow:none!important}
body[data-page] .button i,body[data-page] button i{flex:0 0 auto}

/* Shared forms: consistent full-width fields without changing form logic. */
body[data-page] .form-grid,body[data-page] .settings-grid,body[data-page] .profile-form-grid{width:100%;min-width:0}
body[data-page] .form-grid>*,body[data-page] .settings-grid>*,body[data-page] .profile-form-grid>*{min-width:0}
body[data-page] label input:not([type="checkbox"]):not([type="radio"]),
body[data-page] label select,
body[data-page] label textarea,
body[data-page] .upload-panel input:not([type="checkbox"]):not([type="radio"]),
body[data-page] .upload-panel select,
body[data-page] .upload-panel textarea{width:100%}
body[data-page] textarea{resize:vertical}
body[data-page] dialog{max-width:calc(100vw - 24px)}
body[data-page] dialog .upload-panel,body[data-page] dialog form{max-width:100%;min-width:0}
body[data-page] .modal-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}

/* Timeline/feed: remove accidental inner gaps and keep every post inside its card. */
body[data-page="home"] .feed,body[data-page="home"] #homeFeedStart{display:flex!important;flex-direction:column!important;gap:12px!important;width:100%!important;min-width:0!important}
body[data-page="home"] .feed>*{width:100%;max-width:100%;min-width:0;margin-left:0!important;margin-right:0!important}
body[data-page="home"] .post-card,body[data-page="home"] [data-feed-item]{max-width:100%;min-width:0}
body[data-page="home"] .post-card{overflow:hidden!important}
body[data-page="home"] .post-card img,body[data-page="home"] .post-card video{display:block;max-width:100%;object-fit:cover}
body[data-page="home"] .post-actions,body[data-page="home"] .post-meta-actions{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
body[data-page="home"] .post-actions>*{min-width:0;flex:1 1 0}
body[data-page="home"] .post-actions button,body[data-page="home"] .post-actions a{padding-left:8px!important;padding-right:8px!important;white-space:normal!important}
body[data-page="home"] .pn-feed-module{width:100%!important;max-width:100%!important;margin-inline:0!important}
body[data-page="home"] .feed-category-heading,body[data-page="home"] .pn-feed-mode{max-width:100%;overflow-x:auto}

/* Marketplace and seller pages: full available content width and safe controls. */
body[data-page="marketplace"] .marketplace-m2,body[data-page="seller-center"] .seller-center{width:100%!important;max-width:100%!important;margin-inline:0!important}
body[data-page="marketplace"] .market-topbar,body[data-page="marketplace"] .market-menu,body[data-page="marketplace"] .market-hero,body[data-page="marketplace"] .market-products-layout,body[data-page="marketplace"] .market-grid,body[data-page="marketplace"] .market-view-head{max-width:100%;min-width:0}
body[data-page="marketplace"] .market-quick-search{min-width:0}
body[data-page="marketplace"] .market-quick-search input{min-width:0;width:100%}
body[data-page="marketplace"] .market-quick-search button{white-space:nowrap;color:#fff!important;background:#0866ff!important}
body[data-page="marketplace"] .market-menu{overflow-x:auto;scrollbar-width:none}
body[data-page="marketplace"] .market-menu::-webkit-scrollbar{display:none}
body[data-page="marketplace"] .market-menu a{min-width:max-content}
body[data-page="marketplace"] .market-grid{grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr))!important}
body[data-page="marketplace"] .market-product-card,body[data-page="marketplace"] .product-card{min-width:0;overflow:hidden}
body[data-page="marketplace"] .market-price-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
body[data-page="marketplace"] .market-price-row>div{min-width:0}
body[data-page="marketplace"] .market-price-row .button{flex:0 0 auto;white-space:nowrap}
body[data-page="seller-center"] .seller-head-actions .button{white-space:normal}

/* Chat: neutralize duplicate canvas/background and align action icons evenly. */
body[data-page="chat"] .content{overflow:visible!important}
body[data-page="chat"] .chat-shell{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;background:#fff!important}
body[data-page="chat"] .conversation,body[data-page="chat"] .chat-list{min-width:0!important}
body[data-page="chat"] .conversation-header{gap:10px!important;min-width:0!important}
body[data-page="chat"] .conversation-header>div,body[data-page="chat"] .conversation-title{min-width:0!important}
body[data-page="chat"] .conversation-header-actions,body[data-page="chat"] .chat-header-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex:0 0 auto!important}
body[data-page="chat"] .conversation-header-actions>a,body[data-page="chat"] .conversation-header-actions>button,body[data-page="chat"] .conversation-header-actions>details>summary,
body[data-page="chat"] .chat-header-actions>a,body[data-page="chat"] .chat-header-actions>button,body[data-page="chat"] .chat-header-actions>details>summary{display:grid!important;place-items:center!important;width:38px!important;min-width:38px!important;height:38px!important;padding:0!important;margin:0!important;border-radius:50%!important}
body[data-page="chat"] .message-stream{min-width:0!important;background-color:#f8fafc!important;background-image:none!important}
body[data-page="chat"] .message{max-width:min(78%,620px)!important;overflow-wrap:anywhere!important}
body[data-page="chat"] .message-composer,body[data-page="chat"] .chat-composer{min-width:0!important;gap:8px!important;background:#fff!important}
body[data-page="chat"] .message-composer textarea,body[data-page="chat"] .chat-composer textarea{min-width:0!important;max-height:140px!important}

/* Tables, tabs and action rows never force horizontal page scrolling. */
body[data-page] .tabs,body[data-page] .tab-list,body[data-page] [class*="-nav"],body[data-page] [class*="-tabs"]{max-width:100%}
body[data-page] .tabs,body[data-page] .tab-list{overflow-x:auto;scrollbar-width:thin}
body[data-page] table{max-width:100%}
body[data-page] .table-wrap,body[data-page] .responsive-table,body[data-page] .seller-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

@media (max-width:1180px){
  body[data-page]{--pn-ui-gutter:12px;--pn-ui-gap:12px}
  body[data-page] .app-layout{width:calc(100% - 20px)!important;grid-template-columns:minmax(190px,220px) minmax(0,1fr)!important;gap:12px!important}
  body[data-page] .right-sidebar{display:none!important}
}

@media (max-width:800px){
  body[data-page]{--pn-ui-gutter:10px;--pn-ui-gap:10px;--pn-ui-radius:12px}
  body[data-page] .app-layout{display:block!important;width:100%!important;max-width:100%!important;margin:0 0 calc(74px + env(safe-area-inset-bottom))!important;padding:0!important}
  body[data-page] .left-sidebar,body[data-page] .right-sidebar{display:none!important}
  body[data-page] .content{width:100%!important;max-width:100%!important;margin:0!important;padding:10px!important}
  body[data-page] .card{border-radius:12px!important}
  body[data-page] .form-grid{grid-template-columns:1fr!important}
  body[data-page] .form-grid .wide{grid-column:auto!important}
  body[data-page] .modal-actions{display:grid!important;grid-template-columns:1fr!important}
  body[data-page] .modal-actions>*{width:100%!important}

  body[data-page="home"] .content{padding:8px!important}
  body[data-page="home"] .feed,body[data-page="home"] #homeFeedStart{gap:10px!important}
  body[data-page="home"] .post-card{width:100%!important;margin:0!important;border-radius:12px!important}
  body[data-page="home"] .post-actions{gap:2px!important}
  body[data-page="home"] .post-actions button,body[data-page="home"] .post-actions a{min-height:38px!important;font-size:12px!important;gap:5px!important}

  body[data-page="marketplace"] .content,body[data-page="seller-center"] .content{padding:8px!important}
  body[data-page="marketplace"] .market-menu{display:flex!important;gap:5px!important;padding:6px!important}
  body[data-page="marketplace"] .market-menu a{min-height:40px!important;padding:8px 10px!important}
  body[data-page="marketplace"] .market-products-layout{display:block!important}
  body[data-page="marketplace"] .market-filter-panel{width:100%!important;max-width:100%!important}
  body[data-page="marketplace"] .market-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  body[data-page="marketplace"] .market-product-card,body[data-page="marketplace"] .product-card{border-radius:12px!important}
  body[data-page="marketplace"] .market-price-row{align-items:flex-start;flex-direction:column}
  body[data-page="marketplace"] .market-price-row .button{width:100%!important}
  body[data-page="marketplace"] .market-hero-actions{display:grid!important;grid-template-columns:1fr!important}
  body[data-page="marketplace"] .market-hero-actions>*{width:100%!important}

  body[data-page="chat"] .content{padding:0!important}
  body[data-page="chat"] .chat-shell{height:calc(100dvh - 68px - 66px - env(safe-area-inset-bottom))!important;border:0!important;border-radius:0!important;box-shadow:none!important}
  body[data-page="chat"] .conversation-header{padding:9px 10px!important}
  body[data-page="chat"] .conversation-header-actions,body[data-page="chat"] .chat-header-actions{gap:5px!important}
  body[data-page="chat"] .conversation-header-actions>a,body[data-page="chat"] .conversation-header-actions>button,body[data-page="chat"] .conversation-header-actions>details>summary,
  body[data-page="chat"] .chat-header-actions>a,body[data-page="chat"] .chat-header-actions>button,body[data-page="chat"] .chat-header-actions>details>summary{width:34px!important;min-width:34px!important;height:34px!important}
  body[data-page="chat"] .message{max-width:86%!important}
}

@media (max-width:480px){
  body[data-page]{--pn-ui-gutter:8px}
  body[data-page] .content{padding:8px!important}
  body[data-page] .button,body[data-page] button{font-size:13px}
  body[data-page="marketplace"] .market-grid{grid-template-columns:1fr!important}
  body[data-page="marketplace"] .market-hero-stats{grid-template-columns:1fr!important}
  body[data-page="seller-center"] .seller-metrics{grid-template-columns:1fr!important}
  body[data-page="seller-center"] .seller-metrics>.card:last-child{grid-column:auto!important}
  body[data-page="chat"] .conversation-header-actions,body[data-page="chat"] .chat-header-actions{gap:3px!important}
  body[data-page="chat"] .conversation-header-actions>a,body[data-page="chat"] .conversation-header-actions>button,body[data-page="chat"] .conversation-header-actions>details>summary,
  body[data-page="chat"] .chat-header-actions>a,body[data-page="chat"] .chat-header-actions>button,body[data-page="chat"] .chat-header-actions>details>summary{width:32px!important;min-width:32px!important;height:32px!important;font-size:13px!important}
}

/* =========================================================
   PAISANOW TIMELINE MOBILE CARD + AD SPACING PATCH — 20260721
   UI only: keeps feed, ad and notification functionality intact.
   ========================================================= */
@media (max-width:800px){
  body[data-page="home"] .feed > article.post.card,
  body[data-page="home"] #homeFeedStart > article.post.card,
  body[data-page="home"] article.post.card[data-feed-item],
  body[data-page="home"] [data-feed-item].post.card{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 0 12px!important;
    overflow:hidden!important;
    border:1px solid #e2e8f0!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 3px 12px rgba(15,23,42,.08)!important;
  }

  body[data-page="home"] article.post.card[data-feed-item]:last-child,
  body[data-page="home"] [data-feed-item].post.card:last-child{
    margin-bottom:12px!important;
  }

  body[data-page="home"] .sponsored-post,
  body[data-page="home"] .adsense-timeline-slot,
  body[data-page="home"] [data-ad-impression],
  body[data-page="home"] [data-feed-item].sponsored-post{
    margin-bottom:16px!important;
  }

  body[data-page="home"] .sponsored-copy{
    padding-bottom:16px!important;
  }
}

/* Notification avatars always remain equal-size circular thumbnails. */
body[data-page="notifications"] .notification-avatar-wrap{
  width:50px!important;
  min-width:50px!important;
  height:50px!important;
  flex:0 0 50px!important;
  position:relative!important;
}
body[data-page="notifications"] .notification-avatar,
body[data-page="notifications"] .notification-avatar img,
body[data-page="notifications"] img.notification-avatar{
  display:block!important;
  width:50px!important;
  min-width:50px!important;
  max-width:50px!important;
  height:50px!important;
  min-height:50px!important;
  max-height:50px!important;
  padding:0!important;
  margin:0!important;
  border-radius:50%!important;
  object-fit:cover!important;
  object-position:center!important;
  aspect-ratio:1/1!important;
  overflow:hidden!important;
  background:#e8eef7!important;
}
@media (max-width:600px){
  body[data-page="notifications"] .notification-avatar-wrap{
    width:46px!important;
    min-width:46px!important;
    height:46px!important;
    flex-basis:46px!important;
  }
  body[data-page="notifications"] .notification-avatar,
  body[data-page="notifications"] .notification-avatar img,
  body[data-page="notifications"] img.notification-avatar{
    width:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
  }
}

/* PN targeted floating controls + mobile footer correction — 2026-07-22 */
body[data-page="home"] .pn-fab-wrap{right:18px!important;left:auto!important;bottom:88px!important}
body[data-page="home"] .pn-back-top{left:18px!important;right:auto!important;bottom:88px!important}
@media(max-width:700px){
 body[data-page="home"] .pn-fab-wrap{right:12px!important;left:auto!important;bottom:82px!important}
 body[data-page="home"] .pn-back-top{left:12px!important;right:auto!important;bottom:82px!important}
 /* Do not elevate or paint the middle Message slot; keep all footer icons on one line. */
 .bottom-nav a:nth-child(3),.bottom-nav button:nth-child(3){margin-top:0!important;width:auto!important;height:49px!important;border-radius:0!important;background:transparent!important;color:#475569!important;box-shadow:none!important}
 .bottom-nav a:nth-child(3).active{color:var(--pn-ref-blue)!important}
}

/* 20260723: Register page polish — placeholders inside fields, white hero text, guest mobile header buttons right aligned. */
.auth-art,.auth-art h1,.auth-art p{color:#fff!important}
.auth-art .eyebrow{color:#c7d2fe!important;text-shadow:0 1px 6px rgba(0,0,0,.18)}
.pn-register-form input::placeholder,.pn-register-form textarea::placeholder{color:#98a2b3!important;font-weight:650!important;opacity:1!important}
.pn-register-form .phone-field input::placeholder,.pn-register-form .password-field input::placeholder{color:#98a2b3!important;font-weight:650!important;opacity:1!important}
.pn-register-form small{min-height:0!important;margin-top:0!important}
.pn-register-form small:empty{display:none!important}
.user-header.guest-header{justify-content:space-between!important;gap:12px!important}
.user-header.guest-header .brand{flex:0 0 auto!important;min-width:auto!important;margin-right:0!important}
.user-header.guest-header .guest-actions{margin-left:auto!important;margin-right:0!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex:0 0 auto!important}
@media(max-width:760px){
  .user-header.guest-header.topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;height:58px!important;min-height:58px!important;padding:7px 8px!important;gap:8px!important;overflow:hidden!important}
  .user-header.guest-header .brand{flex:0 0 42px!important;width:42px!important;min-width:42px!important;max-width:42px!important;overflow:hidden!important}
  .user-header.guest-header .brand-copy,.user-header.guest-header .production-label{display:none!important}
  .user-header.guest-header .site-logo,.user-header.guest-header .brand-mark{display:block!important;width:40px!important;height:40px!important;min-width:40px!important;max-width:40px!important;border-radius:11px!important;object-fit:contain!important}
  .user-header.guest-header .guest-actions{margin-left:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;flex:1 1 auto!important;min-width:0!important}
  .user-header.guest-header .guest-actions>a:not(.button){padding:8px 7px!important;font-size:12px!important;font-weight:750!important;white-space:nowrap!important;line-height:1!important}
  .user-header.guest-header .guest-actions .button.small{min-height:38px!important;height:38px!important;padding:0 12px!important;border-radius:12px!important;font-size:12px!important;white-space:nowrap!important;box-shadow:0 8px 18px rgba(24,119,242,.22)!important}
  .auth-card{padding:34px 21px!important}
  .auth-card h2{font-size:32px!important;line-height:1.22!important;margin-bottom:20px!important}
  .pn-register-form{gap:13px!important}
}
@media(max-width:370px){
  .user-header.guest-header .guest-actions{gap:4px!important}
  .user-header.guest-header .guest-actions>a:not(.button){font-size:11px!important;padding-inline:5px!important}
  .user-header.guest-header .guest-actions .button.small{font-size:11px!important;padding-inline:9px!important}
}

/* Phase 9: authoritative normal-flow header layout. Sticky/fixed header mode removed. */
:root{--pn-user-header-height:68px;--pn-mobile-header-height:62px;}
html{scroll-padding-top:0!important;}
body[data-page]{margin-top:0!important;padding-top:0!important;}
.user-header.topbar{position:relative!important;top:auto!important;left:auto!important;right:auto!important;inset:auto!important;width:100%!important;margin:0!important;transform:none!important;}
.user-header.guest-header{height:var(--pn-mobile-header-height)!important;min-height:var(--pn-mobile-header-height)!important;}
.user-header.guest-header .guest-header-tools{margin-left:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;min-width:0!important;}
.user-header.guest-header .guest-language-menu{flex:0 0 auto!important;}
.user-header.guest-header .guest-actions{margin:0!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;min-width:0!important;}
@media (min-width:1101px){
  body[data-page] .app-layout{display:grid!important;align-items:start!important;padding-top:0!important;}
  body[data-page]:not([data-page="chat"]):not([data-page="reels"]) .app-layout{margin-top:16px!important;}
  body[data-page="chat"] .app-layout,body[data-page="reels"] .app-layout{margin-top:0!important;}
  body[data-page] .app-layout>.left-sidebar,body[data-page] .app-layout>.content,body[data-page] .app-layout>.right-sidebar{grid-row:1!important;align-self:start!important;margin-top:0!important;padding-top:0!important;transform:none!important;}
  body[data-page] .app-layout>.left-sidebar,body[data-page] .app-layout>.right-sidebar{position:sticky!important;top:14px!important;max-height:calc(100dvh - 28px)!important;}
  body[data-page="home"] .content>.stories:first-child,body[data-page="home"] .content>section.stories:first-child{margin-top:0!important;}
}
@media (max-width:1100px){
  body[data-page] .app-layout{padding-top:0!important;}
  body[data-page]:not([data-page="chat"]):not([data-page="reels"]) .app-layout{margin-top:10px!important;}
  body[data-page="chat"] .app-layout,body[data-page="reels"] .app-layout{margin-top:0!important;}
  body[data-page="home"] .app-layout>.content,body[data-page="home"] .content{padding-top:0!important;}
  body[data-page="home"] .content>.stories:first-child,body[data-page="home"] .content>section.stories:first-child{margin-top:0!important;}
}

@media(max-width:760px){
  .user-header.guest-header.topbar{height:var(--pn-mobile-header-height)!important;min-height:var(--pn-mobile-header-height)!important;padding:7px 8px!important;}
  .user-header.guest-header .guest-header-tools{gap:5px!important;flex:1 1 auto!important;}
  .user-header.guest-header .header-language-menu>summary{width:38px!important;height:38px!important;}
  .user-header.guest-header .guest-actions{gap:5px!important;}
  .user-header.guest-header .guest-actions>a:not(.button){padding:8px 5px!important;font-size:11px!important;white-space:nowrap!important;}
  .user-header.guest-header .guest-actions .button.small{height:38px!important;min-height:38px!important;padding:0 9px!important;font-size:11px!important;white-space:nowrap!important;}
}
