*{box-sizing:border-box}

:root{
  --brand-light:#FFF3E0;
  --bg:#f4f6ff;
  --surface:#ffffff;
  --surface-soft:#f8fbff;
  --text:#111827;
  --muted:#667085;
  --line:#e5e7eb;
  --line-soft:#e9eefc;
  --shadow-sm:0 2px 10px rgba(0,0,0,.08);
  --shadow-md:0 10px 30px rgba(0,0,0,.12);
  --shadow-lg:0 24px 60px rgba(15,23,42,.22);
  --radius-md:14px;
  --radius-lg:18px;
  --radius-xl:22px;
}

html,body{
  margin:0;
  padding:0;
  max-width:100%;
  overflow-x:hidden;
}

html{-webkit-text-size-adjust:100%}

body{
  font-family:system-ui,-apple-system,Segoe UI,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{
  text-decoration:none;
  color:inherit;
}

button{font-family:inherit}
img{max-width:100%}

/* =========================
   GLOBAL SVG ICON SYSTEM
========================= */

.svg-icon,
.site-svg,
.bn-svg,
.home-svg,
.push-svg,
.al-svg,
.inq-svg{
  display:inline-block;
  vertical-align:middle;
  width:20px;
  height:20px;
  min-width:20px;
  min-height:20px;
  stroke:currentColor;
  fill:none;
  flex:0 0 auto;
  pointer-events:none;
  opacity:1;
  shape-rendering:geometricPrecision;
  transform-origin:center;
  transition:transform .16s ease, opacity .16s ease, color .16s ease, filter .16s ease;
}

.icon-inline{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  flex:0 0 auto;
}

.icon-inline .svg-icon,
.icon-inline .site-svg,
.icon-inline .bn-svg,
.icon-inline .home-svg,
.icon-inline .push-svg,
.icon-inline .al-svg,
.icon-inline .inq-svg{
  width:1em;
  height:1em;
  min-width:1em;
  min-height:1em;
}

.icon-text{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.icon-text .svg-icon{
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
}

/* =========================
   SVG SIZE HELPERS
========================= */

.svg-12{width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important}
.svg-14{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important}
.svg-15{width:15px!important;height:15px!important;min-width:15px!important;min-height:15px!important}
.svg-16{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important}
.svg-18{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important}
.svg-20{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important}
.svg-22{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important}
.svg-24{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important}
.svg-28{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important}
.svg-32{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important}
.svg-36{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}

/* =========================
   INTERACTION
========================= */

a:hover .svg-icon,
button:hover .svg-icon,
label:hover .svg-icon,
.btn:hover .svg-icon,
.photo-btn:hover .svg-icon,
.share-btn:hover .svg-icon,
.preview-action:hover .svg-icon,
.social-box a:hover .svg-icon,
.logout-link:hover .svg-icon,
.drawer-btn:hover .svg-icon,
.menu-btn:hover .svg-icon,
.bell-btn:hover .svg-icon{
  transform:scale(1.05);
}

a:active .svg-icon,
button:active .svg-icon,
label:active .svg-icon,
.btn:active .svg-icon,
.drawer-btn:active .svg-icon{
  transform:scale(.97);
}

.icon-spin{
  animation:iconSpin .9s linear infinite;
}

@keyframes iconSpin{
  100%{transform:rotate(360deg)}
}

/* =========================
   PROFESSIONAL COLOR HELPERS
========================= */

.icon-brand{color:var(--brand)!important}
.icon-brand-dark{color:var(--brand-dark)!important}
.icon-brand-soft{color:#5b8fd1!important}
.icon-white{color:#fff!important}
.icon-muted{color:var(--muted)!important}
.icon-soft{opacity:.82!important}

.icon-success{color:#15803d!important}
.icon-danger{color:#dc2626!important}
.icon-warning{color:#d97706!important}
.icon-info{color:#2563eb!important}

/* semantic icon colors */
.icon-home{color:var(--brand)}
.icon-building{color:#6d4c41}
.icon-briefcase{color:#7c3aed}
.icon-users{color:#0f766e}
.icon-package{color:#ea580c}
.icon-truck{color:#2e7d32}

.icon-phone{color:var(--brand)}
.icon-mail{color:#2563eb}
.icon-globe{color:#475569}
.icon-map-pin{color:#d84315}
.icon-share{color:#6d28d9}
.icon-link{color:#475569}

.icon-whatsapp{color:#16a34a}
.icon-facebook{color:#1877F2}
.icon-instagram{color:#E1306C}
.icon-youtube{color:#FF0000}

.icon-check{color:#15803d}
.icon-badge-check{color:#1d9bf0}
.icon-alert-circle{color:#dc2626}
.icon-help-circle{color:#d97706}
.icon-wifi-off{color:#64748b}

.icon-user{color:var(--brand)}
.icon-edit{color:#ea580c}
.icon-address-card{color:#0f9d58}
.icon-log-in{color:var(--brand)}
.icon-log-out{color:#c62828}
.icon-search{color:var(--brand)}
.icon-bell{color:var(--brand)}
.icon-menu{color:currentColor}
.icon-close{color:currentColor}
.icon-eye{color:var(--brand)}
.icon-eye-off{color:var(--brand)}
.icon-list{color:var(--brand)}
.icon-message-circle{color:var(--brand)}
.icon-grid{color:var(--brand)}
.icon-star{color:#f59e0b}
.icon-file-plus{color:var(--brand)}
.icon-plus-square{color:var(--brand)}
.icon-settings{color:var(--brand)}
.icon-lock{color:var(--brand)}
.icon-circle-check{color:#16a34a}
.icon-rocket{color:var(--brand)}
.icon-loader{color:currentColor}

/* =========================
   ICON BACKGROUND HELPERS
========================= */

.icon-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:var(--brand-light);
  color:var(--brand);
}

.icon-box{
  width:42px;
  height:42px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--brand-light);
  color:var(--brand);
  flex:0 0 auto;
}

.icon-box .svg-icon{
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
}

/* =========================
   ICON BUTTON HELPERS
========================= */

.icon-btn{
  width:42px;
  height:42px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  flex:0 0 auto;
}

.icon-btn .svg-icon{
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
}

.icon-btn-sm{
  width:34px;
  height:34px;
}

.icon-btn-sm .svg-icon{
  width:16px;
  height:16px;
  min-width:16px;
  min-height:16px;
}

.icon-btn-lg{
  width:48px;
  height:48px;
}

.icon-btn-lg .svg-icon{
  width:20px;
  height:20px;
  min-width:20px;
  min-height:20px;
}

/* inline usage */
label .svg-icon,
.section-title .svg-icon,
.badge .svg-icon,
.preview-line .svg-icon,
.meta .svg-icon,
.notice .svg-icon,
.status-badge .svg-icon,
.alert-line .svg-icon,
.page-title-row .svg-icon,
.processing-row .svg-icon{
  flex:0 0 auto;
}

/* =========================
   HEADER
========================= */

.topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:var(--brand);
  color:#fff;
  box-shadow:var(--shadow-sm);
}

.topbar-main{
  min-height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 12px;
  overflow:hidden;
}

.brand{
  display:flex;
  align-items:center;
  min-width:0;
  flex:1 1 auto;
}

.brand-link{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  width:100%;
  overflow:hidden;
  color:#fff;
  font-weight:800;
}

.brand-logo{
  width:42px;
  height:42px;
  min-width:42px;
  max-width:42px;
  flex:0 0 42px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #fff;
  box-shadow:0 2px 8px rgba(0,0,0,.14);
}

.brand span,
.brand-link span{
  display:block;
  min-width:0;
  flex:1 1 auto;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.15;
  font-size:16px;
  font-weight:800;
}

.topbar-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
  flex-shrink:0;
}

.header-login-link{
  color:#fff;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}

.header-profile{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.header-profile img{
  width:34px;
  height:34px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #fff;
  display:block;
}

.menu-btn,
.bell-btn{
  width:36px;
  height:36px;
  min-width:36px;
  flex:0 0 36px;
  padding:0;
  border:0;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:none;
  color:#fff;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.bell-btn{
  position:relative;
  background:rgba(255,255,255,.10);
}

.menu-btn .svg-icon,
.bell-btn .svg-icon,
.menu-btn .site-svg,
.bell-btn .site-svg{
  width:19px;
  height:19px;
  min-width:19px;
  min-height:19px;
}

.bell-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  opacity:.9;
  transition:transform .2s ease,color .2s ease,opacity .2s ease;
}

.bell-icon .svg-icon,
.bell-icon .site-svg{
  width:19px;
  height:19px;
  min-width:19px;
  min-height:19px;
}

.bell-icon.active{
  color:#22c55e;
  opacity:1;
  transform:scale(1.06);
}

.bell-btn.active{
  background:rgba(25,193,95,.18);
  box-shadow:0 0 0 2px rgba(25,193,95,.22) inset;
}

.bell-status{
  position:absolute;
  top:5px;
  right:5px;
  width:11px;
  height:11px;
  border-radius:50%;
  border:2px solid var(--brand);
  box-shadow:0 0 0 1px rgba(255,255,255,.15);
}

.bell-on{background:#19c15f}
.bell-off{background:#e53935}
.bell-default{background:#f59e0b}

/* =========================
   DRAWER
========================= */

body.drawer-open{overflow:hidden}

.drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease, visibility .25s ease;
  z-index:1999;
}

.drawer-overlay.show{
  opacity:1;
  visibility:visible;
}

.drawer{
  position:fixed;
  top:0;
  right:0;
  width:78%;
  max-width:360px;
  height:100dvh;
  background:var(--surface);
  z-index:2000;
  border-radius:18px 0 0 18px;
  box-shadow:-10px 0 30px rgba(0,0,0,.12);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  transform:translateX(100%);
  transition:transform .25s ease;
}

.drawer.show{transform:translateX(0)}

.drawer-head{
  flex:0 0 auto;
  padding:calc(14px + env(safe-area-inset-top)) 16px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--bg);
  font-weight:800;
  font-size:22px;
  position:sticky;
  top:0;
  z-index:2;
  border-bottom:1px solid var(--line-soft);
}

.drawer-head button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #ddd;
  background:#fff;
  border-radius:10px;
  width:38px;
  height:38px;
  cursor:pointer;
  color:#111827;
}

.drawer-head button .svg-icon,
.drawer-head button .site-svg{
  width:20px;
  height:20px;
  min-width:20px;
  min-height:20px;
}

.drawer-body{
  flex:1 1 auto;
  min-height:0;
  padding:14px 14px calc(110px + env(safe-area-inset-bottom));
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
}

.drawer-btn{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:12px 14px;
  margin-bottom:10px;
  border:1px solid #e0e6ff;
  border-radius:14px;
  background:#fff;
  font-weight:700;
  font-size:15px;
  line-height:1.35;
  color:#111827;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}

.drawer-btn:hover{
  background:var(--surface-soft);
  border-color:#cdd9f7;
}

.drawer-btn:active{
  transform:scale(.99);
}

.drawer-btn:last-child{margin-bottom:20px}

.drawer-btn .svg-icon,
.drawer-btn .site-svg{
  width:20px;
  height:20px;
  min-width:20px;
  min-height:20px;
  color:var(--brand);
  opacity:.95;
  flex:0 0 auto;
}

/* =========================
   LAYOUT
========================= */

.container{
  max-width:1100px;
  margin:auto;
  padding:12px;
}

/* =========================
   PUSH POPUP WRAPPER
========================= */

#pushPopup{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  overflow:auto;
}

#pushPopup.active{display:flex}

.drawer[hidden],
.drawer-overlay[hidden],
#pushPopup[hidden]{
  display:none !important;
}

.push-modal{
  width:100%;
  max-width:420px;
  max-height:90dvh;
  overflow-y:auto;
  background:#fff;
  border-radius:18px;
  padding:20px;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  text-align:left;
  color:#111;
}

#categoryCheckboxWrap{
  display:grid;
  gap:12px;
}

.push-cat-row{
  display:grid;
  grid-template-columns:26px 1fr;
  align-items:center;
  gap:12px;
  color:#111;
  font-size:16px;
  font-weight:700;
  line-height:1.35;
}

.push-cat-row input[type="checkbox"]{
  width:20px;
  height:20px;
  margin:0;
  accent-color:var(--brand);
  cursor:pointer;
}

.push-cat-text{
  display:flex;
  align-items:center;
  gap:10px;
  color:#111;
  word-break:break-word;
}

#pushDeniedMsg,
#pushStatusMsg{
  display:none;
  margin:12px 0 0;
  font-size:14px;
  text-align:center;
  line-height:1.5;
}

#pushDeniedMsg{color:#c62828}
#pushStatusMsg{color:#177a35}

.push-progress-wrap{margin-top:14px}

.push-progress-text{
  font-size:14px;
  color:var(--brand);
  margin-bottom:8px;
  text-align:left;
}

.push-progress-bar{
  width:100%;
  height:10px;
  background:#e8eefc;
  border-radius:999px;
  overflow:hidden;
  position:relative;
}

.push-progress-fill{
  position:absolute;
  top:0;
  left:0;
  width:35%;
  height:100%;
  background:var(--brand);
  border-radius:999px;
  animation:pushLoadingBar 1.1s linear infinite;
}

@keyframes pushLoadingBar{
  0%{left:-35%}
  100%{left:100%}
}

/* =========================
   GLOBAL FORM LOADER
========================= */

.global-form-loader{
  position:fixed;
  inset:0;
  width:100vw;
  height:100dvh;
  min-height:100vh;
  background:rgba(255,255,255,.88);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:100000;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, visibility .18s ease;
}

.global-form-loader.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.loader-box{
  background:#fff;
  padding:22px 26px;
  border-radius:18px;
  box-shadow:var(--shadow-md);
  text-align:center;
  min-width:180px;
  max-width:min(92vw, 300px);
}

.loader-spinner{
  width:46px;
  height:46px;
  border:4px solid #e5e7eb;
  border-top:4px solid var(--brand);
  border-radius:50%;
  margin:0 auto 12px;
  animation:spin .8s linear infinite;
}

.loader-text{
  font-size:15px;
  font-weight:600;
  color:#222;
  line-height:1.4;
}

body.form-loading{overflow:hidden}

@keyframes spin{
  100%{transform:rotate(360deg)}
}

/* =========================
   INPUT ERROR
========================= */

.field-error{
  min-height:18px;
  margin-top:4px;
  margin-bottom:6px;
  font-size:13px;
  color:#dc2626;
  font-weight:700;
}

.input-error{
  border-color:#dc2626 !important;
  background:#fff6f6;
}

.input-error:focus{
  border-color:#dc2626;
  box-shadow:0 0 0 3px rgba(220,38,38,.12);
}

/* =========================
   STARTUP LOADER
========================= */

.app-startup-loader{
  position:fixed;
  inset:0;
  width:100vw;
  height:100dvh;
  min-height:100vh;
  background:rgba(244,246,255,.82);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:999999;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .28s ease, visibility .28s ease;
}

.app-startup-loader.hide{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.app-startup-inner{
  position:relative;
  width:min(92vw, 240px);
  height:255px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  margin:0 auto;
}

.app-startup-ring{
  position:absolute;
  top:8px;
  left:50%;
  transform:translateX(-50%);
  width:188px;
  height:188px;
  border-radius:50%;
  border:4px solid rgba(21,101,192,.14);
  border-top-color:var(--brand);
  border-right-color:rgba(21,101,192,.35);
  animation:rrAppSpin 1.05s linear infinite;
  box-shadow:0 0 0 6px rgba(21,101,192,.03);
}

.app-startup-logo{
  position:absolute;
  top:62px;
  left:50%;
  transform:translateX(-50%);
  width:76px;
  height:76px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.app-startup-logo img{
  width:76px;
  height:76px;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 6px 14px rgba(21,101,192,.12));
}

.app-startup-text{
  position:absolute;
  bottom:34px;
  left:50%;
  transform:translateX(-50%);
  width:min(92vw, 230px);
  font-size:15px;
  line-height:1.35;
  font-weight:800;
  color:var(--brand);
  letter-spacing:.2px;
  margin:0;
}

.app-startup-subtext{
  position:absolute;
  bottom:8px;
  left:50%;
  transform:translateX(-50%);
  width:min(92vw, 230px);
  font-size:12px;
  line-height:1.4;
  font-weight:600;
  color:#5f6b7a;
  opacity:.9;
  margin:0;
}

@keyframes rrAppSpin{
  0%{transform:translateX(-50%) rotate(0deg)}
  100%{transform:translateX(-50%) rotate(360deg)}
}

/* =========================
   MOBILE
========================= */

@media (max-width:480px){
  .drawer{width:84%}

  .push-modal{
    padding:18px 16px;
    border-radius:16px;
  }

  .global-form-loader{padding:12px}

  .loader-box{
    min-width:unset;
    width:min(92vw, 280px);
    padding:18px 16px;
    border-radius:16px;
  }

  .loader-spinner{
    width:42px;
    height:42px;
  }

  .loader-text{font-size:14px}

  .app-startup-loader{padding:12px}

  .app-startup-inner{
    width:min(94vw, 220px);
    height:240px;
  }

  .app-startup-ring{
    top:10px;
    width:168px;
    height:168px;
    border-width:4px;
  }

  .app-startup-logo{
    top:60px;
    width:68px;
    height:68px;
  }

  .app-startup-logo img{
    width:68px;
    height:68px;
  }

  .app-startup-text{
    bottom:34px;
    width:min(92vw, 210px);
    font-size:14px;
  }

  .app-startup-subtext{
    bottom:10px;
    width:min(92vw, 210px);
    font-size:12px;
  }

  .svg-icon,
  .site-svg,
  .bn-svg,
  .home-svg,
  .push-svg,
  .al-svg,
  .inq-svg{
    width:18px;
    height:18px;
    min-width:18px;
    min-height:18px;
  }

  .icon-text{gap:6px}

  .icon-btn{
    width:40px;
    height:40px;
  }

  .icon-btn .svg-icon{
    width:17px;
    height:17px;
    min-width:17px;
    min-height:17px;
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce){
  .svg-icon,
  .site-svg,
  .bn-svg,
  .home-svg,
  .push-svg,
  .al-svg,
  .inq-svg{
    transition:none !important;
    animation:none !important;
  }
}
/* FORCE SAME HEADER COLOR ON ALL PAGES */
body[data-header-light-mode="0"] .topbar,
body[data-header-light-mode="1"] .topbar,
.topbar{
    background:linear-gradient(135deg,var(--brand),var(--brand-dark)) !important;
}

.topbar .brand-link,
.topbar .brand-link span,
.topbar .menu-btn,
.topbar .bell-btn,
.topbar .svg-icon,
.topbar .header-login-link{
  color:#fff !important;
  stroke:#fff !important;
}

.bell-status{
  border-color:#C62828 !important;
}

/* keep search box white */
.topbar .search-box,
.topbar .search-bar,
.topbar .header-search{
  background:#fff !important;
  color:#111827 !important;
}