/* Page-specific styles extracted from provider_dashboard.html for browser caching. */
/* ═══════════════════════════════════════════════
     Provider Dashboard v4 — matched to profile.html
     Color accent: teal/cyan for provider context
  ═══════════════════════════════════════════════ */

  /* ── Page Background ── */
  body.page-provider-dashboard.page-provider-dashboard-v4 .page-content {
    padding-top: 0;
    padding-bottom: calc(var(--bottom-nav-height, 68px) + 24px + env(safe-area-inset-bottom, 0px));
    background:
      radial-gradient(ellipse at 80% 0%, rgba(14, 116, 144, 0.16), transparent 44%),
      radial-gradient(ellipse at 2% 34%, rgba(15, 118, 110, 0.10), transparent 40%),
      linear-gradient(180deg, #e6f7f8 0%, #f0fafa 28%, #f5fafb 60%, #f8fafc 100%);
    min-height: 100dvh;
  }

  /* ── Shell ── */
  .pdv4-shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 14px 0;
  }

  body.page-provider-dashboard.page-provider-dashboard-v4 #auth-gate {
    margin: 18px auto 0;
    max-width: 560px;
  }

  /* ── Body grid: 1-col mobile / 2-col desktop ── */
  .pdv4-body {
    display: grid;
    gap: 14px;
  }

  .pdv4-sidebar { display: grid; gap: 14px; }
  .pdv4-main    { display: grid; gap: 14px; min-width: 0; }

  @media (min-width: 880px) {
    .pdv4-shell { padding: 14px 20px 0; }
    .pdv4-body {
      grid-template-columns: 340px minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }
    .pdv4-sidebar { position: sticky; top: 20px; }
  }
  @media (min-width: 1100px) {
    .pdv4-body { grid-template-columns: 360px minmax(0, 1fr); }
  }

  /* ── Base Card (mirrors prf-v3-card) ── */
  .pdv4-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 24px;
    box-shadow: 0 6px 24px rgba(4, 28, 40, 0.07), 0 1px 4px rgba(14, 116, 144, 0.04);
    overflow: hidden;
  }

  /* ── Cover ── */
  .pdv4-cover {
    position: relative;
    min-height: 200px;
    background:
      radial-gradient(ellipse at 95% 5%, rgba(255,255,255,0.22), transparent 36%),
      radial-gradient(ellipse at 5% 95%, rgba(255,255,255,0.12), transparent 32%),
      linear-gradient(128deg, #1FB5A8 0%, #1FB5A8 30%, #1FB5A8 58%, #1FB5A8 80%, #164e63 100%);
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
  }
  .pdv4-cover::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    bottom: -140px; inset-inline-start: -80px;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
  }
  .pdv4-cover::after {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    border-radius: 50%;
    top: -70px; inset-inline-end: -40px;
    background: rgba(255,255,255,0.09);
    pointer-events: none;
  }
  .pdv4-cover img {
    width: 100%; height: 100%;
    min-height: 200px; max-height: 270px;
    object-fit: cover; display: block;
  }
  .pdv4-cover-placeholder {
    width: 100%;
    min-height: 200px;
    display: block;
  }
  .pdv4-cover.has-gallery {
    box-shadow: inset 0 -24px 48px rgba(4, 25, 40, 0.18);
  }
  .pdv4-cover-gallery-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 0;
  }
  .pdv4-cover-gallery-copy {
    min-width: 0;
  }
  .pdv4-cover-gallery-title {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    color: #113b54;
  }
  .pdv4-cover-gallery-note {
    margin: 4px 0 0;
    color: #5f7280;
    font-size: 11px;
    line-height: 1.8;
    font-weight: 700;
  }
  .pdv4-cover-gallery-note.is-locked {
    color: #a16207;
  }
  .pdv4-cover-gallery-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 2px;
  }
  .pdv4-cover-gallery-dot {
    width: 9px;
    height: 9px;
    border: none;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.18);
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, width .16s ease;
  }
  .pdv4-cover-gallery-dot.is-active {
    width: 22px;
    background: linear-gradient(135deg, #14b8a6, #1FB5A8);
  }
  .pdv4-cover-gallery-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 10px;
    padding: 12px 16px 16px;
  }
  .pdv4-cover-gallery-empty {
    grid-column: 1 / -1;
    min-height: 84px;
    border-radius: 18px;
    border: 1px dashed rgba(14, 116, 144, 0.2);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(14, 116, 144, 0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64808a;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    padding: 12px;
  }
  .pdv4-cover-thumb {
    position: relative;
    min-height: 82px;
    border: none;
    border-radius: 18px;
    background-color: #d5eef2;
    background-position: center;
    background-size: cover;
    box-shadow: 0 12px 24px rgba(4, 28, 40, 0.09);
    overflow: hidden;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, outline-color .16s ease;
  }
  .pdv4-cover-thumb:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(4, 28, 40, 0.12);
  }
  .pdv4-cover-thumb.is-active {
    outline: 2px solid rgba(20, 184, 166, 0.9);
    outline-offset: 0;
  }
  .pdv4-cover-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 32, 43, 0.04), rgba(7, 32, 43, 0.42));
    pointer-events: none;
  }
  .pdv4-cover-thumb-index {
    position: absolute;
    z-index: 2;
    bottom: 8px;
    inset-inline-start: 8px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #0f4d55;
    font-size: 10px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
  }
  .pdv4-cover-thumb-remove {
    position: absolute;
    z-index: 2;
    top: 8px;
    inset-inline-end: 8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(7, 32, 43, 0.58);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }
  .pdv4-cover-thumb-remove:hover {
    background: rgba(127, 29, 29, 0.82);
  }

  /* ── Cover bar ── */
  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-cover-bar {
    position: absolute;
    top: 12px; inset-inline-end: 12px;
    z-index: 4;
    display: flex; gap: 8px;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-mini-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.32);
    background: rgba(4, 25, 40, 0.52);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .16s ease, transform .14s ease;
    color: #fff;
    position: relative; overflow: hidden;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-mini-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-mini-btn.is-uploading svg,
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar-upload.is-uploading svg {
    opacity: 0;
  }

  /* ── Identity row (mirrors prf-v3-identity-row) ── */
  .pdv4-identity-row {
    position: relative;
    z-index: 5;
    margin-top: 14px;
    padding: 0 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
  }

  /* ── Avatar wrap ── */
  .pdv4-avatar-stack {
    display: grid;
    justify-items: center;
    align-self: start;
    gap: 8px;
    min-width: 112px;
  }
  .pdv4-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
  }

  /* Override base css: styled inline on #pd-avatar by provider-dashboard.css */
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar-wrap {
    width: auto; height: auto;
    margin-inline: 0;
    filter: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 50%;
    background: var(--nw-avatar-ring-gradient);
    box-shadow: var(--nw-avatar-ring-shadow);
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar {
    width: 92px; height: 92px;
    border-radius: 50%;
    border: 0;
    background: var(--nw-avatar-inner-bg);
    box-shadow: none;
    overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: box-shadow .2s ease, transform .16s ease;
    font-size: 28px; font-weight: 900;
    color: #1FB5A8;
    background-size: cover;
    background-position: center;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar:hover {
    transform: scale(1.04);
    box-shadow: none;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar-upload {
    background: rgba(14, 116, 144, 0.92);
    inset-inline-end: -2px;
    bottom: -2px;
    width: 28px; height: 28px;
    box-shadow: 0 8px 16px rgba(4, 28, 50, 0.22);
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar-upload:hover {
    background: rgba(14, 116, 144, 1);
  }

  /* ── Identity copy ── */
  .pdv4-identity-copy {
    min-width: 0;
    align-self: center;
    padding: 0;
    display: grid;
    justify-items: start;
    gap: 5px;
  }
  .pdv4-name {
    margin: 0;
    color: #0f172a;
    font-size: clamp(18px, 4vw, 25px);
    font-weight: 900;
    line-height: 1.18;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  .pdv4-excellence-row { display: none !important; }
  .pdv4-handle {
    margin: 0;
    padding: 4px 9px;
    border-radius: 999px;
    color: #475569;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    font-size: 12px;
    font-weight: 800;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    overflow-wrap: anywhere;
    max-width: 100%;
  }

  /* ── Verified badge ── */
  body.page-provider-dashboard.page-provider-dashboard-v4 .provider-verified-badge {
    display: inline-flex; align-items: center; gap: 5px;
    margin: 6px 16px 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.09);
    border: 1px solid rgba(14, 116, 144, 0.20);
    color: #0c5460;
    font-size: 11px; font-weight: 800;
    box-shadow: none;
  }

  /* ── Avatar verification + excellence badges: row under avatar ── */
  .pdv4-avatar-wrap { overflow: visible; }
  .pdv4-avatar-wrap .provider-avatar-badge,
  .pdv4-avatar-wrap .pd-avatar-excellence-badges,
  .pdv4-avatar-wrap .nw-avatar-top-badges,
  .pdv4-avatar-wrap .nw-avatar-arc-badges {
    display: none !important;
  }
  .pdv4-badge-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    direction: ltr;
    gap: 6px;
    margin-top: 6px;
    min-height: 30px;
    position: relative;
    z-index: 9;
    width: max-content;
    max-width: none;
  }
  .pdv4-badge-row.hidden { display: none; }
  .pdv4-badge-seal {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    border: 2.4px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pdv4-seal-color, #5f33ad), color-mix(in srgb, var(--pdv4-seal-color, #5f33ad) 78%, #000));
    box-shadow:
      0 7px 15px color-mix(in srgb, var(--pdv4-seal-color, #5f33ad) 32%, transparent),
      0 2px 5px rgba(15, 23, 42, 0.18);
    flex: 0 0 auto;
  }
  .pdv4-badge-row.is-wide { gap: 5px; }
  .pdv4-badge-row.is-wide .pdv4-badge-seal {
    width: 24px;
    height: 24px;
    border-width: 2.2px;
  }
  .pdv4-badge-seal svg { width: 14px; height: 14px; }
  .pdv4-badge-row.is-wide .pdv4-badge-seal svg { width: 13px; height: 13px; }

  /* ── Upload status ── */
  body.page-provider-dashboard.page-provider-dashboard-v4 .pd-upload-status {
    margin: 6px 16px 0;
    width: auto;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(14, 116, 144, 0.18);
    background: rgba(14, 116, 144, 0.07);
    color: #0c5460;
    font-size: 12px; font-weight: 700;
  }

  /* ── Stats bar (mirrors mwx-stats) ── */
  .pdv4-stats {
    margin: 12px 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(14, 116, 144, 0.10);
    background: linear-gradient(135deg, rgba(204, 251, 241, 0.50) 0%, rgba(240, 249, 250, 0.72) 100%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
  }
  .pdv4-stat {
    padding: 12px 8px;
    text-align: center;
    display: grid; gap: 3px;
    position: relative;
  }
  .pdv4-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18%; bottom: 18%;
    inset-inline-end: 0;
    width: 1px;
    background: rgba(14, 116, 144, 0.15);
  }
  .pdv4-stat strong { color: #1FB5A8; font-size: 22px; font-weight: 900; line-height: 1; }
  .pdv4-stat span   { color: #5a8a92; font-size: 10.5px; font-weight: 800; }

  /* ── Mode Switch card (mirrors profile.html) ── */
  .pdv4-mode-card { padding: 14px 16px; }
  .pdv4-mode-label { margin: 0 0 8px; color: #0f172a; font-size: 12px; font-weight: 900; }

  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-mode-toggle.ux-mode-switch {
    background: rgba(14, 116, 144, 0.06);
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 12px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-mode-chip {
    border: 0;
    min-height: 40px;
    border-radius: 9px;
    background: transparent;
    color: #5a8a92;
    font-family: 'Cairo', sans-serif;
    font-size: 12px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 7px; cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pv2-mode-chip.active {
    background: linear-gradient(135deg, #1FB5A8, #1FB5A8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.30);
  }

  /* ── Panel head ── */
  .pdv4-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
  }
  .pdv4-panel-title { margin: 0; color: #0f172a; font-size: 16px; font-weight: 900; }

  /* ── Card sections ── */
  .pdv4-section    { padding: 18px 16px; }
  .pdv4-section-sm { padding: 14px 16px; }

  /* ── KPI tiles (mirrors mwx-action) ── */
  .pdv4-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .pdv4-kpi {
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 16px;
    min-height: 90px; padding: 12px 8px;
    background: linear-gradient(155deg, #fff 0%, #f0fafa 100%);
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    border-style: solid;
    -webkit-appearance: none; appearance: none;
  }
  @media (hover: hover) {
    .pdv4-kpi:hover {
      transform: translateY(-3px);
      border-color: rgba(14, 116, 144, 0.28);
      box-shadow: 0 12px 26px rgba(14, 116, 144, 0.13);
    }
  }
  .pdv4-kpi:active { transform: scale(0.97); }

  .pdv4-kpi-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.15), rgba(14, 116, 144, 0.07));
    color: #1FB5A8;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .pdv4-kpi-value { color: #1FB5A8; font-size: 20px; font-weight: 900; line-height: 1; }
  .pdv4-kpi-label { color: #5a8a92; font-size: 10px; font-weight: 800; text-align: center; line-height: 1.3; }

  /* Urgent */
  .pdv4-kpi-urgent .pdv4-kpi-value { color: #dc2626; }
  .pdv4-kpi-urgent .pdv4-kpi-icon  { background: linear-gradient(135deg, rgba(220,38,38,.14), rgba(220,38,38,.07)); color: #dc2626; }
  .pdv4-kpi-urgent:hover { border-color: rgba(220,38,38,.24); box-shadow: 0 12px 26px rgba(220,38,38,.10); }

  /* Competitive */
  .pdv4-kpi-competitive .pdv4-kpi-value { color: #d97706; }
  .pdv4-kpi-competitive .pdv4-kpi-icon  { background: linear-gradient(135deg, rgba(217,119,6,.14), rgba(217,119,6,.07)); color: #d97706; }
  .pdv4-kpi-competitive:hover { border-color: rgba(217,119,6,.22); box-shadow: 0 12px 26px rgba(217,119,6,.08); }

  /* Assigned */
  .pdv4-kpi-assigned .pdv4-kpi-value { color: #1FB5A8; }
  .pdv4-kpi-assigned .pdv4-kpi-icon  { background: linear-gradient(135deg, rgba(15,118,110,.14), rgba(15,118,110,.07)); color: #1FB5A8; }

  /* ── Summary header card ── */
  .pdv4-summary-card { padding: 18px 20px; }
  .pdv4-badge {
    display: inline-flex; align-items: center;
    min-height: 24px; padding: 0 10px;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.10);
    border: 1px solid rgba(14, 116, 144, 0.20);
    color: #0c5460; font-size: 10px; font-weight: 900;
    margin-bottom: 8px;
  }
  .pdv4-summary-title {
    margin: 0 0 6px; color: #0f172a;
    font-size: clamp(18px, 3.5vw, 26px); font-weight: 900; line-height: 1.25;
  }
  .pdv4-summary-sub {
    margin: 0 0 10px; color: #3d7278;
    font-size: 12.5px; font-weight: 700; line-height: 1.9;
  }
  .pdv4-pills-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .pdv4-pill {
    min-height: 24px; padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(14, 116, 144, 0.18);
    background: rgba(14, 116, 144, 0.07);
    color: #0c5460; font-size: 10.5px; font-weight: 800;
    display: inline-flex; align-items: center;
  }

  /* ── Menu items (mirrors mwx-menu-item) ── */
  .pdv4-menu-list { display: grid; gap: 8px; }
  .pdv4-menu-item {
    border: 1px solid rgba(14, 116, 144, 0.10);
    border-radius: 14px;
    min-height: 62px; padding: 12px 14px;
    background: rgba(236, 251, 252, 0.55);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px; align-items: center;
    text-align: right; cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
    font-family: 'Cairo', sans-serif;
    width: 100%; color: inherit; text-decoration: none;
    -webkit-appearance: none; appearance: none; border-style: solid;
  }
  @media (hover: hover) {
    .pdv4-menu-item:hover {
      background: rgba(14, 116, 144, 0.09);
      border-color: rgba(14, 116, 144, 0.22);
      box-shadow: 0 6px 16px rgba(14, 116, 144, 0.09);
    }
  }
  .pdv4-menu-item:active { transform: scale(0.99); }
  .pdv4-menu-item i {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(14,116,144,.14), rgba(14,116,144,.07));
    color: #1FB5A8;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .pdv4-menu-item strong { display: block; color: #0f172a; font-size: 13px; font-weight: 900; }
  .pdv4-menu-item small  { display: block; color: #5a8a92; font-size: 11px; font-weight: 700; margin-top: 2px; line-height: 1.5; }
  .pdv4-arrow { color: #9bbec4; flex-shrink: 0; transition: transform .14s ease; }
  .pdv4-menu-item:hover .pdv4-arrow { transform: translateX(-2px); }
  /* الأسهم مرسومة لليسار (الاتجاه الأمامي في RTL). نقلبها أفقيًا في الإنجليزية
     (LTR) لتشير للأمام (يمينًا) بدل الإشارة للخلف. */
  [dir="ltr"] .pdv4-arrow { transform: scaleX(-1); }
  [dir="ltr"] .pdv4-menu-item:hover .pdv4-arrow { transform: scaleX(-1) translateX(-2px); }
  .pdv4-orders-manage {
    margin-top: 10px;
    background: rgba(236, 251, 252, 0.50);
  }
  .pdv4-sub-icon-orders {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(14, 116, 144, 0.08));
  }
  .pdv4-orders-manage .pdv4-sub-title {
    font-size: 13px;
  }
  .pdv4-orders-manage .pdv4-sub-meta {
    line-height: 1.7;
  }

  /* ── Inline sub-panels (subscription, completion, reels) ── */
  .pdv4-sub-panel {
    padding: 14px;
    border: 1px solid rgba(14, 116, 144, 0.10);
    border-radius: 16px;
    background: rgba(236, 251, 252, 0.50);
    display: grid; gap: 10px;
  }
  .pdv4-sub-panel + .pdv4-sub-panel { margin-top: 10px; }

  .pdv4-sub-head { display: flex; align-items: center; gap: 10px; }
  .pdv4-sub-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .pdv4-sub-icon-gold   { background: linear-gradient(135deg, rgba(217,179,0,.18), rgba(217,119,6,.10)); }
  .pdv4-sub-icon-teal   { background: linear-gradient(135deg, rgba(14,116,144,.14), rgba(15,118,110,.07)); }
  .pdv4-sub-icon-purple { background: linear-gradient(135deg, rgba(103,58,183,.14), rgba(103,58,183,.07)); }
  .pdv4-sub-title { margin: 0; color: #0f172a; font-size: 13px; font-weight: 900; }
  .pdv4-sub-meta  { margin: 2px 0 0; color: #5a8a92; font-size: 11px; font-weight: 700; }

  /* ── Progress bar ── */
  .pdv4-progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .pdv4-progress-label { color: #0f172a; font-size: 13px; font-weight: 900; }
  .pdv4-progress-pct   { color: #1FB5A8; font-size: 13px; font-weight: 900; }
  .pdv4-progress-track {
    height: 8px; border-radius: 999px;
    background: rgba(14, 116, 144, 0.12);
    overflow: hidden;
  }
  .pdv4-progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #1FB5A8, #1FB5A8);
    transition: width .5s ease;
    width: 0%;
  }

  /* ── CTA Button ── */
  .pdv4-cta-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, #1FB5A8, #1FB5A8);
    color: #fff;
    text-decoration: none; font-size: 13px; font-weight: 900;
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.28);
    transition: transform .16s ease, box-shadow .16s ease;
    border: none; cursor: pointer;
    font-family: 'Cairo', sans-serif;
    width: 100%;
  }
  .pdv4-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(14, 116, 144, 0.38);
    color: #fff;
  }
  .pdv4-plan-actions {
    display: grid;
    gap: 8px;
  }
  .pdv4-plan-actions .pdv4-cta-btn {
    min-height: 44px;
  }
  .pdv4-cta-btn-secondary {
    background: rgba(255,255,255,.74);
    color: #1FB5A8;
    border: 1px solid rgba(14,116,144,.28);
    box-shadow: none;
  }
  .pdv4-cta-btn-secondary:hover {
    color: #1FB5A8;
    background: rgba(236,251,252,.92);
    box-shadow: 0 6px 16px rgba(14,116,144,.14);
  }

  /* ── Reels row (لمحات) ── */
  .pdv4-reels-row {
    display: flex; gap: 10px; padding: 4px 2px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .pdv4-reels-row::-webkit-scrollbar { display: none; }
  .pdv4-reel-add {
    width: 80px; min-width: 80px; height: 118px;
    border-radius: 18px;
    border: 2px dashed rgba(14, 116, 144, 0.34);
    background: linear-gradient(165deg, rgba(236, 254, 255, 0.92), rgba(240, 253, 250, 0.65));
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
  }
  .pdv4-reel-add:hover {
    border-color: rgba(14, 116, 144, 0.58);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(14, 116, 144, 0.14);
  }
  .pdv4-reel-add-icon {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #1FB5A8, #1FB5A8);
    color: #fff;
    box-shadow: 0 6px 14px rgba(14, 116, 144, 0.32);
  }
  .pdv4-reel-add-icon svg { width: 18px; height: 18px; }
  .pdv4-reel-add-label {
    font-size: 10.5px; font-weight: 900; color: #1FB5A8;
    line-height: 1.3; text-align: center; padding: 0 4px;
  }
  .pdv4-reel-add.is-quota-full {
    border-color: rgba(217, 119, 6, 0.42);
    background: linear-gradient(165deg, rgba(255, 251, 235, 0.95), rgba(254, 243, 199, 0.58));
  }
  .pdv4-reel-add.is-quota-full .pdv4-reel-add-icon {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 6px 14px rgba(217, 119, 6, 0.28);
  }
  .pdv4-reel-add.is-quota-full .pdv4-reel-add-label { color: #b45309; }
  .pdv4-reel-add.is-disabled {
    border-color: rgba(100, 116, 139, 0.28);
    background: rgba(241, 245, 249, 0.8);
    cursor: not-allowed;
    transform: none; box-shadow: none;
  }
  .pdv4-reel-add.is-disabled .pdv4-reel-add-icon { background: #94a3b8; box-shadow: none; }
  .pdv4-reel-add.is-disabled .pdv4-reel-add-label { color: #64748b; }

  body.page-provider-dashboard.page-provider-dashboard-v4 .pd-reel-thumb {
    position: relative;
    width: 80px; min-width: 80px; height: 118px;
    border-radius: 18px;
    border: 1px solid rgba(14, 116, 144, 0.14);
    background-color: #0f172a;
    background-size: cover; background-position: center;
    overflow: hidden; cursor: pointer; flex-shrink: 0;
    display: block;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pd-reel-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.16);
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pd-reel-thumb::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.20) 0%, rgba(15, 23, 42, 0) 36%, rgba(15, 23, 42, 0.58) 100%);
    pointer-events: none;
  }
  .pd-reel-play {
    position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 1;
    width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    pointer-events: none;
  }
  .pd-reel-play svg { width: 13px; height: 13px; fill: currentColor; }
  .pd-reel-label {
    position: absolute; bottom: 10px; inset-inline-end: 8px; z-index: 1;
    color: #fff; font-size: 9.5px; font-weight: 800;
    text-shadow: 0 1px 4px rgba(15, 23, 42, 0.6);
    pointer-events: none;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pd-reel-del {
    position: absolute; top: 6px; inset-inline-end: 6px; z-index: 2;
    width: 22px; height: 22px; border-radius: 50%; border: 0;
    display: grid; place-items: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    color: #fff; cursor: pointer;
    font-size: 14px; line-height: 1; padding: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: background .16s ease;
  }
  body.page-provider-dashboard.page-provider-dashboard-v4 .pd-reel-del:hover {
    background: rgba(220, 38, 38, 0.85);
  }
  .pdv4-spotlight-chip {
    margin-inline-start: auto;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(14, 116, 144, 0.10);
    color: #1FB5A8;
    font-size: 11px; font-weight: 900;
    border: 1px solid rgba(14, 116, 144, 0.22);
    white-space: nowrap;
  }
  .pdv4-spotlight-chip.is-warning {
    background: rgba(217, 119, 6, 0.10);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.26);
  }
  .pd-spotlight-quota { margin-top: 10px; }
  .pd-spotlight-quota-track {
    height: 6px; border-radius: 999px;
    background: rgba(14, 116, 144, 0.12);
    overflow: hidden;
  }
  .pd-spotlight-quota-fill {
    height: 100%; width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1FB5A8, #1FB5A8);
    transition: width .5s ease;
  }
  .pd-spotlight-quota-fill.is-warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
  }
  #spotlight-note { margin-top: 6px; }
  #spotlight-note.is-warning {
    color: #9a3412;
  }
  .pd-spotlight-duration-alert {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 12px;
    border: 1px solid rgba(100, 116, 139, .18);
    background: rgba(248, 250, 252, .85);
    box-shadow: none;
    overflow: hidden;
  }
  .pd-spotlight-duration-alert::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 999px;
    background: #94a3b8;
  }
  .pd-spotlight-duration-alert__icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #475569;
    background: rgba(100, 116, 139, .12);
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, .14);
  }
  .pd-spotlight-duration-alert__icon svg {
    width: 15px;
    height: 15px;
  }
  .pd-spotlight-duration-alert__copy {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
  }
  .pd-spotlight-duration-alert__title {
    margin: 0;
    font-size: 11.5px;
    font-weight: 900;
    color: #334155;
    white-space: nowrap;
  }
  .pd-spotlight-duration-alert__body {
    margin: 0;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.45;
    font-weight: 700;
  }
  .pd-spotlight-duration-alert.is-checking .pd-spotlight-duration-alert__icon svg {
    animation: pdSpotlightSpin 1.1s linear infinite;
  }
  .pd-spotlight-duration-alert.is-ok {
    border-color: rgba(22, 163, 74, .24);
    background: rgba(240, 253, 244, .72);
  }
  .pd-spotlight-duration-alert.is-ok::before {
    background: #22c55e;
  }
  .pd-spotlight-duration-alert.is-error {
    border-color: rgba(220, 38, 38, .26);
    background: rgba(254, 242, 242, .82);
    box-shadow: none;
  }
  .pd-spotlight-duration-alert.is-error::before {
    background: #dc2626;
  }
  .pd-spotlight-duration-alert.is-error .pd-spotlight-duration-alert__icon {
    color: #b91c1c;
    background: rgba(220, 38, 38, .10);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .14);
  }
  .pd-spotlight-duration-alert.is-error .pd-spotlight-duration-alert__title {
    color: #7f1d1d;
  }
  @keyframes pdSpotlightSpin {
    to { transform: rotate(360deg); }
  }
  .pd-spotlight-cat-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
  }
  .pd-spotlight-cat-card {
    width: min(420px, 100%);
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  }
  .pd-spotlight-cat-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
  }
  .pd-spotlight-cat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }
  .pd-spotlight-cat-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    transition: border-color .15s, background .15s;
  }
  .pd-spotlight-cat-option:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
  }
  .pd-spotlight-cat-option input { accent-color: #2563eb; }
  .pd-spotlight-cat-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  .pd-spotlight-cat-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .pd-spotlight-cat-cancel {
    background: #f1f5f9;
    color: #475569;
  }
  .pd-spotlight-cat-confirm {
    background: #2563eb;
    color: #fff;
  }
  .pd-upgrade-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .pd-upgrade-dialog {
    width: min(100%, 420px);
    border-radius: 28px;
    padding: 22px 18px 18px;
    background:
      radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 30%),
      radial-gradient(circle at bottom left, rgba(14, 116, 144, 0.14), transparent 28%),
      linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,255,0.96));
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.26);
    display: grid;
    gap: 14px;
    animation: pdUpgradeSlideUp .22s ease;
  }
  @keyframes pdUpgradeSlideUp {
    from { transform: translateY(18px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .pd-upgrade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    font-size: 11px;
    font-weight: 900;
  }
  .pd-upgrade-title {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 900;
  }
  .pd-upgrade-copy {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.9;
    font-weight: 700;
  }
  .pd-upgrade-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pd-upgrade-stat {
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 4px;
  }
  .pd-upgrade-stat strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
  }
  .pd-upgrade-stat span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }
  .pd-upgrade-actions {
    display: grid;
    gap: 10px;
  }
  .pd-upgrade-secondary {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(14, 116, 144, 0.14);
    background: rgba(255,255,255,0.78);
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
  }

  /* ── Extra services card ── */
  .pdv4-extras-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 18px;
    background:
      radial-gradient(circle at top right, rgba(14, 116, 144, 0.08), transparent 28%),
      radial-gradient(circle at bottom left, rgba(217, 119, 6, 0.08), transparent 26%),
      linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
  }
  .pdv4-extras-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
  }
  .pdv4-extras-head-copy {
    min-width: 0;
  }
  .pdv4-extras-title {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 900;
  }
  .pdv4-extras-note {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
    font-weight: 700;
  }
  .pdv4-extras-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: #0c4a6e;
    background: rgba(14, 116, 144, 0.08);
    border: 1px solid rgba(14, 116, 144, 0.14);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
  }
  .pdv4-extras-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .pdv4-extra-pill {
    min-height: 42px; padding: 0 15px;
    border-radius: 14px; border: 1px solid;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 850;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  }
  .pdv4-extra-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }
  .pdv4-extra-pill-green {
    background: rgba(15,118,110,.08); border-color: rgba(15,118,110,.18); color: #1FB5A8;
  }
  .pdv4-extra-pill-gold {
    background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.18); color: #92400e;
  }
  .pdv4-extra-pill-blue {
    background: rgba(14,116,144,.08); border-color: rgba(14,116,144,.18); color: #0c4a6e;
  }
  .pdv4-extras-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    text-align: center;
    color: #1FB5A8;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(14, 116, 144, 0.1);
    background: rgba(255,255,255,0.76);
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  }
  .pdv4-extras-cta:hover {
    background: rgba(14, 116, 144, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14, 116, 144, 0.08);
  }
  .pdv4-extras-cta-arrow {
    color: #f97316;
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
  }
  /* السهم النصّي ← يشير لليسار (أمامي في RTL)؛ نقلبه في LTR ليصبح → */
  [dir="ltr"] .pdv4-extras-cta-arrow { display: inline-block; transform: scaleX(-1); }

  /* ── Plan highlights ── */
  #plan-highlights {
    list-style: none; margin: 6px 0 0; padding: 0;
    display: grid; gap: 5px;
  }
  #plan-highlights li {
    display: flex; align-items: flex-start; gap: 8px;
    color: #1e293b; font-size: 12px; font-weight: 700; line-height: 1.6;
  }
  #plan-highlights li::before {
    content: '';
    width: 6px; height: 6px; min-width: 6px;
    border-radius: 50%; background: #1FB5A8; margin-top: 6px;
  }

  /* ── Desktop ── */
  @media (min-width: 880px) {
    .pdv4-cover { min-height: 190px; }
    .pdv4-cover img { min-height: 190px; max-height: 250px; }
    .pdv4-cover-placeholder { min-height: 190px; }
    .pdv4-summary-card { display: block; }
  }

  /* ── Tablet: collapse to single column ── */
  @media (min-width: 880px) and (max-width: 1099px) {
    .pdv4-body { grid-template-columns: 1fr; }
    .pdv4-sidebar { position: static; }
  }

  /* ── Mobile ≤420px ── */
  @media (max-width: 420px) {
    .pdv4-shell { padding: 8px 10px 0; }
    .pdv4-card  { border-radius: 18px; }
    .pdv4-cover { min-height: 165px; }
    .pdv4-cover img, .pdv4-cover-placeholder { min-height: 165px; }
    body.page-provider-dashboard.page-provider-dashboard-v4 .provider-avatar { width: 80px; height: 80px; }
    .pdv4-identity-row {
      margin-top: 12px;
      padding: 0 14px;
      grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
      gap: 12px;
    }
    .pdv4-identity-copy { padding: 0; gap: 4px; }
    .pdv4-name { font-size: 20px; line-height: 1.12; }
    .pdv4-handle { font-size: 11px; }
    .pdv4-stat strong { font-size: 19px; }
    .pdv4-kpi-grid { gap: 8px; }
    .pdv4-kpi { min-height: 80px; padding: 10px 6px; border-radius: 14px; gap: 6px; }
    .pdv4-kpi-icon { width: 36px; height: 36px; border-radius: 10px; }
    .pdv4-kpi-label { font-size: 10px; }
    .pdv4-summary-card { display: none; }
    .pdv4-section, .pdv4-section-sm { padding: 14px 12px; }
    .pdv4-panel-title { font-size: 15px; }
    .pdv4-menu-item { padding: 10px 12px; min-height: 56px; border-radius: 12px; gap: 10px; }
    .pdv4-menu-item i { width: 34px; height: 34px; border-radius: 10px; }
    .pdv4-arrow { display: none; }
  }

  /* ── Mobile ≤360px ── */
  @media (max-width: 360px) {
    .pdv4-identity-row {
      grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
      gap: 10px;
      padding: 0 12px;
    }
    .pdv4-identity-copy { padding: 0; }
    .pdv4-name { font-size: 18px; }
    .pdv4-kpi-grid { gap: 6px; }
    .pdv4-kpi { min-height: 72px; padding: 8px 4px; border-radius: 12px; }
    .pdv4-stat strong { font-size: 17px; }
    .pdv4-stat span   { font-size: 10px; }
    .pdv4-stats { margin: 10px 12px 12px; }
  }

  /* ── Loading state ── */
  [data-loading="true"] { pointer-events: none; }
  [data-loading="true"]::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  [data-loading="true"]::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10000;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(14,116,144,0.2);
    border-top-color: #1FB5A8;
    border-radius: 50%;
    animation: pdv4-spin 0.7s linear infinite;
  }
  @keyframes pdv4-spin { to { transform: rotate(360deg); } }

  /* ── Cover thumb keyboard focus ── */
  .pdv4-cover-thumb:focus-visible {
    outline: 2px solid #1FB5A8;
    outline-offset: 2px;
  }
