/* ==========================================================================
   بوابة الموكلين وحجز الاستشارات — فوق office.css (نفس الألوان والمكونات)
   ========================================================================== */
.p { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.p-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.p-main { flex: 1; padding-top: 26px; padding-bottom: 48px; }
.p-main:focus { outline: none; }

/* الرأس */
.p-head { background: var(--green-900); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.p-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 72px; }
.p-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.p-brand img { height: 44px; width: auto; border-radius: 6px; }
.p-brand strong { display: block; font-family: "Amiri", serif; font-size: 1.2rem; line-height: 1.2; color: #fff; }
.p-brand small { display: block; color: var(--gold-400); font-size: .78rem; }
.p-brand:hover { color: #fff; }
.p-head__actions { display: flex; align-items: center; gap: 8px; }
.p-head__me { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; max-width: 220px; }
.p-head__me:hover { color: var(--gold-400); }
.p-head .btn--outline { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.p-head .btn--outline:hover { border-color: var(--gold-400); color: var(--gold-400); }
.p-head__me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-nav { background: var(--green-950); }
.p-nav__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.p-nav__inner::-webkit-scrollbar { display: none; }
.p-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.p-nav a:hover { color: #fff; }
.p-nav a.is-on { color: #fff; border-bottom-color: var(--gold-500); }
.p-nav__cta { margin-inline-start: auto; color: var(--gold-400) !important; }

/* العناوين */
.p-title { font-size: 1.45rem; margin-bottom: 16px; }
.p-title--in { font-size: 1.2rem; margin: 0; }
.p-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.p-titlebar .p-title { margin: 0; }
.p-back { margin-bottom: 10px; font-size: .9rem; }
.p-back a { text-decoration: none; }
.p-stats { grid-template-columns: repeat(4, 1fr); }

/* الدخول */
.p-auth { max-width: 440px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: 16px; padding: 28px 26px; box-shadow: var(--sh); }
.p-auth--wide { max-width: 520px; }
.p-auth__title { font-size: 1.3rem; text-align: center; margin-bottom: 8px; }
.p-auth__lead { color: var(--muted); text-align: center; font-size: .93rem; }
.p-auth .form { display: grid; gap: 14px; margin-top: 12px; }
.p-auth__note { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 14px 0 0; font-size: .84rem; color: var(--muted); text-align: center; }
.p-code { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-family: ui-monospace, monospace; }
.link-btn--plain { color: var(--green-800); font-size: .84rem; }
.p-slot-sum { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; background: var(--green-50); border: 1px solid #C6DCCE; border-radius: 10px; padding: 10px; margin: 12px 0 6px; }

/* القضايا */
.p-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.p-case { display: grid; gap: 6px; margin: 0; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.p-case:hover { border-color: var(--gold-500); color: var(--ink); }
.p-case__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--green-900); }
.p-case__subject { font-weight: 600; }
.p-case__next { display: flex; align-items: center; gap: 6px; font-size: .9rem; flex-wrap: wrap; }
.p-timeline { list-style: none; margin: 0 0 12px; padding: 0 18px 0 0; border-inline-start: 2px solid var(--line); }
.p-timeline li { position: relative; padding: 6px 14px 12px 0; }
.p-timeline li::before { content: ""; position: absolute; inset-inline-start: -25px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); }
.p-timeline li.is-next::before { background: var(--gold-500); }
.p-timeline li.is-next strong { color: var(--green-900); }

/* الحجز */
.p-book { max-width: 860px; margin: 0 auto; }
.p-step { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 14px; flex-wrap: wrap; }
.p-step > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-800); color: #fff; font-size: .85rem; }
.p-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.p-type { display: grid; gap: 4px; justify-items: start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); }
.p-type .icon { width: 26px; height: 26px; color: var(--gold-600); }
.p-type span { font-size: .84rem; color: var(--muted); }
.p-type:hover { border-color: var(--gold-400); color: var(--ink); }
.p-type.is-on { border-color: var(--green-800); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-800); }
.p-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.p-day { flex: 0 0 auto; display: grid; justify-items: center; min-width: 70px; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); scroll-snap-align: start; }
.p-day strong { font-size: 1.35rem; line-height: 1.2; color: var(--green-900); }
.p-day small { font-size: .74rem; color: var(--muted); }
.p-day:hover { border-color: var(--gold-400); color: var(--ink); }
.p-day.is-on { background: var(--green-800); border-color: var(--green-800); }
.p-day.is-on strong, .p-day.is-on small { color: #fff; }
.p-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 8px; }
.p-slots input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-slots label { display: block; padding: 9px 6px; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; background: var(--surface); }
.p-slots label:hover { border-color: var(--gold-400); }
.p-slots input:checked + label { background: var(--gold-500); border-color: var(--gold-500); color: var(--green-950); }
.p-slots input:focus-visible + label { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.p-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check.is-invalid { color: var(--red); }
.p-booking .dl { margin: 12px 0; }
.p-cal { margin-top: 12px; align-items: center; }
.p-bookings li > a { display: grid; gap: 2px; }

/* التذييل */
.p-foot { background: var(--footer-bg, var(--green-950)); color: rgba(255, 255, 255, .75); font-size: .86rem; }
.p-foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.p-foot p { margin: 0; }
.p-foot strong { color: #fff; }
.p-foot__links { display: flex; gap: 16px; flex-wrap: wrap; }
.p-foot a { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .8); text-decoration: none; }
.p-foot a:hover { color: var(--gold-400); }

@media (max-width: 760px) {
  .p-stats { grid-template-columns: 1fr 1fr; }
  .p .grid-2 { grid-template-columns: 1fr; }
  .p-hide-sm { display: none; }
  .p-brand small { display: none; }
  .p-head__me span { display: none; }
}
@media (max-width: 420px) {
  .p-wrap { padding-inline: 16px; }
  .p-brand strong { font-size: 1.02rem; }
  .p-auth { padding: 22px 16px; }
}

/* الشعار العريض */
.p-brand--wordmark { flex-direction: column; align-items: flex-start; gap: 0; }
.p-brand--wordmark img { height: auto; max-height: 46px; max-width: min(300px, calc(100vw - 170px)); border-radius: 0; }
.p-brand__sub { color: var(--gold-400); font-size: .74rem; font-weight: 600; }
