/* HAMSOOG UI V3.5 — unified organizational slate theme, visual-only. */
:root{
  --h3-page:#f3f6f9;--h3-surface:#ffffff;--h3-line:#dce4eb;--h3-text:#27303b;--h3-muted:#778190;
  --h3-accent:#5b6675;--h3-accent-2:#8691a1;--h3-accent-soft:#e8edf3;
  --h3-success:#4f8a70;--h3-warning:#b27d34;--h3-danger:#bd6262;
  --h3-sidebar:#263241;--h3-sidebar-2:#354354;--h3-radius:17px;--h3-shadow:0 7px 24px rgba(39,48,59,.07)
}
body.admin-page,
body.admin-page.role-admin,
body.admin-page.role-seller,
body.admin-page.role-accountant{
  --h3-accent:#5b6675!important;--h3-accent-2:#8691a1!important;--h3-accent-soft:#e8edf3!important;
  --brand:#5b6675!important;--brand2:#8691a1!important;--brand3:#e8edf3!important;
  --bg:#f3f6f9!important;--theme-bg-soft:#f8fafc!important;--theme-bg-glow:#e7edf4!important;
  --card:#ffffff!important;--card2:#f3f6f9!important;--text:#27303b!important;--muted:#778190!important;--line:#dce4eb!important;
  background:linear-gradient(180deg,#f6f8fb 0%,#eef2f6 100%)!important;color:var(--h3-text);
  font-family:Tahoma,"Vazirmatn","IRANSans",Arial,sans-serif;line-height:1.75
}

/* Header */
.admin-page .topbar{min-height:66px;padding:9px 18px;background:rgba(255,255,255,.97);border-bottom:1px solid var(--h3-line);box-shadow:0 2px 14px rgba(39,48,59,.045);backdrop-filter:blur(14px)}
.admin-page .brand-mini{display:inline-flex;align-items:center;color:var(--h3-text);font-size:12px;gap:8px;min-width:0}
.admin-page .brand-mini img{width:39px;height:39px;border-radius:12px;background:transparent!important;padding:0!important;border:0!important;box-shadow:none!important;object-fit:contain}
.admin-page .menu-toggle,.admin-page .theme-toggle{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--h3-line);background:#fff;color:#354354;border-radius:12px;box-shadow:none;font-size:19px;line-height:1;cursor:pointer}
.admin-page .menu-toggle{font-size:0}.admin-page .menu-toggle:before{content:"";width:19px;height:14px;background:linear-gradient(currentColor,currentColor) 0 0/19px 2px no-repeat,linear-gradient(currentColor,currentColor) 0 6px/19px 2px no-repeat,linear-gradient(currentColor,currentColor) 0 12px/19px 2px no-repeat}
.admin-page .theme-picker-btn{display:none!important}
.admin-page .pill{display:inline-flex;align-items:center;height:40px;padding:0 12px;background:var(--h3-accent-soft);color:var(--h3-accent);border:1px solid #d7dee7;font-weight:800;font-size:10.8px;line-height:1.2;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-page .nav-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}.admin-page .nav-actions .btn.ghost{display:inline-flex;align-items:center;justify-content:center;height:40px;background:#f5f7fa;color:#4d5b6d;border:1px solid var(--h3-line);min-width:56px;white-space:nowrap}
.admin-page .nav-actions a[href*="logout.php"]{font-size:12px;font-weight:800}

/* Shell */
@media(min-width:861px){.admin-page .admin-shell{grid-template-columns:252px minmax(0,1fr)!important;gap:22px!important;padding:22px 26px!important;max-width:1600px!important}.admin-page .side-menu{height:calc(100vh - 92px);top:80px}}
.admin-page .side-menu{background:linear-gradient(180deg,var(--h3-sidebar),var(--h3-sidebar-2));border:0;border-radius:19px;padding:14px 12px;box-shadow:0 14px 36px rgba(25,33,43,.17)}
.admin-page .menu-head{padding:8px 8px 15px;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:9px;color:#fff}.admin-page .menu-head img{width:43px;height:43px;border-radius:12px;background:transparent!important;padding:0!important;box-shadow:none!important;object-fit:contain}.admin-page .menu-head strong{font-size:13px}.admin-page .menu-head small{color:#c2ccd6;font-size:10px}
.admin-page .side-menu a{min-height:39px;margin:2px 0;padding:7px 9px;border-radius:11px;color:#d0d8e0;font-size:11.1px;font-weight:700;transition:.15s ease}.admin-page .side-menu a:hover{background:rgba(255,255,255,.08);color:#fff}.admin-page .side-menu a.active{background:linear-gradient(135deg,#5b6675,#748091);color:#fff;box-shadow:0 7px 18px rgba(39,48,59,.28)}
.admin-page .side-menu a span{display:grid;place-items:center;width:27px;height:27px;flex:0 0 27px;color:inherit}.admin-page .side-menu svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
.admin-page .drawer-backdrop{z-index:45}.admin-page .side-menu{z-index:50}

/* Content */
.admin-page .content{padding-top:2px}.admin-page .page-title{margin-bottom:16px;align-items:center}.admin-page .page-title h1{font-size:22px;color:var(--h3-text);letter-spacing:-.5px}.admin-page .page-title h1:before{content:"";display:inline-block;width:6px;height:24px;border-radius:8px;background:var(--h3-accent);vertical-align:-6px;margin-left:9px}.admin-page .page-title p,.admin-page .muted{color:var(--h3-muted)}
.admin-page .card,.admin-page .stat,.admin-page .lead-card{background:#fff;border:1px solid var(--h3-line);border-radius:var(--h3-radius);box-shadow:var(--h3-shadow)}.admin-page .card{padding:16px;margin-bottom:14px}.admin-page .soft{background:linear-gradient(135deg,#fff,#f7f9fb)}
.admin-page .stats{gap:10px;margin-bottom:10px}.admin-page .stats.compact{gap:9px}.admin-page .stat{position:relative;min-height:106px;padding:14px 15px;overflow:hidden;transition:transform .15s ease,box-shadow .15s ease}.admin-page .stat:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(39,48,59,.10)}
.admin-page .stat strong{display:block;font-size:22px;color:#27303b;line-height:1.4;font-weight:900;white-space:normal;overflow-wrap:anywhere}.admin-page .stat span{display:block;font-size:11px;color:var(--h3-muted);font-weight:700}.admin-page .stat small{font-size:9.5px}
.admin-page .ui-stat-icon{display:grid;place-items:center;width:37px;height:37px;margin-bottom:8px;border-radius:11px;background:var(--h3-accent-soft);color:var(--h3-accent)}.admin-page .ui-stat-icon svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.admin-page input,.admin-page select,.admin-page textarea{border-color:var(--h3-line);border-radius:11px;background:#fbfcfe;padding:10px 11px;color:var(--h3-text);transition:.15s}.admin-page input:focus,.admin-page select:focus,.admin-page textarea:focus{background:#fff;border-color:var(--h3-accent);box-shadow:0 0 0 3px rgba(91,102,117,.10)}
.admin-page .btn{min-height:37px;border-radius:10px;padding:8px 13px;font-weight:800;box-shadow:none}.admin-page .btn.primary{background:var(--h3-accent);color:#fff}.admin-page .btn.secondary{background:var(--h3-accent-soft);color:var(--h3-accent)}.admin-page .btn.ghost{background:#f3f6fa;color:#526071}.admin-page .btn.call{background:#eaf3ef;color:#46705e}.admin-page .btn.danger{background:#fff0f2;color:var(--h3-danger)}
.admin-page .notice{border-radius:12px;border:1px solid transparent}.admin-page .notice.info{background:#eef2f6;border-color:#dde4ec}.admin-page .notice.success{background:#eaf4ef;border-color:#d4e8dd}.admin-page .notice.warn{background:#fff7e8;border-color:#f5e3bd}.admin-page .notice.danger,.admin-page .notice.error{background:#fff0f2;border-color:#f5d9de}
.admin-page .table-wrap{border:1px solid var(--h3-line);border-radius:15px;background:#fff;box-shadow:none}.admin-page table{font-size:11px}.admin-page th{background:#f5f7fa;color:#526071;border-bottom:1px solid var(--h3-line);font-weight:900}.admin-page td{border-bottom:1px solid #edf1f5}.admin-page tbody tr:hover td{background:#fbfcfd}.admin-page .lead-card{padding:15px}.admin-page .lead-grid span,.admin-page .lead-desc,.admin-page details.lead-edit,.admin-page details.mini{background:#f7f9fb;border-color:var(--h3-line)}

/* Unified landing card: logo directly on page background, no pasted white panel */
.admin-page .home-content{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:calc(100dvh - 120px)}
.admin-page .home-card{background:transparent!important;border:0!important;box-shadow:none!important;padding:24px 18px!important;width:100%;max-width:520px;text-align:center}
.admin-page .home-card img{width:170px!important;height:170px!important;max-width:42vw;max-height:42vw;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;object-fit:contain}
.admin-page .home-card h1{font-size:38px;color:var(--h3-accent)!important;margin-top:16px}
.admin-page .home-card p{color:var(--h3-muted)!important;font-size:14px}
.admin-page .panel-footer{color:#8b949f}

@media(max-width:860px){
  .admin-page .topbar{min-height:62px;padding:8px 9px}.admin-page .brand-mini img{width:36px;height:36px}.admin-page .brand-mini span{display:none}.admin-page .nav-actions{gap:4px}.admin-page .pill{max-width:142px;height:38px;padding:0 8px;font-size:8.5px}.admin-page .nav-actions .btn.ghost{display:inline-flex!important;min-width:49px;height:38px;padding:0 8px;font-size:10.5px}
  .admin-page .admin-shell{padding:12px!important}.admin-page .side-menu{position:fixed!important;top:0!important;right:-306px!important;width:292px!important;height:100dvh!important;border-radius:0!important;padding:16px 11px!important;transition:right .22s ease!important;overflow-y:auto!important}.admin-page.menu-open .side-menu,.menu-open .admin-page .side-menu,body.menu-open .side-menu{right:0!important}.admin-page .drawer-backdrop{display:block!important;opacity:0;pointer-events:none;position:fixed;inset:0;background:rgba(25,33,43,.42);transition:opacity .2s}.admin-page.menu-open .drawer-backdrop,body.menu-open .drawer-backdrop{opacity:1;pointer-events:auto}
  .admin-page .page-title{display:flex;align-items:flex-start;margin:7px 0 13px}.admin-page .page-title h1{font-size:19px}.admin-page .page-title p{font-size:10.5px}.admin-page .page-title .btn{flex:0 0 auto}
  .admin-page .stats,.admin-page .stats.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:8px}.admin-page .stats.ui-count-3>:last-child{grid-column:1/-1}.admin-page .stat{min-height:112px;padding:12px}.admin-page .stat strong{font-size:clamp(17px,5.1vw,21px);line-height:1.35}.admin-page .stat span{font-size:10.2px}.admin-page .ui-stat-icon{width:36px;height:36px;margin-bottom:7px}
  .admin-page .card{border-radius:15px;padding:13px;margin-bottom:11px}.admin-page .table-wrap{border-radius:13px}.admin-page .btn{min-height:39px}.admin-page .lead-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.admin-page .lead-actions>*{width:100%;min-width:0}.admin-page .lead-actions .btn{width:100%;white-space:normal}.admin-page .home-content{min-height:calc(100dvh - 112px);padding:20px 0}.admin-page .home-card{max-width:380px}.admin-page .home-card img{width:150px!important;height:150px!important}.admin-page .home-card h1{font-size:36px}
}
@media(max-width:430px){.admin-page .pill{max-width:132px;font-size:8.2px}.admin-page .stat{min-height:108px}.admin-page .page-title h1{font-size:18px}.admin-page .stats.ui-count-3>:last-child{min-height:98px}.admin-page .stat strong{font-size:18px}.admin-page .home-card img{width:145px!important;height:145px!important}}
@media(max-width:360px){.admin-page .pill{max-width:112px;font-size:7.7px}.admin-page .nav-actions .btn.ghost{min-width:45px;font-size:10px}.admin-page .stat strong{font-size:16px}.admin-page .stat span{font-size:9.6px}}

.admin-page.dark-mode{--h3-page:#151a20;--h3-surface:#1e252d;--h3-line:#35404b;--h3-text:#eef2f5;--h3-muted:#a4afb9;background:#151a20!important}.admin-page.dark-mode .topbar,.admin-page.dark-mode .card,.admin-page.dark-mode .stat,.admin-page.dark-mode .lead-card,.admin-page.dark-mode .table-wrap{background:#1e252d;border-color:#35404b;color:#eef2f5}.admin-page.dark-mode .page-title h1,.admin-page.dark-mode .stat strong{color:#eef2f5}.admin-page.dark-mode th{background:#26303a;color:#cbd3da}.admin-page.dark-mode td{border-color:#313c46}.admin-page.dark-mode input,.admin-page.dark-mode select,.admin-page.dark-mode textarea{background:#181f26;color:#eef2f5;border-color:#35404b}

/* HAMSOOG UI V3.6 FINAL OVERRIDES — unified accountant blue + seamless landing */
:root,
body,
body.admin-page,
body.admin-page.role-admin,
body.admin-page.role-seller,
body.admin-page.role-accountant{
  --h3-accent:#356ea8!important;
  --h3-accent-2:#6f98c1!important;
  --h3-accent-soft:#eaf2fb!important;
  --brand:#356ea8!important;
  --brand2:#6f98c1!important;
  --brand3:#dce9f6!important;
  --h3-page:#eef3f8!important;
  --bg:#eef3f8!important;
  --theme-bg-soft:#f5f8fb!important;
  --theme-bg-glow:#dce8f4!important;
  --text:#243649!important;
  --muted:#718197!important;
  --line:#d8e2ed!important;
}
body.admin-page,
body.admin-page.role-admin,
body.admin-page.role-seller,
body.admin-page.role-accountant{
  background:linear-gradient(180deg,#f3f7fb 0%,#eaf0f6 100%)!important;
}

/* One unified blue identity for all three roles */
body .pill,
body.admin-page .pill{
  background:#eaf2fb!important;
  color:#356ea8!important;
  border-color:#d4e3f2!important;
}
body .side-menu a.active,
body.admin-page .side-menu a.active{
  background:linear-gradient(135deg,#356ea8,#5f8cba)!important;
  box-shadow:0 7px 18px rgba(53,110,168,.26)!important;
}
body .page-title h1:before,
body.admin-page .page-title h1:before{background:#356ea8!important}
body .ui-stat-icon,
body.admin-page .ui-stat-icon{background:#eaf2fb!important;color:#356ea8!important}
body .btn.primary,
body.admin-page .btn.primary{background:#356ea8!important}

/* Landing page: absolutely no white pasted card */
body .home-content,
body.admin-page .home-content{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:calc(100dvh - 112px)!important;
  padding:18px 12px!important;
  background:transparent!important;
}
body .home-card,
body.admin-page .home-card,
body .home-shell .home-card,
body.admin-page .home-shell .home-card{
  width:100%!important;
  max-width:560px!important;
  margin:0 auto!important;
  padding:28px 16px!important;
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  text-align:center!important;
}
body .home-card::before,
body .home-card::after,
body.admin-page .home-card::before,
body.admin-page .home-card::after{display:none!important;content:none!important}
body .home-card img,
body.admin-page .home-card img,
body .home-shell .home-card img{
  display:block!important;
  width:205px!important;
  height:205px!important;
  max-width:54vw!important;
  max-height:54vw!important;
  margin:0 auto 14px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  object-fit:contain!important;
}
body .home-card h1,
body.admin-page .home-card h1,
body .home-shell .home-card h1{
  margin:4px 0 8px!important;
  color:#356ea8!important;
  font-size:40px!important;
  line-height:1.35!important;
  text-shadow:none!important;
}
body .home-card p,
body.admin-page .home-card p,
body .home-shell .home-card p{
  color:#718197!important;
  font-size:15px!important;
  margin:0!important;
}
body .panel-footer,
body.admin-page .panel-footer{color:#8391a0!important;background:transparent!important}

/* Header logo stays clean and transparent */
body .brand-mini img,
body.admin-page .brand-mini img,
body .menu-head img,
body.admin-page .menu-head img{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  object-fit:contain!important;
}

@media(max-width:860px){
  body .home-card img,
  body.admin-page .home-card img,
  body .home-shell .home-card img{width:185px!important;height:185px!important}
  body .home-card h1,
  body.admin-page .home-card h1{font-size:38px!important}
}
@media(max-width:430px){
  body .home-card img,
  body.admin-page .home-card img,
  body .home-shell .home-card img{width:175px!important;height:175px!important}
  body .home-card h1,
  body.admin-page .home-card h1{font-size:36px!important}
}

/* Dark mode remains functional with the same blue identity */
body.admin-page.dark-mode,
body.dark-mode{
  --h3-accent:#77a9da!important;
  --h3-accent-soft:#243b52!important;
}
body.dark-mode .home-card,
body.admin-page.dark-mode .home-card{background:transparent!important;box-shadow:none!important;border:0!important}
body.dark-mode .home-card h1,
body.admin-page.dark-mode .home-card h1{color:#77a9da!important}

/* HAMSOOG UI V3.7 — three requested micro-fixes only */
/* 1) Larger dashboard logo in top bar, aligned with neighboring controls */
body.admin-page.role-seller .brand-mini,
body.admin-page.role-accountant .brand-mini{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  flex:0 0 48px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:13px!important;
}
body.admin-page.role-seller .brand-mini img,
body.admin-page.role-accountant .brand-mini img{
  width:44px!important;
  height:44px!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  transform:none!important;
}

/* 2) Center hamburger bars slightly lower inside the square */
body.admin-page.role-seller .menu-toggle:before,
body.admin-page.role-accountant .menu-toggle:before{
  transform:translateY(2px)!important;
}

/* 3) White logo in opened drawer header for better contrast */
body.admin-page.role-seller .side-menu .menu-head img,
body.admin-page.role-accountant .side-menu .menu-head img{
  width:46px!important;
  height:46px!important;
  filter:brightness(0) invert(1)!important;
  opacity:1!important;
  object-fit:contain!important;
}

@media(max-width:860px){
  body.admin-page.role-seller .brand-mini,
  body.admin-page.role-accountant .brand-mini{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
  }
  body.admin-page.role-seller .brand-mini img,
  body.admin-page.role-accountant .brand-mini img{
    width:44px!important;
    height:44px!important;
  }
}

/* HAMSOOG UI V3.8 — definitive top-logo and hamburger centering fix */
@media(max-width:860px){
  /* Top dashboard logo: same outer size as header buttons, artwork enlarged inside */
  body.admin-page.role-seller .topbar .brand-mini,
  body.admin-page.role-accountant .topbar .brand-mini{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    flex:0 0 48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    border:1px solid var(--h3-line)!important;
    border-radius:13px!important;
    background:#fff!important;
    box-shadow:0 2px 8px rgba(36,54,73,.04)!important;
  }
  body.admin-page.role-seller .topbar .brand-mini img,
  body.admin-page.role-accountant .topbar .brand-mini img{
    display:block!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    min-height:46px!important;
    max-width:46px!important;
    max-height:46px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    object-fit:contain!important;
    transform:scale(1.42)!important;
    transform-origin:center center!important;
  }

  /* Hamburger: force the three bars to the exact geometric center of its square */
  body.admin-page.role-seller .topbar .menu-toggle,
  body.admin-page.role-accountant .topbar .menu-toggle{
    position:relative!important;
    display:block!important;
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    padding:0!important;
  }
  body.admin-page.role-seller .topbar .menu-toggle:before,
  body.admin-page.role-accountant .topbar .menu-toggle:before{
    position:absolute!important;
    top:50%!important;
    left:50%!important;
    width:22px!important;
    height:16px!important;
    margin:0!important;
    transform:translate(-50%,-50%)!important;
    background:linear-gradient(currentColor,currentColor) 0 0/22px 2px no-repeat,
               linear-gradient(currentColor,currentColor) 0 7px/22px 2px no-repeat,
               linear-gradient(currentColor,currentColor) 0 14px/22px 2px no-repeat!important;
  }
}

/* HAMSOOG UI V3.9 — universal forced header alignment; no role-class dependency */
@media (max-width:860px){
  /* Dashboard logo: exact same box as the other square header controls */
  body.admin-page .topbar > .brand-mini,
  .admin-page .topbar .brand-mini{
    box-sizing:border-box!important;
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    max-width:48px!important;
    max-height:48px!important;
    flex:0 0 48px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    background:#fff!important;
    border:1px solid #d8e2ed!important;
    border-radius:13px!important;
    box-shadow:0 2px 8px rgba(36,54,73,.04)!important;
    line-height:0!important;
  }
  body.admin-page .topbar > .brand-mini img,
  .admin-page .topbar .brand-mini img{
    position:absolute!important;
    top:50%!important;
    left:50%!important;
    display:block!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    max-width:42px!important;
    max-height:42px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    object-fit:contain!important;
    transform:translate(-50%,-50%) scale(1.72)!important;
    transform-origin:center center!important;
  }

  /* Hamburger: exact mathematical center inside the square */
  body.admin-page .topbar > .menu-toggle,
  .admin-page .topbar .menu-toggle{
    box-sizing:border-box!important;
    position:relative!important;
    display:block!important;
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    max-width:48px!important;
    max-height:48px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    line-height:0!important;
  }
  body.admin-page .topbar > .menu-toggle::before,
  .admin-page .topbar .menu-toggle::before{
    content:""!important;
    position:absolute!important;
    top:50%!important;
    left:50%!important;
    display:block!important;
    width:24px!important;
    height:18px!important;
    margin:0!important;
    padding:0!important;
    transform:translate(-50%,-50%)!important;
    transform-origin:center center!important;
    background:
      linear-gradient(currentColor,currentColor) center top/24px 2px no-repeat,
      linear-gradient(currentColor,currentColor) center center/24px 2px no-repeat,
      linear-gradient(currentColor,currentColor) center bottom/24px 2px no-repeat!important;
  }
}

/* HAMSOOG UI V4.0 — final exact header sizing: match the night-mode button */
@media (max-width:860px){
  body.admin-page .topbar > .brand-mini,
  .admin-page .topbar .brand-mini,
  body.admin-page .topbar > .menu-toggle,
  .admin-page .topbar .menu-toggle{
    box-sizing:border-box!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    max-width:40px!important;
    max-height:40px!important;
    flex:0 0 40px!important;
    margin:0!important;
    padding:0!important;
    border-radius:12px!important;
  }

  body.admin-page .topbar > .brand-mini,
  .admin-page .topbar .brand-mini{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    background:#fff!important;
    border:1px solid var(--h3-line)!important;
    box-shadow:none!important;
    line-height:0!important;
  }

  body.admin-page .topbar > .brand-mini img,
  .admin-page .topbar .brand-mini img{
    position:absolute!important;
    top:50%!important;
    left:50%!important;
    display:block!important;
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    max-width:30px!important;
    max-height:30px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    object-fit:contain!important;
    transform:translate(-50%,-50%)!important;
    transform-origin:center center!important;
  }

  body.admin-page .topbar > .menu-toggle,
  .admin-page .topbar .menu-toggle{
    position:relative!important;
    display:block!important;
    overflow:hidden!important;
    line-height:0!important;
  }

  body.admin-page .topbar > .menu-toggle::before,
  .admin-page .topbar .menu-toggle::before{
    content:""!important;
    position:absolute!important;
    top:50%!important;
    left:50%!important;
    display:block!important;
    width:19px!important;
    height:14px!important;
    margin:0!important;
    padding:0!important;
    transform:translate(-50%,-50%)!important;
    transform-origin:center center!important;
    background:
      linear-gradient(currentColor,currentColor) center top/19px 2px no-repeat,
      linear-gradient(currentColor,currentColor) center center/19px 2px no-repeat,
      linear-gradient(currentColor,currentColor) center bottom/19px 2px no-repeat!important;
  }
}

/* HAMSOOG UI V4.1 — seller/accountant top logo exact centering only */
@media (max-width:860px){
  body.admin-page.role-seller .topbar .brand-mini,
  body.admin-page.role-accountant .topbar .brand-mini{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    max-width:40px!important;
    max-height:40px!important;
    flex:0 0 40px!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  body.admin-page.role-seller .topbar .brand-mini > img,
  body.admin-page.role-accountant .topbar .brand-mini > img{
    opacity:0!important;
    visibility:hidden!important;
  }
  body.admin-page.role-seller .topbar .brand-mini::before,
  body.admin-page.role-accountant .topbar .brand-mini::before{
    content:""!important;
    position:absolute!important;
    inset:0!important;
    margin:auto!important;
    width:30px!important;
    height:30px!important;
    display:block!important;
    background:url('icons/hamsoog-logo-transparent.png?v=20260716-41') center center/30px 30px no-repeat!important;
    transform:none!important;
    pointer-events:none!important;
  }
}

/* HAMSOOG UI V4.2 — admin drawer logo white only */
body.admin-page.role-admin .side-menu .menu-head img,
body.role-admin .side-menu .menu-head img{
  filter:brightness(0) invert(1)!important;
  opacity:1!important;
}

/* HAMSOOG_UI_V44_SECOND_THEME_START */
/* Theme toggle button — second theme (soft red / white) */
.admin-page .theme-alt-toggle{
  display:grid;place-items:center;width:40px;height:40px;padding:0;
  border:1px solid var(--h3-line,var(--line));background:#fff;color:#ff5b61;
  border-radius:12px;box-shadow:none;cursor:pointer;position:relative;overflow:hidden;flex:0 0 40px
}
.admin-page .theme-alt-toggle:before{
  content:"";display:block;width:18px;height:18px;border-radius:999px;
  background:conic-gradient(from 95deg,#ff6269 0 34%,#ff98a0 34% 70%,#ffffff 70% 100%);
  border:1px solid rgba(255,95,106,.20);box-shadow:0 1px 4px rgba(255,95,106,.18)
}
.admin-page .theme-alt-toggle[aria-pressed="true"]{background:#fff1f3;border-color:#ffd6db}
.admin-page .theme-alt-toggle[aria-pressed="true"]:after{
  content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,91,97,.07)
}
@media(max-width:860px){.admin-page .theme-alt-toggle{width:40px;height:40px;flex:0 0 40px}}

/* Second theme — exact request: white base + soft red accent, no layout changes */
body.admin-page.theme-alt-red:not(.dark-mode),
body.admin-page.role-admin.theme-alt-red:not(.dark-mode),
body.admin-page.role-seller.theme-alt-red:not(.dark-mode),
body.admin-page.role-accountant.theme-alt-red:not(.dark-mode){
  --h44-accent:#ff5b61;
  --h44-accent-2:#ff8f96;
  --h44-accent-soft:#fff1f3;
  --h44-page:#f7f8fb;
  --h44-page-2:#fcfcfe;
  --h44-line:#e7e9f0;
  --h44-text:#232733;
  --h44-muted:#7f8797;
  --brand:#ff5b61!important;
  --brand2:#ff8f96!important;
  --brand3:#fff1f3!important;
  --bg:#f7f8fb!important;
  --theme-bg-soft:#fcfcfe!important;
  --theme-bg-glow:#ffffff!important;
  --card:#ffffff!important;
  --card2:#fcfcfd!important;
  --text:#232733!important;
  --muted:#7f8797!important;
  --line:#e7e9f0!important;
  background:linear-gradient(180deg,#ffffff 0%,#f7f8fb 100%)!important;
  color:var(--h44-text)!important;
}
body.admin-page.theme-alt-red:not(.dark-mode) .topbar{
  background:rgba(255,255,255,.98)!important;
  border-bottom:1px solid var(--h44-line)!important;
  box-shadow:0 4px 18px rgba(35,39,51,.045)!important;
}
body.admin-page.theme-alt-red:not(.dark-mode) .menu-toggle,
body.admin-page.theme-alt-red:not(.dark-mode) .theme-toggle,
body.admin-page.theme-alt-red:not(.dark-mode) .theme-alt-toggle{
  border:1px solid var(--h44-line)!important;background:#fff!important;color:#4d596d!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .pill{
  background:#f5f7fb!important;color:#55657c!important;border:1px solid #dde4ee!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .nav-actions .btn.ghost{
  background:#ffffff!important;border:1px solid var(--h44-line)!important;color:#49576a!important
}

body.admin-page.theme-alt-red:not(.dark-mode) .side-menu{
  background:rgba(255,255,255,.98)!important;
  border:1px solid var(--h44-line)!important;
  box-shadow:0 14px 36px rgba(35,39,51,.08)!important;
}
body.admin-page.theme-alt-red:not(.dark-mode) .menu-head{
  color:var(--h44-text)!important;border-bottom:1px solid var(--h44-line)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .menu-head small{color:var(--h44-muted)!important}
body.admin-page.theme-alt-red:not(.dark-mode) .side-menu a{
  color:#4b5565!important;background:transparent!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .side-menu a span{color:#9aa2af!important}
body.admin-page.theme-alt-red:not(.dark-mode) .side-menu a.active,
body.admin-page.theme-alt-red:not(.dark-mode) .side-menu a:hover{
  background:linear-gradient(135deg,#fff1f3,#ffe7eb)!important;
  color:var(--h44-accent)!important;
  box-shadow:0 8px 20px rgba(255,91,97,.09)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .side-menu a.active span,
body.admin-page.theme-alt-red:not(.dark-mode) .side-menu a:hover span{color:var(--h44-accent)!important}

body.admin-page.theme-alt-red:not(.dark-mode) .card,
body.admin-page.theme-alt-red:not(.dark-mode) .lead-card,
body.admin-page.theme-alt-red:not(.dark-mode) .stat,
body.admin-page.theme-alt-red:not(.dark-mode) .table-wrap,
body.admin-page.theme-alt-red:not(.dark-mode) .home-card,
body.admin-page.theme-alt-red:not(.dark-mode) .login-card{
  background:#ffffff!important;border:1px solid var(--h44-line)!important;
  box-shadow:0 10px 28px rgba(35,39,51,.055)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .soft{
  background:linear-gradient(135deg,#ffffff,#fff4f6)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .page-title h1,
body.admin-page.theme-alt-red:not(.dark-mode) .home-card h1{color:var(--h44-text)!important}
body.admin-page.theme-alt-red:not(.dark-mode) .home-card p,
body.admin-page.theme-alt-red:not(.dark-mode) .page-title p,
body.admin-page.theme-alt-red:not(.dark-mode) .muted,
body.admin-page.theme-alt-red:not(.dark-mode) .panel-footer,
body.admin-page.theme-alt-red:not(.dark-mode) .stat span,
body.admin-page.theme-alt-red:not(.dark-mode) .lead-grid span,
body.admin-page.theme-alt-red:not(.dark-mode) .lead-desc,
body.admin-page.theme-alt-red:not(.dark-mode) .seller-mini-kpis span,
body.admin-page.theme-alt-red:not(.dark-mode) .seller-mini-kpis small{color:var(--h44-muted)!important}
body.admin-page.theme-alt-red:not(.dark-mode) .page-title h1:before{background:var(--h44-accent)!important}
body.admin-page.theme-alt-red:not(.dark-mode) .stat strong,
body.admin-page.theme-alt-red:not(.dark-mode) .seller-mini-kpis strong,
body.admin-page.theme-alt-red:not(.dark-mode) .mobile,
body.admin-page.theme-alt-red:not(.dark-mode) details summary{color:var(--h44-text)!important}

body.admin-page.theme-alt-red:not(.dark-mode) .btn.primary{
  background:linear-gradient(135deg,#ff666f,#ff8f96)!important;color:#fff!important;border:0!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .btn.secondary{
  background:#fff1f3!important;color:var(--h44-accent)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .btn.danger,
body.admin-page.theme-alt-red:not(.dark-mode) .notice.danger{
  background:#fff0f2!important;color:#d94d58!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .btn.ghost{
  background:#ffffff!important;color:#566171!important;border:1px solid var(--h44-line)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .btn.call,
body.admin-page.theme-alt-red:not(.dark-mode) .notice.success{
  background:#fff1f3!important;color:var(--h44-accent)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .notice.info{
  background:#f5f7fb!important;color:#55657c!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .notice.warn{
  background:#fff8ea!important;color:#9a6a1e!important
}

body.admin-page.theme-alt-red:not(.dark-mode) input,
body.admin-page.theme-alt-red:not(.dark-mode) select,
body.admin-page.theme-alt-red:not(.dark-mode) textarea{
  background:#ffffff!important;border-color:var(--h44-line)!important;color:var(--h44-text)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) input:focus,
body.admin-page.theme-alt-red:not(.dark-mode) select:focus,
body.admin-page.theme-alt-red:not(.dark-mode) textarea:focus{
  border-color:#ff8f96!important;box-shadow:0 0 0 3px rgba(255,95,106,.12)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) th{
  background:#fafbfe!important;color:#5d6675!important;border-bottom-color:var(--h44-line)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) td{border-bottom-color:#eef0f5!important}
body.admin-page.theme-alt-red:not(.dark-mode) .lead-grid span,
body.admin-page.theme-alt-red:not(.dark-mode) .lead-desc,
body.admin-page.theme-alt-red:not(.dark-mode) details.lead-edit,
body.admin-page.theme-alt-red:not(.dark-mode) details.mini{
  background:#fcfcfe!important;border-color:#edf0f5!important
}

/* Soft red accents for stat/action icons when existing classes are present */
body.admin-page.theme-alt-red:not(.dark-mode) .ui-stat-icon,
body.admin-page.theme-alt-red:not(.dark-mode) .quick-actions .btn,
body.admin-page.theme-alt-red:not(.dark-mode) .quick-links a,
body.admin-page.theme-alt-red:not(.dark-mode) .shortcut,
body.admin-page.theme-alt-red:not(.dark-mode) .action-tile{
  border-color:#ffd7dc!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .ui-stat-icon{
  background:#fff1f3!important;color:var(--h44-accent)!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .quick-actions .btn,
body.admin-page.theme-alt-red:not(.dark-mode) .quick-links a,
body.admin-page.theme-alt-red:not(.dark-mode) .shortcut,
body.admin-page.theme-alt-red:not(.dark-mode) .action-tile{
  background:#fff7f8!important;color:#57657a!important
}
body.admin-page.theme-alt-red:not(.dark-mode) .quick-actions .btn:hover,
body.admin-page.theme-alt-red:not(.dark-mode) .quick-links a:hover,
body.admin-page.theme-alt-red:not(.dark-mode) .shortcut:hover,
body.admin-page.theme-alt-red:not(.dark-mode) .action-tile:hover{
  background:#fff1f3!important;color:var(--h44-accent)!important
}

body.admin-page.theme-alt-red:not(.dark-mode) .badge.waiting_payment,
body.admin-page.theme-alt-red:not(.dark-mode) .badge.payment_review{background:#fff6e8!important;color:#a26f20!important}
body.admin-page.theme-alt-red:not(.dark-mode) .badge.paid,
body.admin-page.theme-alt-red:not(.dark-mode) .badge.success{background:#ecfbf2!important;color:#2f7b57!important}
body.admin-page.theme-alt-red:not(.dark-mode) .badge.rejected,
body.admin-page.theme-alt-red:not(.dark-mode) .badge.expired,
body.admin-page.theme-alt-red:not(.dark-mode) .badge.cancelled,
body.admin-page.theme-alt-red:not(.dark-mode) .badge.danger{background:#fff0f2!important;color:#d94d58!important}
body.admin-page.theme-alt-red:not(.dark-mode) .badge.assigned,
body.admin-page.theme-alt-red:not(.dark-mode) .badge.answered{background:#f5f7fb!important;color:#5a6a82!important}
body.admin-page.theme-alt-red:not(.dark-mode) .badge.follow_up{background:#fff1f3!important;color:var(--h44-accent)!important}

@media(max-width:860px){
  body.admin-page.theme-alt-red:not(.dark-mode) .drawer-backdrop{background:rgba(35,39,51,.26)!important}
}
/* HAMSOOG_UI_V44_SECOND_THEME_END */

/* HAMSOOG_UI_V45_HOME_MERGE_START */
/* فقط صفحه اصلی فروشنده و حسابدار: حذف کارت سفید و چسباندن لوگو به پس‌زمینه اصلی */
body.admin-page.role-seller .home-card,
body.admin-page.role-accountant .home-card,
body.admin-page.role-seller.theme-alt-red .home-card,
body.admin-page.role-accountant.theme-alt-red .home-card{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  outline:0!important;
  padding:20px 16px!important;
  margin:0 auto!important;
  width:auto!important;
  max-width:380px!important;
}
body.admin-page.role-seller .home-card:before,
body.admin-page.role-seller .home-card:after,
body.admin-page.role-accountant .home-card:before,
body.admin-page.role-accountant .home-card:after{display:none!important;content:none!important}
body.admin-page.role-seller .home-card img,
body.admin-page.role-accountant .home-card img{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  display:block!important;
  margin:0 auto 14px!important;
  object-fit:contain!important;
}
body.admin-page.role-seller .home-content,
body.admin-page.role-accountant .home-content{
  background:transparent!important;
}
/* HAMSOOG_UI_V45_HOME_MERGE_END */
