/* Earn & Refer UI (refer.php, refer-dashboard.php, share dialog, homepage band). Tokens match home-v2. */
.rhref-page, .rhref-dash { --navy: #111B32; --orange: #FF8A00; --orange-d: #E67A00; --grey: #F4F6F9; --line: #e6e9ef; --muted: #64708a; background: #FAFAF8; font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; color: #1f2a44; }
.rhref-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rhref-hero { padding: 64px 0 56px; background: linear-gradient(180deg, #FFF4E5 0%, #FAFAF8 100%); border-bottom: 1px solid var(--line); }
.rhref-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-d); margin: 0 0 14px; }
.rhref-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; letter-spacing: -.04em; font-weight: 800; color: var(--navy); max-width: 760px; }
.rhref-hero h1 span { color: var(--orange); }
.rhref-lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 560px; margin: 18px 0 26px; line-height: 1.6; }
.rhref-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.rhref-note { margin: 24px 0 0; max-width: 620px; padding: 14px 18px; background: #fff; border: 1px solid #f3d9b0; border-left: 4px solid var(--orange); border-radius: 12px; font-size: 14.5px; color: #475569; line-height: 1.55; }
.rhref-sec { padding-top: 56px; padding-bottom: 8px; }
.rhref-sec h2, .rhref-band h2 { margin: 0 0 22px; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; font-weight: 800; color: var(--navy); }
.rhref-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.rhref-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(17,27,50,.05); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.rhref-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(17,27,50,.12); border-color: rgba(255,138,0,.5); }
.rhref-ico { width: 52px; height: 52px; border-radius: 16px; background: #FFF1DD; color: var(--orange-d); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.rhref-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rhref-card h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.rhref-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; flex: 1; }
.rhref-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--grey); color: var(--muted); }
.rhref-tag.on { background: #EAF7F1; color: #0f6b4a; }
.rhref-more { margin-top: 6px; font-weight: 700; font-size: 14.5px; color: var(--orange-d); }
.rhref-band { margin-top: 64px; padding: 64px 0; background: var(--grey); }
.rhref-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.rhref-steps li { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.rhref-steps b { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 15px; margin-bottom: 12px; }
.rhref-steps h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--navy); }
.rhref-steps p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.rhref-terms-list { margin: 0; padding: 22px 26px 22px 44px; background: #fff; border: 1px solid var(--line); border-radius: 18px; color: #475569; line-height: 1.7; font-size: 15px; }
.rhref-faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 10px; }
.rhref-faq summary { cursor: pointer; padding: 15px 0; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.rhref-faq summary::after { content: '+'; font-size: 20px; color: var(--orange-d); }
.rhref-faq details[open] summary::after { content: '–'; }
.rhref-faq summary::-webkit-details-marker { display: none; }
.rhref-faq p { margin: 0 0 16px; color: var(--muted); line-height: 1.65; font-size: 15px; }
.rhref-page :focus-visible, .rhref-dash :focus-visible, .rhref-modal :focus-visible { outline: 3px solid rgba(255,138,0,.6); outline-offset: 2px; }

/* Dashboard */
.rhref-dash main { padding: 40px 0 72px; }
.rhref-dash h1 { margin: 0 0 6px; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.035em; font-weight: 800; color: var(--navy); }
.rhref-dash .sub { color: var(--muted); margin: 0 0 26px; }
.rhd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.rhd-stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.rhd-stat small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rhd-stat b { font-size: 28px; letter-spacing: -.03em; color: var(--navy); }
.rhd-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 22px; }
.rhd-box h2 { margin: 0 0 14px; font-size: 20px; font-weight: 800; color: var(--navy); }
.rhd-owner { display: flex; flex-wrap: wrap; gap: 12px; }
.rhd-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rhd-filters button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.rhd-filters button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.rhd-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rhd-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 12px 10px 0; }
.rhd-table td { padding: 13px 12px 13px 0; border-top: 1px solid var(--line); vertical-align: top; }
.rhd-wrap { overflow-x: auto; }
.rhd-st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--grey); color: #475569; }
.rhd-st.Qualified, .rhd-st.Approved { background: #E7F0FF; color: #1d4ed8; }
.rhd-st.Paid { background: #EAF7F1; color: #0f6b4a; }
.rhd-st.Rejected { background: #FDECEC; color: #b42318; }
.rhd-links { display: grid; gap: 10px; }
.rhd-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.rhd-link .t { flex: 1 1 220px; font-weight: 700; color: var(--navy); font-size: 14.5px; }
.rhd-link .t small { display: block; font-weight: 500; color: var(--muted); }
.rhd-empty { padding: 28px; text-align: center; color: var(--muted); }

/* Share dialog */
.rhref-modal { position: fixed; inset: 0; z-index: 10050; background: rgba(17,27,50,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rhref-modal[hidden] { display: none; }
.rhref-dialog { position: relative; width: 100%; max-width: 460px; background: #fff; border-radius: 22px; padding: 26px; box-shadow: 0 30px 80px rgba(17,27,50,.35); font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; }
.rhref-dialog h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #111B32; letter-spacing: -.02em; }
.rhref-x { position: absolute; right: 14px; top: 10px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: #64708a; }
.rhref-sub { margin: 0 0 16px; color: #64708a; font-size: 14.5px; line-height: 1.5; }
.rhref-link { display: flex; gap: 8px; margin-bottom: 12px; }
.rhref-link input { flex: 1; min-width: 0; height: 46px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 14px; color: #111B32; background: #F4F6F9; }
.rhref-link button, .rhref-actions button { height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: #111B32; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.rhref-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rhref-wa { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px; background: #25D366; color: #fff !important; font-weight: 700; text-decoration: none; }
.rhref-terms { margin: 14px 0 0; font-size: 12.5px; color: #64708a; line-height: 1.55; }
.rhref-msg { margin: 8px 0 0; font-size: 13.5px; color: #b42318; min-height: 1em; }

/* Refer buttons on cards / details */
.rhpg-refer { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 38px; border-radius: 12px; border: 1.5px dashed #f0b56b; background: #FFF8EE; color: #b45309; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.rhpg-refer:hover { background: #FFF1DD; border-color: var(--orange, #FF8A00); }
.rhpg-refer[hidden] { display: none; }

/* Homepage Earn & Refer band */
.rhref-home { margin-top: 72px; }
.rhref-home .box { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 44px; border-radius: 28px; background: #111B32; color: #fff; }
.rhref-home .box::before { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: #FF8A00; opacity: .14; }
.rhref-home h2 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; color: #fff; position: relative; }
.rhref-home p.l { margin: 0 0 22px; color: #cbd5e6; line-height: 1.6; font-size: 16px; max-width: 520px; position: relative; }
.rhref-home .acts { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }
.rhref-home .rhpg-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.rhref-home .rhpg-btn--ghost:hover { border-color: #fff; }
.rhref-home .bens { display: grid; gap: 12px; position: relative; }
.rhref-home .ben { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; }
.rhref-home .ben i { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #FF8A00; display: inline-flex; align-items: center; justify-content: center; }
.rhref-home .ben svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rhref-home .ben b { display: block; font-size: 16px; color: #fff; margin-bottom: 2px; }
.rhref-home .ben span { font-size: 14px; color: #cbd5e6; line-height: 1.5; }
@media (max-width: 900px) { .rhref-home .box { grid-template-columns: 1fr; padding: 28px 22px; border-radius: 22px; } }
@media (max-width: 640px) { .rhref-wrap { padding: 0 16px; } .rhref-hero { padding: 40px 0 36px; } }
@media (prefers-reduced-motion: reduce) { .rhref-card, .rhpg-refer { transition: none; } }

/* Homepage management cards */
.rhh-manage { margin-top: 56px; }
.rhh-manage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; }
.rhh-manage-head h2 { margin: 0; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.035em; font-weight: 800; color: #111B32; }
.rhh-manage-head a { font-weight: 700; font-size: 15px; color: #E67A00; text-decoration: none; padding: 8px 14px; border-radius: 10px; }
.rhh-manage-head a:hover { background: #FFF1DD; }
.rhh-manage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mcard { display: flex; flex-direction: column; background: #fff; border: 1px solid #e6e9ef; border-radius: 24px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(17,27,50,.05), 0 2px 8px rgba(17,27,50,.04); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.mcard:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(17,27,50,.12); border-color: rgba(255,138,0,.5); }
.mcard img { width: 100%; height: 190px; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.mcard:hover img { transform: scale(1.05); }
.mcard { overflow: hidden; }
.mbody { position: relative; padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; background: #fff; }
.mico { width: 48px; height: 48px; margin-top: -50px; border-radius: 16px; background: #FF8A00; color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(255,138,0,.35); }
.mico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mbody h3 { margin: 6px 0 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #111B32; }
.mbody p { margin: 0; color: #64708a; font-size: 15px; line-height: 1.55; flex: 1; }
.mgo { margin-top: 8px; font-weight: 700; font-size: 15px; color: #E67A00; }
@media (max-width: 760px) { .rhh-manage-grid { grid-template-columns: 1fr; } .rhh-manage-head { flex-direction: column; align-items: flex-start; } }

/* Flats page owner banner */
.rhx-own { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin: 4px 0 18px; padding: 16px 20px; background: #111B32; color: #fff; border-radius: 16px; }
.rhx-own b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.rhx-own span { font-size: 13.5px; color: #cbd5e6; }
.rhx-own a { background: #FF8A00; color: #fff; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 12px; text-decoration: none; white-space: nowrap; }
.rhx-own a:hover { background: #E67A00; }
