/* ===================================================================
   Member Listing Page — Scoped styles (ml-*)
   =================================================================== */

:root {
    --ml-primary: var(--primary, #6610f2);
    --ml-primary-rgb: var(--primary-rgb, 102, 16, 242);
    --ml-accent: #4f46e5;
    --ml-bg: #f7f8fc;
    --ml-card-bg: #ffffff;
    --ml-border: #e5e7eb;
    --ml-text: #1f2937;
    --ml-text-muted: #6b7280;
    --ml-radius: 12px;
    --ml-radius-sm: 8px;
    --ml-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --ml-shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --ml-transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Page Layout ─────────────────────────────────────────────────── */

.ml-page {
    background: var(--ml-bg);
    min-height: 100vh;
}

.ml-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: var(--header-height, 120px);
    z-index: 100;
    padding: 10px 0;
    background: var(--ml-bg);
}

.ml-header__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ml-primary);
    margin: 0;
    opacity: 1;
    transition: opacity .3s;
}

.ml-header__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
    background: var(--ml-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background var(--ml-transition), box-shadow var(--ml-transition);
}

.ml-header__filter-btn:hover {
    background: var(--ml-accent);
    box-shadow: var(--ml-shadow-md);
}

.ml-header__filter-btn i {
    font-size: 1.1rem;
}

/* ── Member Card ─────────────────────────────────────────────────── */

.ml-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.ml-card {
    display: flex;
    background: var(--ml-card-bg);
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius);
    overflow: hidden;
    transition: box-shadow var(--ml-transition), transform var(--ml-transition);
    position: relative;
}

.ml-card:hover {
    box-shadow: var(--ml-shadow-md);
    transform: translateY(-1px);
}

/* Photo Column */
.ml-card__photo-col {
    flex-shrink: 0;
    padding: 16px;
    display: flex;
    align-items: flex-start;
}

.ml-photo-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--ml-radius-sm);
    width: 200px;
    height: 220px;
}

.ml-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.ml-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.ml-photo-overlay__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ml-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(.8);
    transition: transform .2s ease;
}

.ml-photo-overlay__icon i {
    color: #fff;
    font-size: 1.25rem;
}

.ml-photo-wrap:hover .ml-photo-overlay {
    opacity: 1;
    visibility: visible;
}

.ml-photo-wrap:hover .ml-photo-overlay__icon {
    transform: scale(1);
}

.ml-photo-wrap:hover img {
    transform: scale(1.05);
}

/* Touch: overlay hidden by default, shown via .ml-photo-wrap--touched */
.ml-photo-wrap--touched .ml-photo-overlay {
    opacity: 1;
    visibility: visible;
}

.ml-photo-wrap--touched .ml-photo-overlay__icon {
    transform: scale(1);
}

.ml-photo-wrap--touched img {
    transform: scale(1.05);
}

/* Badge */
.ml-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

.ml-badge-new {
    display: inline-block;
    padding: 3px 10px;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Info Column */
.ml-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 20px 16px 4px;
    min-width: 0;
}

/* Desktop / tablet: one line — name + code + verified + match (left-aligned cluster) */
.ml-card__name-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 10px;
    margin-bottom: 12px;
    min-width: 0;
}

.ml-card__name-block {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
    flex: 0 1 auto;
    justify-content: flex-start;
}

.ml-card__name-heading {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
}

.ml-card__name {
    display: inline;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ml-primary);
    margin: 0;
    min-width: 0;
}

.ml-card__code {
    font-size: .75rem;
    color: var(--ml-text-muted);
    font-weight: 400;
}

.ml-card__name-heading .ml-card__verified {
    color: #22c55e;
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

/* Partner match % on listing (read-only pill); public profile may use a button with .mp-compare-btn */
button.ml-match-badge {
    border: 0;
    font: inherit;
    color: inherit;
    line-height: inherit;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.ml-match-badge {
    cursor: default;
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    box-sizing: border-box;
}
/* Match chip next to verified (inside .ml-card__name-block) */
.ml-card__name-block .ml-match-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.ml-match-badge--high {
    color: #065f46;
    background: #d1fae5;
}
.ml-match-badge--med {
    color: #92400e;
    background: #fef3c7;
}
.ml-match-badge--low {
    color: #991b1b;
    background: #fee2e2;
}

@media (min-width: 768px) {
    .ml-card__name-block {
        flex-wrap: nowrap;
    }

    .ml-card__name-heading {
        flex-wrap: nowrap;
    }
}

/* Detail grid: only .ml-detail rows belong here; .ml-actions is a sibling under .ml-card__info */
.ml-card__info > .ml-details {
    width: 100%;
    box-sizing: border-box;
}

/* Detail Grid */
.ml-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 16px;
    flex: 1;
    padding-bottom: 10px;
}

.ml-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ml-detail__label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--ml-primary);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 2px;
    opacity: .85;
}

.ml-detail__value {
    font-size: .835rem;
    color: var(--ml-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-detail--location {
    grid-column: span 2;
}

.ml-detail--location .ml-detail__value {
    white-space: normal;
}

/* Action Bar (full-width row under the detail grid, not a grid cell) */
.ml-card__info > .ml-actions {
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
    min-width: 0;
}

.ml-actions {
    display: flex;
    border-top: 1px solid var(--ml-border);
    margin-top: auto;
    padding-top: 10px;
}

.ml-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--ml-transition);
    border-radius: var(--ml-radius-sm);
}

.ml-action:hover {
    background: rgba(var(--ml-primary-rgb), .06);
}

.ml-action i {
    font-size: 1.25rem;
    color: var(--ml-primary);
}

.ml-action__text {
    font-size: .72rem;
    font-weight: 600;
    color: var(--ml-primary);
    text-align: center;
    white-space: nowrap;
}

.ml-action--muted i,
.ml-action--muted .ml-action__text {
    color: var(--ml-text-muted);
}

/* Empty State */
.ml-empty {
    text-align: center;
    padding: 60px 20px;
}

.ml-empty__img {
    max-width: 200px;
    height: auto;
    margin-bottom: 24px;
    opacity: .7;
}

.ml-empty__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ml-primary);
    margin-bottom: 8px;
}

.ml-empty__text {
    color: var(--ml-text-muted);
    font-size: 1rem;
    margin-bottom: 20px;
}

.ml-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ml-primary);
    background: transparent;
    border: 2px solid var(--ml-primary);
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--ml-transition);
}

.ml-empty__btn:hover {
    background: var(--ml-primary);
    color: #fff;
    text-decoration: none;
}

/* Pagination wrapper */
.ml-pagination .pagination {
    justify-content: center;
}

/* AJAX loading overlay */
#ml-ajax-wrap {
    position: relative;
    transition: opacity .2s ease;
}

#ml-ajax-wrap.ml-ajax-loading {
    opacity: .45;
    pointer-events: none;
}

#ml-ajax-wrap.ml-ajax-loading::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    border: 3px solid var(--ml-border);
    border-top-color: var(--ml-primary);
    border-radius: 50%;
    animation: ml-spin .6s linear infinite;
    z-index: 10;
}

@keyframes ml-spin {
    to { transform: rotate(360deg); }
}

/* ── Advanced Search Modal ───────────────────────────────────────── */

/* ── Search Modal ────────────────────────────────────────────────── */
.ml-search-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.14);
}

/* Header */
.ml-search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--ml-border);
}
.ml-search-header__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ml-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.ml-search-header__title i {
    color: var(--ml-primary);
    font-size: 1.1rem;
}
.ml-search-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .6rem;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
}
.ml-search-header__badge i { font-size: .6rem; }
.ml-search-header__close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
    font-size: 1rem;
    color: var(--ml-text-muted);
    margin-left: auto;
    flex-shrink: 0;
}
.ml-search-header__close:hover {
    background: #e5e7eb;
    color: var(--ml-text);
}

/* Scrollable body */
.ml-search-body {
    padding: 16px 20px 0;
    background: #f8f9fa;
    max-height: 72vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Section cards */
.ml-search-section {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    padding: 14px 16px 2px;
    margin-bottom: 12px;
}
.ml-search-section__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 700;
    color: var(--ml-text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.ml-search-section__title i {
    font-size: .85rem;
    color: var(--ml-primary);
}

/* Form elements */
.ml-form-group {
    margin-bottom: 14px;
}
.ml-form-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: .73rem;
    font-weight: 600;
    color: var(--ml-text);
    margin-bottom: 4px;
    min-height: 20px;
    line-height: 1.3;
}
.ml-form-hint {
    font-size: .65rem;
    color: var(--ml-text-muted);
    margin-top: 2px;
    display: block;
}

/* Range pair (Age, Height) */
.ml-range-pair {
    display: flex;
    align-items: center;
    gap: 0;
}
.ml-range-pair .bootstrap-select {
    flex: 1;
    min-width: 0;
}
.ml-range-sep {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: .75rem;
    color: #9ca3af;
    font-weight: 600;
}

/* Input/select consistency */
.ml-search-section .form-control,
.ml-search-section .bootstrap-select .btn {
    font-size: .8rem;
    min-height: 36px;
}
.ml-search-section input.form-control {
    height: 36px;
    font-size: .8rem;
    padding: 4px 10px;
}
.ml-search-section .bootstrap-select .btn {
    padding-top: 4px;
    padding-bottom: 4px;
}
.ml-search-section .bootstrap-select .btn .filter-option-inner-inner {
    font-size: .8rem;
}
.bootstrap-select .dropdown-menu li a span.text {
    font-size: 12px;
}
.bootstrap-select .bs-actionsbox .btn-group button {
    font-size: 10px;
}
.ml-search-section .ml-field-disabled {
    font-size: .8rem;
}

/* Sticky footer */
.ml-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid var(--ml-border);
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -20px;
}
.ml-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 22px;
    font-size: .8rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .15s;
}
.ml-btn--primary {
    color: #fff;
    background: var(--ml-primary);
    border-color: var(--ml-primary);
}
.ml-btn--primary:hover {
    background: var(--ml-accent);
    border-color: var(--ml-accent);
}
.ml-btn--outline {
    color: var(--ml-text-muted);
    background: transparent;
    border-color: #d1d5db;
}
.ml-btn--outline:hover {
    color: var(--ml-text);
    border-color: #9ca3af;
    background: #f9fafb;
}
.ml-btn .spinner-border {
    width: 14px;
    height: 14px;
    border-width: 2px;
}
.ml-btn i { font-size: .9rem; }

/* ── Advanced Locked Banner ─────────────────────────────────────── */
.ml-adv-locked-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.ml-adv-locked-banner__left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.ml-adv-locked-banner__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #92400e;
    background: rgba(245,158,11,.15);
}
.ml-adv-locked-banner__title {
    font-size: .8rem;
    font-weight: 700;
    color: #78350f;
    margin: 0;
    line-height: 1.3;
}
.ml-adv-locked-banner__desc {
    font-size: .68rem;
    color: #92400e;
    margin: 2px 0 0;
    line-height: 1.4;
}
.ml-adv-locked-banner__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    font-size: .73rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 8px;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(245,158,11,.25);
    white-space: nowrap;
}
.ml-adv-locked-banner__btn:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245,158,11,.35);
}
.ml-adv-locked-banner__btn i { font-size: .8rem; }

/* ── Per-field lock tag (Manglik, City) ─────────────────────────── */
.ml-field-lock-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #92400e;
    background: #fef3c7;
    font-size: .55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50px;
    white-space: nowrap;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .3px;
    flex-shrink: 0;
}
.ml-field-lock-tag i {
    font-size: .5rem;
    line-height: 1;
}
.ml-field-disabled {
    opacity: .45;
    cursor: not-allowed;
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    font-size: .8rem;
    min-height: 36px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .ml-search-header { padding: 12px 16px; }
    .ml-search-body { padding: 12px 14px 0; }
    .ml-search-section { padding: 12px 14px 2px; }
    .ml-search-actions { padding: 10px 16px; margin: 0 -14px; }
    .ml-form-label { font-size: .7rem; min-height: 18px; }
    .ml-search-section .form-control,
    .ml-search-section .bootstrap-select .btn { font-size: .78rem; min-height: 34px; }
    .ml-search-section input.form-control { height: 34px; font-size: .78rem; }
}

@media (max-width: 575.98px) {
    .ml-search-header { padding: 10px 12px; gap: 8px; }
    .ml-search-header__title { font-size: .85rem; }
    .ml-search-header__badge { display: none; }
    .ml-search-body { padding: 10px 10px 0; }
    .ml-search-section { padding: 10px 10px 2px; border-radius: 10px; margin-bottom: 8px; }
    .ml-search-section__title { font-size: .65rem; gap: 5px; margin-bottom: 8px; padding-bottom: 6px; }
    .ml-search-section__title i { font-size: .75rem; }
    .ml-search-actions { padding: 10px 12px; margin: 0 -10px; gap: 8px; }
    .ml-btn { padding: 8px 16px; font-size: .75rem; }
    .ml-form-group { margin-bottom: 10px; }
    .ml-form-label { font-size: .68rem; gap: 3px; min-height: 16px; }
    .ml-search-section .form-control,
    .ml-search-section .bootstrap-select .btn { font-size: .75rem; min-height: 32px; }
    .ml-search-section input.form-control { height: 32px; font-size: .75rem; }
    .ml-field-lock-tag { font-size: .48rem; padding: 1px 5px; gap: 2px; }
    .ml-field-lock-tag i { font-size: .45rem; }
    .ml-range-sep { width: 14px; font-size: .65rem; }
    .ml-range-pair .bootstrap-select .btn .filter-option-inner-inner { font-size: .7rem; }
    .ml-adv-locked-banner { flex-direction: column; text-align: center; padding: 12px 10px; gap: 8px; }
    .ml-adv-locked-banner__left { flex-direction: column; align-items: center; }
    .ml-adv-locked-banner__icon { width: 34px; height: 34px; font-size: 1rem; }
    .ml-adv-locked-banner__title { font-size: .73rem; }
    .ml-adv-locked-banner__desc { font-size: .63rem; max-width: 240px; }
    .ml-adv-locked-banner__btn { font-size: .68rem; padding: 6px 14px; }
}

/* ── Photo Modal ─────────────────────────────────────────────────── */

.ml-photo-modal .modal-content {
    border: none;
    border-radius: var(--ml-radius);
    overflow: hidden;
    background: #111;
}

.ml-photo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1a1a2e;
    border: none;
}

.ml-photo-modal-header__title {
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.ml-photo-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ml-photo-tool-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--ml-transition);
    font-size: 1rem;
}

.ml-photo-tool-btn:hover {
    background: rgba(255,255,255,.2);
}

.ml-photo-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80vh;
    overflow: auto;
    background: #111;
    padding: 0;
}

.ml-photo-modal-body img {
    max-height: 80vh;
    transition: all .3s ease;
    cursor: grab;
}

/* ── Ignore & Report Modals ──────────────────────────────────────── */

.ml-dialog .modal-content {
    border: none;
    border-radius: var(--ml-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.ml-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--ml-card-bg);
    border-bottom: 1px solid var(--ml-border);
}

.ml-dialog__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ml-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ml-dialog__title i {
    color: var(--ml-primary);
}

.ml-dialog__close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .9rem;
    color: var(--ml-text-muted);
    transition: background var(--ml-transition);
}

.ml-dialog__close:hover {
    background: #e5e7eb;
}

.ml-dialog__body {
    padding: 20px;
}

.ml-dialog__text {
    font-size: .9rem;
    color: var(--ml-text);
    margin: 0;
}

.ml-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--ml-border);
}

.ml-report-form .ml-form-label {
    font-size: .8rem;
    margin-bottom: 6px;
}

.ml-report-form textarea {
    width: 100%;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm);
    padding: 10px 12px;
    font-size: .85rem;
    resize: vertical;
    transition: border-color var(--ml-transition);
}

.ml-report-form textarea:focus {
    outline: none;
    border-color: var(--ml-primary);
    box-shadow: 0 0 0 3px rgba(var(--ml-primary-rgb), .1);
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .ml-details {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    /* Section rhythm: Bootstrap .py-lg-5 does not add padding on small screens */
    section.ml-page.py-lg-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Main column: keep content off screen edges (Bootstrap row has negative margins) */
    .ml-page .container > .row > .col-12.col-lg-9 {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }

    .ml-header {
        position: fixed !important;
        right: 12px !important;
        width: auto !important;
        background: transparent !important;
        padding: 0 !important;
        z-index: 1030 !important;
    }

    .ml-header__title {
        display: none;
    }

    .ml-header__filter-btn {
        box-shadow: 0 2px 10px rgba(0,0,0,.15);
    }

    #ml-ajax-wrap {
        padding-top: 0.25rem;
    }

    .ml-cards {
        padding-top: 10px;
        padding-left: 0;
        padding-right: 0;
    }

    .ml-card {
        flex-direction: column;
        border-radius: var(--ml-radius);
    }

    .ml-card__photo-col {
        padding: 14px 14px 0;
        justify-content: center;
    }

    .ml-photo-wrap {
        width: 160px;
        height: 180px;
        margin: 0 auto;
    }

    .ml-card__badge {
        top: 8px;
        left: 8px;
        right: auto;
    }

    .ml-card__info {
        padding: 14px 14px 16px;
    }

    /* Mobile: same as earlier — row 1 = name+code+verified; row 2 = match (sibling-like stack) */
    .ml-card__name-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-bottom: 12px;
    }

    .ml-card__name-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        flex: 0 1 auto;
    }

    .ml-card__name-heading {
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px 8px;
    }

    .ml-card__name {
        font-size: 0.95rem;
        text-align: center;
    }

    .ml-card__name-heading .ml-card__verified {
        font-size: 1.05rem;
    }

    .ml-card__name-block .ml-match-badge {
        flex: 0 0 auto;
        align-self: center;
    }

    .ml-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px 10px;
    }

    .ml-detail__label {
        font-size: .62rem;
    }

    .ml-detail__value {
        font-size: .78rem;
    }

    .ml-detail--location {
        grid-column: span 1;
    }

    .ml-detail__value--wrap {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .ml-actions {
        padding-top: 10px;
        padding-left: 0;
        padding-right: 0;
        gap: 2px;
    }

    .ml-action {
        min-height: 44px;
        justify-content: center;
        padding: 6px 4px;
    }

    .ml-action i {
        font-size: 1.05rem;
    }

    .ml-action__text {
        font-size: .62rem;
    }

    /* Search modal responsive */
    /* .ml-search-body {
        padding: 14px 16px;
    } */

    .ml-search-actions {
        padding: 12px 16px;
        margin: 0 -16px -14px;
    }

    .ml-btn {
        padding: 8px 20px;
        font-size: .8rem;
    }

    /* Photo modal tools */
    .ml-photo-tools {
        gap: 4px;
    }

    .ml-photo-tool-btn {
        width: 28px;
        height: 28px;
        font-size: .85rem;
    }
}

@media (max-width: 575px) {
    .ml-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px 8px;
    }

    .ml-detail--location {
        grid-column: span 1;
    }

    .ml-action__text {
        font-size: .58rem;
    }
}
