/* Badri.rent — account flows: register, owner submission, renter referral. Loads after landing.css. */

body.flow-body { background: var(--soft); }
.flow-page { padding-block: 40px 88px; min-height: calc(100vh - 68px); }
.flow-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.flow-grid--single { grid-template-columns: minmax(0, 760px); justify-content: center; }

/* Header account chip */
.acct { display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; }
html[dir="rtl"] .acct { padding: 5px 14px 5px 6px; }
.acct b { font-weight: 800; }
.acct small { color: var(--muted); font-weight: 600; }
.acct button { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.acct button:hover { background: var(--line); }

/* Aside: step list */
.flow-aside { position: sticky; top: 92px; display: grid; gap: 16px; }
.flow-aside__box { padding: 24px; border-radius: 24px; background: #fff; }
.flow-aside h2 { font-size: 15px; font-weight: 800; color: var(--muted); }
.fsteps { list-style: none; display: grid; gap: 4px; margin: 14px 0 0; padding: 0; }
.fsteps li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; font-weight: 600; color: var(--muted); }
.fsteps li span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--soft); border: 1.5px solid var(--line); font: 800 13px var(--font); }
.fsteps li.is-current { background: var(--mint); color: var(--ink); }
.fsteps li.is-current span { background: var(--lime); border-color: var(--lime-600); }
.fsteps li.is-done { color: var(--ink); cursor: pointer; }
.fsteps li.is-done span { background: var(--ink); border-color: var(--ink); color: var(--lime); font-size: 0; }
.fsteps li.is-done span::before { content: "✓"; font-size: 14px; }
.fsteps li.is-done:hover { background: var(--soft); }
.flow-aside__help p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.demo { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #FFF6D6; color: #6B4A00; font-size: 13.5px; font-weight: 600; }
.demo::before { content: "i"; display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: #6B4A00; color: #FFF6D6; font: 800 12px var(--font); }

/* Main card (reuses the .pq field styles from landing.css) */
.flow-card.pq { width: 100%; padding: clamp(22px, 4vw, 40px); box-shadow: 0 30px 60px -40px rgba(0,0,0,.3); }
.flow-card__head { margin-bottom: 28px; }
.flow-card__head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.flow-card__head p { margin-top: 8px; color: var(--muted); }
.flow-card__step { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.flow-card .pq__step { gap: 22px; }
.flow-card textarea { width: 100%; min-height: 128px; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--soft); font: 500 15px/1.5 var(--font); resize: vertical; outline: none; }
html[lang="ar"] .flow-card textarea { font-family: var(--font-ar); }
.flow-card textarea:focus { border-color: var(--blue); background: #fff; }
.flow-card input[type="date"], .flow-card input[type="email"], .flow-card input[type="password"] { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--soft); font-weight: 600; font-size: 16px; outline: none; }
.flow-card input[type="date"]:focus, .flow-card input[type="email"]:focus, .flow-card input[type="password"]:focus { border-color: var(--blue); background: #fff; }
.flow-card .is-invalid { border-color: #D64545 !important; background: #FFF7F7 !important; }
.field-hint { font-size: 13px; color: var(--muted); }
.opt { font-weight: 500; color: var(--muted); font-size: 13px; }
.pill-note { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 8px 14px; border-radius: 999px; background: var(--mint); border: 1px solid #CFEFD0; font-size: 14px; font-weight: 700; }
.pill-note--warn { background: #FFF6D6; border-color: #F3DE9A; color: #6B4A00; }
.pill-note--bad { background: #FFF1F1; border-color: #F6D3D3; color: #9B1C1F; }

/* Role cards */
.rolecards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rolecard { position: relative; cursor: pointer; }
.rolecard input { position: absolute; inset: 0; opacity: 0; }
.rolecard__body { display: grid; gap: 8px; height: 100%; padding: 24px 22px; border-radius: 22px; border: 2px solid var(--line); background: var(--soft); transition: all .15s; }
.rolecard__body img { height: 72px; width: auto; margin-bottom: 6px; }
.rolecard__body b { font-size: 20px; font-weight: 800; }
.rolecard__body span { font-size: 14.5px; color: var(--muted); }
.rolecard:hover .rolecard__body { border-color: #C9CBC3; }
.rolecard input:checked + .rolecard__body { border-color: var(--ink); background: var(--lime); }
.rolecard input:checked + .rolecard__body span { color: var(--ink-2); }
.rolecard input:focus-visible + .rolecard__body { outline: 3px solid var(--blue); outline-offset: 3px; }
.invite-banner { padding: 14px 16px; border-radius: 16px; background: var(--mint); border: 1px solid #CFEFD0; font-weight: 600; font-size: 14.5px; }

/* OTP */
.otp { width: 100%; max-width: 320px; padding: 14px 16px !important; text-align: center !important; font: 800 30px var(--font) !important; letter-spacing: .5em; direction: ltr; }
.otp-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 14px; }
.linkbtn { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* Light segmented control (months) */
.seg--light .seg__opt span { background: var(--soft); border: 1.5px solid var(--line); color: var(--ink); }
.seg--light .seg__opt small { color: var(--muted); }
.seg--light .seg__opt:hover span { border-color: #C9CBC3; }
.seg--light .seg__opt input:checked + span { background: var(--lime); border-color: var(--lime-600); }
.seg--light .seg__opt input:focus-visible + span { outline-color: var(--blue); }
.estimate { padding: 20px 22px; border-radius: 20px; background: var(--soft); }
.estimate .calc__resultLabel { font-size: 14px; }
.estimate .calc__big { font-size: clamp(36px, 4vw, 48px); }
.estimate .breakdown { margin: 12px 0 0; }
.payout-fields { display: grid; gap: 14px; padding: 18px; border-radius: 18px; border: 1.5px dashed var(--line); }

/* Documents */
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc { position: relative; display: grid; gap: 4px; align-content: start; min-height: 132px; padding: 18px; border-radius: 18px; border: 1.5px dashed #C9CBC3; background: var(--soft); transition: border-color .15s, background-color .15s; }
.doc:hover { border-color: var(--ink); }
.doc input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc b { font-size: 15px; }
.doc small { font-size: 13px; color: var(--muted); }
.doc__pick { margin-top: auto; justify-self: start; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.doc__file { display: none; align-items: center; gap: 10px; margin-top: auto; }
.doc__file img, .doc__file i { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; background: var(--ink); color: var(--lime); font: 800 11px/44px var(--font); text-align: center; font-style: normal; }
.doc__file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.doc__remove { position: relative; z-index: 2; margin-inline-start: auto; padding: 4px 10px; border: 0; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.doc.is-set { border-style: solid; border-color: var(--lime-600); background: #F6FFE0; }
.doc.is-set .doc__pick { display: none; }
.doc.is-set .doc__file { display: flex; }
.doc.is-invalid { border-color: #D64545; background: #FFF7F7; }

/* Review */
.review { display: grid; gap: 14px; }
.review section { padding: 18px 20px; border-radius: 18px; background: var(--soft); }
.review header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.review h3 { font-size: 16px; font-weight: 800; }
.review dl { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 6px 16px; margin: 0; font-size: 14.5px; }
.review dt { color: var(--muted); }
.review dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Done / status */
.done { display: grid; justify-items: start; gap: 14px; }
.done__check { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--lime); font-size: 30px; font-weight: 800; }
.done h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 800; letter-spacing: -.03em; }
.done p { color: var(--ink-2); }
.done .btn { margin-top: 6px; }
.refbox { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--lime); font: 800 18px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; direction: ltr; }
.track { list-style: none; display: grid; gap: 0; width: 100%; margin: 8px 0 0; padding: 0; }
.track li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 18px; }
.track li::before { content: ""; position: absolute; top: 28px; bottom: 0; inset-inline-start: 13px; width: 2px; background: var(--line); }
.track li:last-child::before { display: none; }
.track i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-style: normal; font-weight: 800; font-size: 13px; }
.track li.is-done i { background: var(--lime); border-color: var(--lime-600); }
.track b { display: block; }
.track small { color: var(--muted); font-size: 14px; }

/* Applications list */
.apps { display: grid; gap: 10px; margin-bottom: 24px; }
.apps__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.apps__head h2 { font-size: 20px; font-weight: 800; }
.app { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 18px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); }
.app b { font-size: 15px; }
.app small { grid-column: 1; color: var(--muted); font-size: 13.5px; }
.app .pq__badge { grid-row: 1 / span 2; grid-column: 2; }
.app code { font: 800 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--blue); direction: ltr; }

/* Guard panel */
.guard { display: grid; justify-items: start; gap: 12px; }
.guard img { width: 84px; }
.guard h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.guard p { color: var(--muted); }
.guard .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Referral */
.refcard { display: grid; gap: 14px; padding: 26px; border-radius: 24px; background: var(--ink); color: #fff; }
.refcard__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.refcard small { display: block; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.6); }
.refcard .refbox { background: var(--lime); color: var(--ink); font-size: 22px; }
.reflink { display: flex; gap: 8px; }
.reflink input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #34372F; background: #1A1C17; color: #fff; font: 600 14px var(--font); direction: ltr; text-align: left; }
.refcard .btn { min-height: 46px; padding: 10px 18px; font-size: 14px; }
.howref { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.howref div { padding: 16px; border-radius: 16px; background: var(--soft); }
.howref b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.howref b i { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--lime); font-size: 12px; font-style: normal; }
.howref p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.sendrow { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--wa { background: #25D366; color: #08361a; }
.btn--wa:hover { background: #1fbd5a; }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--mint); border: 1px solid #CFEFD0; font-weight: 600; font-size: 14.5px; }
.invites { display: grid; gap: 10px; }
.invite { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.invite small { color: var(--muted); font-size: 13px; }
.invite .pq__badge { grid-row: 1 / span 2; grid-column: 2; }
.pq__badge--invited { background: #E3E9FF; color: var(--blue); }
.empty { padding: 18px; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--muted); font-size: 14.5px; text-align: center; }
.section-gap { margin-top: 28px; }
.section-gap > h2 { margin-bottom: 14px; font-size: 20px; font-weight: 800; }

/* Responsive */
@media (max-width: 960px) {
  .flow-grid { grid-template-columns: 1fr; gap: 18px; }
  .flow-aside { position: static; }
  .flow-aside__help { display: none; }
  .flow-aside__box { padding: 14px; }
  .flow-aside h2 { display: none; }
  .fsteps { display: flex; gap: 4px; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .fsteps li { flex: none; padding: 6px 10px 6px 6px; font-size: 13.5px; }
  .fsteps li:not(.is-current) b { display: none; }
}
@media (max-width: 720px) {
  .flow-page { padding-block: 20px 56px; }
  .rolecards, .docs, .howref { grid-template-columns: 1fr; }
  .review dl { grid-template-columns: 1fr; gap: 0 0; }
  .review dd { margin-bottom: 8px; }
  .acct small { display: none; }
  .nav__actions .acct + .lang-toggle, .nav__actions .lang-toggle { padding-inline: 10px; }
  .sendrow .btn { flex: 1 1 100%; }
  .reflink { flex-direction: column; }
}

/* ---------- Owner dashboard ---------- */
.done .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.done .btns .btn { margin-top: 0; }
.app__link { grid-column: 1; justify-self: start; margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--blue); }
.app__link::after { content: " →"; }
html[dir="rtl"] .app__link::after { content: " ←"; }
.pq__badge--muted { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }

.dash { display: grid; gap: 20px; }
.dbdemo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 14px 18px; border-radius: 18px; background: #FFF6D6; border: 1px solid #F3DE9A; color: #6B4A00; font-size: 14px; }
.dbdemo__text { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-weight: 600; }
.dbdemo__text b { padding: 1px 8px; border-radius: 999px; background: #6B4A00; color: #FFF6D6; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.dbdemo__text a { color: var(--blue); font-weight: 700; text-decoration: underline; }
.dbdemo__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.dbdemo__range { display: grid; gap: 4px; min-width: 220px; font-weight: 600; font-size: 13px; }
.dbdemo__range input { width: 100%; accent-color: #6B4A00; }
.dbdemo__check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.dbdemo__check input { width: 16px; height: 16px; accent-color: #6B4A00; }

.dbhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-top: 6px; }
.dbhead h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.dbhead__meta { margin-top: 6px; color: var(--muted); font-weight: 600; }
.dbhead__meta code { font: 800 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--blue); direction: ltr; unicode-bidi: isolate; }
.dbhead__side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dbpick select { max-width: 320px; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }

.dbsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dbstat { display: grid; align-content: start; gap: 6px; padding: 22px 24px; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.dbstat:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }
.dbstat:first-child .dbstat__label, .dbstat:first-child .dbstat__sub, .dbstat:first-child small { color: rgba(255,255,255,.6); }
.dbstat:first-child .dbstat__big bdi { color: var(--lime); }
.dbstat__label { font-weight: 700; font-size: 14px; color: var(--muted); }
.dbstat__big { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.dbstat__big small { font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.dbstat__sub { font-size: 14px; color: var(--muted); }
.dbstat--next.is-late { background: #FFF8E6; border-color: #F3DE9A; }
.dbprog { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.dbprog span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime-600); transition: width .4s ease; }

.dbgrid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dbside { display: grid; gap: 16px; }
.dbcard { display: grid; gap: 12px; justify-items: start; padding: 26px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.dbcard > * { max-width: 100%; }
.dbcard--soft { background: var(--mint); border-color: #CFEFD0; }
.dbcard h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.dbcard__lead, .dbcard__text { font-size: 14.5px; color: var(--ink-2); }
.dbcard__fine { font-size: 12.5px; color: var(--muted); }
.dbtenant b { font-size: 16px; }
.dbtenant bdi { margin-inline-start: 6px; color: var(--muted); font-weight: 600; font-size: 14px; }

/* Month rows */
.months { list-style: none; display: grid; width: 100%; margin: 6px 0 0; padding: 0; }
.mrow { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
.mrow::before { content: ""; position: absolute; top: 24px; bottom: 0; inset-inline-start: 10px; width: 2px; background: var(--line); }
.mrow:last-child { padding-bottom: 0; }
.mrow:last-child::before { display: none; }
.mrow__dot { width: 22px; height: 22px; margin-top: 12px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.mrow--paid .mrow__dot, .mrow--paidLate .mrow__dot, .mrow--back .mrow__dot { background: var(--lime); border-color: var(--lime-600); }
.mrow--paid .mrow__dot::after, .mrow--paidLate .mrow__dot::after { content: "✓"; display: grid; place-items: center; height: 100%; font-size: 11px; font-weight: 800; }
.mrow--sent .mrow__dot { border-color: var(--blue); box-shadow: 0 0 0 4px #E3E9FF; }
.mrow--late .mrow__dot { border-color: #D19A00; background: #FFF0C2; }
.mrow__main { display: grid; gap: 4px; padding: 12px 16px; border-radius: 16px; background: var(--soft); }
.mrow.is-next .mrow__main { background: #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.mrow--late.is-next .mrow__main { box-shadow: 0 0 0 1.5px #D19A00; }
.mrow--back .mrow__main { background: var(--mint); }
.mrow__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.mrow__top b { font-size: 16px; }
.mrow__amt { font-weight: 800; }
.mrow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--muted); }
.mrow__meta .pq__badge { padding: 3px 10px; font-size: 12px; }
.mrow__note { font-size: 14px; color: var(--ink-2); }

/* Growth ladder (3 steps) */
.ladder3 { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 0; padding: 0; }
.ladder3 li { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--soft); border: 1.5px solid var(--line); text-align: center; }
.ladder3 small { font-size: 12px; font-weight: 700; color: var(--muted); }
.ladder3 b { font-size: 14px; }
.ladder3 li.is-current { background: var(--lime); border-color: var(--lime-600); }
.ladder3 li.is-current small { color: var(--ink-2); }
.ladder3 li.is-done { background: var(--ink); border-color: var(--ink); color: #fff; }
.ladder3 li.is-done small { color: var(--lime); }

@media (max-width: 960px) {
  .dbgrid { grid-template-columns: 1fr; }
  .dbsum { grid-template-columns: 1fr 1fr; }
  .dbstat:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .dbsum { grid-template-columns: 1fr; }
  .dbcard { padding: 20px 18px; }
  .dbstat { padding: 18px 20px; }
  .dbdemo__range { min-width: 0; width: 100%; }
  .dbdemo__controls { width: 100%; }
  .mrow { gap: 10px; }
}
.mrow--backUp .mrow__main { background: var(--mint); opacity: .75; }
