:root {
  --hub-navy: #062A67;
  --hub-blue: #0B65D8;
  --hub-green: #4CAE24;
  --hub-ink: #0B2B63;
  --hub-muted: #718096;
  --hub-line: #E5EDF6;
  --hub-surface: #FFFFFF;
  --hub-shadow: 0 10px 30px rgba(16, 44, 88, .09);
}

.pmtech-hub-body {
  margin: 0;
  min-width: 320px;
  background: #F5F8FC;
  color: var(--hub-ink);
  font-family: Cairo, "Segoe UI", sans-serif;
}

.hub-page {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 82% -5%, rgba(53, 162, 255, .12), transparent 28rem),
    linear-gradient(180deg, #FFF 0%, #F7FBFF 56%, #F1F6FB 100%);
}

.hub-shell {
  width: min(100%, 1180px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) clamp(16px, 4vw, 36px) calc(102px + env(safe-area-inset-bottom));
}

.hub-header {
  display: grid;
  direction: ltr;
  grid-template-columns: 46px minmax(180px, 1fr) 46px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.hub-brand {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.hub-brand img {
  width: min(60vw, 250px);
  max-height: 76px;
  object-fit: contain;
}

.hub-icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  color: var(--hub-navy);
  background: rgba(255,255,255,.92);
  box-shadow: 0 5px 18px rgba(15, 55, 105, .08);
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.hub-icon-button:hover,
.hub-icon-button:focus-visible {
  background: #EDF6FF;
  box-shadow: 0 9px 22px rgba(15, 92, 187, .16);
  transform: translateY(-1px);
  outline: none;
}

.hub-icon-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-menu { position: relative; }
.hub-menu summary { list-style: none; }
.hub-menu summary::-webkit-details-marker { display: none; }

.hub-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  left: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--hub-line);
  border-radius: 18px;
  background: #FFF;
  box-shadow: 0 16px 38px rgba(15, 43, 84, .16);
  direction: rtl;
}

.hub-menu-panel a {
  display: block;
  padding: 10px 12px;
  color: #24436D;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.hub-menu-panel a:hover { background: #EFF7FF; color: #0864D7; }

.hub-notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #54B82E;
  border: 2px solid #FFF;
}

.hub-welcome {
  padding: 22px 0 20px;
  text-align: center;
}

.hub-welcome h1,
.hub-welcome p,
.hub-section h2 { margin: 0; }

.hub-welcome h1 {
  font-size: clamp(25px, 4.4vw, 40px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.7px;
  color: #113B7D;
}

.hub-welcome strong { color: #0B397B; font-family: "Plus Jakarta Sans", Cairo, sans-serif; }

.hub-welcome p {
  margin-top: 4px;
  color: #718096;
  font-size: clamp(13px, 2.3vw, 18px);
  font-weight: 600;
}

.hub-hero {
  position: relative;
  min-height: 326px;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(24px, 4vw, 34px);
  background: #C6E7FF;
  box-shadow: 0 16px 32px rgba(12, 68, 126, .13);
}

.hub-hero-landscape,
.hub-hero-copy { position: absolute; inset: 0; }

.hub-hero-landscape {
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(229,246,255,.58) 0%, rgba(180,223,255,.44) 46%, rgba(77,151,41,.17) 47%, rgba(45,121,29,.36) 100%),
    linear-gradient(115deg, #EFF9FF 0%, #BFE5FF 53%, #B7DBF2 100%);
}

.hub-hero-sun {
  position: absolute;
  top: 28px;
  left: 58%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 250, 194, .85);
  filter: blur(5px);
}

.hub-hero-cloud {
  position: absolute;
  width: 150px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  filter: blur(5px);
}

.cloud-one { top: 65px; right: 14%; }
.cloud-two { top: 112px; left: 28%; width: 90px; opacity: .66; }

.hub-hero-field {
  position: absolute;
  right: -8%;
  bottom: -17%;
  width: 110%;
  height: 54%;
  transform: skewY(-4deg);
  background:
    repeating-linear-gradient(103deg, rgba(21,105,37,.42) 0 3px, transparent 3px 16px),
    linear-gradient(180deg, #7BBE55, #246D31);
}

.field-back { bottom: 24%; height: 18%; opacity: .54; transform: skewY(-7deg) rotate(-1deg); }
.field-front { bottom: -25%; }

.hub-hero-pipe {
  position: absolute;
  z-index: 1;
  bottom: -8px;
  left: 23%;
  width: 112px;
  height: 82px;
  border: 20px solid #7D8B89;
  border-bottom: 0;
  border-radius: 64px 64px 0 0;
  transform: rotate(8deg);
  box-shadow: inset 5px 3px 8px rgba(255,255,255,.38), 3px 6px 12px rgba(0,0,0,.18);
}

.hub-hero-pipe::after {
  content: "";
  position: absolute;
  right: -47px;
  bottom: -15px;
  width: 57px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 42% 50%, #1D3136 0 35%, #6B7C7C 37% 53%, #AAB7B6 55% 100%);
}

.hub-hero-pipe i {
  position: absolute;
  right: -40px;
  bottom: -10px;
  width: 39px;
  height: 32px;
  border-radius: 50%;
  background: #183B40;
}

.hub-hero-water {
  position: absolute;
  z-index: 0;
  left: 17%;
  bottom: -12px;
  width: 132px;
  height: 138px;
  transform: rotate(19deg);
  transform-origin: top right;
  background: linear-gradient(90deg, rgba(219,251,255,.86), rgba(66,195,240,.82), rgba(236,255,255,.75));
  clip-path: polygon(0 0, 29% 0, 100% 100%, 20% 100%);
  filter: blur(1px);
  opacity: .9;
}

.hub-solar-panel {
  position: absolute;
  right: -18px;
  bottom: 31px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 225px;
  height: 104px;
  padding: 5px;
  background: #D6E8F5;
  border: 3px solid rgba(245,252,255,.9);
  transform: perspective(260px) rotateY(-12deg) rotateX(9deg) rotateZ(-4deg);
  box-shadow: 3px 8px 12px rgba(7,48,86,.2);
}

.hub-solar-panel i { background: linear-gradient(135deg, #0A315F, #1D75B3); border: 1px solid rgba(198,235,255,.6); }

.hub-hero-slogan {
  position: absolute;
  top: 42px;
  right: 26px;
  color: #133E76;
  font-size: 15px;
  line-height: 1.42;
  font-weight: 800;
  text-align: center;
  transform: rotate(-8deg);
}

.hub-hero-copy {
  z-index: 2;
  box-sizing: border-box;
  width: 67%;
  padding: 29px 24px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 15%, rgba(255,255,255,.88) 100%);
}

.hub-hero-copy h2 {
  margin: 0;
  color: #0A3473;
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1.27;
  font-weight: 900;
  letter-spacing: -1.1px;
}

.hub-hero-copy p {
  margin: 8px 0 18px;
  color: #657389;
  font-size: clamp(13px, 2.7vw, 18px);
  font-weight: 600;
}

.hub-primary-action {
  width: fit-content;
  min-width: 144px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 17px;
  color: #FFF;
  background: linear-gradient(135deg, #67C635, #2B9720);
  box-shadow: 0 9px 18px rgba(40, 141, 27, .24);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.hub-primary-action svg,
.hub-card-arrow,
.hub-offer-arrow svg,
.hub-bottom-nav svg,
.hub-placeholder-back svg,
.hub-placeholder-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-primary-action:hover { color: #FFF; transform: translateY(-2px); box-shadow: 0 12px 22px rgba(40, 141, 27, .32); }

.hub-hero-pager { position: absolute; z-index: 3; bottom: 15px; left: 50%; display: flex; gap: 8px; transform: translateX(-50%); direction: ltr; }
.hub-hero-pager i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.78); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.hub-hero-pager .active { width: 10px; background: #3A9829; }

.hub-section { margin-top: 30px; }

.hub-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hub-section-heading h2 { color: #082C68; font-size: clamp(22px, 4vw, 30px); font-weight: 900; letter-spacing: -.6px; }
.hub-section-heading span { padding-bottom: 3px; color: #8190A4; font-size: 11px; font-weight: 700; }

.hub-app-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }

.hub-app-card {
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  overflow: hidden;
  border: 1px solid rgba(227,236,247,.9);
  border-radius: 23px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--hub-shadow);
  color: #0B3574;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hub-app-card:hover { color: #0B3574; transform: translateY(-3px); border-color: #BBDBFA; box-shadow: 0 16px 30px rgba(13, 74, 147, .15); }
.hub-app-card:focus-visible { outline: 3px solid rgba(9,104,222,.28); outline-offset: 3px; }
.hub-app-card strong { max-width: 100%; font-size: clamp(14px, 2.8vw, 18px); font-weight: 900; line-height: 1.45; }

.hub-app-icon {
  width: 73px;
  height: 73px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.hub-app-icon svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hub-icon-products { color: #0D3A78; background: linear-gradient(135deg, #EDF5FF, #E1F2E4); }
.hub-icon-quote { color: #0B3A7B; background: linear-gradient(135deg, #EDF6FF, #E8F3FF); }
.hub-icon-pump { color: #0A3472; background: linear-gradient(135deg, #EFF7FF, #E5F4ED); }
.hub-icon-solar { color: #0A3977; background: linear-gradient(135deg, #EEF7FF, #E4F0FF); }
.hub-icon-assistant { color: #0A63D4; background: linear-gradient(135deg, #EAF4FF, #E8FAF0); }
.hub-icon-assistant svg { fill: currentColor; stroke: none; }

.hub-card-arrow { position: absolute; left: 15px; bottom: 15px; width: 18px; height: 18px; color: #7A8799; }

.hub-app-card-featured {
  grid-column: 1 / -1;
  min-height: 85px;
  flex-direction: row;
  justify-content: flex-start;
  text-align: right;
  padding-inline: 20px 46px;
  background: linear-gradient(112deg, #F7FCFF 0%, #ECF7FF 49%, #F3FFF2 100%);
}

.hub-app-card-featured .hub-app-icon { width: 52px; height: 52px; flex: 0 0 52px; }
.hub-app-card-featured .hub-app-icon svg { width: 29px; height: 29px; }
.hub-app-card-featured small { display: block; margin-bottom: 1px; color: #348161; font-size: 10px; font-weight: 800; }

.hub-offer-banner {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: 24px;
  background: linear-gradient(108deg, #04295F 3%, #0961B8 58%, #1B88D9 100%);
  box-shadow: 0 15px 30px rgba(9, 62, 125, .2);
  color: #FFF;
  text-decoration: none;
}

.hub-offer-banner:hover { color: #FFF; }
.hub-offer-visual { position: relative; flex: 0 0 92px; align-self: stretch; }
.hub-offer-gift { position: relative; z-index: 2; width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; padding-top: 5px; color: #FFF; filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
.hub-offer-gift svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-offer-orbit { position: absolute; top: -57px; right: -36px; width: 155px; height: 155px; border: 12px solid rgba(150,218,65,.9); border-radius: 50%; }
.hub-offer-brand { position: absolute; z-index: 1; left: 4px; bottom: 1px; color: rgba(255,255,255,.63); font-family: "Plus Jakarta Sans", sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 1px; line-height: 1.1; }
.hub-offer-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-offer-copy strong { font-size: clamp(22px, 4.6vw, 32px); line-height: 1.35; font-weight: 900; }
.hub-offer-copy span { font-size: clamp(12px, 2.5vw, 16px); font-weight: 600; opacity: .94; }
.hub-offer-arrow { width: 37px; height: 37px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-right: auto; border-radius: 50%; color: #164D8F; background: #FFF; }

.hub-category-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.hub-category { min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 4px; border: 1px solid #E6EEF7; border-radius: 19px; background: #FFF; color: #0B3978; box-shadow: 0 7px 18px rgba(13, 65, 125, .06); text-align: center; text-decoration: none; }
.hub-category:hover { color: #0B64D7; border-color: #C4E0FA; }
.hub-category-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #EEF6FF; color: #0B4B96; }
.hub-category-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-category:nth-child(3) .hub-category-icon { background: #EFF9EB; color: #4BA82A; }
.hub-category strong { font-size: clamp(10px, 2.3vw, 14px); line-height: 1.35; font-weight: 900; }

.hub-bottom-nav {
  position: fixed;
  z-index: 12;
  bottom: 0;
  left: 50%;
  width: min(100%, 1180px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-sizing: border-box;
  padding: 9px max(16px, env(safe-area-inset-left)) max(9px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  transform: translateX(-50%);
  border-top: 1px solid rgba(220,230,241,.82);
  background: rgba(255,255,255,.94);
  box-shadow: 0 -8px 22px rgba(19, 60, 113, .07);
  backdrop-filter: blur(16px);
}

.hub-nav-link { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 3px; color: #7F8A9A; font-size: 11px; font-weight: 700; text-decoration: none; }
.hub-nav-link svg { width: 25px; height: 25px; stroke-width: 1.8; }
.hub-nav-link.active { color: #4BAE2F; font-weight: 900; }

.hub-placeholder-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px;
  background: radial-gradient(circle at 75% 20%, #DFF3FF 0, transparent 26rem), #F5F9FD;
}

.hub-placeholder-card { width: min(100%, 570px); position: relative; box-sizing: border-box; overflow: hidden; padding: 38px 28px; border: 1px solid #E1ECF7; border-radius: 30px; background: rgba(255,255,255,.95); box-shadow: 0 22px 50px rgba(21, 61, 112, .12); text-align: center; }
.hub-placeholder-card::after { content: ""; position: absolute; z-index: 0; right: -75px; bottom: -85px; width: 245px; height: 245px; border: 28px solid rgba(81,179,52,.12); border-radius: 50%; }
.hub-placeholder-card > * { position: relative; z-index: 1; }
.hub-placeholder-back { display: inline-flex; align-items: center; gap: 6px; position: absolute; top: 16px; right: 16px; color: #0B63CF; font-size: 12px; font-weight: 800; text-decoration: none; }
.hub-placeholder-back svg { width: 17px; height: 17px; }
.hub-placeholder-logo { width: min(215px, 62vw); height: 72px; object-fit: contain; margin-top: 8px; }
.hub-placeholder-mark { width: 69px; height: 69px; display: inline-flex; align-items: center; justify-content: center; margin-top: 23px; border-radius: 23px; background: #EAF4FF; color: #0967DA; }
.hub-placeholder-mark svg { width: 37px; height: 37px; fill: currentColor; stroke: none; }
.hub-placeholder-kicker { margin: 17px 0 3px; color: #4BAE2F; font-size: 12px; font-weight: 900; }
.hub-placeholder-card h1 { margin: 0; color: #0C3471; font-size: clamp(25px, 5vw, 34px); font-weight: 900; }
.hub-placeholder-card > p:not(.hub-placeholder-kicker) { max-width: 390px; margin: 10px auto 0; color: #687A91; font-size: 14px; font-weight: 600; line-height: 1.9; }
.hub-placeholder-note { width: fit-content; max-width: 100%; margin: 25px auto 0; padding: 10px 14px; border: 1px solid #D7EAF9; border-radius: 13px; background: #F5FAFF; color: #38648F; font-size: 12px; font-weight: 700; }

@media (min-width: 680px) {
  .hub-header { grid-template-columns: 52px minmax(240px, 1fr) 52px; }
  .hub-icon-button { width: 52px; height: 52px; border-radius: 18px; }
  .hub-hero { min-height: 360px; }
  .hub-hero-copy { width: 62%; padding: 43px 42px; }
  .hub-solar-panel { width: 300px; height: 135px; right: 3%; }
  .hub-hero-pipe { left: 33%; }
  .hub-hero-water { left: 29%; }
  .hub-app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-app-card { min-height: 180px; }
  .hub-app-card-featured { grid-column: span 2; }
  .hub-offers { display: grid; grid-template-columns: 190px 1fr; align-items: end; gap: 18px; }
  .hub-offers .hub-section-heading { margin: 0 0 15px; }
  .hub-offers .hub-offer-banner { min-height: 115px; }
  .hub-category-list { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (min-width: 980px) {
  .hub-shell { padding-bottom: 114px; }
  .hub-hero { min-height: 410px; }
  .hub-hero-copy h2 { font-size: 47px; }
  .hub-section { margin-top: 42px; }
  .hub-bottom-nav { width: min(940px, calc(100% - 80px)); bottom: 16px; border: 1px solid #E0EAF4; border-radius: 23px; }
  .hub-app-card-featured { grid-column: span 2; }
}

@media (max-width: 380px) {
  .hub-shell { padding-inline: 13px; }
  .hub-header { grid-template-columns: 42px minmax(145px, 1fr) 42px; gap: 9px; }
  .hub-icon-button { width: 42px; height: 42px; border-radius: 14px; }
  .hub-icon-button svg { width: 24px; height: 24px; }
  .hub-hero { min-height: 300px; }
  .hub-hero-copy { width: 72%; padding: 25px 18px; }
  .hub-hero-copy h2 { font-size: 24px; }
  .hub-primary-action { min-width: 125px; padding: 10px 14px; font-size: 14px; }
  .hub-app-grid { gap: 10px; }
  .hub-app-card { min-height: 144px; border-radius: 19px; padding: 14px 7px; }
  .hub-app-icon { width: 62px; height: 62px; }
  .hub-app-icon svg { width: 36px; height: 36px; }
  .hub-app-card-featured { min-height: 78px; padding-inline: 14px 36px; }
  .hub-offer-banner { min-height: 115px; padding-inline: 14px; }
  .hub-offer-visual { flex-basis: 70px; }
  .hub-offer-gift { width: 47px; height: 47px; }
  .hub-offer-gift svg { width: 43px; height: 43px; }
  .hub-offer-copy strong { font-size: 21px; }
}

/* السلايدر: صور حقيقية مع طبقة نص تضمن وضوح العربية فوق التفاصيل. */
.hub-hero {
  height: clamp(250px, 36vw, 410px);
  min-height: 0;
  background: #B8DDF5;
}

.hub-hero-slides,
.hub-hero-slide {
  position: absolute;
  inset: 0;
}

.hub-hero-slide {
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .62s ease;
}

.hub-hero-slide.is-active { z-index: 1; pointer-events: auto; opacity: 1; }

.hub-hero-slide > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hub-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.93) 0%, rgba(255,255,255,.82) 32%, rgba(255,255,255,.25) 61%, rgba(255,255,255,.02) 100%);
}

.hub-hero-slide .hub-hero-copy {
  position: absolute;
  z-index: 2;
  inset: auto auto 24px 0;
  width: 67%;
  box-sizing: border-box;
  padding: 0 24px;
  background: none;
}

.hub-hero-slogan {
  z-index: 3;
  right: 28px;
  text-shadow: 0 1px 8px rgba(255,255,255,.45);
}

.hub-hero-nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  color: #164A82;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .18s ease, background .18s ease;
}

.hub-hero:hover .hub-hero-nav,
.hub-hero:focus-within .hub-hero-nav { opacity: 1; }
.hub-hero-nav:hover { background: #FFF; }
.hub-hero-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hub-hero-next { left: 14px; }
.hub-hero-prev { right: 14px; }

.hub-hero-pager {
  z-index: 6;
  bottom: 13px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(4, 38, 80, .12);
  backdrop-filter: blur(5px);
}

.hub-hero-pager button {
  width: 7px;
  height: 7px;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  cursor: pointer;
  transition: width .18s ease, background .18s ease;
}

.hub-hero-pager button.active { width: 17px; border-radius: 99px; background: #43A82D; }

/* في الهاتف تتحول الصفحة إلى لوحة واحدة ثابتة بلا تمرير عمودي. */
/* اللوحة تتبع أبعاد الهاتف حتى عند معاينتها من متصفح سطح المكتب، دون إطار هاتف مصطنع. */
@media (min-width: 0) {
  html:has(.pmtech-hub-body),
  .pmtech-hub-body:has(.hub-page) {
    height: 100%;
    overflow: hidden;
  }

  .hub-page {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .hub-shell {
    width: min(100%, 440px);
    height: 100%;
    display: grid;
    grid-template-rows: 46px 43px minmax(154px, 1fr) auto auto auto;
    align-content: stretch;
    gap: clamp(5px, 1vh, 9px);
    overflow: hidden;
    padding: max(8px, env(safe-area-inset-top)) 16px calc(67px + env(safe-area-inset-bottom));
  }

  .hub-header { min-height: 0; height: 46px; grid-template-columns: 42px minmax(145px, 1fr) 42px; }
  .hub-brand img { max-height: 54px; }
  .hub-icon-button { width: 42px; height: 42px; border-radius: 14px; }
  .hub-icon-button svg { width: 24px; height: 24px; }
  .hub-notification-dot { top: 6px; right: 6px; }

  .hub-welcome { box-sizing: border-box; padding: 0; display: flex; flex-direction: column; justify-content: center; }
  .hub-welcome h1 { font-size: clamp(19px, 5.5vw, 25px); letter-spacing: -.4px; }
  .hub-welcome p { margin-top: 0; font-size: clamp(10px, 2.8vw, 13px); }

  .hub-hero { height: auto; min-height: 0; border-radius: 21px; }
  .hub-hero-slide .hub-hero-copy { bottom: 22px; width: 73%; padding: 0 18px; }
  .hub-hero-copy h2 { font-size: clamp(20px, 6vw, 28px); line-height: 1.27; letter-spacing: -.7px; }
  .hub-hero-copy p { margin: 3px 0 10px; font-size: clamp(10px, 2.8vw, 13px); }
  .hub-primary-action { min-width: 108px; padding: 8px 12px; border-radius: 12px; font-size: 12px; }
  .hub-primary-action svg { width: 16px; height: 16px; }
  .hub-hero-slogan { top: 19px; right: 17px; font-size: 10px; }
  .hub-hero-nav { display: none; }
  .hub-hero-pager { bottom: 8px; gap: 5px; padding: 3px 5px; }
  .hub-hero-pager button { width: 5px; height: 5px; }
  .hub-hero-pager button.active { width: 12px; }

  .hub-section { min-width: 0; margin-top: 0; }
  .hub-section-heading { min-height: 18px; margin: 0 0 5px; }
  .hub-section-heading h2 { font-size: clamp(16px, 4.6vw, 21px); line-height: 1.15; }
  .hub-section-heading span { display: none; }

  .hub-app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .hub-app-card { min-height: 72px; height: clamp(72px, 10vh, 89px); flex-direction: row; justify-content: flex-start; gap: 7px; padding: 8px 11px 8px 25px; border-radius: 17px; text-align: right; }
  .hub-app-card strong { font-size: clamp(10px, 3vw, 14px); line-height: 1.32; }
  .hub-app-icon { width: 42px; height: 42px; flex: 0 0 42px; }
  .hub-app-icon svg { width: 26px; height: 26px; }
  .hub-card-arrow { left: 7px; bottom: 50%; width: 15px; height: 15px; transform: translateY(50%); }

  .hub-offers { display: block; }
  .hub-offer-banner { min-height: 57px; padding: 7px 12px; border-radius: 17px; gap: 7px; }
  .hub-offer-visual { flex: 0 0 42px; }
  .hub-offer-gift { width: 37px; height: 37px; padding: 0; }
  .hub-offer-gift svg { width: 34px; height: 34px; }
  .hub-offer-orbit { top: -37px; right: -26px; width: 93px; height: 93px; border-width: 7px; }
  .hub-offer-brand { display: none; }
  .hub-offer-copy strong { font-size: clamp(15px, 4.3vw, 20px); }
  .hub-offer-copy span { font-size: clamp(9px, 2.5vw, 11px); }
  .hub-offer-arrow { width: 27px; height: 27px; }
  .hub-offer-arrow svg { width: 16px; height: 16px; }

  .hub-category-list { gap: 7px; }
  .hub-category { min-height: 52px; flex-direction: row; justify-content: center; gap: 5px; padding: 5px 4px; border-radius: 14px; }
  .hub-category-icon { width: 29px; height: 29px; flex: 0 0 29px; }
  .hub-category-icon svg { width: 19px; height: 19px; }
  .hub-category strong { font-size: clamp(8px, 2.4vw, 11px); }

  .hub-bottom-nav { width: min(100%, 440px); bottom: 0; min-height: 59px; padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); border-radius: 0; }
  .hub-nav-link { gap: 2px; font-size: 9px; }
  .hub-nav-link svg { width: 21px; height: 21px; }
}

@media (max-width: 640px) and (max-height: 760px) {
  .hub-shell { grid-template-rows: 42px 35px minmax(125px, 1fr) auto auto auto; padding-top: max(5px, env(safe-area-inset-top)); gap: 5px; }
  .hub-header { height: 42px; }
  .hub-icon-button { width: 38px; height: 38px; }
  .hub-welcome h1 { font-size: 18px; }
  .hub-welcome p { display: none; }
  .hub-app-card { height: clamp(64px, 10vh, 76px); min-height: 64px; padding-block: 6px; }
  .hub-app-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .hub-app-icon svg { width: 23px; height: 23px; }
  .hub-offer-banner { min-height: 50px; }
  .hub-section-heading { margin-bottom: 3px; }
}

@media (max-width: 380px) {
  .hub-shell { padding-right: 11px; padding-left: 11px; }
  .hub-app-card { padding-right: 7px; padding-left: 21px; }
  .hub-app-card strong { font-size: 10px; }
  .hub-category strong { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero-slide { transition: none; }
}

/* مرجع واجهة PM TECH: واجهة هاتف نظيفة، بلا إطار جهاز مصطنع. */
@media (min-width: 0) {
  .pmtech-hub-body,
  .hub-page {
    background: #fff;
  }

  .hub-page {
    background:
      radial-gradient(circle at 98% 3%, rgba(199, 234, 255, .56), transparent 19rem),
      #fff;
  }

  .hub-shell {
    grid-template-rows: 50px 45px minmax(140px, 1fr) auto auto auto;
    gap: clamp(5px, 1vh, 9px);
    padding-right: clamp(16px, 4vw, 22px);
    padding-left: clamp(16px, 4vw, 22px);
    background: transparent;
  }

  .hub-header {
    grid-template-columns: 42px minmax(164px, 1fr) 42px;
    gap: 10px;
    height: 50px;
  }

  .hub-brand img {
    width: min(48vw, 176px);
    max-height: 50px;
  }

  .hub-header-action {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #0B3472;
    cursor: pointer;
    text-decoration: none;
  }

  .hub-header-action:hover,
  .hub-header-action:focus-visible {
    border-radius: 13px;
    background: #F1F7FD;
    box-shadow: none;
    transform: none;
    outline: none;
  }

  .hub-header-action svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.45;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .hub-notification-dot {
    top: 5px;
    right: 3px;
    width: 9px;
    height: 9px;
    border-width: 1.5px;
  }

  .hub-menu-panel { top: calc(100% + 4px); left: -6px; }

  .hub-welcome h1 {
    font-size: clamp(17px, 4.8vw, 22px);
    color: #103D7C;
    font-weight: 900;
  }

  .hub-welcome p {
    margin-top: 1px;
    color: #6D7C91;
    font-size: clamp(10px, 2.7vw, 13px);
    font-weight: 600;
  }

  .hub-hero {
    border-radius: 20px;
    box-shadow: 0 11px 26px rgba(19, 71, 128, .11);
  }

  .hub-hero-shade {
    background: linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.86) 39%, rgba(255,255,255,.22) 67%, rgba(255,255,255,.01) 100%);
  }

  .hub-hero-slide .hub-hero-copy {
    bottom: 23px;
    width: 76%;
    padding: 0 15px;
  }

  .hub-hero-copy h2 {
    color: #0B3776;
    font-size: clamp(20px, 5.45vw, 26px);
    font-weight: 900;
  }

  .hub-primary-action {
    min-width: 106px;
    padding: 7px 12px;
    border-radius: 13px;
    background: linear-gradient(135deg, #62BD31, #349A22);
    box-shadow: 0 7px 14px rgba(47, 143, 31, .22);
  }

  .hub-section-heading {
    min-height: 21px;
    margin-bottom: 5px;
  }

  .hub-section-heading h2 {
    color: #0B3472;
    font-size: clamp(17px, 4.8vw, 22px);
    font-weight: 900;
  }

  .hub-app-grid {
    gap: 8px;
  }

  .hub-app-card {
    height: clamp(74px, 12.4vh, 102px);
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 9px 6px;
    border: 1px solid #EDF1F6;
    border-radius: 19px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 7px 19px rgba(18, 61, 108, .075);
    text-align: center;
  }

  .hub-app-card:hover { transform: translateY(-1px); }

  .hub-app-icon {
    width: clamp(48px, 12.5vw, 58px);
    height: clamp(48px, 12.5vw, 58px);
    flex-basis: auto;
    border-radius: 50%;
  }

  .hub-app-icon svg {
    width: 84%;
    height: 84%;
    stroke: none;
  }

  .hub-icon-products { background: linear-gradient(135deg, #EDF5FF, #EEF8EC); }
  .hub-icon-quote { background: #EFF6FD; }
  .hub-icon-pump { background: linear-gradient(135deg, #EFF7FF, #EDF9EF); }
  .hub-icon-solar { background: #EEF6FE; }

  .hub-card-label {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 19px;
  }

  .hub-app-card strong {
    font-size: clamp(10px, 2.9vw, 13px);
    line-height: 1.2;
    color: #0B3472;
  }

  .hub-card-arrow {
    position: static;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    transform: none;
    color: #7E8998;
    stroke-width: 2.1;
  }

  .hub-offers .hub-section-heading { margin-bottom: 4px; }

  .hub-offer-banner {
    min-height: clamp(64px, 10.5vh, 86px);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 18px;
    background: linear-gradient(110deg, #06295F 0%, #0A4D9B 56%, #0872C8 100%);
    box-shadow: 0 9px 20px rgba(8, 57, 117, .18);
  }

  .hub-offer-banner::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: -38%;
    right: 22%;
    width: 32%;
    height: 170%;
    border: clamp(5px, 1.2vw, 9px) solid #8CCB2A;
    border-radius: 50%;
    pointer-events: none;
  }

  .hub-offer-photo {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    width: 37%;
    height: 100%;
    object-fit: cover;
    object-position: 79% center;
  }

  .hub-offer-photo-rim {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: 68%;
    background: linear-gradient(90deg, #06295F 8%, #0757AA 66%, rgba(8,113,196,.26) 100%);
  }

  .hub-offer-visual,
  .hub-offer-copy,
  .hub-offer-arrow { position: relative; z-index: 2; }

  .hub-offer-visual {
    display: inline-flex;
    width: clamp(35px, 9vw, 48px);
    height: clamp(35px, 9vw, 48px);
    flex: 0 0 auto;
    align-self: auto;
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
  }

  .hub-offer-gift,
  .hub-offer-gift svg {
    width: 100%;
    height: 100%;
    padding: 0;
  }

  .hub-offer-copy {
    top: 50%;
    right: 42%;
    left: 62px;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    text-align: right;
  }

  .hub-offer-copy strong {
    font-size: clamp(16px, 4.5vw, 22px);
    line-height: 1.2;
  }

  .hub-offer-copy span {
    font-size: clamp(9px, 2.5vw, 11px);
    line-height: 1.35;
  }

  .hub-offer-arrow {
    top: 50%;
    left: 48%;
    width: clamp(26px, 7.5vw, 34px);
    height: clamp(26px, 7.5vw, 34px);
    margin: 0;
    transform: translateY(-50%);
    color: #0B407F;
  }

  .hub-category-list { gap: 7px; }

  .hub-category {
    min-height: clamp(50px, 8vh, 65px);
    gap: 4px;
    border-color: #EDF1F6;
    border-radius: 15px;
    box-shadow: 0 5px 13px rgba(18, 61, 108, .06);
  }

  .hub-category-icon {
    width: clamp(27px, 7vw, 36px);
    height: clamp(27px, 7vw, 36px);
    flex-basis: auto;
  }

  .hub-category-icon svg { width: 71%; height: 71%; stroke-width: 2; }
  .hub-category strong { font-size: clamp(8px, 2.35vw, 11px); color: #0B3472; }

  .hub-bottom-nav {
    width: min(100%, 440px);
    min-height: 62px;
    border-top: 1px solid #EEF1F5;
    box-shadow: 0 -6px 17px rgba(19, 60, 113, .06);
    background: rgba(255,255,255,.97);
  }

  .hub-nav-link { color: #7A8695; font-size: 9px; font-weight: 700; }
  .hub-nav-link svg { width: 24px; height: 24px; stroke-width: 1.75; }
  .hub-nav-link.active { color: #50AD2F; }
}

@media (max-width: 640px) and (max-height: 760px) {
  .hub-shell {
    grid-template-rows: 42px 34px minmax(118px, 1fr) auto auto auto;
    gap: 4px;
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .hub-header { height: 42px; }
  .hub-brand img { max-height: 42px; }
  .hub-header-action { width: 37px; height: 37px; }
  .hub-header-action svg { width: 27px; height: 27px; }
  .hub-welcome h1 { font-size: 18px; }
  .hub-welcome p { display: none; }
  .hub-hero-slide .hub-hero-copy { bottom: 18px; }
  .hub-hero-copy h2 { font-size: 20px; }
  .hub-hero-copy p { display: none; }
  .hub-primary-action { margin-top: 4px; padding: 6px 10px; font-size: 11px; }
  .hub-app-grid { gap: 6px; }
  .hub-app-card { height: clamp(64px, 11vh, 78px); min-height: 64px; border-radius: 16px; }
  .hub-app-icon { width: 39px; height: 39px; }
  .hub-app-card strong { font-size: 10px; }
  .hub-offer-banner { min-height: 54px; border-radius: 15px; }
  .hub-offer-copy strong { font-size: 15px; }
  .hub-offer-copy span { font-size: 8px; }
  .hub-category { min-height: 48px; border-radius: 13px; }
  .hub-bottom-nav { min-height: 56px; }
}

/* الأقسام أصبحت قابلة للترتيب والإخفاء من لوحة الإدارة؛ الحاوية تتأقلم مع أي ترتيب. */
@media (min-width: 0) {
  .hub-shell {
    grid-template-rows: 50px 45px minmax(0, 1fr);
  }

  .hub-managed-content {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(5px, 1vh, 9px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .hub-managed-content::-webkit-scrollbar { display: none; }
  .hub-managed-content > .hub-section { margin-top: 0; }
  .hub-managed-content > .hub-hero {
    flex: 0 0 clamp(134px, 19vh, 156px);
    min-height: 0;
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  .hub-shell { grid-template-rows: 42px 34px minmax(0, 1fr); }
  .hub-managed-content > .hub-hero { flex-basis: 124px; }
}

/* الأيقونات الموحّدة التي يختارها السوبر أدمن من لوحة التحكم. */
.hub-app-icon svg,
.hub-category-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hub-app-icon .hub-icon-accent,
.hub-category-icon .hub-icon-accent { fill: #55B934; stroke: none; }
.hub-app-icon .hub-icon-accent-stroke,
.hub-category-icon .hub-icon-accent-stroke { fill: none; stroke: #55B934; }
.hub-app-icon .hub-icon-white,
.hub-category-icon .hub-icon-white { fill: none; stroke: #fff; }
.hub-icon-solar-savings { color: #0B3978; background: linear-gradient(135deg, #EDF7FF, #EEF8E9); }

@media (min-width: 0) {
  .hub-app-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hub-app-grid--compact .hub-app-card { padding-inline: 4px; }
  .hub-app-grid--compact .hub-app-card strong { font-size: clamp(8px, 2.35vw, 11px); }
  .hub-app-grid--compact .hub-app-icon { width: clamp(40px, 10.6vw, 49px); height: clamp(40px, 10.6vw, 49px); }
}

/* سطح المكتب ليس نسخة هاتف مكبرة: محتوى حر، بطاقات واسعة، ورأس على كامل العرض. */
@media (min-width: 768px) {
  html:has(.pmtech-hub-body), .pmtech-hub-body:has(.hub-page) { height: auto; overflow: auto; }
  .hub-page { height: auto; min-height: 100vh; overflow: visible; }
  .hub-shell { width: min(1180px, calc(100% - 56px)); height: auto; display: block; overflow: visible; padding: 0 0 118px; }
  .hub-header { position: sticky; top: 0; z-index: 30; width: 100vw; min-height: 76px; height: 76px; box-sizing: border-box; margin-right: calc(50% - 50vw); margin-left: calc(50% - 50vw); padding: 10px clamp(28px, 5vw, 94px); grid-template-columns: 52px minmax(220px, 1fr) 52px; background: rgba(255,255,255,.94); border-bottom: 1px solid #E5EFF8; box-shadow: 0 4px 18px rgba(20,65,112,.05); backdrop-filter: blur(16px); }
  .hub-brand { justify-content: center; }
  .hub-brand img { width: 220px; max-height: 54px; }
  .hub-welcome { padding: 31px 0 24px; }
  .hub-welcome h1 { font-size: 29px; }
  .hub-managed-content { display: flex; min-height: 0; gap: 34px; overflow: visible; }
  .hub-managed-content > .hub-hero { flex: 0 0 380px; min-height: 380px; }
  .hub-hero { border-radius: 30px; }
  .hub-hero-slide .hub-hero-copy { width: 56%; padding: 42px; }
  .hub-hero-copy h2 { font-size: 38px; }
  .hub-section { margin-top: 0; }
  .hub-section-heading { margin-bottom: 15px; }
  .hub-section-heading h2 { font-size: 27px; }
  .hub-app-grid, .hub-app-grid--compact { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
  .hub-app-card { min-height: 166px; border-radius: 23px; }
  .hub-app-card strong { font-size: 17px; }
  .hub-app-icon { width: 76px; height: 76px; }
  .hub-offers { display: block; }
  .hub-offer-banner { min-height: 145px; border-radius: 24px; }
  .hub-category-list { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
  .hub-category { min-height: 75px; }
  .hub-bottom-nav { width: min(940px, calc(100% - 80px)); min-height: 68px; bottom: 18px; border: 1px solid #E0EAF4; border-radius: 23px; }
}
