/* Shared responsive geometry. Keep desktop colors and menu structure intact. */
:is(.user-content,.admin-content),:is(.user-content,.admin-content) > *{box-sizing:border-box;min-width:0;max-width:100%}
:is(.user-content,.admin-content) :is(input,select,textarea){box-sizing:border-box;min-width:0;max-width:100%}
:is(.user-content,.admin-content) :is(img,video,canvas){max-width:100%}
.dashboard-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.dashboard-panel{min-width:0;overflow-wrap:anywhere}
.dashboard-panel .order-mini-table{display:block!important;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
@media screen and (min-width:801px){
 html body :is(.user-sidebar,.admin-sidebar){transform:none!important;transition:none!important}
 html body:not(.fc-admin-panel) .user-sidebar{width:238px!important}
 html body:not(.fc-admin-panel) .user-topbar{left:238px!important;right:0!important;height:54px!important}
 html body:not(.fc-admin-panel) .user-content{margin-left:238px!important;width:calc(100% - 238px)!important;max-width:calc(100% - 238px)!important}
 html body:not(.fc-admin-panel) .user-content ~ :is(footer,.footer,.global-footer,.admin-footer){margin-left:238px!important}
 html body:not(.fc-admin-panel) .user-topbar :is(.mobile-open,.admin-mobile-open){display:none!important}
}
@media screen and (max-width:800px){
 html body :is(.user-sidebar,.admin-sidebar){left:0!important;width:260px!important;max-width:85vw!important;transform:translateX(-100%)!important}
 html body :is(.user-sidebar,.admin-sidebar).open{transform:translateX(0)!important}
 html body :is(.user-topbar,.admin-topbar){left:0!important;right:0!important;max-width:100%;box-sizing:border-box}
 html body :is(.user-content,.admin-content){margin-left:0!important;width:100%!important;max-width:100%!important}
 html body :is(.user-content,.admin-content) ~ :is(footer,.footer,.global-footer,.admin-footer){margin-left:0!important;width:100%!important;box-sizing:border-box}
 .dashboard-extra-grid{grid-template-columns:minmax(0,1fr)!important}
 .dashboard-panel{padding:16px!important}
 .toolbar-left-side,.toolbar-right-side{min-width:0!important;max-width:100%;flex-wrap:wrap!important}
 .toolbar-left-side{flex-basis:100%}
 .toolbar-left-side form,.toolbar-right-side form{min-width:0;max-width:100%;flex-wrap:wrap}
 .shop-form-grid{grid-template-columns:minmax(0,1fr)!important}
 :is(.user-content,.admin-content) :is(input,select,textarea){font-size:16px!important}
 :is(.user-content,.admin-content) :is(h1,h2,h3){overflow-wrap:anywhere}
 .shop-toolbar,.shop-form-actions,.shop-row-actions{min-width:0;max-width:100%;flex-wrap:wrap}
 .shop-toolbar > *,.shop-filter > *{min-width:0;max-width:100%}
}
@media screen and (max-width:480px){
 html body .user-topbar .top-left{min-width:0!important;flex:0 1 auto!important}
 html body .user-topbar .custom-banner{min-width:0!important;flex:1 1 0!important;margin-inline:5px!important;padding-inline:5px!important}
 html body .user-topbar .user-title{max-width:110px!important;font-size:12px!important}
 :is(.user-content,.admin-content) .hero-box h1{font-size:clamp(18px,5.5vw,23px)!important;line-height:1.35!important}
 .shop-filter label{min-width:0!important;max-width:100%!important;flex-basis:100%}
 .shop-dashboard-recent{grid-template-columns:minmax(0,1fr)!important}
}
@media print{html body :is(.user-sidebar,.admin-sidebar,.fc-bottom-nav,.fc-sidebar-overlay){display:none!important}}
@media screen and (min-width:801px) and (max-width:1100px){
 .balance-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media screen and (max-width:800px){
 .toolbar-left-side form[method="get" i]{flex-basis:100%!important;width:100%}
 .toolbar-left-side form[method="get" i] .search-input{flex:1 1 120px!important;width:auto!important}
}
@media screen and (min-width:801px){
 html body :is(.admin-topbar,.user-topbar) :is(.mobile-open,.admin-mobile-open){display:none!important}
}

/* Viewport fit: one 800px navigation breakpoint, including browser zoom. */
@media screen {
 html { box-sizing:border-box; overflow-x:auto!important; }
 *, *::before, *::after { box-sizing:inherit; }
 html body { min-width:0!important; max-width:100%; margin:0; overflow-x:visible!important; overflow-wrap:anywhere; }
 html body :is(.user-content,.admin-content) { box-sizing:border-box!important; min-width:0!important; overflow-x:visible!important; overflow-wrap:anywhere; }
 html body :is(.user-content,.admin-content) > * { min-width:0; max-width:100%; }
 html body :is(.user-content,.admin-content) :is(input,select,textarea,fieldset) { min-width:0; max-width:100%; box-sizing:border-box; }
 html body :is(.user-content,.admin-content) :is(img,video,canvas,iframe) { max-width:100%; }
 html body :is(.user-topbar,.admin-topbar) { box-sizing:border-box!important; width:auto!important; min-width:0!important; }
 html body :is(.top-left,.fc-admin-heading) { min-width:0!important; }
 html body :is(.custom-banner,.top-banner) { min-width:0!important; flex:1 1 0!important; }
 html body :is(.user-title,.admin-title) { min-width:0!important; overflow:hidden!important; text-overflow:ellipsis!important; }
 html body :is(.toolbar-left-side,.toolbar-right-side,.shop-toolbar,.shop-filter,.shop-form-actions,.shop-row-actions) { min-width:0; max-width:100%; flex-wrap:wrap; }
 html body :is(.balance-grid,.stats-grid,.quick-grid,.main-services-grid,.dashboard-extra-grid,.shop-form-grid) > * { min-width:0; max-width:100%; overflow-wrap:anywhere; }
 html body .fc-viewport-table { display:block; width:100%; max-width:100%; min-width:0; overflow-x:auto!important; -webkit-overflow-scrolling:touch; }
 html body .fc-viewport-table > table { display:table!important; overflow:visible!important; max-width:none!important; min-width:100%; }
 html body .fc-viewport-table:focus-visible { outline:2px solid #047857; outline-offset:2px; }
}
@media screen and (min-width:801px) {
 html body:not(.fc-admin-panel) :is(.user-sidebar,.admin-sidebar) { width:238px!important; transform:none!important; }
 html body:not(.fc-admin-panel) :is(.user-topbar,.admin-topbar) { left:238px!important; right:0!important; height:54px!important; }
 html body:not(.fc-admin-panel) :is(.user-content,.admin-content) { margin-left:238px!important; width:calc(100% - 238px)!important; max-width:calc(100% - 238px)!important; padding-top:74px!important; }
 html body:not(.fc-admin-panel) :is(.user-content,.admin-content) ~ :is(footer,.footer,.global-footer,.admin-footer) { margin-left:238px!important; width:calc(100% - 238px)!important; max-width:calc(100% - 238px)!important; }
 html body :is(.user-topbar,.admin-topbar) :is(.mobile-open,.admin-mobile-open) { display:none!important; }
}
@media screen and (min-width:801px) and (max-width:1100px) {
 html body :is(.balance-grid,.stats-grid,.quick-grid,.main-services-grid,.shop-form-grid,.dashboard-extra-grid) { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
 html body :is(.user-topbar,.admin-topbar) :is(.top-left,.fc-admin-heading) { flex:0 1 auto!important; }
 html body :is(.custom-banner,.top-banner) { margin-inline:6px!important; }
}
@media screen and (max-width:800px) {
 html body :is(.user-topbar,.admin-topbar) { position:fixed!important; top:0!important; left:0!important; right:0!important; height:64px!important; }
 html body :is(.user-content,.admin-content) { margin-left:0!important; width:100%!important; max-width:100%!important; padding:84px 12px 96px!important; }
 html body :is(.user-topbar,.admin-topbar) :is(.mobile-open,.admin-mobile-open) { display:inline-flex!important; flex-shrink:0; }
 html body :is(.user-sidebar,.admin-sidebar) { box-sizing:border-box!important; width:260px!important; max-width:85vw!important; }
 html body :is(.balance-grid,.stats-grid,.quick-grid,.main-services-grid) { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
 html body :is(.dashboard-extra-grid,.shop-form-grid) { grid-template-columns:minmax(0,1fr)!important; }
 html body :is(.user-content,.admin-content) ~ :is(footer,.footer,.global-footer,.admin-footer) { margin-left:0!important; width:100%!important; max-width:100%!important; }
}
@media screen and (max-width:480px) {
 html body :is(.balance-grid,.stats-grid,.quick-grid) { grid-template-columns:minmax(0,1fr)!important; }
 html body :is(.user-topbar,.admin-topbar) { gap:6px!important; padding-inline:8px!important; }
 html body :is(.user-title,.admin-title) { max-width:100px!important; }
 html body :is(.top-user,.admin-user) > span { display:none!important; }
 html body :is(.custom-banner,.top-banner) { margin-inline:0!important; padding-inline:4px!important; }
}
@media print { .fc-viewport-table { overflow:visible!important; max-width:none!important; } }

/* Homepage: preserve the supplied desktop reference's 2:1 columns. */
@media screen {
 html body .fc-home-layout { width:100%; max-width:none; margin-inline:auto; }
 html body .fc-home-layout > * { min-width:0; width:100%; max-width:100%; }
 html body .fc-home-layout :is(img,video,iframe) { max-width:100%; }
}
@media screen and (min-width:801px) {
 html body .fc-home-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:24px; align-items:start; }
}
@media screen and (min-width:801px) and (max-width:1100px) {
 html body .fc-home-layout .fc-home-copy { width:55%; padding-left:20px; }
 html body .fc-home-layout .fc-home-copy h2 { font-size:22px; }
 html body .fc-home-layout .fc-home-copy p { font-size:11px; }
 html body .fc-home-layout .market-seller-callout { flex-wrap:wrap; }
 html body .fc-home-secondary > * { padding:18px; }
}
@media screen and (max-width:800px) {
 html body .fc-home-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; }
}

@media screen { html body .fc-home-brand-row { width:100%; max-width:none; } }

/* Shared homepage edges: match the reference's ~3.85% side gutters. */
@media screen {
 body.fc-home-page { --fc-home-gutter: max(16px, 3.85vw); }
 html body.fc-home-page :is(.fc-home-layout,.fc-home-brand-row,.fc-home-payment,.footer-grid) {
   box-sizing:border-box; width:calc(100% - 2 * var(--fc-home-gutter));
   max-width:none; min-width:0; margin-inline:auto; padding-inline:0;
 }
 html body.fc-home-page .fc-home-brand-bar { padding-inline:0; }
 html body.fc-home-page .footer-grid {
   grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(20px,2vw,40px);
 }
 html body.fc-home-page .footer-col { min-width:0; overflow-wrap:anywhere; }
 html body.fc-home-page .footer-col h4 { font-size:clamp(16px,0.94vw,18px); line-height:1.5; }
 html body.fc-home-page .footer-col :is(p,li,a,.footer-contact,.footer-contact span) { font-size:clamp(14px,0.83vw,16px); line-height:1.8; }
 html body.fc-home-page .payment-section { width:100%; min-width:0; }
}
@media screen and (max-width:1000px) {
 html body.fc-home-page .footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:800px) {
 body.fc-home-page { --fc-home-gutter:16px; }
}
@media screen and (max-width:480px) {
 html body.fc-home-page .footer-grid { grid-template-columns:minmax(0,1fr); }
 html body.fc-home-page .payment-section { padding:18px 12px; }
 html body.fc-home-page .payment-logos { gap:10px; }
 html body.fc-home-page .payment-logo-card { flex:1 1 112px; min-width:0; max-width:100%; padding:10px 8px; }
}
