/* Member profile form (templates/member/form.html.twig). Everything is scoped under .mf. */
.mf {
    --mf-navy: #142d52; --mf-blue: #1769e8; --mf-blue-dark: #1054c4; --mf-blue-pale: #edf5ff;
    --mf-ink: #1c2a3e; --mf-muted: #6b7b90; --mf-line: #dfe7f0; --mf-red: #d34a4a;
    --mf-shadow: 0 8px 24px #193b6508;
    color: var(--mf-ink); font-size: 14px; line-height: 1.5;
}
.mf a { text-decoration: none; }

.mf-breadcrumb { padding: 0 0 9px; font-size: 12px; color: var(--mf-muted); }
.mf-breadcrumb a { color: var(--mf-muted); }
.mf-breadcrumb a:hover { color: var(--mf-blue); }
.mf-breadcrumb b { color: var(--mf-blue); }

.mf-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.mf-eyebrow { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; font-weight: 800; color: var(--mf-blue); }
.mf h1 { margin: 5px 0; font-size: 30px; font-weight: 800; letter-spacing: -1px; color: var(--mf-navy); }
.mf-sub { margin: 0; color: var(--mf-muted); font-size: 13px; }
.mf-head-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.mf-btn { border: 1px solid var(--mf-line); background: #fff; border-radius: 10px; padding: 10px 15px; color: var(--mf-navy);
    font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mf-btn:hover { background: #f5f8fc; color: var(--mf-navy); }
.mf-btn.primary { background: var(--mf-blue); border-color: var(--mf-blue); color: #fff; box-shadow: 0 5px 13px #1769e81c; }
.mf-btn.primary:hover { background: var(--mf-blue-dark); }
.mf-btn.small { padding: 7px 10px; font-size: 10px; color: var(--mf-blue); border-radius: 7px; }

.mf-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.mf-side-panel { background: #fff; border: 1px solid var(--mf-line); border-radius: 16px; padding: 18px; position: sticky; top: 18px; }
.mf-profile-mini { display: flex; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid var(--mf-line); margin-bottom: 14px; min-width: 0; }
.mf-profile-mini > div:last-child { min-width: 0; }
.mf-portrait { height: 55px; width: 55px; flex-shrink: 0; border-radius: 15px; background: #e9f2ff; display: grid; place-items: center; color: #2362ac; font-size: 26px; }
.mf-profile-mini strong { display: block; color: var(--mf-navy); font-size: 13px; overflow-wrap: anywhere; }
.mf-profile-mini span { font-size: 11px; color: var(--mf-muted); }
.mf-nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.1px; color: #8a98aa; font-weight: 800; margin: 17px 0 8px; }
.mf-side-nav { display: grid; gap: 5px; }
.mf-side-nav a { padding: 10px 11px; border-radius: 9px; font-size: 12px; font-weight: 700; color: #5c6c81; display: flex; gap: 10px; align-items: center; }
.mf-side-nav a:hover { background: #f5f8fc; }
.mf-side-nav a span { width: 20px; text-align: center; font-size: 15px; }
.mf-side-nav a.active { background: var(--mf-blue-pale); color: var(--mf-blue); }
.mf-side-note { margin-top: 20px; background: #f5f8fc; border-radius: 11px; padding: 12px; font-size: 11px; color: var(--mf-muted); }
.mf-side-note strong { display: block; color: var(--mf-navy); margin-bottom: 4px; }

.mf-form-area { min-width: 0; }
.mf-notice { border: 1px solid #d6e8ff; background: #eff6ff; border-radius: 12px; padding: 12px 15px; color: #496583; font-size: 12px; display: flex; gap: 10px; margin-bottom: 16px; }
.mf-notice strong { color: var(--mf-navy); }
.mf-notice.error { border-color: #f3caca; background: #fdf1f1; color: #8a3a3a; }
.mf-notice.error strong { color: #8a3a3a; }
.mf-notice .invalid-feedback, .mf-notice .alert { display: block; margin: 0; padding: 0; border: 0; background: none; color: inherit; font-size: 12px; }
.mf-req { color: var(--mf-red); }

.mf-card { background: #fff; border: 1px solid var(--mf-line); border-radius: 16px; box-shadow: var(--mf-shadow); margin-bottom: 16px; overflow: hidden; scroll-margin-top: 20px; }
.mf-card-head { padding: 18px 22px; border-bottom: 1px solid var(--mf-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mf-card-title { display: flex; align-items: center; gap: 11px; }
.mf-section-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; background: var(--mf-blue-pale); color: var(--mf-blue); display: grid; place-items: center; font-size: 17px; font-weight: 700; }
.mf-card-head h2 { font-size: 15px; font-weight: 700; color: var(--mf-navy); margin: 0; }
.mf-card-head p { font-size: 11px; color: var(--mf-muted); margin: 3px 0 0; }
.mf-required-note { font-size: 10px; color: var(--mf-muted); white-space: nowrap; }
.mf-card-body { padding: 21px 22px; }

.mf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.mf-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mf-field { min-width: 0; }
.mf-field.full { grid-column: 1 / -1; }
.mf-field .form-label, .mf-label-spacer { display: block; font-size: 11px; font-weight: 800; color: #40516a; margin-bottom: 6px; }
.mf-label-spacer { height: 16.5px; }
.mf-field .form-label.required::after { content: " *"; color: var(--mf-red); }
.mf .form-control, .mf .form-select { border: 1px solid #d7e0eb; border-radius: 9px; padding: 10px 11px; min-height: 41px; font-size: 14px; color: var(--mf-ink); }
.mf .form-select { padding-right: 32px; }
.mf .form-control:focus, .mf .form-select:focus { border-color: #6ca7ff; box-shadow: 0 0 0 3px #1769e816; }
.mf .form-control::placeholder { color: #a0acbb; }
.mf .form-control.is-invalid, .mf .form-select.is-invalid { border-color: var(--mf-red); }
.mf textarea.form-control { resize: vertical; min-height: 80px; }
.mf .form-text { font-size: 10px; color: #8592a3; margin-top: 5px; }
.mf .invalid-feedback { font-size: 11px; }
.mf-checkline { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #52637a; min-height: 41px; margin: 0; cursor: pointer; }
.mf-checkline .form-check { display: flex; align-items: center; gap: 9px; margin: 0; padding: 0; min-height: 0; }
.mf-checkline .form-check-input { float: none; margin: 0; width: 15px; height: 15px; cursor: pointer; }
.mf-checkline .form-check-label { cursor: pointer; }

.mf-identity-layout { display: grid; grid-template-columns: 155px 1fr; gap: 22px; }
.mf-photo-uploader { border: 1px dashed #b9cbe0; background: #f8fbff; border-radius: 13px; padding: 14px 10px; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 174px; align-self: start; }
.mf-photo-placeholder { height: 76px; width: 76px; border-radius: 50%; background: #e5efff; color: #4e7db7; display: grid; place-items: center; font-size: 35px; margin-bottom: 9px; overflow: hidden; }
.mf-photo-placeholder img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mf-photo-uploader > strong { font-size: 11px; color: var(--mf-navy); }
.mf-photo-uploader > span { font-size: 10px; color: var(--mf-muted); margin: 4px 0 10px; }
.mf-photo-uploader .mf-checkline { min-height: 0; margin-top: 10px; font-size: 11px; }
.mf-photo-uploader .invalid-feedback { display: block; margin-top: 6px; }
.mf-photo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.mf-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.mf-photo-uploader:focus-within .mf-btn.small { box-shadow: 0 0 0 3px #1769e830; }

.mf-footer-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 10px; }
.mf-footer-actions .right { display: flex; gap: 9px; flex-wrap: wrap; }
.mf-autosave { font-size: 11px; color: var(--mf-muted); }

@media (max-width: 920px) {
    .mf-layout { grid-template-columns: 205px minmax(0, 1fr); }
    .mf-side-panel { padding: 13px; }
    .mf-identity-layout { grid-template-columns: 1fr; }
    .mf-photo-uploader { min-height: 130px; }
    .mf-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .mf-layout { grid-template-columns: 1fr; }
    .mf-side-panel { position: static; }
    .mf-profile-mini { padding-bottom: 10px; margin-bottom: 10px; }
    .mf-side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-side-note { display: none; }
    .mf-page-head { align-items: flex-start; flex-direction: column; }
    .mf h1 { font-size: 26px; }
    .mf-head-actions { width: 100%; }
    .mf-head-actions .mf-btn { flex: 1; }
    .mf-card-head, .mf-card-body { padding: 16px; }
    .mf-grid, .mf-grid.three { grid-template-columns: 1fr; gap: 14px; }
    .mf-label-spacer { display: none; }
}
@media print {
    .mf-side-panel, .mf-head-actions, .mf-footer-actions, .mf-photo-uploader .mf-btn, .mf-photo-actions { display: none !important; }
    .mf-layout { display: block; }
    .mf-card { break-inside: avoid; box-shadow: none; }
}
