/* V56 final UI hardening: overflow, media, forms and mobile safety. */
html,body{max-width:100%;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
pre{max-width:100%;overflow:auto;white-space:pre-wrap;word-break:break-word}
table{max-width:100%}
button,input,select,textarea{font:inherit;max-width:100%}
.navbar,.container,.container-fluid,.row,[class*="col-"]{min-width:0}
.btn,.nav-link,.user-side-link,.admin-side-link{overflow-wrap:anywhere}
.modal-dialog{max-width:calc(100vw - 24px)}
.modal-content{overflow:hidden}
@media(max-width:900px){
  .navbar-collapse{max-height:calc(100vh - 76px);overflow-y:auto}
  .hero,.hero-section,.page-hero{overflow:hidden}
  .table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media(max-width:600px){
  .container,.container-fluid{padding-left:12px!important;padding-right:12px!important}
  .btn{min-height:42px}
  .form-control,.form-select{min-width:0}
  .card,.panel,.tool-card,.catalog-card{max-width:100%;overflow:hidden}
}

/* =========================================================
   V60 GLOBAL THEME ENGINE
   One light/dark switch for public pages + user dashboard.
   ========================================================= */
html[data-theme="light"] body.site-body,
body.theme-light.site-body{background:#f6f7fb!important;color:#17233a!important}
html[data-theme="light"] body.site-body .site-nav{background:rgba(255,255,255,.96)!important;border-bottom-color:#e5e9f1!important}
html[data-theme="light"] body.site-body .brand{color:#17233a!important}
html[data-theme="light"] body.site-body .nav-links .nav-link{color:#526078!important}
html[data-theme="light"] body.site-body .nav-links .nav-link:hover,
html[data-theme="light"] body.site-body .nav-links .nav-link.active{color:#fff!important}
html[data-theme="light"] body.site-body .round-btn{background:#fff!important;color:#4f5d76!important;border:1px solid #dfe5ee!important}
html[data-theme="light"] body.site-body .nav-toggle{color:#4f5d76!important;border-color:#dfe5ee!important}
html[data-theme="light"] body.site-body .nav-login{color:#4f5d76!important;border-color:#7651f2!important}
html[data-theme="light"] body.site-body .hero-wrap{background:linear-gradient(135deg,#eef4ff 0%,#f8f3ff 48%,#eafaff 100%)!important}
html[data-theme="light"] body.site-body .hero-content h1,
html[data-theme="light"] body.site-body .hero-content h1 span{color:#18243a!important}
html[data-theme="light"] body.site-body .hero-content p{color:#63718a!important}
html[data-theme="light"] body.site-body .hero-badge,
html[data-theme="light"] body.site-body .section-kicker{color:#6844ee!important;background:#eee8ff!important;border-color:#ddd1ff!important}
html[data-theme="light"] body.site-body .hero-search{background:#fff!important;border-color:#dce3ed!important;box-shadow:0 15px 40px rgba(45,60,90,.10)!important}
html[data-theme="light"] body.site-body .hero-search input{color:#17233a!important}
html[data-theme="light"] body.site-body .hero-search input::placeholder{color:#8a96a8!important}
html[data-theme="light"] body.site-body .popular-line{color:#7b879a!important}
html[data-theme="light"] body.site-body .popular-line b{color:#39475e!important}
html[data-theme="light"] body.site-body .popular-line span{background:#fff!important;border-color:#e1e7f0!important}
html[data-theme="light"] body.site-body .hero-stats strong{color:#17233a!important}
html[data-theme="light"] body.site-body .hero-stats small{color:#718096!important}
html[data-theme="light"] body.site-body .stat-icon{background:#fff!important;border-color:#e1e7f0!important;color:#6844ee!important}
html[data-theme="light"] body.site-body .dark-section,
html[data-theme="light"] body.site-body .tools-section{background:#f6f7fb!important}
html[data-theme="light"] body.site-body .section-head h2,
html[data-theme="light"] body.site-body .center-head h2{color:#17233a!important}
html[data-theme="light"] body.site-body .section-head p,
html[data-theme="light"] body.site-body .center-head p{color:#718096!important}
html[data-theme="light"] body.site-body .outline-btn{color:#6844ee!important;background:#fff!important;border-color:#d8cdfc!important}
html[data-theme="light"] body.site-body .cat-card,
html[data-theme="light"] body.site-body .tool-card,
html[data-theme="light"] body.site-body .blog-card{background:#fff!important;color:#17233a!important;border-color:#e1e7f0!important;box-shadow:0 10px 28px rgba(35,52,89,.07)!important}
html[data-theme="light"] body.site-body .cat-card:hover,
html[data-theme="light"] body.site-body .tool-card:hover{background:#fff!important;border-color:#cfc2ff!important}
html[data-theme="light"] body.site-body .cat-card b,
html[data-theme="light"] body.site-body .tool-card h4,
html[data-theme="light"] body.site-body .blog-body h5{color:#17233a!important}
html[data-theme="light"] body.site-body .cat-card small,
html[data-theme="light"] body.site-body .tool-card p,
html[data-theme="light"] body.site-body .tool-meta{color:#718096!important}
html[data-theme="light"] body.site-body .tool-meta a{color:#6844ee!important;background:#f0ecff!important;border-color:#ddd3ff!important}
html[data-theme="light"] body.site-body .cta-card{background:linear-gradient(135deg,#f0eaff,#eafaff)!important;border-color:#ded7f7!important}
html[data-theme="light"] body.site-body .cta-card h3{color:#17233a!important}
html[data-theme="light"] body.site-body .cta-card p{color:#718096!important}
html[data-theme="light"] body.site-body .site-footer{background:#fff!important;border-top-color:#e1e7f0!important}
html[data-theme="light"] body.site-body .footer-grid h6{color:#17233a!important}
html[data-theme="light"] body.site-body .footer-grid>div>a:not(.footer-logo){color:#718096!important}
html[data-theme="light"] body.site-body .footer-grid>div>a:hover{color:#6844ee!important}
html[data-theme="light"] body.site-body .socials a{background:#f0f2f7!important;color:#64728a!important}
html[data-theme="light"] body.site-body .newsletter .news-form{background:#f7f8fb!important;border-color:#dfe5ee!important}
html[data-theme="light"] body.site-body .newsletter input{color:#17233a!important}
html[data-theme="light"] body.site-body .site-global-native-rail{color:#718096!important}

/* User shell dark mode. Default remains the existing dashboard light theme. */
html[data-theme="dark"] .user-app{background:#070d1b!important;color:#e7edf8!important}
html[data-theme="dark"] .user-page-area{background:linear-gradient(135deg,#0b1222,#0f172a)!important;color:#e7edf8!important}
html[data-theme="dark"] .user-page-topbar{background:rgba(10,18,34,.96)!important;border-bottom-color:#1e2a40!important;box-shadow:0 8px 25px rgba(0,0,0,.25)!important}
html[data-theme="dark"] .user-top-search input,
html[data-theme="dark"] .user-theme-toggle,
html[data-theme="dark"] .user-top-notify,
html[data-theme="dark"] .user-top-stat,
html[data-theme="dark"] .user-profile-chip,
html[data-theme="dark"] .user-mobile-menu{background:#111b30!important;border-color:#263550!important;color:#dbe5f5!important}
html[data-theme="dark"] .user-top-search input{color:#e7edf8!important}
html[data-theme="dark"] .user-top-search input::placeholder{color:#71809a!important}
html[data-theme="dark"] .user-top-stat b,
html[data-theme="dark"] .user-profile-chip b{color:#eef4ff!important}
html[data-theme="dark"] .user-top-stat small,
html[data-theme="dark"] .user-profile-chip small{color:#91a0b8!important}
html[data-theme="dark"] .user-page-area h1,
html[data-theme="dark"] .user-page-area h2,
html[data-theme="dark"] .user-page-area h3,
html[data-theme="dark"] .user-page-area h4{color:#eef4ff!important}
html[data-theme="dark"] .user-page-area .panel{background:linear-gradient(145deg,#111b30,#0d1628)!important;border-color:#263550!important;color:#e7edf8!important;box-shadow:0 15px 38px rgba(0,0,0,.25)!important}
html[data-theme="dark"] .user-page-area .panel h1,
html[data-theme="dark"] .user-page-area .panel h2,
html[data-theme="dark"] .user-page-area .panel h3,
html[data-theme="dark"] .user-page-area .panel h4{color:#eef4ff!important}
html[data-theme="dark"] .user-page-area .form-label{color:#cbd6e8!important}
html[data-theme="dark"] .user-page-area .form-control,
html[data-theme="dark"] .user-page-area .form-select{background:#0b1426!important;color:#e7edf8!important;border-color:#263550!important}
html[data-theme="dark"] .user-page-area .table-responsive{background:#0b1426!important;border-color:#263550!important}
html[data-theme="dark"] .user-page-area .table{--bs-table-color:#dbe5f5;--bs-table-border-color:#263550}
html[data-theme="dark"] .user-page-area .table th{color:#91a0b8!important}
html[data-theme="dark"] .user-page-area .alert{background:#111d33!important;border-color:#263550!important;color:#dbe5f5!important}

/* Public page light-mode utility/header areas used by All Tools. */
html[data-theme="light"] .global-breadcrumb-wrap{background:#fff!important;border-color:#e5e9f1!important}
html[data-theme="light"] .global-breadcrumb{color:#718096!important}
html[data-theme="light"] .global-breadcrumb a{color:#718096!important}

/* Prevent an old page-level light-preview rule from making the switch appear dead. */
body.light-preview{background:#f6f7fb!important;color:#17233a!important}
