/* ===== LOGIN PAGE REDESIGN ===== */
#authModal .modal-inner{background:#f3f7f3}
.auth-page-grid{grid-template-columns:1.05fr .95fr;min-height:100%;}
.auth-brand-panel{position:relative;overflow:hidden;align-items:flex-start;justify-content:flex-start;padding:56px 64px;
  background:linear-gradient(160deg,rgba(6,70,30,.93),rgba(8,92,36,.9) 55%,rgba(4,50,22,.96)),url('/assets/images/campus-hero.jpg') center/cover no-repeat}
.auth-brand-panel:before{content:'';position:absolute;right:-120px;top:-80px;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,rgba(74,222,128,.28),transparent 70%)}
.auth-brand-inner{position:relative;max-width:760px;width:100%;}
.auth-brand-logo{display:flex;align-items:center;gap:12px;font-size:28px;margin-bottom:56px;letter-spacing:-.5px}
.auth-brand-logo em{font-style:normal;color:#86efac}
.auth-logo-mark{width:54px;height:54px;border-radius:14px;background:#fff;color:#0c831f;display:grid;place-items:center}
.auth-brand-inner h2{font-size:clamp(34px,4.2vw,56px);font-weight:800;line-height:1.1;margin-bottom:22px}
.auth-brand-inner h2 .hl{color:#a3e635;display:inline-block;border-bottom:4px solid #4ade80;border-radius:2px;padding-bottom:2px}
.auth-brand-inner p{opacity:.92;font-size:18px;line-height:1.55;max-width:520px}
.auth-features{display:flex;gap:14px;margin-top:34px;flex-wrap:wrap}
.auth-features div{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(6px);padding:14px 18px;border-radius:14px;font-size:14px;font-weight:600;line-height:1.25}
.auth-form-panel{background:radial-gradient(circle at 100% 0,#dff3e3,transparent 45%),radial-gradient(circle at 0 100%,#e4f5e8,transparent 40%),#f3f7f3;padding:40px 28px}
.auth-card{position:relative;width:100%;max-width:830px;min-height:min(754px,calc(100dvh - 80px));box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;background:#fff;border-radius:28px;padding:64px 60px 34px;box-shadow:0 24px 60px rgba(12,60,30,.14);border:1px solid rgba(0,0,0,.04)}
.auth-card .page-back-btn{top:26px;left:30px;color:#0c831f;font-size:15px}
.auth-card .modal-header{max-width:none;text-align:center;display:block;padding:0 0 22px}
.auth-card .modal-header h3{font-size:32px;font-weight:800;color:#0f172a}
.auth-sub{font-size:18px;color:#475569;margin-top:4px}
.auth-card .modal-body{max-width:none}
.auth-tabs{background:#f1f5f2;border-radius:14px;padding:6px;gap:6px;margin-bottom:26px}
.auth-tab-btn{display:flex;align-items:center;justify-content:center;gap:8px;padding:13px 6px;font-size:15px;font-weight:700;border-radius:10px;color:#334155}
.auth-tab-btn.active{background:#0c831f;color:#fff;box-shadow:0 4px 12px rgba(12,131,31,.3)}
.auth-card .form-group{margin-bottom:18px}
.auth-card .form-group label{font-size:16px;font-weight:800;color:#0f172a;margin-bottom:8px}
.auth-card .form-input,.auth-card .form-select{padding:14px 14px;font-size:15px;border-radius:12px;border:1px solid #dbe3dd;background:#fff;color:#0f172a}
.auth-card .form-input:focus,.auth-card .form-select:focus{border-color:#0c831f;box-shadow:0 0 0 3px rgba(12,131,31,.15)}
.input-icon-wrap{position:relative}
.input-icon-wrap>svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#475569;pointer-events:none}
.input-icon-wrap .form-input{padding-left:46px;padding-right:46px}
.pw-eye{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:36px;height:36px;display:grid;place-items:center;color:#334155;border-radius:8px}
.auth-submit{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;background:#0c831f;color:#fff;padding:16px;border-radius:12px;font-weight:800;font-size:17px;margin-top:10px;box-shadow:0 8px 18px rgba(12,131,31,.28);transition:.2s}
.auth-submit:hover{background:#0a7019;transform:translateY(-1px)}
.auth-or{display:flex;align-items:center;gap:14px;color:#64748b;font-size:13px;margin:22px 0 14px}
.auth-or:before,.auth-or:after{content:'';flex:1;height:1px;background:#dbe3dd}
.auth-secure{display:flex;align-items:center;justify-content:center;gap:8px;color:#475569;font-size:14px}
@media(max-width:860px){.auth-card{padding:60px 22px 26px;border-radius:22px}.auth-tab-btn svg{display:none}}

/* ===== FULL DARK MODE ===== */
body.dark-mode #authModal .modal-inner,body.dark-mode #checkoutModal .modal-inner{background:#0b1220}
body.dark-mode .auth-brand-panel{background:linear-gradient(160deg,rgba(3,28,14,.94),rgba(5,46,22,.9) 55%,rgba(2,20,10,.96)),url('/assets/images/campus-hero.jpg') center/cover no-repeat}
body.dark-mode .auth-form-panel{background:radial-gradient(circle at 100% 0,rgba(22,101,52,.3),transparent 45%),radial-gradient(circle at 0 100%,rgba(22,101,52,.22),transparent 40%),#0b1220}
body.dark-mode .auth-card{background:#111a2b;border-color:#263244;box-shadow:0 24px 60px rgba(0,0,0,.55)}
body.dark-mode .auth-card .page-back-btn{color:#4ade80}
body.dark-mode .auth-card .modal-header h3,body.dark-mode .auth-card .form-group label{color:#f8fafc}
body.dark-mode .auth-sub,body.dark-mode .auth-secure,body.dark-mode .auth-or{color:#94a3b8}
body.dark-mode .auth-or:before,body.dark-mode .auth-or:after{background:#263244}
body.dark-mode .auth-tabs{background:#0b1220}
body.dark-mode .auth-tab-btn{color:#94a3b8}
body.dark-mode .auth-tab-btn.active{background:#0c831f;color:#fff}
body.dark-mode .auth-card .form-input,body.dark-mode .auth-card .form-select,
body.dark-mode .form-input,body.dark-mode .form-select,body.dark-mode .form-textarea{background:#0b1220!important;color:#f8fafc!important;border-color:#2a3a52!important}
body.dark-mode .form-input::placeholder,body.dark-mode .form-textarea::placeholder{color:#64748b}
body.dark-mode .form-input:focus,body.dark-mode .form-select:focus{border-color:#22c55e!important;box-shadow:0 0 0 3px rgba(34,197,94,.18)}
body.dark-mode .input-icon-wrap>svg,body.dark-mode .pw-eye{color:#94a3b8}
body.dark-mode .form-group label{color:#cbd5e1}
body.dark-mode .form-select option{background:#0b1220;color:#f8fafc}
body.dark-mode .checkout-steps,body.dark-mode .student-account-tabs{background:#0b1220}
body.dark-mode .step-indicator{color:#94a3b8}
body.dark-mode .step-indicator.active,body.dark-mode .student-account-tab.active{background:#1f2937;color:#f8fafc}
body.dark-mode .payment-option-card.selected{background:#12351f;border-color:#22c55e}
body.dark-mode .account-value{color:#f8fafc}
body.dark-mode .account-status{background:#12351f;color:#86efac}
body.dark-mode .bank-detail-label,body.dark-mode .account-label{color:#94a3b8}
body.dark-mode .qr-code-img{background:#fff}
body.dark-mode .toast-message{background:#1f2937;color:#f8fafc}
body.dark-mode .field-error{color:#fca5a5}
/* catch inline light styles (incl. JS-rendered templates) */
body.dark-mode [style*="background:#fff;"],body.dark-mode [style*="background:#fff\""],body.dark-mode [style*="background:white"],
body.dark-mode [style*="background:#f8fafc"],body.dark-mode [style*="background:#f1f5f9"],body.dark-mode [style*="background:#f7f8fa"],
body.dark-mode [style*="background:#f3f4f6"],body.dark-mode [style*="background:#f7f7f7"],body.dark-mode [style*="background:#f4f5f3"],
body.dark-mode [style*="background:#f1f1f1"],body.dark-mode [style*="background:#e2e8f0"],body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background-color:#fff"],body.dark-mode [style*="background-color: #fff"]{background:#172033!important;color:#f8fafc!important;border-color:#263244!important}
body.dark-mode [style*="background:#ecfdf5"],body.dark-mode [style*="background:#ecfdf3"],body.dark-mode [style*="background:#f0fdf4"],body.dark-mode [style*="background:#effbf1"],body.dark-mode [style*="background:#eaf7ec"],body.dark-mode [style*="background:#e8f8eb"]{background:#12351f!important;color:#86efac!important}
body.dark-mode [style*="background:#fef2f2"],body.dark-mode [style*="background:#fee2e2"],body.dark-mode [style*="background:#fdf2f2"]{background:#3b1518!important;color:#fca5a5!important;border-color:#7f1d1d!important}
body.dark-mode [style*="background:#eff6ff"]{background:#14263f!important;color:#93c5fd!important}
body.dark-mode [style*="color:#64748b"],body.dark-mode [style*="color:#6b7280"],body.dark-mode [style*="color:#374151"],body.dark-mode [style*="color:#475569"]{color:#94a3b8!important}
body.dark-mode [style*="color:#111827"],body.dark-mode [style*="color:#0f172a"],body.dark-mode [style*="color:#1f2937"]{color:#f8fafc!important}
body.dark-mode [style*="background:#111827"]{background:#1f2937!important}
body.dark-mode footer,body.dark-mode .footer-bottom{background:#070d18!important;border-color:#263244!important}
body.dark-mode .top-strip{background:#070d18}
body.dark-mode .location-icon{background:#2a2410}
body.dark-mode .logo small{color:#94a3b8}
body.dark-mode .hero-campus:after{opacity:.45}
body.dark-mode .quick-view-content,body.dark-mode .policy-card,body.dark-mode .order-receipt-card{color:#f8fafc}

/* ===== STORE PAGE: kill remaining light areas in dark mode ===== */
body.dark-mode,body.dark-mode main,body.dark-mode .container{background:#0b1220!important;color:#e5e7eb}
body.dark-mode header{background:rgba(11,18,32,.96)!important;border-color:#1e2a3d!important}
body.dark-mode .cat-nav{background:#0d1626!important;border-color:#1e2a3d!important}
body.dark-mode .cat-nav a,body.dark-mode .cat-nav button,body.dark-mode .cat-link{color:#cbd5e1}
body.dark-mode .hero,body.dark-mode .hero-campus{background:linear-gradient(135deg,#0f1b2d,#10281b 60%,#0f1d33)!important;border-color:#1e2a3d!important}
body.dark-mode .hero-campus:after{opacity:.35}
body.dark-mode .hero h1,body.dark-mode .hero-content h1,body.dark-mode .printing-entry h2{color:#f8fafc!important}
body.dark-mode .hero h1 span{color:#4ade80!important}
body.dark-mode .hero p,body.dark-mode .printing-entry p{color:#a8b5c7!important}
body.dark-mode .printing-entry,body.dark-mode .printing-entry-copy{background:linear-gradient(100deg,#0f1b2d,#13263f)!important;border-color:#24406a!important}
body.dark-mode .printing-entry h2 span,body.dark-mode .printing-entry em{color:#4ade80!important}
body.dark-mode .print-bubble,body.dark-mode .float-card,body.dark-mode .hero-badge,body.dark-mode .printing-kicker,body.dark-mode .secondary-btn{background:#172033!important;color:#e5e7eb!important;border-color:#263244!important}
body.dark-mode .section-head h2,body.dark-mode h1,body.dark-mode h2,body.dark-mode h3,body.dark-mode h4{color:#f8fafc}
body.dark-mode .section-head p,body.dark-mode .products-count,body.dark-mode small{color:#94a3b8!important}
body.dark-mode .product-card,body.dark-mode .benefit,body.dark-mode .category-intro-box,body.dark-mode .empty-state,body.dark-mode .contact-info-card,body.dark-mode .contact-form-card,body.dark-mode .student-special,body.dark-mode .sort-select,body.dark-mode .user-btn,body.dark-mode .theme-toggle,body.dark-mode .modal-inner{background:#111a2b!important;border-color:#263244!important;color:#e5e7eb!important}
body.dark-mode .empty-state h3,body.dark-mode .empty-state h4,body.dark-mode .empty-state p{color:#cbd5e1!important}
body.dark-mode .contact-section{background:#0d1626!important}
body.dark-mode .contact-section h2,body.dark-mode .contact-section h3,body.dark-mode .contact-section h4,body.dark-mode .contact-detail-text strong,body.dark-mode .contact-detail-text a{color:#f8fafc!important}
body.dark-mode .contact-section p,body.dark-mode .contact-section label,body.dark-mode .contact-detail-text span,body.dark-mode .contact-detail-text small{color:#94a3b8!important}
body.dark-mode .contact-detail-icon,body.dark-mode .benefit-icon{background:#172a22!important;color:#4ade80!important}
body.dark-mode .category-intro-box *{color:inherit}
body.dark-mode .cat-intro-info h3{color:#f8fafc!important}
body.dark-mode .cat-intro-info p,body.dark-mode .benefit p,body.dark-mode .benefit span{color:#94a3b8!important}
body.dark-mode .benefit h4,body.dark-mode .benefit strong{color:#f8fafc!important}
body.dark-mode .student-special,body.dark-mode [class*="special"]{background:#12281d!important;color:#e5e7eb!important}
body.dark-mode [class*="special"] *{color:inherit}
body.dark-mode .category-pill{background:#172033!important;color:#cbd5e1!important;border-color:#263244!important}
body.dark-mode .category-pill.active{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important}
body.dark-mode .logo,body.dark-mode .logo b{color:#f8fafc!important}
body.dark-mode .search{background:#172033!important;border-color:#263244!important}
body.dark-mode .search-icon{filter:none}
body.dark-mode .product-title{color:#f8fafc!important}
body.dark-mode .product-image-wrap{background:#172033!important}
body.dark-mode .offer-banner{background:linear-gradient(135deg,#12281d,#173523)!important;border:1px solid #1f4a30!important}
body.dark-mode .offer-banner h2{color:#f8fafc!important}
body.dark-mode .offer-banner p{color:#a7f3d0!important}
body.dark-mode .section-head h2,body.dark-mode .section-head h2 *{color:#f8fafc!important}
body.dark-mode .section-head p{color:#94a3b8!important}
body.dark-mode .section-head a{color:#4ade80!important}
body.dark-mode .sort-select{color:#e5e7eb!important}
body.dark-mode [class*="stock-badge"],body.dark-mode .cat-badge,body.dark-mode .category-intro-box span[class]{background:#12351f!important;color:#86efac!important}

/* ===== MOBILE LOGIN ===== */
@media(max-width:860px){
  #authModal .modal-inner{overflow-y:auto;-webkit-overflow-scrolling:touch}
  .auth-page-grid{display:flex;flex-direction:column;height:auto;min-height:100%}
  .auth-brand-panel{display:block;padding:22px 20px 70px;flex:none}
  .auth-brand-panel:before{width:240px;height:240px;right:-90px;top:-70px}
  .auth-brand-logo{font-size:20px;margin-bottom:18px;gap:10px}
  .auth-logo-mark{width:40px;height:40px;border-radius:11px}
  .auth-logo-mark svg{width:22px;height:22px}
  .auth-brand-inner h2{font-size:27px;margin-bottom:8px}
  .auth-brand-inner p{font-size:14px;max-width:none}
  .auth-features{display:none}
  .auth-form-panel{flex:1;justify-content:flex-start;align-items:center;padding:0 14px 24px;overflow:visible}
  .auth-card{margin-top:-48px;padding:56px 18px 24px;max-width:480px;border-radius:22px}
  .auth-card .page-back-btn{top:20px;left:18px;font-size:14px}
  .auth-card .modal-header h3{font-size:25px}
  .auth-sub{font-size:15px}
  .auth-tab-btn{font-size:13px;padding:11px 4px;gap:5px}
  .auth-tab-btn svg{display:none}
  .auth-card .form-input,.auth-card .form-select{font-size:16px;padding:13px 12px} /* 16px stops iOS zoom */
  .input-icon-wrap .form-input{padding-left:44px}
  .auth-card .modal-body [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important;gap:0!important}
}
@media(max-width:380px){.auth-brand-inner h2{font-size:23px}.auth-tab-btn{font-size:12px}}


/* ===== AUTH PAGE: MATCH APPROVED STUDENT PORTAL REFERENCE ===== */
@media (min-width:861px){
  #authModal .modal-inner{height:100dvh;min-height:620px;overflow:hidden;background:#f5f5ef}
  .auth-page-grid{height:100%;grid-template-columns:51.2% 48.8%;}
  .auth-brand-panel{padding:52px clamp(42px,4.5vw,80px);}
  .auth-brand-inner{max-width:760px}
  .auth-brand-logo{margin-bottom:58px}
  .auth-brand-inner h2{font-size:clamp(42px,3.5vw,60px);line-height:1.12}
  .auth-brand-inner p{font-size:clamp(16px,1.35vw,20px)}
  .auth-form-panel{padding:40px 28px}
  .auth-card{width:100%;max-width:830px;min-height:min(754px,calc(100dvh - 80px));padding:64px clamp(34px,3.5vw,66px) 34px;border-radius:48px}
  .auth-card .modal-header h3{font-size:clamp(30px,2.4vw,42px)}
  .auth-card .modal-body{width:100%}
  .auth-tabs{margin-bottom:30px}
  .auth-tab-btn{min-height:58px;font-size:16px}
  .auth-card .form-input,.auth-card .form-select{min-height:66px;font-size:17px;border-radius:17px}
  .auth-submit{min-height:68px;border-radius:16px}
}
@media (max-width:860px){
  .auth-page-grid{grid-template-columns:1fr}
  .auth-brand-panel{display:block}
  .auth-form-panel{padding:0 14px 24px}
  .auth-card{min-height:0;width:100%;max-width:520px;padding:60px 22px 26px;border-radius:22px}
}
