/* Member-facing pages (tenant / owner dashboards, documents, repair form).
   Opt in with <section class="... mp">. Tables with class mp-table stackable fold into
   labelled cards on phones via js/member-ui.js. */
.mp.section-padding { padding-top: 36px; padding-bottom: 56px; }
.mp h1 { font-size: 30px; margin: 0 0 6px; }
.mp h2 { font-size: 20px; margin: 34px 0 12px; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.mp-btn { display: inline-block; padding: 8px 14px; border-radius: 8px; background: #e9eef6; color: #1d2b44; text-decoration: none; font-size: 14px; }
.mp-btn:hover { background: #dbe5f3; color: #1d2b44; }
.mp-btn.primary { background: #0D47A1; color: #fff; }
.mp-btn.primary:hover { background: #0a3a85; color: #fff; }
.mp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 6px 0 0; }
.mp-card { background: #fff; border-radius: 12px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.07); border-left: 5px solid #cfd8e3; }
.mp-card.wallet { border-left-color: #0D47A1; }
.mp-card .label { font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: #6b7a90; margin: 0 0 6px; }
.mp-card .amount { font-size: 26px; font-weight: 700; color: #1d2b44; display: block; line-height: 1.2; }
.mp-card.wallet .amount { color: #0D47A1; font-size: 30px; }
.mp-card small { display: block; margin-top: 6px; color: #6b7a90; font-size: 13px; line-height: 1.4; }
.mp-banner { background: #fff6e5; border-left: 4px solid #FF8F00; border-radius: 8px; padding: 14px 18px; margin: 18px 0 0; }
.mp-banner strong { display: block; margin-bottom: 2px; color: #7a4a00; }
.mp-pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #eef1f6; color: #44546a; }
.mp-pill.active, .mp-pill.extended { background: #e3f4e6; color: #1a7f37; }
.mp-pill.upcoming { background: #e3f0fd; color: #0D47A1; }
.mp-pill.expired, .mp-pill.terminated { background: #fde8df; color: #b3401a; }
.mp-timing { display: block; font-size: 13px; color: #6b7a90; margin-top: 3px; }
.mp-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 14px; }
.mp-filters label { display: block; font-size: 12px; font-weight: 600; color: #6b7a90; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 3px; }
.mp-filters input, .mp-filters select { padding: 8px 10px; border: 1px solid #c5d0de; border-radius: 6px; font-size: 14px; background: #fff; min-width: 0; }
.mp-filters button { padding: 9px 18px; border: 0; border-radius: 6px; background: #0D47A1; color: #fff; font-size: 14px; cursor: pointer; }
.mp-filters a { align-self: center; font-size: 14px; }
.mp-scroll { overflow-x: auto; }
.mp table.mp-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.mp table.mp-table th { text-align: left; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; color: #6b7a90; background: #f4f7fb; padding: 10px 12px; }
.mp table.mp-table td { padding: 11px 12px; border-top: 1px solid #eef1f6; vertical-align: top; font-size: 15px; }
.mp-amt.credit { color: #1a7f37; font-weight: 700; }
.mp-amt.debit { color: #1d2b44; }
.mp-help { margin-top: 28px; background: #f4f7fb; border-radius: 10px; padding: 12px 18px; }
.mp-help summary { cursor: pointer; font-weight: 600; color: #0D47A1; }
.mp .cell-val { min-width: 0; }
.mp-notice { display: block; margin-top: 6px; padding: 6px 10px; border-left: 3px solid #FF8F00; background: #fff6e5; color: #6b4a00; font-size: 13px; line-height: 1.4; border-radius: 4px; }
.mp-empty { text-align: center; color: #6b7a90; padding: 22px 12px !important; }
@media (max-width: 767px) {
    .mp h1 { font-size: 26px; }
    .mp-filters > div { flex: 1 1 45%; }
    .mp-filters input, .mp-filters select { width: 100%; box-sizing: border-box; }
    .mp table.mp-table.stack-sm, .mp table.mp-table.stack-sm tbody, .mp table.mp-table.stack-sm tr, .mp table.mp-table.stack-sm td { display: block; width: 100%; box-sizing: border-box; }
    .mp table.mp-table.stack-sm { background: transparent; box-shadow: none; }
    .mp table.mp-table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .mp table.mp-table.stack-sm tr { background: #fff; border-radius: 10px; margin-bottom: 12px; padding: 6px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
    .mp table.mp-table.stack-sm td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; border-top: 0; border-bottom: 1px solid #f0f3f8; text-align: right; word-break: break-word; }
    .mp table.mp-table.stack-sm td:last-child { border-bottom: 0; }
    .mp table.mp-table.stack-sm td::before { content: attr(data-label); flex: none; max-width: 40%; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: #6b7a90; text-align: left; }
    .mp table.mp-table.stack-sm td.mp-empty { display: block; text-align: center; }
    .mp table.mp-table.stack-sm td.mp-empty::before { content: none; }
}

/* forms */
.mp .mp-form { max-width: 560px; }
.mp .mp-form label { display: block; font-weight: 600; font-size: 14px; color: #1d2b44; margin: 18px 0 5px; }
.mp .mp-form label.is-required::after { content: " *"; color: #c62828; }
.mp .mp-form .hint { display: block; font-weight: 400; font-size: 13px; color: #6b7a90; margin-top: 3px; }
.mp .mp-form input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=file]),
.mp .mp-form select, .mp .mp-form textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #c5d0de; border-radius: 8px; font-size: 16px; background: #fff; }
.mp .mp-form textarea { min-height: 130px; resize: vertical; }
.mp .mp-form input[type=file] { display: block; width: 100%; padding: 12px; border: 1px dashed #9db3d6; border-radius: 8px; background: #f7f9fc; box-sizing: border-box; }
.mp .mp-form input:focus, .mp .mp-form select:focus, .mp .mp-form textarea:focus { outline: 2px solid #0D47A1; outline-offset: 1px; border-color: #0D47A1; }
.mp .mp-form button[type=submit] { margin-top: 24px; padding: 12px 26px; border: 0; border-radius: 8px; background: #0D47A1; color: #fff; font-size: 16px; cursor: pointer; }
.mp .mp-form button[type=submit]:hover { background: #0a3a85; }
.mp .mp-alert { border-radius: 8px; padding: 12px 16px; margin: 14px 0; font-size: 15px; }
.mp .mp-alert.error { background: #fdecea; border-left: 4px solid #c62828; color: #7a1a12; }
.mp .mp-alert.success { background: #e8f5e9; border-left: 4px solid #2e7d32; color: #1b5e20; }
.mp .mp-back { display: inline-block; margin: 0 0 14px; font-size: 14px; }
.mp .mp-note { color: #6b7a90; font-size: 14px; margin: 0 0 10px; }

/* Pager used by every list (renderPager() in includes/functions.php) */
.pager-a { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.pager-a a, .pager-a span { padding: 8px 16px; border-radius: 6px; background: #e9eef6; color: #1d2b44; text-decoration: none; font-size: 14px; }
.pager-a a:hover { background: #dbe5f3; color: #1d2b44; }
.pager-a span.off { opacity: .4; }
.pager-a span.cur { background: transparent; color: #6b7a90; }
/* "Viewing as" selector (dashboard_switch.php), shown only to members with more than one dashboard */
.role-switch { display: inline-flex; align-items: center; gap: 8px; background: #eef4ff; border: 1px solid #d3e0f7; border-radius: 999px; padding: 4px 6px 4px 16px; margin: 0 0 16px; }
.role-switch label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: #6b7a90; }
.role-switch select { border: 0; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: #0D47A1; cursor: pointer; min-width: 150px; }
.role-switch select:focus-visible { outline: 2px solid #0D47A1; outline-offset: 1px; }
.role-switch button { border: 0; border-radius: 999px; padding: 7px 16px; background: #0D47A1; color: #fff; font-size: 14px; cursor: pointer; }
/* owner dashboards: per-row actions + extra status colours */
.mp-rowact { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-rowact a { padding: 5px 10px; border-radius: 6px; background: #e9eef6; color: #1d2b44; font-size: 13px; text-decoration: none; line-height: 1.3; }
.mp-rowact a:hover { background: #dbe5f3; color: #1d2b44; }
.mp-rowact a.main { background: #0D47A1; color: #fff; }
.mp-rowact a.main:hover { background: #0a3a85; color: #fff; }
.mp-pill.vacant { background: #fff3d6; color: #8a5a00; }
.mp-pill.inactive { background: #eef1f6; color: #6b7a90; }
.mp-table.stack-sm .mp-rowact { justify-content: flex-end; }

/* approve / reject buttons + inline forms in tables */
.mp .mp-btn.danger { background: #fdecea; color: #a02317; }
.mp .mp-btn.danger:hover { background: #f9d5d0; color: #a02317; }
form.mp-inline { display: inline; margin: 0; }
.mp button.mp-btn { border: 0; cursor: pointer; font-family: inherit; }
.mp .mp-form br { display: none; }
/* compact label/value facts row (owner property page) */
.mp-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 22px; padding: 12px 18px; background: #f4f7fb; border-radius: 10px; }
.mp-facts > div { min-width: 120px; }
.mp-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #6b7a90; font-weight: 600; }
.mp-facts dd { margin: 2px 0 0; font-size: 15px; color: #1d2b44; }
.mp-cards.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
/* wide, sectioned forms (lead submission) + label/value detail cards (lead details) */
.mp .mp-form.mp-wide { max-width: 780px; }
.mp .mp-form .mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.mp .mp-form .mp-grid > div { min-width: 0; }
.mp .mp-form h2.mp-section { font-size: 17px; margin: 30px 0 4px; padding-bottom: 6px; border-bottom: 1px solid #e1e8f2; color: #0D47A1; }
.mp .mp-form h2.mp-section:first-of-type { margin-top: 8px; }
@media (max-width: 767px) { .mp .mp-form .mp-grid { grid-template-columns: 1fr; } }
.mp-kvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.mp-kvcard { background: #fff; border-radius: 12px; padding: 6px 20px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.mp-kvcard h3 { font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: #0D47A1; margin: 14px 0 6px; }
.mp-kvrow { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f0f3f8; font-size: 15px; }
.mp-kvrow:last-child { border-bottom: 0; }
.mp-kvrow .k { flex: none; max-width: 42%; color: #6b7a90; font-size: 14px; }
.mp-kvrow .v { text-align: right; min-width: 0; word-break: break-word; }
.mp-kvrow .v.empty { color: #aab4c3; }
.mp-media { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mp-media img { width: 150px; height: 110px; object-fit: cover; border-radius: 8px; display: block; }
.mp-pill.lead-new { background: #e3f0fd; color: #0D47A1; }
.mp-pill.lead-contacted, .mp-pill.lead-inspection_scheduled { background: #fff3d6; color: #8a5a00; }
.mp-pill.lead-converted { background: #e3f4e6; color: #1a7f37; }
.mp-pill.lead-rejected { background: #fde8df; color: #b3401a; }
.mp .mp-form .req-star { color: #c62828; }
/* visible labels for the public sign-in / password / contact forms */
.field-label { display: block; margin: 16px 0 5px; font-size: 14px; font-weight: 600; color: #1d2b44; text-align: left; }
.field-label .field-hint { font-weight: 400; color: #6b7a90; margin-left: 4px; }
.field-help { margin: 14px 0 0; font-size: 14px; text-align: center; }
/* sign-in extras: field tip, show/hide password, captcha refresh */
.field-hint-line { display: block; margin-top: 5px; font-size: 13px; color: #6b7a90; text-align: left; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 64px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #0D47A1; font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px; }
.captcha-refresh { border: 1px solid #c5d0de; background: #fff; color: #0D47A1; border-radius: 8px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.captcha-refresh:hover { background: #eef4ff; }

/* "How this works" link under a page title */
.mp .help-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #0D47A1; text-decoration: none; margin: 0 0 12px; }
.mp .help-link span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #e3ecfa; font-weight: 700; font-size: 12px; }
.mp .help-link:hover { text-decoration: underline; }

/* notification settings: a checkbox with its explanation beside it */
.mp .mp-form label.mp-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 14px 0; }
.mp .mp-form label.mp-check input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.mp .mp-form label.mp-check strong { font-weight: 600; color: #1d2b44; }
.mp .mp-always { margin: 0 0 6px; padding-left: 20px; color: #44546a; font-size: 14px; }
.mp .mp-always li { margin: 4px 0; }

/* getting-started card on the dashboards */
.mp .gs-card { background: #f4f8fe; border: 1px solid #d6e3f7; border-radius: 12px; padding: 14px 18px 8px; margin: 0 0 18px; max-width: 760px; }
.mp .gs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mp .gs-head h2 { font-size: 17px; margin: 0; color: #0D47A1; }
.mp .gs-hide, .mp .gs-show { background: none; border: 0; color: #0D47A1; font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.mp .gs-show { display: block; margin: 0 0 14px; }
.mp .gs-show[hidden], .mp .gs-card[hidden] { display: none; }
.mp .gs-steps { margin: 8px 0 6px; padding-left: 20px; font-size: 14px; color: #44546a; }
.mp .gs-steps li { margin: 7px 0; line-height: 1.5; }
.mp .gs-steps strong { color: #1d2b44; }
.mp .gs-steps a { white-space: nowrap; }
