/*
 * Ahd member-site design layer (loaded LAST, after legacy style.css).
 * Keeps the existing identity (plum + rose) and unifies tokens, forms, cards, buttons, focus states,
 * packages / checkout / payment-result screens. RTL is the default; logical properties are used where possible.
 */
:root {
    --ahd-plum: #4f3445;
    --ahd-plum-700: #3d2835;
    --ahd-plum-50: #f6f0f3;
    --ahd-rose: #e8607f;
    --ahd-rose-600: #d24c6b;
    --ahd-rose-100: #fde9ee;
    --ahd-peach: #f9c0b7;
    --ahd-ink: #2b2230;
    --ahd-muted: #6b6270;
    --ahd-line: #e8e1e5;
    --ahd-bg: #faf7f8;
    --ahd-ok: #1f7a4d;
    --ahd-ok-bg: #e7f5ee;
    --ahd-warn: #8a5a00;
    --ahd-warn-bg: #fff5dc;
    --ahd-err: #b3261e;
    --ahd-err-bg: #fdecea;
    --ahd-info: #1f5f8b;
    --ahd-info-bg: #e8f2fa;
    --ahd-radius: 14px;
    --ahd-shadow: 0 1px 2px rgba(43, 34, 48, .06), 0 8px 24px rgba(43, 34, 48, .07);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Readex Pro', Tahoma, sans-serif; color: var(--ahd-ink); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; }

/* ---------- focus + accessibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible { outline: 3px solid rgba(232, 96, 127, .55); outline-offset: 2px; }
.sr-only-ahd { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* ---------- forms ---------- */
.form-control, select.form-control, textarea.form-control {
    height: auto; min-height: 46px; border: 1px solid var(--ahd-line); border-radius: 10px;
    padding: 10px 14px; font-size: 15px; box-shadow: none; background: #fff; color: var(--ahd-ink);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--ahd-rose); box-shadow: 0 0 0 3px rgba(232, 96, 127, .18); }
.form-control.is-invalid, .has-error .form-control { border-color: var(--ahd-err); }
label { font-weight: 500; color: var(--ahd-plum); }
.text-danger, .text-red-600 { color: var(--ahd-err) !important; font-size: 13px; }
button[disabled], .btn.disabled, .btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- buttons (override legacy gradient-only .btn) ---------- */
.ahd-btn, a.ahd-btn, button.ahd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
    padding: 10px 28px; border-radius: 10px; border: 1px solid transparent; font-size: 15px; font-weight: 600;
    line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s, box-shadow .15s;
    background: var(--ahd-plum); color: #fff; margin: 0;
}
.ahd-btn:hover { background: var(--ahd-plum-700); color: #fff; text-decoration: none; }
.ahd-btn:active { transform: translateY(1px); }
.ahd-btn.ahd-btn--rose { background: var(--ahd-rose); }
.ahd-btn.ahd-btn--rose:hover { background: var(--ahd-rose-600); }
.ahd-btn.ahd-btn--ghost { background: #fff; color: var(--ahd-plum); border-color: var(--ahd-line); }
.ahd-btn.ahd-btn--ghost:hover { background: var(--ahd-plum-50); color: var(--ahd-plum); }
.ahd-btn--block { display: flex; width: 100%; }
.ahd-btn .ahd-spin { display: none; }
.ahd-btn.is-loading .ahd-spin { display: inline-block; }
.ahd-spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: ahdspin .7s linear infinite; }
@keyframes ahdspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ahd-spin { animation-duration: 2s; } }

/* ---------- alerts ---------- */
.ahd-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; text-align: right; border: 1px solid transparent; }
.ahd-alert i { margin-top: 4px; }
.ahd-alert--info { background: var(--ahd-info-bg); color: var(--ahd-info); border-color: #cfe3f3; }
.ahd-alert--ok { background: var(--ahd-ok-bg); color: var(--ahd-ok); border-color: #c5e7d5; }
.ahd-alert--warn { background: var(--ahd-warn-bg); color: var(--ahd-warn); border-color: #f1dca0; }
.ahd-alert--err { background: var(--ahd-err-bg); color: var(--ahd-err); border-color: #f4c7c3; }

/* ---------- page shell ---------- */
.ahd-page { padding: 40px 0 64px; background: var(--ahd-bg); }
.ahd-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ahd-wrap--narrow { max-width: 560px; }
.ahd-card { background: #fff; border: 1px solid var(--ahd-line); border-radius: var(--ahd-radius); box-shadow: var(--ahd-shadow); padding: 24px; }
.ahd-h { color: var(--ahd-plum); font-weight: 700; margin: 0 0 8px; }
.ahd-sub { color: var(--ahd-muted); margin: 0 0 24px; }

/* ---------- subscription-required gate ---------- */
.ahd-gate { background: linear-gradient(135deg, var(--ahd-plum), #6a4660); color: #fff; border-radius: var(--ahd-radius); padding: 28px; margin-bottom: 28px; display: flex; gap: 20px; align-items: center; box-shadow: var(--ahd-shadow); }
.ahd-gate__icon { flex: 0 0 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .15); display: grid; place-items: center; font-size: 24px; }
.ahd-gate h2 { margin: 0 0 6px; font-size: 20px; color: #fff; }
.ahd-gate p { margin: 0; color: rgba(255, 255, 255, .88); }
.ahd-gate--expired { background: linear-gradient(135deg, #7a4a2b, #a0643a); }

/* ---------- packages ---------- */
.ahd-pkgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.ahd-pkg { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ahd-line); border-radius: var(--ahd-radius); padding: 28px 24px; box-shadow: var(--ahd-shadow); transition: box-shadow .2s, border-color .2s; }
.ahd-pkg:hover { border-color: var(--ahd-peach); box-shadow: 0 2px 4px rgba(43, 34, 48, .06), 0 14px 32px rgba(43, 34, 48, .1); }
.ahd-pkg__name { font-size: 20px; font-weight: 700; color: var(--ahd-plum); margin: 0 0 4px; }
.ahd-pkg__dur { color: var(--ahd-muted); margin: 0 0 18px; }
.ahd-pkg__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.ahd-pkg__amount { font-size: 40px; font-weight: 700; color: var(--ahd-ink); line-height: 1; }
.ahd-pkg__cur { color: var(--ahd-muted); font-size: 16px; }
.ahd-pkg__daily { color: var(--ahd-muted); font-size: 13px; margin-bottom: 18px; }
.ahd-pkg__list { list-style: none; margin: 0 0 20px; padding: 18px 0 0; border-top: 1px solid var(--ahd-line); flex: 1; text-align: right; }
.ahd-pkg__list li { display: flex; gap: 10px; margin-bottom: 10px; }
.ahd-pkg__list i { color: var(--ahd-ok); margin-top: 5px; }
.ahd-pkg__note { font-size: 12px; color: var(--ahd-muted); margin-bottom: 14px; }
.ahd-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ahd-plum-50); color: var(--ahd-plum); }
.ahd-badge--ok { background: var(--ahd-ok-bg); color: var(--ahd-ok); }
.ahd-badge--warn { background: var(--ahd-warn-bg); color: var(--ahd-warn); }

/* ---------- checkout ---------- */
.ahd-checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.ahd-summary dl { margin: 0; }
.ahd-summary .row-i { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--ahd-line); }
.ahd-summary .row-i:last-child { border-bottom: 0; }
.ahd-summary dt { color: var(--ahd-muted); font-weight: 400; }
.ahd-summary dd { margin: 0; font-weight: 600; text-align: left; }
.ahd-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding: 16px; background: var(--ahd-plum-50); border-radius: 12px; font-size: 18px; font-weight: 700; color: var(--ahd-plum); }
.ahd-status { display: none; margin-top: 14px; }
.ahd-status.is-on { display: flex; }
.ahd-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; font-size: 13px; color: var(--ahd-muted); flex-wrap: wrap; }
.ahd-steps li { display: flex; align-items: center; gap: 6px; }
.ahd-steps li b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ahd-line); color: var(--ahd-plum); font-size: 12px; }
.ahd-steps li.on b { background: var(--ahd-plum); color: #fff; }
.ahd-steps li.on { color: var(--ahd-plum); font-weight: 600; }

/* ---------- payment result ---------- */
.ahd-result { text-align: center; padding: 36px 24px; }
.ahd-result__icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 32px; }
.ahd-result--ok .ahd-result__icon { background: var(--ahd-ok-bg); color: var(--ahd-ok); }
.ahd-result--err .ahd-result__icon { background: var(--ahd-err-bg); color: var(--ahd-err); }
.ahd-result--warn .ahd-result__icon { background: var(--ahd-warn-bg); color: var(--ahd-warn); }
.ahd-result--info .ahd-result__icon { background: var(--ahd-info-bg); color: var(--ahd-info); }
.ahd-result h2 { margin: 0 0 8px; color: var(--ahd-plum); font-size: 22px; }
.ahd-result p { color: var(--ahd-muted); max-width: 440px; margin: 0 auto 20px; }
.ahd-result .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ahd-result .meta { max-width: 360px; margin: 0 auto 22px; text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 767px) {
    .ahd-page { padding: 24px 0 48px; }
    .ahd-checkout { grid-template-columns: 1fr; }
    .ahd-gate { flex-direction: column; text-align: center; }
    .ahd-pkg__amount { font-size: 34px; }
    .ahd-card { padding: 18px; }
    .container { padding-left: 16px; padding-right: 16px; }
    .table-responsive, table { max-width: 100%; }
}

/* ---------- chat polish ---------- */
.message-group.me .message-bubble { background: var(--ahd-plum) !important; color: #fff !important; }
.message-group.other .message-bubble { background: #fff !important; color: var(--ahd-ink) !important; border: 1px solid var(--ahd-line); }
.message-bubble { overflow-wrap: anywhere; line-height: 1.8; white-space: pre-wrap; }
#message-input { min-height: 70px; resize: vertical; }

/* ---------- contrast: legacy white-on-pale-pink buttons fall below 3:1; use a deeper rose ---------- */
.btn:not(.btn-default):not(.btn-link):not(.ahd-btn), .add-to-cart, .submit button, .search-form button[type="submit"],
.questions-con button[type="submit"], .subscribe-section button, .btn-action, .btn-primary:not(.ahd-btn) {
    background: linear-gradient(135deg, #c93f61, #de5a7c) !important; color: #fff !important; border-color: transparent !important;
}
.btn:not(.btn-default):not(.btn-link):not(.ahd-btn):hover, .add-to-cart:hover, .submit button:hover, .btn-action:hover {
    background: linear-gradient(135deg, #b33556, #c93f61) !important; color: #fff !important;
}
.add-to-cart i { margin-inline-end: 4px; }
bdi, .ahd-ltr { unicode-bidi: isolate; }
.sign-up-form button:not(.btn-link), .login-form button[type="submit"]:not(.btn-link), .sign-up-page button.next, .sign-up-page button.prev {
    background: linear-gradient(135deg, #c93f61, #de5a7c) !important; color: #fff !important;
}
.swal2-styled.swal2-confirm { background: var(--ahd-plum) !important; color: #fff !important; box-shadow: none !important; }
.swal2-styled.swal2-cancel { background: #fff !important; color: var(--ahd-plum) !important; border: 1px solid var(--ahd-line) !important; }
.swal2-popup { font-family: 'Readex Pro', sans-serif; direction: rtl; }

/* chat composer: textarea takes the row, send button stays fixed-size (was ~140px wide on phones) */
#message-form { display: flex; align-items: stretch; gap: 8px; padding: 10px; }
#message-form #message-input { flex: 1 1 auto; min-width: 0; width: auto; margin: 0 !important; }
#message-form button[type="submit"] { flex: 0 0 52px; padding: 0; min-height: 46px; }

/* tablet: keep single-column checkout/cards readable instead of 700px-wide forms */
@media (min-width: 768px) and (max-width: 991px) { .ahd-checkout { max-width: 640px; margin: 0 auto; } }

/* ---------- search result cards (search/advanced + search/simple): equal-height cards, tidy action buttons ---------- */
.ahd-search-row { display: flex; flex-wrap: wrap; }
.ahd-search-row::before, .ahd-search-row::after { display: none; }
.ahd-search-row > [class*="col-"] { display: flex; float: none; margin-bottom: 24px; }
.ahd-search-row > [class*="col-"] > br { display: none; }
.ahd-search-row .products-grid { display: flex; flex-direction: column; width: 100%; }
.ahd-search-row .products-grid .product-content { flex: 1 1 auto; display: flex; flex-direction: column; }
.ahd-card-actions { margin-top: auto; padding: 16px 14px 16px; display: flex; gap: 10px; }
.products-grid .ahd-card-actions .add-to-cart {
    flex: 1 1 0; min-width: 0; width: auto; margin: 0; min-height: 44px; padding: 8px 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 10px; font-size: 14px; line-height: 1.2; text-align: center; white-space: nowrap;
}
.products-grid .ahd-card-actions .add-to-cart i {
    flex: 0 0 auto; width: auto; height: auto; line-height: 1; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font-size: 15px;
}
.products-grid .ahd-card-actions .add-to-cart span { flex: 0 1 auto; width: auto; height: auto; line-height: 1.2; padding: 0; display: inline; }
@media (max-width: 400px) { .ahd-card-actions { flex-direction: column; } }


/* =====================================================================
   Header / navigation (replaces legacy navbar + home side panel)
   ===================================================================== */
.ahd-btn--sm { min-height: 38px; padding: 6px 16px; font-size: 14px; border-radius: 9px; }
.ahd-btn--lg { min-height: 52px; padding: 12px 34px; font-size: 16px; border-radius: 12px; }

.ahd-header { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ahd-line); }
.ahd-header__bar { max-width: 1180px; margin: 0 auto; padding: 0 16px; min-height: 68px; display: flex; align-items: center; gap: 24px; }
.ahd-header__brand { flex: 0 0 auto; display: block; }
.ahd-header__brand img { height: 52px; width: auto; display: block; }
.ahd-header__nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ahd-nav-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.ahd-nav-links > li > a, .ahd-dd__btn.ahd-nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; color: var(--ahd-ink); font-size: 15px; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; }
.ahd-nav-links > li > a:hover { background: var(--ahd-plum-50); color: var(--ahd-plum); }
.ahd-nav-links > li > a.is-active { color: var(--ahd-rose-600); background: var(--ahd-rose-100); font-weight: 600; }
.ahd-nav-actions { display: flex; align-items: center; gap: 8px; }
.ahd-icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ahd-plum); background: none; border: 0; text-decoration: none; cursor: pointer; font-size: 16px; }
.ahd-icon-btn:hover { background: var(--ahd-plum-50); color: var(--ahd-plum); }
.ahd-count { position: absolute; top: 0; inset-inline-start: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ahd-rose-600); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.ahd-dd .ahd-count, .ahd-dd__menu .ahd-count { position: static; display: inline-block; margin-inline-start: 6px; }
.ahd-dd { position: relative; }
.ahd-dd > .ahd-dd__btn:not(.ahd-icon-btn) { padding: 8px 14px; border-radius: 9px; border: 0; background: none; font-size: 15px; font-weight: 500; color: var(--ahd-ink); cursor: pointer; font-family: inherit; }
.ahd-dd > .ahd-dd__btn:not(.ahd-icon-btn):hover { background: var(--ahd-plum-50); color: var(--ahd-plum); }
.ahd-dd__btn i.fa-chevron-down { font-size: 10px; margin-inline-start: 4px; }
.ahd-dd__menu { display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 200px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--ahd-line); border-radius: 12px; box-shadow: var(--ahd-shadow); z-index: 1100; }
.ahd-dd__menu--end { inset-inline-start: auto; inset-inline-end: 0; }
.ahd-dd.is-open > .ahd-dd__menu { display: block; }
.ahd-dd__menu a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--ahd-ink); text-decoration: none; font-size: 14px; }
.ahd-dd__menu a:hover { background: var(--ahd-plum-50); color: var(--ahd-plum); }
.ahd-header__toggle { display: none; margin-inline-start: auto; width: 44px; height: 44px; border: 1px solid var(--ahd-line); border-radius: 10px; background: #fff; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.ahd-header__toggle span { display: block; width: 20px; height: 2px; background: var(--ahd-plum); border-radius: 2px; transition: transform .2s, opacity .2s; }
.ahd-header.is-open .ahd-header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ahd-header.is-open .ahd-header__toggle span:nth-child(2) { opacity: 0; }
.ahd-header.is-open .ahd-header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
    .ahd-header__bar { flex-wrap: wrap; min-height: 60px; gap: 0; }
    .ahd-header__brand img { height: 44px; }
    .ahd-header__toggle { display: inline-flex; }
    .ahd-header__nav { display: none; flex: 0 0 100%; flex-direction: column; align-items: stretch; padding: 8px 0 16px; border-top: 1px solid var(--ahd-line); margin-top: 8px; max-height: calc(100vh - 72px); overflow-y: auto; }
    .ahd-header.is-open .ahd-header__nav { display: flex; }
    .ahd-nav-links { flex-direction: column; align-items: stretch; }
    .ahd-nav-links > li > a, .ahd-dd > .ahd-dd__btn:not(.ahd-icon-btn) { width: 100%; justify-content: flex-start; padding: 12px 10px; text-align: start; }
    .ahd-dd__menu { position: static; box-shadow: none; border: 0; padding: 0 12px 0 0; min-width: 0; }
    .ahd-nav-actions { padding-top: 10px; border-top: 1px solid var(--ahd-line); flex-wrap: wrap; }
    .ahd-nav-actions .ahd-btn { flex: 1 1 0; }
    .ahd-dd--user .ahd-dd__menu { position: absolute; }
}

/* =====================================================================
   Home hero
   ===================================================================== */
.ahd-hero { background: linear-gradient(180deg, var(--ahd-plum-50) 0%, #fff 100%); padding: 48px 16px 56px; overflow: hidden; }
.ahd-hero__inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.ahd-eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--ahd-rose-100); color: var(--ahd-rose-600); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.ahd-hero h1 { margin: 0 0 16px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.35; font-weight: 700; color: var(--ahd-plum); }
.ahd-hero h1 span { display: block; color: var(--ahd-rose-600); }
.ahd-hero__copy > p { margin: 0 0 28px; font-size: 17px; line-height: 2; color: var(--ahd-muted); max-width: 540px; }
.ahd-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.ahd-hero__note { margin: 0; font-size: 14px; color: var(--ahd-ok); display: flex; align-items: center; gap: 8px; }
.ahd-hero__note i { font-size: 16px; }
.ahd-hero__media { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 520px; box-shadow: 0 24px 60px rgba(79, 52, 69, .22); background: var(--ahd-plum-50); }
.ahd-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(79, 52, 69, .25)); pointer-events: none; }
.ahd-hero__media img, .ahd-hero__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 991px) {
    .ahd-hero { padding: 28px 16px 40px; }
    .ahd-hero__inner { grid-template-columns: 1fr; gap: 28px; }
    .ahd-hero__media { aspect-ratio: 16 / 10; max-height: 300px; order: -1; border-radius: 20px; }
    .ahd-hero__copy { text-align: center; }
    .ahd-hero__copy > p { margin-inline: auto; }
    .ahd-hero__cta, .ahd-hero__note { justify-content: center; }
}
@media (max-width: 480px) { .ahd-hero__cta .ahd-btn { flex: 1 1 100%; } }
.ahd-header button { box-shadow: none; text-shadow: none; font-family: inherit; }
.ahd-header .ahd-icon-btn, .ahd-header .ahd-dd > .ahd-dd__btn:not(.ahd-icon-btn) { background: transparent !important; color: var(--ahd-plum) !important; }
.ahd-header .ahd-icon-btn:hover, .ahd-header .ahd-dd > .ahd-dd__btn:not(.ahd-icon-btn):hover { background: var(--ahd-plum-50) !important; }
.ahd-header .ahd-dd.is-open > .ahd-dd__btn { background: var(--ahd-plum-50) !important; }
.ahd-header .ahd-btn--rose { background: var(--ahd-rose) !important; color: #fff !important; }
.ahd-header .ahd-btn--ghost { background: #fff !important; color: var(--ahd-plum) !important; }

/* =====================================================================
   Authentication pages (login, register, OTP, forgot/reset password)
   ===================================================================== */
.ahd-auth { background: var(--ahd-bg); padding: 40px 16px 72px; min-height: 60vh; }
.ahd-auth__card { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--ahd-line); border-radius: 18px; box-shadow: var(--ahd-shadow); padding: 32px 32px 26px; }
.ahd-auth__card--wide { max-width: 720px; }
.ahd-auth__head { text-align: center; margin-bottom: 22px; }
.ahd-auth__head h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; color: var(--ahd-plum); }
.ahd-auth__head p { margin: 0; color: var(--ahd-muted); line-height: 1.9; font-size: 15px; }
.ahd-auth__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--ahd-rose-100); color: var(--ahd-rose-600); display: grid; place-items: center; font-size: 22px; }
.ahd-auth__alt { text-align: center; margin: 20px 0 0; color: var(--ahd-muted); font-size: 15px; }
.ahd-auth__resend { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; color: var(--ahd-muted); font-size: 14px; }
.ahd-link { color: var(--ahd-rose-600); font-weight: 600; text-decoration: none; }
.ahd-link:hover { text-decoration: underline; color: var(--ahd-rose-600); }
.ahd-linkbtn { background: none !important; border: 0; padding: 0; color: var(--ahd-rose-600) !important; font-weight: 600; cursor: pointer; font-family: inherit; font-size: inherit; box-shadow: none; }
.ahd-linkbtn[disabled] { color: var(--ahd-muted) !important; cursor: not-allowed; }
.ahd-req { color: var(--ahd-err); }
.ahd-field { margin-bottom: 18px; }
.ahd-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ahd-plum); }
.ahd-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ahd-field__row label { margin-bottom: 6px; }
.ahd-field__row .ahd-link { font-size: 13px; }
.ahd-field__hint { margin: 6px 0 0; font-size: 13px; color: var(--ahd-muted); }
.ahd-field__error { margin: 6px 0 0; font-size: 13px; color: var(--ahd-err); display: flex; gap: 6px; align-items: flex-start; }
.ahd-field__error::before { content: "!"; flex: 0 0 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--ahd-err); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.ahd-auth .form-control.is-invalid { border-color: var(--ahd-err); background-image: none; }
.ahd-auth .form-control { width: 100%; }
.ahd-pw { position: relative; }
.ahd-pw .form-control { padding-inline-end: 46px; }
.ahd-pw__toggle { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 46px; background: none !important; border: 0; color: var(--ahd-muted) !important; cursor: pointer; box-shadow: none; }
.ahd-pw__toggle:hover { color: var(--ahd-plum) !important; }
.ahd-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; font-weight: 400 !important; font-size: 14px; color: var(--ahd-ink) !important; cursor: pointer; line-height: 1.8; }
.ahd-check input { margin-top: 6px; width: 17px; height: 17px; accent-color: var(--ahd-rose-600); flex: 0 0 auto; }
.ahd-check--terms { margin-bottom: 0; }
.ahd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.ahd-form-grid .ahd-field--full { grid-column: 1 / -1; }
.ahd-otp { text-align: center; font-size: 28px; letter-spacing: 12px; min-height: 58px; font-weight: 600; }
.ahd-btn.is-loading { pointer-events: none; opacity: .85; }
.ahd-btn.is-loading .ahd-spin { display: inline-block; }
@media (max-width: 640px) {
    .ahd-auth { padding: 20px 12px 48px; }
    .ahd-auth__card { padding: 24px 18px 20px; border-radius: 14px; }
    .ahd-form-grid { grid-template-columns: 1fr; }
    .ahd-auth__head h1 { font-size: 23px; }
    .ahd-otp { letter-spacing: 8px; font-size: 24px; }
}
.ahd-pw .ahd-pw__toggle { position: absolute !important; top: 0; bottom: 0; inset-inline-end: 0; margin: 0 !important; padding: 0; width: 46px; height: auto; display: grid; place-items: center; transform: none; }
.ahd-header .ahd-header__toggle { width: 44px !important; height: 44px !important; min-width: 0; padding: 0 !important; background: #fff !important; border: 1px solid var(--ahd-line) !important; margin-block: 0 !important; }
.ahd-header .ahd-header__toggle span { background: var(--ahd-plum) !important; }

/* =====================================================================
   Home page sections below the hero (existing, DB-driven content; restyled only)
   ===================================================================== */
.home-search-section { background: var(--ahd-bg) !important; padding: 48px 16px !important; }
.home-search-section .search-form { max-width: 920px; margin: 0 auto; background: #fff !important; border: 1px solid var(--ahd-line); border-radius: 18px; box-shadow: var(--ahd-shadow); padding: 28px 28px 24px !important; }
.home-search-section .search-form > h3, .home-search-section h3.text-center { font-size: 24px; font-weight: 700; color: var(--ahd-plum); margin: 0 0 20px !important; }
.home-search-section .tab-buttons { display: flex; gap: 10px; margin-bottom: 18px; }
.home-search-section .tab-btn { flex: 1; min-height: 46px; border-radius: 10px; font-weight: 600; background: #fff !important; color: var(--ahd-plum) !important; border: 1px solid var(--ahd-line) !important; box-shadow: none; }
.home-search-section .tab-btn.active { background: var(--ahd-plum) !important; color: #fff !important; border-color: var(--ahd-plum) !important; }
.home-search-section .age-range-display { border-radius: 10px; }
.home-search-section .form-group label { font-weight: 600; color: var(--ahd-plum); margin-bottom: 6px; }

.best-services { padding: 56px 0 40px !important; background: #fff; }
.best-services .best-head h3 { color: var(--ahd-plum) !important; font-weight: 700; }
.best-services .best-head h4 { color: var(--ahd-muted); font-weight: 500; }
.best-services .best-conn { background: transparent !important; box-shadow: none !important; padding: 0 !important; margin: 8px auto 24px !important; }
.best-services .best-conn img { display: none; }
.best-services .best-conn p { color: var(--ahd-muted); font-size: 16px; }

.hero-buttons-section { padding: 24px 0 48px !important; }
.clients { padding: 48px 0 !important; background: var(--ahd-bg); }
.home-banners-section { padding: 24px 16px !important; background: #fff !important; }
.home-banners-section .banner-item-full { border-radius: 16px; overflow: hidden; margin: 0 auto 16px; }
@media (max-width: 767px) {
    .home-search-section { padding: 28px 12px !important; }
    .home-search-section .search-form { padding: 20px 16px !important; }
    .home-banners-section .banner-item-full, .home-banners-section .banner-item-full img { height: auto !important; }
    .best-services { padding: 36px 0 24px !important; }
    .clients { padding: 32px 0 !important; }
}
.ahd-auth__resend { flex-wrap: wrap; text-align: center; }
.ahd-auth .ahd-linkbtn { box-shadow: none !important; background: none !important; width: auto !important; margin: 0 !important; padding: 4px 8px !important; border-radius: 8px; }
.ahd-auth .ahd-linkbtn:not([disabled]):hover { background: var(--ahd-rose-100) !important; }
.ahd-auth__head strong { display: inline-block; word-break: break-all; }
@media (max-width: 991px) { .ahd-hero__media { width: 100%; aspect-ratio: auto; height: 300px; max-height: none; } }
@media (max-width: 480px) { .ahd-hero__media { height: 220px; } }
.ahd-auth .ahd-pw .ahd-pw__toggle { border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 10px 10px 0; }
html[dir="rtl"] .ahd-auth .ahd-pw .ahd-pw__toggle { border-radius: 10px 0 0 10px; }

/* ================= Member profile (reference: Docs/يروفايل.jpeg) ================= */
.ahd-pf { background: var(--ahd-bg); padding: 18px 0 40px; }
.ahd-pf .container { max-width: 880px; }
.ahd-pf-card { background: #fff; border: 1px solid #f3d3dd; border-radius: 22px; box-shadow: var(--ahd-shadow); padding: 18px; margin-bottom: 16px; }
.ahd-pf-head { border-radius: 26px; }
.ahd-pf-head__top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ahd-pf-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ahd-rose-100); flex: none; background: var(--ahd-plum-50); }
.ahd-pf-head__id { flex: 1 1 160px; min-width: 0; }
.ahd-pf-name { margin: 0; font-size: 24px; font-weight: 700; color: var(--ahd-ink); overflow-wrap: anywhere; }
.ahd-pf-seen { color: var(--ahd-muted); font-size: 14px; margin-top: 2px; }
.ahd-pf-num { border: 1.5px solid #f3c2d0; border-radius: 14px; padding: 6px 14px; text-align: center; box-shadow: 0 2px 6px rgba(232, 96, 127, .12); }
.ahd-pf-num small { display: block; color: var(--ahd-rose); font-size: 12px; }
.ahd-pf-num strong { color: var(--ahd-rose-600); font-size: 16px; letter-spacing: .5px; }
.ahd-pf-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 18px; }
.ahd-pf-actions > * { flex: 1 1 0; min-width: 0; margin: 0; }
.ahd-pf-act { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 0; color: var(--ahd-ink); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; }
.ahd-pf-act span { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 22px; transition: transform .15s; }
.ahd-pf-act:hover span { transform: translateY(-2px); }
.ahd-pf-act:hover { color: var(--ahd-ink); text-decoration: none; }
.ahd-pf-act--chat span { background: #bfe6fb; color: #1f4a66; }
.ahd-pf-act--fav span { background: #f9cfe3; color: #8a2150; }
.ahd-pf-act--block span { background: #dfe6ee; color: #2f3b4a; }
.ahd-pf-act--report span { background: #fcc9c4; color: #8a2a22; }
.ahd-pf-act--share span { background: #a9f0d8; color: #14523f; }

/* badges (cards + profile) */
.ahd-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.ahd-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.ahd-badge--top { background: linear-gradient(135deg, #f6d36b, #e7a93b); color: #4a3200; }
.ahd-badge--mid { background: linear-gradient(135deg, #e3e6ea, #bfc6cf); color: #2d3540; }
.ahd-badge--base { background: var(--ahd-rose-100); color: var(--ahd-rose-600); }
.ahd-badge--test { background: var(--ahd-ok-bg); color: var(--ahd-ok); }

/* compatibility summary */
.ahd-pf-compat { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, #fff, var(--ahd-rose-100)); }
.ahd-pf-compat__score { flex: none; width: 104px; height: 104px; border-radius: 50%; background: var(--ahd-rose); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(232, 96, 127, .35); }
.ahd-pf-compat__score strong { font-size: 30px; line-height: 1.1; }
.ahd-pf-compat__body { flex: 1; min-width: 0; }
.ahd-pf-compat__body h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--ahd-plum); }
.ahd-pf-compat__body p { margin: 0 0 8px; color: var(--ahd-muted); }
.ahd-pf-bar { height: 8px; border-radius: 99px; background: #f3d3dd; overflow: hidden; margin-bottom: 8px; }
.ahd-pf-bar i { display: block; height: 100%; background: var(--ahd-rose); border-radius: 99px; }
.ahd-pf-link { color: var(--ahd-rose-600); font-weight: 600; }

/* specs */
.ahd-pf-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid #f3e6ea; margin-bottom: 14px; }
.ahd-pf-sec-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--ahd-ink); margin-bottom: 8px; }
.ahd-pf-sec-head .ahd-pf-sec-title { margin-bottom: 0; }
.ahd-pf-sec-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--ahd-rose-100); color: var(--ahd-rose); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.ahd-pf-toggle { display: inline-flex; padding: 4px; border: 1.5px solid #f3c2d0; border-radius: 999px; background: #fff7f9; }
.ahd-pf-toggle button { border: 0; background: none; padding: 5px 16px; border-radius: 999px; color: var(--ahd-muted); font-weight: 600; cursor: pointer; }
.ahd-pf-toggle button.is-on { background: #fff; color: var(--ahd-rose-600); box-shadow: 0 1px 4px rgba(232, 96, 127, .25); }
.ahd-pf-facts { display: flex; background: #f8f4f5; border-radius: 16px; padding: 12px 6px; margin-bottom: 16px; }
.ahd-pf-facts > div { flex: 1; text-align: center; padding: 0 6px; border-inline-start: 1px solid #e4dade; min-width: 0; }
.ahd-pf-facts > div:first-child { border-inline-start: 0; }
.ahd-pf-facts small { display: block; color: var(--ahd-muted); font-size: 13px; }
.ahd-pf-facts strong { font-size: 17px; overflow-wrap: anywhere; }
.ahd-pf-story p { font-size: 18px; line-height: 2.3; margin: 0 0 14px; }
.ahd-pf-hl { color: var(--ahd-rose); font-weight: 700; }
.ahd-pf-age { display: inline-block; background: var(--ahd-rose); color: #fff; font-weight: 700; border-radius: 10px; padding: 0 12px; line-height: 1.8; }
.ahd-pf-quote { margin: 0 0 12px; padding: 12px 16px; background: #fff5f8; border: 0; border-inline-end: 5px solid #f4a9c0; border-radius: 14px; }
.ahd-pf-quote h4 { margin: 0 0 6px; color: var(--ahd-rose); font-size: 15px; font-weight: 700; }
.ahd-pf-quote p { margin: 0; font-size: 16px; line-height: 2; white-space: pre-line; }
.ahd-pf-points { list-style: none; padding: 0; margin: 0; }
.ahd-pf-points[hidden], .ahd-pf-story[hidden] { display: none; }
.ahd-pf-points li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f3e6ea; }
.ahd-pf-points li i { color: var(--ahd-rose); width: 20px; text-align: center; }
.ahd-pf-points li span { margin-inline-start: auto; font-weight: 700; }
.ahd-pf-linkedin { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: #0077b5; font-weight: 600; }
.ahd-pf-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ahd-pf-album img { width: 100%; height: 130px; object-fit: cover; border-radius: 12px; }
.ahd-pf-qa { padding: 6px 0; border-bottom: 1px dashed #f0e2e7; }
.ahd-pf-qa__q { color: var(--ahd-plum); font-weight: 600; }
.ahd-pf-cat { background: var(--ahd-plum-50); padding: 10px 14px; border-radius: 10px; font-size: 16px; margin: 16px 0 10px; }
.ahd-pf-ans { border: 1px solid #f0e6ea; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ahd-pf-ans__q { font-weight: 700; color: var(--ahd-plum); margin-bottom: 6px; }
.ahd-pf-ans__row { display: flex; gap: 10px; }
.ahd-pf-ans__row > div { flex: 1; border-radius: 10px; padding: 10px; min-width: 0; overflow-wrap: anywhere; }
.ahd-pf-ans__row small { display: block; font-weight: 700; margin-bottom: 2px; }
.ahd-pf-ans__them { background: #f8f4f5; }
.ahd-pf-ans__me { background: var(--ahd-info-bg); }
.ahd-pf-match { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; font-size: 13px; }
.ahd-pf-match--yes { background: var(--ahd-ok-bg); color: var(--ahd-ok); }
.ahd-pf-match--no { background: var(--ahd-warn-bg); color: var(--ahd-warn); }

@media (max-width: 767px) {
    .ahd-pf { padding-top: 10px; }
    .ahd-pf-card { padding: 14px; border-radius: 20px; }
    .ahd-pf-actions { gap: 4px; }
    .ahd-pf-act span { width: 48px; height: 48px; font-size: 19px; }
    .ahd-pf-compat { flex-direction: column; text-align: center; }
    .ahd-pf-story p { font-size: 16.5px; line-height: 2.2; }
    .ahd-pf-ans__row { flex-direction: column; }
    .ahd-pf-facts strong { font-size: 15px; }
}
