/* AfriNet Hub · consistent interior pages / mobile-first
   Extends the legacy service pages while retaining all existing form, listing and checkout logic. */
:root {
  --interior-ink: #102745;
  --interior-navy: #0a2347;
  --interior-orange: #e87526;
  --interior-muted: #52647c;
  --interior-line: #e0e8f2;
  --interior-wash: #f5f8fc;
  --interior-shadow: 0 10px 30px rgba(11,37,74,.055);
}
html {scroll-padding-top:86px;}
body {font-family:Manrope,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;color:var(--interior-ink);line-height:1.58;overflow-x:clip;}
body::before {background:rgba(255,255,255,.965);}
[data-theme="dark"] body::before{background:rgba(7,19,39,.94);}
body:not(.admin-dashboard-body):not(.admin-login-body) .container{max-width:1240px;padding-inline:24px;}
body:not(.admin-dashboard-body):not(.admin-login-body) h1,body:not(.admin-dashboard-body):not(.admin-login-body) h2,body:not(.admin-dashboard-body):not(.admin-login-body) h3{letter-spacing:-.035em;text-wrap:balance;}
body:not(.admin-dashboard-body):not(.admin-login-body) h1{font-size:clamp(30px,4vw,49px);line-height:1.12;}
body:not(.admin-dashboard-body):not(.admin-login-body) h2{font-size:clamp(25px,3vw,38px);line-height:1.19;}
body:not(.admin-dashboard-body):not(.admin-login-body) h3{font-size:clamp(17px,1.65vw,21px);line-height:1.29;}
body:not(.admin-dashboard-body):not(.admin-login-body) p{overflow-wrap:break-word;}
body:not(.admin-dashboard-body):not(.admin-login-body) img{max-width:100%;}
body:not(.admin-dashboard-body):not(.admin-login-body) section{scroll-margin-top:84px;}
button,input,select,textarea{font:inherit;}
button,a,input,select,textarea{touch-action:manipulation;}
:where(a,button,input,select,textarea):focus-visible{outline:3px solid #dd6e27;outline-offset:3px;}
:where(button,a):disabled {cursor:not-allowed;}

/* Global navigation mirrors the React homepage without decorative pills. */
.legacy-topline {background:#0a2347;color:#dce8f8;}
.legacy-topline .container{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:30px;font-size:11px;font-weight:650;}
.legacy-topline a{display:inline-flex;align-items:center;gap:5px;color:#f1b58c;}
.legacy-topline a:hover{text-decoration:underline;}
body header:not(.admin-header){top:0;padding:0;background:#fff;color:var(--interior-ink);box-shadow:0 1px 0 #142d4e19;backdrop-filter:none;}
body header:not(.admin-header) .container{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:73px;}
header:not(.admin-header) .logo{min-width:0;flex-shrink:0;}
header:not(.admin-header) .brand-link{display:flex;align-items:center;gap:8px;min-width:0;text-decoration:none;}
header:not(.admin-header) .logo img{height:46px;width:46px;flex:0 0 46px;border-radius:50%;background:transparent;}
header:not(.admin-header) .brand-block{display:grid;grid-template-rows:min-content min-content;row-gap:0;align-content:center;justify-items:start;line-height:1;}
header:not(.admin-header) .brand-name{display:block;font-size:20px;font-weight:850;letter-spacing:-.055em;line-height:.93;white-space:nowrap;color:var(--interior-ink);}
header:not(.admin-header) .brand-name span{color:var(--interior-orange);}
header:not(.admin-header) .brand-sub{display:block;color:var(--interior-orange);font-weight:800;letter-spacing:.08em;line-height:1;font-size:12px;margin-top:-3px;}
header:not(.admin-header) nav{flex:1;min-width:0;}
header:not(.admin-header) nav ul{display:flex;align-items:center;justify-content:flex-end;gap:9px;}
header:not(.admin-header) nav a{display:block;padding:12px 5px;border:0;border-radius:0;color:#243a57;font-size:12.5px;font-weight:750;white-space:nowrap;}
header:not(.admin-header) nav a:hover,header:not(.admin-header) nav a.active{color:#c66220;background:transparent;border:0;}
header:not(.admin-header) .legacy-header-actions{display:flex;align-items:center;gap:9px;margin:0;}
.legacy-header-order{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:41px;border-radius:7px;background:var(--interior-navy);color:#fff;padding:10px 13px;font-size:12px;font-weight:750;white-space:nowrap;}
.legacy-header-order:hover{background:#173a69;color:#fff;}
#theme-toggle{display:inline-grid;place-items:center;height:41px;width:41px;min-width:41px;padding:0;border:1px solid var(--interior-line);border-radius:7px;background:#fff;color:transparent;overflow:hidden;font-size:0;box-shadow:none;}
#theme-toggle::before{content:"◐";font-size:23px;line-height:1;color:#234061;}
#theme-toggle:hover{background:#f2f6fb;box-shadow:none;}
.legacy-menu-button{width:41px;height:41px;border:1px solid #d9e3ef;border-radius:7px;background:#fff;color:#17395d;}
.legacy-menu-lines i{background:currentColor;}
.legacy-skip-link{border-radius:7px;}
.legacy-menu-open{overflow-y:auto;}

/* Compact secondary-page mastheads; real text is always part of the page. */
main.container{max-width:1200px;min-width:0;}
main>.page-header{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;text-align:left;min-height:190px;margin:23px auto 28px;padding:33px clamp(22px,4vw,45px);border:1px solid var(--interior-line);border-radius:12px;background:#fff;box-shadow:var(--interior-shadow);overflow:hidden;isolation:isolate;}
main>.page-header h1{position:relative;z-index:1;max-width:760px;margin:0 0 10px;color:var(--interior-ink);font-size:clamp(29px,3.6vw,43px);letter-spacing:-.045em;}
main>.page-header p{position:relative;z-index:1;max-width:64ch;font-size:14.5px;line-height:1.6;color:var(--interior-muted);margin:0;}
body:is([data-legacy-page="order"],[data-legacy-page="checkout"],[data-legacy-page="gadgets"],[data-legacy-page="housing"],[data-legacy-page="project"],[data-legacy-page="portal"],[data-legacy-page="news"],[data-legacy-page="partners"]) main>.page-header{border:0;box-shadow:none;background-color:#071c3b;color:#fff;min-height:208px;}
body:is([data-legacy-page="order"],[data-legacy-page="checkout"],[data-legacy-page="gadgets"],[data-legacy-page="housing"],[data-legacy-page="project"],[data-legacy-page="portal"],[data-legacy-page="news"],[data-legacy-page="partners"]) main>.page-header h1{color:#fff;}
body:is([data-legacy-page="order"],[data-legacy-page="checkout"],[data-legacy-page="gadgets"],[data-legacy-page="housing"],[data-legacy-page="project"],[data-legacy-page="portal"],[data-legacy-page="news"],[data-legacy-page="partners"]) main>.page-header p{color:#eaf2fc;}
body[data-legacy-page="order"] main>.page-header,body[data-legacy-page="checkout"] main>.page-header{
  background-image:linear-gradient(90deg,#061b39f7 0%,#061b39ed 46%,#061b3970 100%),url('../images/service-printing.jpg');background-size:cover;background-position:center 48%;}
body[data-legacy-page="gadgets"] main>.page-header{background-image:linear-gradient(90deg,#061b39f7 0%,#061b39ec 45%,#061b3970 100%),url('../images/service-gadgets.jpg');background-size:cover;background-position:center 51%;}
body[data-legacy-page="housing"] main>.page-header{background-image:linear-gradient(90deg,#061b39f8 0%,#061b39ed 45%,#061b3970 100%),url('../images/service-housing.jpg');background-size:cover;background-position:center 52%;}
body[data-legacy-page="project"] main>.page-header{background-image:linear-gradient(90deg,#061b39f7 0%,#061b39ed 45%,#061b3970 100%),url('../images/service-project.jpg');background-size:cover;background-position:center 51%;}
body[data-legacy-page="portal"] main>.page-header{background-image:linear-gradient(90deg,#061b39fa 0%,#061b39ec 46%,#061b3970 100%),url('../images/connected-services.jpg');background-size:cover;background-position:center 50%;}
body[data-legacy-page="news"] main>.page-header,body[data-legacy-page="partners"] main>.page-header{background-image:linear-gradient(90deg,#061b39f7 0%,#061b39e8 45%,#061b396b 100%),url('../images/connected-community.jpg');background-size:cover;background-position:center 48%;}

/* Printing: photo-led but shorter than the homepage hero. */
body[data-legacy-page="printing"] main>.hero{display:flex;align-items:center;padding:56px 0;min-height:310px;text-align:left;color:#fff;background-image:linear-gradient(90deg,#071b39f8 0%,#071b39ed 44%,#071b3977 100%),url('../images/service-printing.jpg');background-size:cover;background-position:center 55%;}
body[data-legacy-page="printing"] main>.hero .container{width:100%;}
body[data-legacy-page="printing"] main>.hero h1{max-width:690px;font-size:clamp(30px,4vw,49px);line-height:1.13;color:#fff;margin:0 0 15px;}
body[data-legacy-page="printing"] main>.hero p{max-width:590px;color:#e8f1fa;font-size:15px;line-height:1.58;opacity:1;margin:0 0 22px;}
body[data-legacy-page="printing"] .trust-signals{justify-content:flex-start;gap:12px 24px;margin-top:24px;font-weight:550;}
body[data-legacy-page="printing"] .trust-signals span{gap:6px;font-size:12px;font-weight:700;color:#e3effd;}
body[data-legacy-page="printing"] .trust-signals img{max-width:17px;max-height:17px;filter:brightness(0) invert(1);}
body[data-legacy-page="printing"] .order-guide,body[data-legacy-page="printing"] .services{padding:57px 0;}
body[data-legacy-page="printing"] .order-guide{background:#f5f8fc;}
body[data-legacy-page="printing"] .how-it-works-logo{width:72px;height:72px;object-fit:contain;}
body[data-legacy-page="printing"] .steps{gap:14px;margin-top:26px;grid-template-columns:repeat(3,minmax(0,1fr));}
body[data-legacy-page="printing"] .step{padding:24px 20px;border:1px solid var(--interior-line);border-radius:11px;box-shadow:none;text-align:left;}
body[data-legacy-page="printing"] .step-number{border-radius:7px;margin:0 0 20px;width:38px;height:38px;font-size:15px;background:var(--interior-orange);}
body[data-legacy-page="printing"] .service-items{gap:15px;margin-top:27px;grid-template-columns:repeat(3,minmax(0,1fr));}
body[data-legacy-page="printing"] .service-item{border:1px solid var(--interior-line);background:#fff;border-radius:11px;padding:24px 21px;text-align:left;}
body[data-legacy-page="printing"] .service-item h3{color:var(--interior-ink);}
body[data-legacy-page="printing"] .portal-services-cta,body[data-legacy-page="printing"] .gadgets-cta{padding:20px 0;}
body[data-legacy-page="printing"] .portal-services-cta .card{padding:32px;background:var(--interior-navy);border:0;color:#fff;}
body[data-legacy-page="printing"] .portal-services-cta .card h2{font-size:clamp(24px,3vw,34px);color:#fff;}
body[data-legacy-page="printing"] .portal-services-cta .card p{font-size:14px;line-height:1.6;color:#e8f1fa;margin:10px auto 21px;}
body[data-legacy-page="printing"] .advertise-with-us,body[data-legacy-page="printing"] .feedback-section{margin:30px auto;}

/* Common form, checkout and card language; never let children force viewport width. */
main :where(.form-card,.card,.step,.service-item,.news-item,.partner-card,.gadget-card,.housing-card){min-width:0;max-width:100%;overflow-wrap:break-word;}
main .form-card,main .card,main .news-item,main .partner-card{border:1px solid var(--interior-line);border-radius:12px;box-shadow:var(--interior-shadow);background:#fff;color:var(--interior-ink);}
main .card h2,main .card h3,main .card h4{color:var(--interior-ink);}
main .form-card{margin:0 auto 35px;padding:clamp(20px,3vw,34px);}
main form.card.form-card{max-width:880px;text-align:left;}
main .form-card .card{background:#f8fafc;box-shadow:none;border-color:#e8edf5;border-radius:9px;}
main .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;}
main .form-grid>*{min-width:0;}
main .form-group{margin-bottom:17px;min-width:0;}
main .form-group label{display:block;font-weight:700;font-size:13px;line-height:1.42;color:#1b3351;margin-bottom:8px;}
main .form-group :where(input,textarea,select),.admin-login-body .form-group :where(input,textarea,select),.admin-dashboard-body .form-group :where(input,textarea,select){display:block;min-width:0;max-width:100%;width:100%;min-height:46px;padding:11px 12px;background:#fff;color:#122744;border:1px solid #c9d5e3;border-radius:8px;box-shadow:none;font-size:15px;line-height:1.4;}
main .form-group textarea,.admin-dashboard-body textarea{min-height:105px;resize:vertical;}
main .form-group :where(input,textarea,select):focus-visible{outline:3px solid #ed701f44;border-color:#dd742b;outline-offset:1px;}
main .disclaimer,main .privacy-guidance{border-left:3px solid var(--interior-orange);border-radius:0 7px 7px 0;background:#fff6ef;color:#32465e;padding:13px 15px;margin:0 0 21px;font-size:13px;line-height:1.58;}
main .disclaimer p{margin:0;}
main .cta-button,main .cta-button-secondary,main .cta-button-small,main .cta-button-whatsapp,main button[type="submit"],main .gadget-add-btn,main .housing-inquire-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:43px;max-width:100%;padding:11px 17px;border:0;border-radius:7px;text-transform:none;letter-spacing:0;font-size:13px;font-weight:750;line-height:1.35;white-space:normal;box-shadow:none;transition:background .18s ease,transform .18s ease;}
main .cta-button,main button[type="submit"]{background:var(--interior-orange);color:#fff;}
main .cta-button-secondary,main .gadget-add-btn,main .housing-inquire-btn{background:var(--interior-navy);color:#fff;}
main .cta-button:hover,main .cta-button-secondary:hover{transform:translateY(-1px);box-shadow:none;}
main :where(#checkout-summary,.payment-card,.price-display,.order-summary,.price-calculator){min-width:0;max-width:100%;overflow-wrap:anywhere;}
body[data-legacy-page="checkout"] #checkout-summary,body[data-legacy-page="checkout"] .payment-card{max-width:820px;margin-inline:auto;margin-bottom:20px;padding:clamp(19px,3vw,30px);}
body[data-legacy-page="checkout"] .payment-card .bank-info{max-width:100%;padding:17px;background:#f5f8fc;border-radius:8px;overflow-wrap:anywhere;}
body[data-legacy-page="checkout"] .payment-card .confirm-payment{max-width:100%;}
body[data-legacy-page="checkout"] .payment-card .cta-button-whatsapp{min-height:44px;}
body[data-legacy-page="order"] #documents-container>.card{max-width:100%;}
body[data-legacy-page="order"] #documents-container .form-grid{align-items:start;}

/* Listings: two consistent browse experiences, clean selected filters, no chip clutter. */
body[data-legacy-page] :where(.gadget-toolbar,.housing-toolbar){display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px;align-items:center;}
body[data-legacy-page] :where(.gadget-filter-btn,.housing-filter-btn){min-height:41px;padding:9px 13px;border-radius:7px;border:1px solid #d9e2ec;background:#fff;color:#283f5a;font-size:12.5px;font-weight:750;}
body[data-legacy-page] :where(.gadget-filter-btn,.housing-filter-btn).active{background:var(--interior-navy);border-color:var(--interior-navy);color:#fff;}
body[data-legacy-page] :where(.gadget-filter-btn,.housing-filter-btn):hover:not(.active){background:#eef3f8;}
body[data-legacy-page] :where(.gadget-grid,.housing-grid){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:36px;}
body[data-legacy-page] :where(.gadget-card,.housing-card){border-radius:11px;overflow:hidden;box-shadow:none;background:#fff;border:1px solid var(--interior-line);}
body[data-legacy-page] :where(.gadget-card,.housing-card) img{display:block;width:100%;height:190px;object-fit:cover;background:#edf2f7;}
body[data-legacy-page] :where(.gadget-card-body,.housing-card-body){padding:18px;min-width:0;}
body[data-legacy-page] :where(.gadget-card-body,.housing-card-body) h3{font-size:18px;line-height:1.28;}
body[data-legacy-page] :where(.gadget-price,.housing-price){color:#c85a17;font-size:19px;}
body[data-legacy-page] :where(.gadget-add-btn,.housing-inquire-btn){width:100%;margin-top:auto;min-height:43px;border-radius:7px;}
body[data-legacy-page] .cart-fab{border-radius:9px;min-height:46px;padding:12px 16px;background:var(--interior-navy);max-width:calc(100vw - 24px);}
body[data-legacy-page] .cart-drawer{max-width:min(100vw,420px);padding:clamp(14px,3vw,23px);box-shadow:-8px 0 40px #071b3975;overflow-y:auto;}
body[data-legacy-page] .cart-item{min-width:0;}
body[data-legacy-page] .cart-item>div{min-width:0;overflow-wrap:break-word;}
body[data-legacy-page] .cart-qty-btn{width:35px;height:35px;flex-shrink:0;}
body[data-legacy-page] .empty-state,body[data-legacy-page] .loading{grid-column:1/-1;border:1px dashed #cbd7e5;border-radius:10px;color:#5e7188;background:#f9fbfd;padding:36px 18px;text-align:center;opacity:1;}
body[data-legacy-page] .ad-banner[style*="display: none"],body[data-legacy-page] .form-card[style*="display: none"]{display:none;}
body[data-legacy-page] .ad-item{aspect-ratio:16/7;min-height:180px;background:#0b2447;}
body[data-legacy-page] .ad-item img{width:100%;height:100%;object-fit:cover;}
body[data-legacy-page] .ad-overlay{background:linear-gradient(180deg,transparent,#04142fea);padding:20px;color:#fff;}

/* Community, news, About and policy pages. */
main .news-list{max-width:940px;gap:15px;}
main .news-item,main .partner-card{padding:23px;text-align:left;}
main .partners-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;}
main .partner-logo{max-height:74px;height:auto;width:auto;object-fit:contain;}
main .legal-content{max-width:940px;margin:0 auto 45px;padding:clamp(23px,3.8vw,46px);background:#fff;text-align:left;}
main .legal-section{margin-bottom:27px;}
main .legal-section:last-child{margin-bottom:0;}
main .legal-section h3{margin:0 0 9px;color:var(--interior-ink);}
main .legal-content :where(p,li){font-size:14px;line-height:1.77;color:#3d5068;}
main .legal-content ul{list-style:disc outside;padding-left:23px;margin:11px 0 17px;}
main .legal-content li{margin-bottom:8px;}
main .legal-content strong,main .legal-content a{overflow-wrap:anywhere;}
main .about-hero-v2{padding:49px 0 55px;}
main .about-hero-v2 h1{font-size:clamp(35px,4.6vw,60px);}
main .about-hero-v2>p{font-size:15px;line-height:1.7;}
main .about-story-v2{padding:65px 0;gap:clamp(25px,5vw,65px);}
main .about-owner-photo{box-shadow:12px 12px 0 #f7eadf;max-width:100%;}
main .about-offerings-v2{padding:57px 0 65px;}
main .about-offerings-grid>a{min-width:0;min-height:220px;border-radius:11px;}
main .about-contact-v2{padding:38px 43px;margin-bottom:25px;}

/* Site-wide footer: same dark foundation and compact wordmark as homepage. */
body footer:not(.admin-footer){margin-top:48px;padding:47px 0 23px;background:#071a38;color:#e0eaf6;}
body footer:not(.admin-footer) .footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:28px;}
body footer:not(.admin-footer) .footer-section{min-width:0;}
body footer:not(.admin-footer) .footer-section h4{color:#eef4fb;font-size:12px;margin:0 0 14px;letter-spacing:0;text-transform:none;}
body footer:not(.admin-footer) .footer-section p,body footer:not(.admin-footer) .footer-section a{color:#c4d3e7;font-size:12.5px;line-height:1.58;opacity:1;}
body footer:not(.admin-footer) .footer-section a{display:block;margin:0 0 10px;min-height:23px;}
body footer:not(.admin-footer) .footer-section a:hover{color:#ffb27d;}
body footer:not(.admin-footer) .legacy-footer-brand{margin-bottom:15px;gap:9px;}
body footer:not(.admin-footer) .legacy-footer-brand img{width:45px;height:45px;flex-shrink:0;}
body footer:not(.admin-footer) .legacy-footer-brand strong{color:#fff;letter-spacing:-.04em;}
body footer:not(.admin-footer) .legacy-footer-brand strong span{color:#ffa263;}
.legacy-footer-bottom{border-top:1px solid #ffffff26;margin-top:24px;padding-top:15px;color:#a6bad2;font-size:11.5px;}

/* Admin login and operational dashboard: same brand and readable controls. */
body.admin-login-body{display:flex;align-items:center;justify-content:center;min-height:100svh;padding:25px 12px;background:#f6f8fc;}
body.admin-login-body .login-card{width:min(100%,450px);margin:20px auto;padding:clamp(23px,4vw,38px);border-radius:13px;background:#fff;box-shadow:0 14px 35px #102e4d19;color:var(--interior-ink);border:1px solid var(--interior-line);}
body.admin-login-body .login-card .logo img{height:62px!important;width:62px;object-fit:contain;border-radius:50%;}
body.admin-login-body .login-card .logo h2{color:var(--interior-ink);font-size:25px;}
body.admin-login-body .login-card .cta-button{width:100%;padding:12px;border-radius:7px;background:var(--interior-orange);color:#fff;text-transform:none;letter-spacing:0;}
body.admin-login-body .login-card .login-footer a{color:#c25f20;}
body.admin-dashboard-body{background:#f7f9fc;color:var(--interior-ink);}
body.admin-dashboard-body .admin-header{background:#fff;color:var(--interior-ink);border:0;box-shadow:0 1px 0 #142d4e22;padding:0;}
body.admin-dashboard-body .admin-header .container{display:flex;align-items:center;justify-content:space-between;gap:13px;min-height:74px;max-width:1240px;}
body.admin-dashboard-body .admin-header .logo{display:flex;align-items:center;gap:12px;min-width:0;}
body.admin-dashboard-body .admin-header .logo img{width:43px!important;height:43px!important;margin:0!important;object-fit:contain;border-radius:50%;}
body.admin-dashboard-body .admin-header .logo h1{font-size:clamp(18px,2.5vw,25px);line-height:1.1;margin:0;color:var(--interior-ink);overflow-wrap:break-word;}
body.admin-dashboard-body .admin-header .logo span{display:none;}
body.admin-dashboard-body .admin-header #admin-logout-button{padding:10px 16px;min-height:42px;flex-shrink:0;background:var(--interior-navy);color:#fff;border:0;border-radius:7px;text-transform:none;letter-spacing:0;}
body.admin-dashboard-body .admin-main{padding:27px 0 30px;min-width:0;}
body.admin-dashboard-body .admin-main .container{max-width:1240px;min-width:0;}
body.admin-dashboard-body .summary-card{max-width:100%;padding:23px 25px;border:0;border-left:4px solid var(--interior-orange);border-radius:10px;background:var(--interior-navy);box-shadow:none;}
body.admin-dashboard-body .summary-card h3{font-size:13px;letter-spacing:0;text-transform:none;color:#f6c7a5;}
body.admin-dashboard-body .summary-card p{font-size:clamp(25px,4vw,34px);}
body.admin-dashboard-body .summary-icon{display:none;}
body.admin-dashboard-body .tab-container{display:flex;flex-wrap:nowrap;align-items:stretch;gap:6px;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:0 0 10px;margin:24px 0 20px;scrollbar-width:thin;}
body.admin-dashboard-body .tab-button{flex:0 0 auto;min-height:43px;padding:10px 14px;border:1px solid var(--interior-line);border-radius:7px;background:#fff;color:#234061;font-size:12.5px;white-space:nowrap;}
body.admin-dashboard-body .tab-button.active{background:var(--interior-navy);border-color:var(--interior-navy);color:#fff;box-shadow:none;}
body.admin-dashboard-body .tab-content{min-width:0;max-width:100%;}
body.admin-dashboard-body .tab-content h2{font-size:clamp(21px,2.7vw,28px);line-height:1.2;}
body.admin-dashboard-body .table-responsive{max-width:100%;overflow-x:auto;border:1px solid var(--interior-line);border-radius:9px;box-shadow:none;overscroll-behavior-x:contain;scrollbar-width:thin;}
body.admin-dashboard-body .table-responsive table{min-width:850px;width:max-content;max-width:none;}
body.admin-dashboard-body :where(th,td){padding:11px 13px;font-size:12.5px;vertical-align:middle;white-space:normal;overflow-wrap:break-word;}
body.admin-dashboard-body .form-card{max-width:100%;min-width:0;padding:clamp(17px,3vw,28px);border-radius:10px;box-shadow:none;border:1px solid var(--interior-line);}
body.admin-dashboard-body .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
body.admin-dashboard-body .action-button,body.admin-dashboard-body .action-button-small{border-radius:7px;min-height:37px;white-space:normal;}
body.admin-dashboard-body .admin-footer{margin-top:25px;padding:20px 0;background:#071a38;color:#e2eaf7;font-size:12px;}

/* Tablets: keep readable columns and proper navigation. */
@media(max-width:1100px){
  header:not(.admin-header) .legacy-header-order{display:none;}
  header:not(.admin-header) nav ul{gap:5px;}
  body[data-legacy-page] :where(.gadget-grid,.housing-grid){grid-template-columns:repeat(2,minmax(0,1fr));}
  main .partners-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:980px){
  header:not(.admin-header) .container{min-height:66px!important;flex-direction:row!important;flex-wrap:nowrap;}
  header:not(.admin-header) .legacy-menu-button{display:flex;}
  header:not(.admin-header) nav#legacy-main-nav{display:none;position:absolute;top:100%;left:0;right:0;padding:10px 17px 18px;background:#fff;border-top:1px solid var(--interior-line);box-shadow:0 15px 32px #122b4730;max-height:min(72vh,620px);overflow-y:auto;}
  header:not(.admin-header) nav#legacy-main-nav.is-open{display:block;}
  header:not(.admin-header) nav#legacy-main-nav ul{display:flex;flex-direction:column;align-items:stretch;gap:0;}
  header:not(.admin-header) nav#legacy-main-nav li{width:100%;}
  header:not(.admin-header) nav#legacy-main-nav a{color:var(--interior-ink);font-size:15px;padding:12px 11px;white-space:normal;border-bottom:1px solid var(--interior-line);}
  header:not(.admin-header) nav#legacy-main-nav a.active{color:#c36525;}
  body[data-legacy-page="printing"] .steps,body[data-legacy-page="printing"] .service-items{grid-template-columns:repeat(2,minmax(0,1fr));}
  main .about-offerings-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  main .about-story-v2{grid-template-columns:1fr;gap:30px;}
  main .about-owner-photo{height:380px;max-width:500px;margin:auto;}
}
@media(max-width:700px){
  .legacy-topline{display:none;}
  body:not(.admin-dashboard-body):not(.admin-login-body) .container{padding-inline:15px;}
  header:not(.admin-header) .container{min-height:62px!important;gap:7px;}
  header:not(.admin-header) .logo img{width:40px;height:40px;flex-basis:40px;}
  header:not(.admin-header) .brand-name{font-size:18px;}
  header:not(.admin-header) .brand-sub{font-size:11px;}
  header:not(.admin-header) .legacy-header-actions{gap:6px;}
  #theme-toggle,.legacy-menu-button{width:39px;height:39px;min-width:39px;}
  main>.page-header,body:is([data-legacy-page="order"],[data-legacy-page="checkout"],[data-legacy-page="gadgets"],[data-legacy-page="housing"],[data-legacy-page="project"],[data-legacy-page="portal"],[data-legacy-page="news"],[data-legacy-page="partners"]) main>.page-header{min-height:162px;margin:12px auto 18px;padding:22px 21px;border-radius:9px;}
  main>.page-header h1{font-size:clamp(26px,7.1vw,34px);line-height:1.14;margin:0 0 8px;}
  main>.page-header p{font-size:13px;line-height:1.47;}
  body:is([data-legacy-page="order"],[data-legacy-page="checkout"],[data-legacy-page="gadgets"],[data-legacy-page="housing"],[data-legacy-page="project"],[data-legacy-page="portal"],[data-legacy-page="news"],[data-legacy-page="partners"]) main>.page-header{background-position:60% center;}
  body[data-legacy-page="printing"] main>.hero{min-height:275px;padding:41px 0;background-position:62% center;}
  body[data-legacy-page="printing"] main>.hero h1{font-size:clamp(29px,7.8vw,38px);}
  body[data-legacy-page="printing"] main>.hero p{font-size:13px;line-height:1.53;}
  body[data-legacy-page="printing"] .trust-signals{margin-top:18px;gap:8px 15px;}
  body[data-legacy-page="printing"] .trust-signals span{font-size:11.5px;}
  body[data-legacy-page="printing"] .steps,body[data-legacy-page="printing"] .service-items{grid-template-columns:1fr;gap:11px;margin-top:21px;}
  body[data-legacy-page="printing"] .order-guide,body[data-legacy-page="printing"] .services{padding:38px 0;}
  body[data-legacy-page="printing"] .step,body[data-legacy-page="printing"] .service-item{padding:20px;}
  body[data-legacy-page="printing"] .portal-services-cta .card{padding:23px;}
  main .form-card{padding:20px;margin:0 auto 25px;}
  main .form-grid,body.admin-dashboard-body .form-grid{grid-template-columns:minmax(0,1fr);gap:0;}
  main .form-group{margin-bottom:15px;}
  main .form-group :where(input,select,textarea){font-size:16px;}
  main .cta-button,main .cta-button-secondary,main button[type="submit"]{min-height:45px;}
  body[data-legacy-page="order"] #documents-container .card{padding:14px!important;}
  body[data-legacy-page] :where(.gadget-grid,.housing-grid){grid-template-columns:minmax(0,1fr);gap:12px;}
  body[data-legacy-page] :where(.gadget-card,.housing-card) img{height:auto;aspect-ratio:16/9;object-fit:cover;}
  body[data-legacy-page] :where(.gadget-toolbar,.housing-toolbar){gap:6px;margin-bottom:17px;}
  body[data-legacy-page] :where(.gadget-filter-btn,.housing-filter-btn){font-size:12px;padding:8px 11px;min-height:40px;}
  body[data-legacy-page] .cart-fab{right:12px;bottom:12px;padding:11px 13px;}
  body[data-legacy-page] .ad-item{aspect-ratio:4/3;min-height:180px;}
  body[data-legacy-page] .ad-overlay{padding:15px;}
  main .partners-grid{grid-template-columns:1fr;gap:11px;}
  main .news-item,main .partner-card{padding:19px;}
  main .legal-content{padding:21px;margin-bottom:30px;}
  main .legal-section{margin-bottom:23px;}
  main .legal-content :where(p,li){font-size:13.5px;}
  main .about-hero-v2{padding:37px 0 42px;}
  main .about-hero-v2 h1{font-size:clamp(32px,8vw,43px);}
  main .about-story-v2{padding:43px 0;}
  main .about-offerings-v2{padding:45px 0;}
  main .about-offerings-grid{grid-template-columns:1fr;}
  main .about-owner-photo{height:340px;box-shadow:6px 7px 0 #f7eadf;}
  main .about-contact-v2{padding:28px 23px;display:block;}
  body footer:not(.admin-footer){padding:35px 0 23px;margin-top:35px;}
  body footer:not(.admin-footer) .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 18px;}
  body footer:not(.admin-footer) .footer-section:first-child{grid-column:1/-1;}
  body.admin-dashboard-body .admin-main{padding:18px 0;}
  body.admin-dashboard-body .tab-container{margin:19px 0 16px;}
  body.admin-dashboard-body .table-responsive table{min-width:850px;}
}
@media(max-width:390px){
  header:not(.admin-header) .brand-name{font-size:17px;}
  header:not(.admin-header) .brand-sub{font-size:10.5px;}
  header:not(.admin-header) .brand-link{gap:6px;}
  header:not(.admin-header) .logo img{height:37px;width:37px;flex-basis:37px;}
  #theme-toggle,.legacy-menu-button{height:37px;width:37px;min-width:37px;}
  main>.page-header,body:is([data-legacy-page="order"],[data-legacy-page="checkout"],[data-legacy-page="gadgets"],[data-legacy-page="housing"],[data-legacy-page="project"],[data-legacy-page="portal"],[data-legacy-page="news"],[data-legacy-page="partners"]) main>.page-header{padding:20px 17px;min-height:158px;}
  main>.page-header h1{font-size:26px;}
  body footer:not(.admin-footer) .footer-grid{grid-template-columns:minmax(0,1fr);gap:17px;}
  body footer:not(.admin-footer) .footer-section:first-child{grid-column:auto;}
  body.admin-dashboard-body .admin-header .container{gap:8px;padding-inline:13px;}
  body.admin-dashboard-body .admin-header .logo{gap:7px;}
  body.admin-dashboard-body .admin-header .logo img{height:36px!important;width:36px!important;}
  body.admin-dashboard-body .admin-header #admin-logout-button{padding:9px 11px;font-size:12px;}
}
@media(prefers-reduced-motion:reduce){
  body :where(.cta-button,.cta-button-secondary,.cta-button-small,.gadget-card,.housing-card,.tab-button){transition:none!important;animation:none!important;}
}

/* Preserve the existing theme preference while keeping text and surfaces readable. */
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body){color:#e9f1fb;background-color:#071b38;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main>.page-header:not(.hero){background-color:#102b4c;border-color:#34516f;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main>.page-header :where(h1,p){color:#f0f5fc;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main :where(.form-card,.card,.news-item,.partner-card,.gadget-card,.housing-card,.legal-content,.step,.service-item){background:#102a49;color:#edf3fb;border-color:#355373;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main :where(.card h2,.card h3,.card h4,.legal-section h3,.gadget-card h3,.housing-card h3){color:#f5f8fe;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main :where(.legal-content p,.legal-content li,.gadget-card p,.housing-card p){color:#d1e0f2;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main .form-group label{color:#e7f1fb;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main :where(.gadget-filter-btn,.housing-filter-btn){background:#173a61;border-color:#3e5e7e;color:#eaf4ff;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main :where(.gadget-filter-btn,.housing-filter-btn).active{background:#ec7929;color:#fff;border-color:#ec7929;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main .legal-section strong{color:#fff;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main .form-card .card{background:#173653;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main :where(.form-group input,.form-group select,.form-group textarea){color:#122744;background:#fff;}
[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main .loading,[data-theme="dark"] body:not(.admin-dashboard-body):not(.admin-login-body) main .empty-state{color:#d1e0f2;background:#112c4d;border-color:#365778;}
[data-theme="dark"] body[data-legacy-page="printing"] .order-guide{background:#102949;}
[data-theme="dark"] body[data-legacy-page="printing"] .service-item h3{color:#f4f8ff;}
[data-theme="dark"] body[data-legacy-page="printing"] .portal-services-cta .card{background:#07192f;}
[data-theme="dark"] body[data-legacy-page="about"] .about-hero-v2 :where(h1,h2),[data-theme="dark"] body[data-legacy-page="about"] .about-story-text h2,[data-theme="dark"] body[data-legacy-page="about"] .about-offerings-v2 h2{color:#fff;}
[data-theme="dark"] body[data-legacy-page="about"] .about-hero-v2>p,[data-theme="dark"] body[data-legacy-page="about"] .about-story-text p{color:#d1e0f2;}
[data-theme="dark"] body[data-legacy-page="about"] .about-offerings-grid>a{background:#173656;border-color:#385577;}
[data-theme="dark"] body[data-legacy-page="about"] .about-offerings-grid h3{color:#f4f8ff;}
[data-theme="dark"] body[data-legacy-page="about"] .about-offerings-grid p{color:#cadbed;}
[data-theme="dark"] body[data-legacy-page="about"] .about-contact-v2{background:#05152a;}

/* Mobile's primary print action remains available when the desktop header CTA hides. */
.legacy-mobile-order{display:none;}
body[data-legacy-page] .cart-drawer-overlay{z-index:1200;}
body[data-legacy-page] .cart-drawer{z-index:1201;}
@media(max-width:980px){header:not(.admin-header) nav#legacy-main-nav .legacy-mobile-order{display:block;}}
