/* Premium polish layer (WeChat/WhatsApp-like). Loaded last; visual only, no layout of routes changes.
   The four bottom tabs (المحادثات، الأصدقاء، اكتشف، أنا) are intentionally NOT touched here. */
.ui-v14{
  --pm-ink:var(--ui-ink);--pm-sub:var(--ui-secondary);--pm-card:var(--ui-card);--pm-line:var(--ui-separator);
  --pm-shadow:0 1px 2px rgba(16,24,20,.04),0 6px 18px rgba(16,24,20,.06);
  --pm-g-madar:linear-gradient(145deg,#6d7cff,#3f51e0);
  --pm-g-sahl:linear-gradient(145deg,#2fd3a0,#0e9c74);
  --pm-g-asala:linear-gradient(145deg,#ffc043,#f28a00);
  --pm-g-salont:linear-gradient(145deg,#ff7aa2,#e23d72);
  --pm-g-green:linear-gradient(145deg,#4cd964,#1f9e45);
  --pm-g-taraf:linear-gradient(145deg,#b483ff,#7a4ae6);
  --pm-g-blue:linear-gradient(145deg,#4fb4ff,#1f7fe0);
  --pm-g-orange:linear-gradient(145deg,#ff9b52,#f0632b);
  --pm-g-teal:linear-gradient(145deg,#3ccfe0,#0f9bb0);
  --pm-g-red:linear-gradient(145deg,#ff6b6b,#e03a3a);
  --pm-g-slate:linear-gradient(145deg,#8e9aa6,#5f6b77);
}
.ui-v14.theme-dark{--pm-shadow:none}
.ui-v14{background:var(--ui-bg)}

/* Header: clean title + bare glyph actions, like WeChat */
.ui-v14 .statusbar.ui-status{font-size:12px;opacity:.75}
.ui-v14 .ui-eyebrow{display:none}
.ui-v14 .ui-topbar h2{font-size:26px;font-weight:700;letter-spacing:-.2px}
.ui-v14 .ui-iconbtn,.ui-v14.theme-dark .ui-iconbtn{width:40px;height:40px;border-radius:50%;background:transparent;color:var(--pm-ink);border:0;transition:background .15s}
.ui-v14 .ui-iconbtn:active{background:var(--ui-soft)}
.ui-v14 .ui-iconbtn svg{width:23px;height:23px;stroke-width:1.75}
.ui-v14 .ui-iconbtn.ui-add-main,.ui-v14.theme-dark .ui-iconbtn.ui-add-main{background:transparent;color:var(--pm-ink);box-shadow:inset 0 0 0 1.8px currentColor;width:28px;height:28px;margin:6px}
.ui-v14 .ui-iconbtn.ui-add-main svg{width:17px;height:17px;stroke-width:2.2}

/* Shortcut chips */
.ui-v14 .v22-inline button{background:var(--pm-card);border:0;box-shadow:var(--pm-shadow);color:var(--pm-ink);font-weight:500}
.ui-v14.theme-dark .v22-inline button{box-shadow:inset 0 0 0 1px var(--pm-line)}
.ui-v14 .v22-inline button svg{color:var(--ui-primary)}

/* Mini-app grid: real app icons (gradient squircles, white glyph) */
.ui-v14 .ui-services-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 6px;background:var(--pm-card);border-radius:20px;padding:18px 8px 14px;box-shadow:var(--pm-shadow)}
.ui-v14.theme-dark .ui-services-grid{box-shadow:inset 0 0 0 1px var(--pm-line)}
.ui-v14 .ui-service{border:0;background:transparent;min-height:0;padding:0;gap:6px}
.ui-v14 .ui-service-ico{width:54px;height:54px;border-radius:16px;color:#fff;background:var(--pm-g-blue);box-shadow:0 6px 14px -6px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.25);margin:0}
.ui-v14 .ui-service-ico svg{width:27px;height:27px;stroke:#fff;stroke-width:1.9}
.ui-v14 .ui-service-madar{background:var(--pm-g-madar)}
.ui-v14 .ui-service-sahl{background:var(--pm-g-sahl)}
.ui-v14 .ui-service-asala{background:var(--pm-g-asala)}
.ui-v14 .ui-service-salont{background:var(--pm-g-salont)}
.ui-v14 .ui-service-green{background:var(--pm-g-green)}
.ui-v14 .ui-service-taraf{background:var(--pm-g-taraf)}
.ui-v14 .ui-service:nth-child(7) .ui-service-ico{background:var(--pm-g-orange)}
.ui-v14 .ui-service:nth-child(8) .ui-service-ico{background:var(--pm-g-teal)}
.ui-v14 .ui-service-name{font-size:13px;font-weight:600;color:var(--pm-ink)}
.ui-v14 .ui-service-sub{font-size:11px;color:var(--pm-sub)}
.ui-v14 .ui-service:active .ui-service-ico{transform:scale(.94)}

/* Section headings */
.ui-v14 .ui-sectionline strong{font-size:15px;font-weight:700}

/* Grouped lists (أنا / الإعدادات): iOS-settings style coloured glyph tiles */
.ui-v14 .ui-listgroup{border:0;border-radius:18px;background:var(--pm-card);box-shadow:var(--pm-shadow);overflow:hidden}
.ui-v14.theme-dark .ui-listgroup{box-shadow:inset 0 0 0 1px var(--pm-line)}
.ui-v14 .ui-listgroup .plainrow{padding-block:12px}
.ui-v14 .ui-listgroup .plainrow .glyph{width:34px;height:34px;border-radius:10px;color:#fff;background:var(--pm-g-blue)}
.ui-v14 .ui-listgroup .plainrow .glyph svg{width:19px;height:19px;stroke:#fff;stroke-width:2}
.ui-v14 .ui-listgroup .plainrow:nth-child(6n+1) .glyph{background:var(--pm-g-blue)}
.ui-v14 .ui-listgroup .plainrow:nth-child(6n+2) .glyph{background:var(--pm-g-orange)}
.ui-v14 .ui-listgroup .plainrow:nth-child(6n+3) .glyph{background:var(--pm-g-salont)}
.ui-v14 .ui-listgroup .plainrow:nth-child(6n+4) .glyph{background:var(--pm-g-sahl)}
.ui-v14 .ui-listgroup .plainrow:nth-child(6n+5) .glyph{background:var(--pm-g-taraf)}
.ui-v14 .ui-listgroup .plainrow:nth-child(6n+6) .glyph{background:var(--pm-g-slate)}
.ui-v14 .ui-listgroup .plainrow strong{font-weight:600}
.ui-v14 .ui-listgroup .plainrow .chevron{color:var(--pm-sub);opacity:.6;font-size:20px}

/* Profile card + stats */
.ui-v14 .ui-user-profile{border:0;background:var(--pm-card);box-shadow:var(--pm-shadow);border-radius:20px}
.ui-v14 .ui-profile-photo{border-radius:16px;background:linear-gradient(145deg,#25c78a,#118a5e);box-shadow:0 6px 14px -6px rgba(17,138,94,.6)}
.ui-v14 .ui-profile-qr{background:transparent;color:var(--pm-sub)}
.ui-v14 .ui-account-stats button{border:0;background:var(--pm-card);box-shadow:var(--pm-shadow);border-radius:16px}
.ui-v14.theme-dark .ui-user-profile,.ui-v14.theme-dark .ui-account-stats button{box-shadow:inset 0 0 0 1px var(--pm-line)}
.ui-v14 .ui-account-stats strong{font-size:22px;font-weight:700;color:var(--pm-ink)}

/* Contacts quick actions */
.ui-v14 .ui-contact-actions button{border:0;background:var(--pm-card);box-shadow:var(--pm-shadow);border-radius:16px}
.ui-v14 .ui-contact-actions button svg{color:#fff;stroke:#fff;background:var(--pm-g-sahl);border-radius:12px;padding:8px;width:38px;height:38px;box-sizing:border-box}
.ui-v14 .ui-contact-actions button:nth-child(2) svg{background:var(--pm-g-blue)}
.ui-v14 .ui-contact-actions button:nth-child(3) svg{background:var(--pm-g-orange)}
.ui-v14.theme-dark .ui-contact-actions button{box-shadow:inset 0 0 0 1px var(--pm-line)}
.ui-v14 .ui-searchbox{border:0;background:var(--ui-soft);border-radius:12px}

/* Avatars: soft gradients instead of flat */
.ui-v14 .ui-avatar{box-shadow:inset 0 1px 0 rgba(255,255,255,.25)}

/* Legacy dark theme forces .glyph to flat grey with !important; keep the coloured tiles in dark too. */
.ui-v14.theme-dark .ui-listgroup .plainrow .glyph{color:#fff!important;border-color:transparent!important}
.ui-v14.theme-dark .ui-listgroup .plainrow:nth-child(6n+1) .glyph{background:var(--pm-g-blue)!important}
.ui-v14.theme-dark .ui-listgroup .plainrow:nth-child(6n+2) .glyph{background:var(--pm-g-orange)!important}
.ui-v14.theme-dark .ui-listgroup .plainrow:nth-child(6n+3) .glyph{background:var(--pm-g-salont)!important}
.ui-v14.theme-dark .ui-listgroup .plainrow:nth-child(6n+4) .glyph{background:var(--pm-g-sahl)!important}
.ui-v14.theme-dark .ui-listgroup .plainrow:nth-child(6n+5) .glyph{background:var(--pm-g-taraf)!important}
.ui-v14.theme-dark .ui-listgroup .plainrow:nth-child(6n+6) .glyph{background:var(--pm-g-slate)!important}
.ui-v14.theme-dark .ui-service{background:transparent!important;border:0!important;box-shadow:none!important}

/* Sub-pages (e.g. «أعمالي»): same coloured glyph tiles as the «أنا» lists */
.ui-v14 .tile .plainrow .glyph{width:38px;height:38px;border-radius:11px;color:#fff;background:var(--pm-g-blue)}
.ui-v14 .tile .plainrow .glyph svg{stroke:#fff;stroke-width:2}
.ui-v14 .tile .plainrow:nth-child(4n+1) .glyph{background:var(--pm-g-madar)}
.ui-v14 .tile .plainrow:nth-child(4n+2) .glyph{background:var(--pm-g-sahl)}
.ui-v14 .tile .plainrow:nth-child(4n+3) .glyph{background:var(--pm-g-salont)}
.ui-v14 .tile .plainrow:nth-child(4n+4) .glyph{background:var(--pm-g-orange)}
.ui-v14 .tile{border:0;box-shadow:var(--pm-shadow);border-radius:18px}
.ui-v14.theme-dark .tile{box-shadow:inset 0 0 0 1px var(--pm-line)}
.ui-v14.theme-dark .tile .plainrow .glyph{color:#fff!important;border-color:transparent!important}
.ui-v14.theme-dark .tile .plainrow:nth-child(4n+1) .glyph{background:var(--pm-g-madar)!important}
.ui-v14.theme-dark .tile .plainrow:nth-child(4n+2) .glyph{background:var(--pm-g-sahl)!important}
.ui-v14.theme-dark .tile .plainrow:nth-child(4n+3) .glyph{background:var(--pm-g-salont)!important}
.ui-v14.theme-dark .tile .plainrow:nth-child(4n+4) .glyph{background:var(--pm-g-orange)!important}

/* ── Luxury layer (council 2026-11-24): one card system, neutral fills, glass bars, crisp chevrons ── */
.ui-v14{
  --r-sm:10px;--r-md:14px;--r-card:20px;
  --sh-card:0 0 0 .5px rgba(0,0,0,.04),0 1px 3px rgba(16,24,20,.04),0 10px 28px -14px rgba(16,24,20,.14);
  --sh-float:0 8px 24px -8px rgba(16,24,20,.22);
  --tertiary:#c3c6c4;--ease:cubic-bezier(.2,.8,.2,1);
  --pm-shadow:var(--sh-card);
}
.ui-v14.theme-dark{--tertiary:#4a4a4d;--sh-card:inset 0 0 0 .5px #2a2a2a;--pm-shadow:none}
/* cards: same radius everywhere */
.ui-v14 .ui-listgroup,.ui-v14 .ui-services-grid,.ui-v14 .ui-user-profile,.ui-v14 .tile{border-radius:var(--r-card)}
/* glass header + bottom bar */
.ui-v14 .ui-topbar{min-height:64px;padding-block:10px;background:rgba(255,255,255,.82);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--ui-separator)}
.ui-v14 .ui-nav{background:rgba(255,255,255,.86);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:.5px solid var(--ui-separator);box-shadow:none}
.ui-v14.theme-dark .ui-topbar{background:rgba(0,0,0,.78)!important}
.ui-v14.theme-dark .ui-nav{background:rgba(0,0,0,.82)!important}
.ui-v14 .ui-iconbtn.ui-add-main,.ui-v14.theme-dark .ui-iconbtn.ui-add-main{width:26px;height:26px;box-shadow:inset 0 0 0 1.6px currentColor}
.ui-v14 .ui-nav button{transition:transform .18s var(--ease)}
.ui-v14 .ui-nav button:active{transform:scale(.92)}
/* chevrons: a drawn arrow instead of the typed «‹» */
.ui-v14 .chevron{font-size:0!important;opacity:1!important;width:14px;height:14px;flex:none;background:var(--tertiary);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/contain no-repeat}
/* grouped rows: calmer height, separators start after the icon (iOS style) */
.ui-v14 .ui-listgroup .plainrow{padding-block:10px;min-height:54px;position:relative;border-bottom:0!important}
.ui-v14 .ui-listgroup .plainrow+.plainrow::before{content:"";position:absolute;top:0;inset-inline-start:48px;inset-inline-end:0;height:.5px;background:var(--ui-separator)}
.ui-v14 .ui-listgroup .plainrow .glyph{width:32px;height:32px;border-radius:9px}
.ui-v14 .ui-listgroup .plainrow .glyph svg{width:18px;height:18px}
.ui-v14 .ui-listgroup .plainrow strong{font-size:15px}
.ui-v14 .ui-listgroup .plainrow .subtitle{font-size:12.5px}
/* tap feedback */
.ui-v14 .plainrow,.ui-v14 .ui-contact-actions button,.ui-v14 .ui-service,.ui-v14 .ui-user-profile,.ui-v14 .ui-account-stats button{transition:transform .18s var(--ease),background .15s}
.ui-v14 .plainrow:active,.ui-v14 .ui-contact-actions button:active,.ui-v14 .ui-user-profile:active,.ui-v14 .ui-account-stats button:active{transform:scale(.97)}
/* friends quick cards: centred, readable, badge in the corner */
.ui-v14 .ui-contact-actions button{min-height:92px;justify-content:center;gap:8px;position:relative;border-radius:var(--r-card)}
.ui-v14 .ui-contact-actions button strong{font-size:12.5px;font-weight:600}
.ui-v14 .ui-contact-actions button strong .p1-tabbadge{position:absolute;top:9px;inset-inline-end:9px}
/* search box: neutral fill */
.ui-v14 .ui-searchbox{background:var(--ui-soft);border-radius:var(--r-md)}
/* type floor: nothing smaller than 11.5px */
.ui-v14 .ui-chatmeta small,.ui-v14 .ui-sectionline>span,.ui-v14 .subtitle,.ui-v14 .ui-service-sub{font-size:max(11.5px,1em)!important}
.ui-v14 .ui-service-sub{font-size:11.5px!important}
.ui-v14 .ui-sectionline strong{font-size:13px;font-weight:600;color:var(--ui-secondary);letter-spacing:.1px}
.ui-v14 .ui-sectionline>span{font-size:13px!important;color:var(--ui-secondary)}
/* mini-app grid squircles: softer shadow */
.ui-v14 .ui-service-ico{box-shadow:0 8px 18px -10px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.28)}
@media (prefers-reduced-motion:reduce){.ui-v14 *{transition:none!important}}
