.link-edit-card .table-scroll{overflow:auto}.link-edit-card td{vertical-align:middle}.link-edit-card td:first-child{min-width:180px}.link-edit-card td:first-child strong{display:block;margin-bottom:12px}.sponsor-number-cell{min-width:360px}.sponsor-number-cell [data-sponsor-control]{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(130px,1fr);gap:12px}.sponsor-number-cell input,.sponsor-number-cell select{width:100%;min-width:0;max-width:100%}[data-match-status]{font-size:11px;line-height:1.5;color:#75656a}[data-link-amount]{width:140px;min-width:110px;direction:ltr;text-align:center}.orphan-profile{width:min(1120px,96vw);padding:24px}.profile-heading{display:flex;gap:24px;align-items:center;padding:22px;background:#faf3f5;border:1px solid #e6d4da;border-radius:12px;margin-bottom:20px}.profile-heading h2{font-size:24px}.profile-photo{width:140px;height:165px;flex-shrink:0;border:1px solid #dbc6cd;border-radius:8px;background:#fff;display:flex;align-items:center;justify-content:center;text-align:center;color:#806d73;font-size:13px;line-height:1.8;overflow:hidden}.profile-photo img{width:100%;height:100%;object-fit:contain}.profile-jumps{display:flex;gap:14px;flex-wrap:wrap}.profile-jumps a{background:white;padding:8px 12px;border:1px solid #e1ccd3;border-radius:6px;text-decoration:none}.profile-section{border:1px solid #dfd1d5;border-radius:10px;background:#fff;margin:0 0 16px;overflow:hidden;scroll-margin-top:16px}.profile-section>summary{padding:16px 20px;font-weight:bold;color:#6f0c1f;background:#faf6f7;cursor:pointer}.profile-section>summary:focus-visible{outline:3px solid #6f0c1f;outline-offset:-3px}.profile-section>.form-grid{padding:20px;grid-template-columns:repeat(3,minmax(0,1fr))}.profile-save{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px;background:#f8f3f5;border-radius:8px}.profile-save small{line-height:1.7;color:#706167}section.profile-section{padding:20px}section.profile-section h3{margin-top:0;color:#6f0c1f}.profile-documents{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.profile-document{border:1px solid #e3d5da;border-radius:8px;padding:14px;min-width:0}.profile-document h4{margin:0 0 12px}.profile-document img{width:100%;height:210px;object-fit:contain;background:#f7f4f5;border-radius:6px}.profile-document a{display:block;margin-top:8px}.profile-document iframe{height:300px}.profile-document summary{cursor:pointer;padding:12px;background:#faf3f5}.profile-rows h3{font-size:16px}.profile-rows table{min-width:950px}.profile-rows input{min-width:100px;width:100%;padding:8px}.profile-rows th,.profile-rows td{padding:7px}.profile-rows [data-add-row]{margin-top:12px}.orphan-profile #profileUpload{flex-wrap:wrap}.orphan-profile #profileUpload input[type=file]{min-width:0;max-width:100%}#profileStatus:not(:empty){padding:12px;background:#eff5ed;border-radius:6px}#profileNoteForm .form-grid{grid-template-columns:1fr 1fr}#profileNoteForm textarea{min-height:110px}#profileNoteForm button{justify-self:start}@media(max-width:700px){.orphan-profile{width:96vw;padding:14px}.profile-heading{padding:14px;gap:14px;align-items:flex-start}.profile-heading h2{font-size:19px}.profile-heading p{font-size:13px}.profile-photo{width:90px;height:115px}.profile-jumps{gap:6px}.profile-jumps a{font-size:12px;padding:7px}.profile-section>.form-grid{grid-template-columns:1fr;padding:14px}.profile-documents{grid-template-columns:1fr}.profile-save{flex-direction:column;align-items:stretch}#profileNoteForm .form-grid{grid-template-columns:1fr}section.profile-section{padding:14px}.profile-document img{height:240px}.link-edit-card{padding:10px}.sponsor-number-cell{min-width:300px}.sponsor-number-cell [data-sponsor-control]{grid-template-columns:170px 115px}}

/* Compact financial rows: RTL number, plain sponsor name, amount, shared actions. */
.link-edit-card table{min-width:860px}.link-edit-card td,.link-edit-card th{white-space:nowrap;padding:12px 10px}.link-edit-card td:first-child{min-width:175px}.link-edit-card td:first-child strong{display:inline;margin:0;font-weight:normal}.link-edit-card .sponsor-number-cell{min-width:290px}.link-edit-card .sponsor-number-cell [data-sponsor-control]{display:flex;flex-direction:row;align-items:center;gap:12px;flex-wrap:nowrap;min-height:40px}.link-edit-card [data-sponsor-number]{width:72px!important;min-width:72px!important;max-width:72px!important;height:38px;padding:7px 8px;direction:ltr;text-align:center;flex:0 0 72px}.link-edit-card [data-sponsor-name]{white-space:nowrap;font-size:14px}.link-edit-card [data-sponsor-choice]{width:auto;max-width:300px;height:38px;padding:7px}.link-edit-card [data-link-amount]{width:112px;min-width:112px;height:38px;padding:7px 10px}.link-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:nowrap}.link-row-actions>button{height:38px;white-space:nowrap;margin:0!important}.link-row-actions .row-save-icon{width:38px;min-width:38px;padding:8px!important;display:inline-flex;align-items:center;justify-content:center}.row-save-icon svg{width:21px;height:21px;pointer-events:none}.row-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.payment-sponsor{display:grid;gap:9px;flex:1;min-width:240px;font-size:14px}.payment-sponsor-line{display:flex;align-items:center;gap:12px;min-height:46px}.payment-sponsor-line input{width:78px;min-width:78px;flex:0 0 78px;padding:10px 8px;direction:ltr;text-align:center}.payment-sponsor-line span{line-height:1.7}.payment-sponsor>select{max-width:100%}@media(max-width:700px){.payment-sponsor{width:100%;min-width:0}}

/* Matching centered headings and compact, individually labelled payment fields. */
#shell[data-view="payment"] .intro #title,#shell[data-view="orphans"] .intro #title{font-size:108px;line-height:1.06;text-align:center;margin:0}
#shell[data-view="orphans"] .intro{margin:10px 0 6px}
#shell[data-view="orphans"] #subtitle{text-align:center;margin:4px 0 12px}
.payment-sponsor-line{align-items:start;gap:16px}.payment-sponsor-line .pay-number-label{flex:0 0 78px;text-align:center;display:grid;gap:9px}.payment-sponsor-line .pay-number-label input{height:46px;min-height:46px;flex:none}.pay-name-field{flex:1;min-width:0;display:grid;gap:9px;text-align:center}.pay-field-label{text-align:center}.pay-name-field #paySponsorName{min-height:46px;display:flex;justify-content:center;align-items:center;line-height:1.6}.pay-month-label{text-align:center}.pay-month-label input{text-align:center;min-height:46px}#orphanTable table{min-width:820px}#orphanTable th,#orphanTable td{vertical-align:middle;padding:13px 12px}#orphanTable .orphan-number{text-align:center;width:95px;font-variant-numeric:tabular-nums}#orphanTable th:first-child{text-align:center}#orphanTable .orphan-name{font-weight:600;min-width:190px}#orphanTable .actions{flex-wrap:nowrap;align-items:center;white-space:nowrap}#orphanTable button{white-space:nowrap;min-height:36px}
@media(max-width:700px){#shell[data-view="payment"] .intro #title,#shell[data-view="orphans"] .intro #title{font-size:clamp(60px,18vw,96px);line-height:1.1}.payment-sponsor-line .pay-number-label{width:78px}.pay-month-label{width:100%}}

#shell[data-view="sponsors"] .intro{margin:10px 0 6px}#shell[data-view="sponsors"] .intro #title{font-size:108px;line-height:1.06;text-align:center;margin:0}#shell[data-view="sponsors"] #subtitle{text-align:center;margin:4px 0 12px}#sponsorToolbar{padding:10px 14px;gap:12px;margin-bottom:12px;max-width:1050px;margin-inline:auto}#sponsorToolbar label{gap:5px;font-size:13px}#sponsorSearch{padding:8px 10px;width:280px;max-width:100%;min-height:36px}#sponsorToolbar button{padding:9px 16px}#sponsorTable{padding:12px 14px;max-width:1050px;margin-inline:auto}#sponsorTable table{min-width:700px}#sponsorTable td,#sponsorTable th{padding:9px 10px;vertical-align:middle}#sponsorTable th:nth-child(-n+2),#sponsorTable td:nth-child(-n+2){width:110px;text-align:center;white-space:nowrap}#sponsorTable input[data-number-one],#sponsorTable input[data-number-two]{width:78px;min-width:78px;height:36px;padding:7px 8px;text-align:center;direction:ltr}#sponsorTable td:nth-child(3){min-width:180px}#sponsorTable td:nth-child(4){width:160px}#sponsorTable td:last-child{width:125px}#sponsorTable .link-row-actions{gap:6px}#sponsorTable .link-row-actions button{height:36px}#sponsorTable .row-save-icon{width:36px;min-width:36px}@media(max-width:700px){#shell[data-view="sponsors"] .intro #title{font-size:clamp(60px,18vw,96px);line-height:1.1}#sponsorToolbar{padding:10px;flex-wrap:nowrap}#sponsorToolbar label{min-width:0;flex:1}#sponsorSearch{width:100%;min-width:0}#sponsorToolbar button{white-space:nowrap;padding:9px 12px}}

#sponsorToolbar,#sponsorTable{max-width:900px}
/* Keep full sponsor names on one line; scroll the table on narrow screens. */
#sponsorTable{max-width:100%;padding:12px 14px}
#sponsorTable table{width:100%;min-width:950px}
#sponsorTable th:nth-child(3),#sponsorTable td:nth-child(3){min-width:360px;white-space:nowrap;overflow:visible;text-overflow:clip}
#sponsorTable td,#sponsorTable th{white-space:nowrap}
/* More room for names, compact accessible action icons. */
#orphanTable table{min-width:900px}#orphanTable .orphan-name{min-width:300px;white-space:nowrap}#orphanTable td:last-child,#orphanTable th:last-child{width:130px;white-space:nowrap}#orphanTable .actions{gap:6px;justify-content:flex-start}#orphanTable .orphan-action-icon{position:relative;display:inline-flex;justify-content:center;align-items:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:7px;flex:0 0 36px}#orphanTable .orphan-action-icon svg{width:20px;height:20px;pointer-events:none}#orphanTable .orphan-action-icon:focus-visible::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 7px);inset-inline-end:0;z-index:4;padding:6px 9px;border-radius:5px;background:#422c33;color:white;font-size:12px;line-height:1.5;white-space:nowrap;box-shadow:0 2px 6px #0002;pointer-events:none}

.profile-photo{position:relative}.profile-photo-content{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.profile-photo-content img{width:100%;height:100%;object-fit:contain}.profile-photo[tabindex]{cursor:pointer}.profile-photo[tabindex]:focus-visible{outline:3px solid #6f0c1f;outline-offset:3px}#dialog .portrait-camera{position:absolute;bottom:6px;left:6px;width:30px;height:30px;min-width:30px;padding:5px;display:flex;align-items:center;justify-content:center;border:1px solid #cbbec2;border-radius:5px;background:#fff;color:#6f0c1f;box-shadow:0 1px 4px #0002}#dialog .portrait-camera svg{width:19px;height:19px;pointer-events:none}#dialog .portrait-camera:disabled{opacity:.5;cursor:default}

/* Content-sized fields throughout the orphan form. */
#profileData .profile-section>.form-grid{display:flex;flex-wrap:wrap;align-items:flex-start;gap:14px 16px;padding:16px}
#profileData [data-profile-size]{flex:0 1 210px;min-width:0;max-width:100%;margin:0}
#profileData [data-profile-size=name]{flex-basis:360px}
#profileData [data-profile-size=long]{flex-basis:320px}
#profileData [data-profile-size=date]{flex-basis:170px}
#profileData [data-profile-size=short]{flex-basis:140px}
#profileData [data-profile-field=gender]{flex-basis:100px}
#profileData [data-profile-size=count]{flex-basis:125px}
#profileData [data-profile-size=notes]{flex:1 1 360px}
#profileData [data-profile-size] input,#profileData [data-profile-size] select,#profileData [data-profile-size] textarea{width:100%;min-width:0;box-sizing:border-box}
#profileData [data-profile-size=notes] textarea{min-height:90px;resize:vertical}
#profileData .profile-rows{flex:0 0 100%;min-width:0;max-width:100%}
#profileData .profile-rows [data-cell=name],#profileData .profile-rows [data-cell=recipient],#profileData .profile-rows [data-cell=workplace]{min-width:200px}
#profileData .profile-rows [data-cell=age],#profileData .profile-rows [data-cell=gender]{min-width:65px}
#profileNoteForm [name=year]{width:110px;max-width:100%}
@media(max-width:600px){
 #profileData .profile-section>.form-grid{gap:12px;padding:12px}
 #profileData [data-profile-size=name],#profileData [data-profile-size=long],#profileData [data-profile-size=notes]{flex-basis:100%}
 #profileData [data-profile-size=medium]{flex-basis:210px}
 #profileData [data-profile-size=short],#profileData [data-profile-size=count]{flex-basis:calc(50% - 6px)}
}

#profileData [hidden],#profileDocuments[hidden],#profileAnnual[hidden]{display:none!important}
#profileData .profile-choice{box-sizing:border-box;border:1px solid #dfd1d5;border-radius:7px;padding:8px 12px;margin:0;flex:0 0 210px;max-width:100%;min-width:0}
#profileData .profile-choice label{display:inline-flex;align-items:center;gap:7px;margin-inline-end:16px}
#profileData .profile-choice input{width:17px;height:17px;margin:0;accent-color:#6f0c1f}
#profileData .profile-choice small{display:block}
#profileData [data-profile-field=gender],#profileData [data-profile-field=nationality]{flex-basis:110px}
#profileData [data-profile-field=siblings]{flex:0 1 320px}
#profileData [data-profile-field=siblings] textarea{min-height:60px}
#profileData [data-profile-field=motherBoys],#profileData [data-profile-field=motherGirls]{flex-basis:125px}
#profileData [data-profile-field^=guardian]:not([data-profile-size=name]){flex-basis:210px}
#profileData [data-profile-field=health],#profileData [data-profile-field=treatment]{flex:0 1 320px}
#profileData [data-profile-field=witness1Name],#profileData [data-profile-field=witness2Name]{flex-basis:320px}

#profileData .profile-gender-pair{display:flex;gap:12px;flex:0 0 232px;max-width:100%;min-width:0}

/* Compact single-line personal details and adjacent health notes. */
#profileData .profile-choice{flex:0 0 150px;padding:5px 8px}
#profileData .profile-choice legend{font-size:14px;padding:0 3px}
#profileData .profile-choice label{gap:5px;margin-inline-end:8px;font-size:14px}
#profileData [data-profile-field=health],#profileData [data-profile-field=treatment],#profileData [data-profile-field=education],#profileData [data-profile-field=needs],#profileData [data-profile-field=hobbies],#profileData [data-profile-field=skills]{flex:0 1 210px}

/* Shared column edges instead of ragged, fixed-width flex rows. */
#profileData .profile-section>.form-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;align-items:start}
#profileData .form-grid>[data-profile-size],#profileData .form-grid>[data-profile-field]{grid-column:span 3;width:100%;min-width:0}
#profileData .form-grid>[data-profile-size=name],#profileData .form-grid>[data-profile-size=long]{grid-column:span 6}
#profileData .form-grid>[data-profile-size=count],#profileData .form-grid>[data-profile-size=short],#profileData .form-grid>[data-profile-size=date]{grid-column:span 2}
#profileData .form-grid>[data-profile-size=notes]{grid-column:span 6}
#profileData .profile-rows{grid-column:1/-1}
#profileData .form-grid>[data-profile-field=name]{grid-column:span 5}
#profileData .form-grid>[data-profile-field=age]{grid-column:span 1}
#profileData [data-profile-field=age] input{width:100%;min-width:0;text-align:center}
#profileData .form-grid>[data-profile-field=birthPlace],#profileData .form-grid>[data-profile-field=governorate],#profileData .form-grid>[data-profile-field=district],#profileData .form-grid>[data-profile-field=area]{grid-column:span 2}
#profileData .profile-gender-pair{grid-column:span 2;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;min-width:0}
#profileData .form-grid>.profile-choice{grid-column:span 2;min-height:65px}
#profileData .form-grid>[data-profile-field=address]{grid-column:span 6}
#profileData .form-grid>[data-profile-field=health]{grid-column:span 3}
@media(max-width:700px){
 #profileData .profile-section>.form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
 #profileData .form-grid>[data-profile-size],#profileData .form-grid>[data-profile-field]{grid-column:span 2}
 #profileData .form-grid>[data-profile-size=name],#profileData .form-grid>[data-profile-size=long],#profileData .form-grid>[data-profile-size=notes],#profileData .form-grid>[data-profile-field=name],#profileData .form-grid>[data-profile-field=address],#profileData .form-grid>[data-profile-field=health]{grid-column:1/-1}
 #profileData .form-grid>[data-profile-field=age]{grid-column:span 1}
 #profileData .form-grid>[data-profile-field=birth]{grid-column:span 3}
}
#profileData .form-grid>[data-profile-field=grade]{grid-column:span 3}#profileData .form-grid>[data-profile-field=needs],#profileData .form-grid>[data-profile-field=hobbies],#profileData .form-grid>[data-profile-field=skills]{grid-column:span 4}@media(max-width:700px){#profileData .form-grid>[data-profile-field=grade]{grid-column:span 2}#profileData .form-grid>[data-profile-field=needs],#profileData .form-grid>[data-profile-field=hobbies],#profileData .form-grid>[data-profile-field=skills]{grid-column:1/-1}}

/* Compact contact, housing and education row with shared edges. */
#profileData .form-grid>[data-profile-field=address]{grid-column:1/-1}
#profileData .form-grid>[data-profile-field=phone]{grid-column:span 3}
#profileData [data-profile-field=phone] input{direction:ltr;text-align:right;font-size:14px}
#profileData .form-grid>[data-profile-field=housing]{grid-column:span 2}
#profileData .form-grid>[data-profile-field=income]{grid-column:span 2}
#profileData .form-grid>[data-profile-field=school]{grid-column:span 3}
#profileData .form-grid>[data-profile-field=grade]{grid-column:span 2}
@media(max-width:700px){
 #profileData .form-grid>[data-profile-field=phone]{grid-column:1/-1}
 #profileData .form-grid>[data-profile-field=school]{grid-column:span 3}
 #profileData .form-grid>[data-profile-field=grade]{grid-column:span 1}
 #profileData [data-profile-field=grade]{font-size:12px}
}

#profileData .profile-contact-row{grid-column:1/-1;display:grid;grid-template-columns:1.7fr 1fr 1fr 2fr 1.3fr;gap:12px;min-width:0}
#profileData .profile-contact-row>label{width:100%;min-width:0}
@media(max-width:700px){#profileData .profile-contact-row{grid-template-columns:repeat(2,minmax(0,1fr))}#profileData .profile-contact-row>[data-profile-field=phone]{grid-column:1/-1}}

/* Compact name and identity, aligned location fields. */
#profileData .form-grid>[data-profile-field=name]{grid-column:span 4}
#profileData .form-grid>[data-profile-field=identityNumber]{grid-column:span 2}
#profileData .form-grid>[data-profile-field=health]{grid-column:span 4}
#profileData .profile-address-row{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr 1fr 4fr;gap:12px;min-width:0}
#profileData .profile-address-row>label{width:100%;min-width:0}
#profileData .form-grid>.profile-gender-pair{grid-column:span 3;grid-template-columns:1fr 1fr;max-width:100%}
@media(max-width:700px){
 #profileData .form-grid>[data-profile-field=name],#profileData .form-grid>[data-profile-field=health]{grid-column:1/-1}
 #profileData .form-grid>.profile-gender-pair{grid-column:span 2}
 #profileData .profile-address-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 #profileData .profile-address-row>[data-profile-field=address]{grid-column:1/-1}
}

/* Narrow the form itself rather than redistributing spare width. */
#dialog.orphan-profile{width:min(880px,96vw)}
#profileData .profile-address-row{grid-template-columns:105px 105px 105px minmax(0,1fr)}
@media(max-width:700px){#dialog.orphan-profile{width:96vw}#profileData .profile-address-row{grid-template-columns:repeat(3,minmax(0,1fr))}}


#profileData .profile-choice legend{font-size:12px;white-space:nowrap}#profileData .profile-choice label{font-size:12px;gap:3px;margin-inline-end:4px}#profileData .profile-choice input{width:14px;height:14px}#profileData [data-profile-field=birth] input{font-size:12px;padding-inline:6px}#profileData .profile-contact-row>label{display:flex;flex-direction:column;justify-content:space-between}#profileData .profile-contact-row{align-items:stretch}


/* Each family member stays visible within the narrow form. */
#profileData [data-row-table=familyMembers] .table-scroll{overflow:visible}
#profileData [data-row-table=familyMembers] table{display:block;min-width:0;width:100%}
#profileData [data-row-table=familyMembers] thead{display:none}
#profileData [data-row-table=familyMembers] tbody{display:grid;gap:12px;counter-reset:family-member}
#profileData [data-row-table=familyMembers] tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #dfd1d5;border-radius:8px;background:#faf7f8;counter-increment:family-member}
#profileData [data-row-table=familyMembers] tr::before{content:'فرد الأسرة ' counter(family-member);grid-column:1/-1;color:#6f0c1f;font-weight:bold}
#profileData [data-row-table=familyMembers] td{display:block;padding:0;border:0;min-width:0;white-space:normal}
#profileData [data-row-table=familyMembers] td::before{content:attr(data-label);display:block;font-size:13px;margin-bottom:6px}
#profileData [data-row-table=familyMembers] td:first-child{grid-column:span 2}
#profileData [data-row-table=familyMembers] td:last-child{grid-column:1/-1;text-align:left}
#profileData [data-row-table=familyMembers] input[data-cell]{min-width:0;width:100%;box-sizing:border-box}
#profileData [data-row-table=familyMembers] [data-remove-row]{padding:6px 12px;font-size:13px}
@media(max-width:700px){#profileData [data-row-table=familyMembers] tr{grid-template-columns:repeat(2,minmax(0,1fr))}}

#profileData .form-grid>[data-profile-field=motherName]{grid-column:span 6}
#profileData .form-grid>[data-profile-field=motherStatus],#profileData .form-grid>[data-profile-field=motherDeath]{grid-column:span 3}
#profileData .form-grid>[data-profile-field=motherResidence]{grid-column:span 4}
#profileData .form-grid>[data-profile-field=motherHealth]{grid-column:span 3}
#profileData .profile-mother-counts{grid-column:span 5;display:grid;grid-template-columns:repeat(3,54px);gap:10px;align-items:start;justify-content:start;min-width:0}
#profileData .profile-mother-counts>label{min-width:0;width:54px;font-size:13px;text-align:center}
#profileData .profile-mother-counts input{width:54px;min-width:0;padding:10px 4px;text-align:center;appearance:textfield;-moz-appearance:textfield}
#profileData .profile-mother-counts input::-webkit-inner-spin-button,#profileData .profile-mother-counts input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(max-width:700px){
 #profileData .form-grid>[data-profile-field=motherName]{grid-column:1/-1}
 #profileData .form-grid>[data-profile-field=motherStatus],#profileData .form-grid>[data-profile-field=motherDeath],#profileData .form-grid>[data-profile-field=motherResidence],#profileData .form-grid>[data-profile-field=motherHealth]{grid-column:span 2}
 #profileData .profile-mother-counts{grid-column:1/-1}
}

/* One compact row per family member on desktop. */
#profileData [data-row-table=familyMembers] tr{grid-template-columns:minmax(130px,2fr) 70px 60px 42px 64px 73px minmax(80px,1fr) 70px 24px;gap:6px;padding:8px;background:#fff;align-items:end}
#profileData [data-row-table=familyMembers] tr::before{display:none}
#profileData [data-row-table=familyMembers] td:first-child,#profileData [data-row-table=familyMembers] td:last-child{grid-column:auto}
#profileData [data-row-table=familyMembers] td::before{font-size:11px;line-height:1.4;min-height:16px;margin-bottom:4px;white-space:nowrap}
#profileData [data-row-table=familyMembers] input[data-cell],#profileData [data-row-table=familyMembers] select[data-cell]{height:34px;padding:4px;min-width:0;width:100%;font-size:12px;box-sizing:border-box}
#profileData [data-row-table=familyMembers] [data-remove-row]{width:24px;height:34px;min-width:0;padding:0;font-size:20px}
#profileData [data-row-table=familyMembers] [data-cell=age]{text-align:center}
@media(max-width:700px){
 #profileData [data-row-table=familyMembers] tr{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 #profileData [data-row-table=familyMembers] td:first-child{grid-column:span 2}
 #profileData [data-row-table=familyMembers] td[data-family-cell=workplace]{grid-column:span 2}
 #profileData [data-row-table=familyMembers] td::before{white-space:normal}
}

#profileData [data-row-table=familyMembers] tr{grid-template-columns:minmax(130px,2fr) 58px 60px 42px 76px 65px 60px minmax(90px,1.2fr) 24px}
#profileData [data-row-table=familyMembers] select[data-cell]{padding-inline:2px;font-size:11px}
@media(max-width:700px){#profileData [data-row-table=familyMembers] tr{grid-template-columns:repeat(4,minmax(0,1fr))}}

#profileData[hidden]{display:none!important}
.profile-tabs button{padding:7px 12px;font-size:13px;background:white;border:1px solid #e1ccd3;border-radius:6px;color:#6f0c1f}
.profile-tabs button[aria-pressed=true]{background:#6f0c1f;color:white}
#profileDocuments .archive-hint{font-size:13px;color:#706167;line-height:1.7}
#profileDocuments #profileUpload{display:flex;align-items:end;gap:10px;padding:12px;background:#faf6f7;border-radius:8px;margin-bottom:16px}
#profileDocuments #profileUpload label{flex:1;min-width:180px}
#profileDocuments #profileUpload select{width:100%}
#profileDocuments .archive-upload{width:36px;height:36px;min-width:36px;padding:7px;display:flex;align-items:center;justify-content:center}
#profileDocuments #profileDocCards{display:block}
#profileDocuments .archive-group{margin-top:16px;border-top:1px solid #eadfe3;padding-top:8px}
#profileDocuments .archive-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#profileDocuments .archive-date{display:block;margin-bottom:8px;color:#706167}
#profileDocuments .archive-items>p{font-size:13px;color:#706167}
@media(max-width:600px){#profileDocuments .archive-items{grid-template-columns:1fr}}

/* Uniform labels and compact controls, including care choices. */
#profileData input:not([type=radio]),#profileData select{height:34px;min-height:34px;padding-block:5px;box-sizing:border-box}
#profileData .profile-care-row{grid-column:1/-1;display:grid;grid-template-columns:135px 135px 135px minmax(0,1fr);gap:12px;align-items:start}
#profileData .profile-care-row>label{min-width:0;width:100%}
#profileData .profile-care-row .profile-choice{border:0;padding:0;margin:0;min-height:0;width:100%}
#profileData .profile-choice-title{display:block;font-size:13px;line-height:20px;margin-bottom:6px;font-weight:normal;color:inherit}
#profileData .profile-care-row>label{font-size:13px;line-height:20px;gap:6px}
#profileData .profile-choice-box{display:flex;align-items:center;justify-content:space-evenly;height:34px;box-sizing:border-box;border:1px solid #cbbec2;border-radius:6px;background:#fff;padding:4px}
#profileData .profile-choice-box label{display:inline-flex;align-items:center;gap:4px;margin:0;font-size:12px;line-height:1}
#profileData .profile-choice-box input{width:14px;height:14px;min-height:0;margin:0}
#profileData textarea{padding-block:6px}
@media(max-width:700px){#profileData .profile-care-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#profileData .profile-care-row>[data-profile-field=health]{grid-column:1/-1}}

/* Keep close reachable while scrolling the orphan file. */
#dialog.orphan-profile>.dialog-head{position:sticky;top:-24px;z-index:20;background:#fff;padding:12px 0;margin-top:-12px;margin-bottom:12px;box-shadow:0 4px 5px -5px #6f0c1f55}
#dialog.orphan-profile .profile-heading{padding:12px 16px;gap:16px;margin-bottom:14px}
#dialog.orphan-profile .profile-photo{width:95px;height:112px}
#dialog.orphan-profile .profile-heading h2{font-size:21px;margin:0 0 6px}
#dialog.orphan-profile .profile-heading p{margin:4px 0 10px;font-size:12px}
#dialog.orphan-profile .profile-tabs button{padding:5px 10px}
@media(max-width:700px){#dialog.orphan-profile>.dialog-head{top:-14px}#dialog.orphan-profile .profile-photo{width:75px;height:90px}#dialog.orphan-profile .profile-heading{padding:10px;gap:10px}#dialog.orphan-profile .profile-heading h2{font-size:17px}}

#profileData .form-grid>[data-profile-field=motherStatus],#profileData .form-grid>[data-profile-field=motherDeath]{grid-column:span 2}
#profileData .form-grid>[data-profile-field=motherName]{grid-column:span 8}
#profileData input:disabled,#profileData textarea:disabled{background:#f1eff0;color:#82767a;cursor:not-allowed}
#profileData [data-profile-field=motherStatus] small{font-size:11px;line-height:1.5}
@media(max-width:700px){#profileData .form-grid>[data-profile-field=motherName]{grid-column:1/-1}}

#dialog.orphan-profile .dialog-head #dialogTitle{margin-inline-end:auto}
#dialog.orphan-profile .dialog-head{gap:8px}
#dialog.orphan-profile #profileTopSave{width:36px;height:36px;padding:7px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
#profileData .form-grid[data-profile-group="3"]{grid-template-columns:minmax(135px,1.6fr) 110px 122px minmax(80px,1fr) 85px 128px;gap:8px;align-items:start}
#profileData .form-grid[data-profile-group="3"]>[data-profile-field],#profileData .form-grid[data-profile-group="3"]>.profile-mother-counts{grid-column:auto}
#profileData .form-grid[data-profile-group="3"]>label{font-size:12px}
#profileData .form-grid[data-profile-group="3"] input{padding-inline:5px;font-size:12px}
#profileData .profile-mother-counts{grid-template-columns:40px 36px 36px;gap:6px}
#profileData .profile-mother-counts>label,#profileData .profile-mother-counts input{width:100%;min-width:0}
#profileData .profile-mother-counts>label{font-size:11px}
@media(max-width:700px){#profileData .form-grid[data-profile-group="3"]{grid-template-columns:repeat(2,minmax(0,1fr))}#profileData .form-grid[data-profile-group="3"]>[data-profile-field=motherName]{grid-column:1/-1}#profileData .profile-mother-counts{grid-template-columns:40px 36px 36px}}

/* Compact section rhythm and automatically growing family rows. */
#profileData.stack{gap:12px}
#profileData>.profile-section{margin-bottom:0}
#profileData .profile-section>summary{padding:10px 14px}
#profileData .profile-section>.form-grid{padding:12px}
#profileData [data-row-table=familyMembers]>h3{display:none}
#profileData [data-row-table=familyMembers] tbody{gap:6px}
#profileData [data-row-table=familyMembers] tr{padding:6px}
#dialog.orphan-profile .profile-heading{margin-bottom:12px}

/* One shared family frame, with aligned rows and one set of headings. */
#profileData [data-row-table=familyMembers] tbody{gap:0;border:1px solid #dfd1d5;border-radius:8px;padding:6px;background:#fff}
#profileData [data-row-table=familyMembers] tr{border:0;border-radius:0;padding:4px 0;background:transparent}
#profileData [data-row-table=familyMembers] tr+tr td::before{display:none}
@media(max-width:700px){#profileData [data-row-table=familyMembers] tr+tr{border-top:1px solid #eadfe3;margin-top:4px;padding-top:8px}#profileData [data-row-table=familyMembers] tr+tr td::before{display:block}}


/* Guardian-only details, five compact fields per desktop row. */
#profileData .form-grid[data-profile-group="4"]{grid-template-columns:minmax(140px,1.6fr) minmax(100px,1fr) minmax(110px,1.1fr) minmax(135px,1.3fr) 80px;gap:12px}
#profileData .form-grid[data-profile-group="4"]>[data-profile-field]{grid-column:auto;width:100%;min-width:0}
#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianPhone]{min-width:0}
#profileData .form-grid[data-profile-group="4"] [name=guardianPhone]{font-size:12px;padding-inline:4px}
@media(max-width:700px){#profileData .form-grid[data-profile-group="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardian]{grid-column:1/-1}}

@media(min-width:701px){#profileData .form-grid[data-profile-group="4"]{grid-template-columns:repeat(24,minmax(0,1fr))}#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardian]{grid-column:span 8}#profileData .form-grid[data-profile-group="4"]>[data-profile-field=relation],#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianJob]{grid-column:span 4}#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianIdentity],#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianResidence],#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianPhone]{grid-column:span 6}#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianAge],#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianDependents]{grid-column:span 2}#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianMaritalStatus],#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianEducation]{grid-column:span 5}}


#profileData .form-grid[data-profile-group="4"]>label{font-size:12px;line-height:20px}
@media(min-width:701px){
 #profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianResidence]{grid-column:span 5}
 #profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianMaritalStatus],#profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianEducation]{grid-column:span 4}
 #profileData .form-grid[data-profile-group="4"]>[data-profile-field=guardianDependents]{grid-column:span 5}
 #profileData .form-grid[data-profile-group="4"]>label{white-space:nowrap}
}

@media(min-width:701px){#profileData .profile-contact-row{grid-template-columns:1.7fr 1fr 145px 1.7fr 1fr}#profileData .profile-contact-row>[data-profile-field=income]{white-space:nowrap;font-size:12px}}


@media(min-width:701px){#profileData .profile-contact-row{grid-template-columns:1.7fr 1fr max-content 2.2fr 1fr}#profileData .profile-contact-row>[data-profile-field=income]{display:block;width:max-content;white-space:nowrap;font-size:12px}#profileData .profile-contact-row>[data-profile-field=income] input{display:block;width:0;min-width:100%;max-width:100%;margin-top:6px;box-sizing:border-box}}


@media(min-width:701px){
 #profileData .form-grid[data-profile-group="2"]{grid-template-columns:minmax(170px,2fr) 145px 120px minmax(150px,2fr);gap:12px}
 #profileData .form-grid[data-profile-group="2"]>[data-profile-field]{grid-column:auto;min-width:0;font-size:12px}
}

@media(min-width:701px){#profileData .form-grid[data-profile-group="2"]{grid-template-columns:250px 145px 120px minmax(0,1fr)}}


#profileData .form-grid[data-profile-group="5"]>[data-profile-field=formNumber]{grid-column:span 2}
#profileData .form-grid[data-profile-group="5"]>[data-profile-field=sponsorshipStart]{grid-column:span 3}
#profileData .form-grid[data-profile-group="5"]>[data-profile-field=refereeName]{grid-column:span 7}
#profileData .form-grid[data-profile-group="5"]>[data-profile-field=socialManagerName]{grid-column:span 4;font-size:12px}
#profileData .form-grid[data-profile-group="5"]>[data-profile-field=administrativeNotes]{grid-column:span 8}
@media(max-width:700px){#profileData .form-grid[data-profile-group="5"]>[data-profile-field]{grid-column:1/-1}#profileData .form-grid[data-profile-group="5"]>[data-profile-field=formNumber],#profileData .form-grid[data-profile-group="5"]>[data-profile-field=sponsorshipStart]{grid-column:span 2}}

#profileData .form-grid[data-profile-group="5"]>[data-profile-field=profileSponsorNumber]{grid-column:span 3}
@media(max-width:700px){#profileData .form-grid[data-profile-group="5"]>[data-profile-field=profileSponsorNumber]{grid-column:span 2}}

@media(min-width:701px){
 #profileData .form-grid[data-profile-group="5"]{grid-template-columns:125px 200px minmax(0,1fr);gap:12px}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field]{grid-column:auto;min-width:0}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field=sponsorshipStart]{grid-column:2}
 #profileData [data-profile-field=sponsorshipStart] input{width:145px;max-width:100%}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field=administrativeNotes]{grid-column:3}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field=profileSponsorNumber]{grid-column:1}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field=socialManagerName]{grid-column:2;font-size:12px;white-space:nowrap}
}

@media(min-width:701px){
 #profileData .form-grid[data-profile-group="5"]{grid-template-columns:125px 165px minmax(0,1fr);gap:12px 8px}
 #profileData [data-profile-field=sponsorshipStart] input{width:100%}
 #profileData .form-grid[data-profile-group="5"]>label{display:flex;flex-direction:column;font-size:12px;line-height:20px;gap:6px}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field=socialManagerName]{white-space:normal}
 #profileData .form-grid[data-profile-group="5"]>[data-profile-field=socialManagerName],#profileData .form-grid[data-profile-group="5"]>[data-profile-field=profileSponsorNumber]{align-self:end}
 #profileData .form-grid[data-profile-group="6"]{grid-template-columns:repeat(12,minmax(0,1fr));gap:12px 8px}
 #profileData .form-grid[data-profile-group="6"]>[data-profile-field=authorizationApplicant],#profileData .form-grid[data-profile-group="6"]>[data-profile-field=authorizationFather],#profileData .form-grid[data-profile-group="6"]>[data-profile-field=authorizationRecipient]{grid-column:span 4}
 #profileData .form-grid[data-profile-group="6"]>[data-profile-field=authorizationDate]{grid-column:span 2}
 #profileData .form-grid[data-profile-group="6"]>[data-profile-field=witness1Name],#profileData .form-grid[data-profile-group="6"]>[data-profile-field=witness2Name]{grid-column:span 3}
 #profileData .form-grid[data-profile-group="6"]>[data-profile-field=witness1Relation],#profileData .form-grid[data-profile-group="6"]>[data-profile-field=witness2Relation]{grid-column:span 2}
 #profileData .form-grid[data-profile-group="6"]>label{font-size:12px;display:flex;flex-direction:column;justify-content:space-between;align-self:stretch;gap:6px;line-height:20px}
}


.sponsor-inline-complete{position:relative;display:flex;align-items:center;width:100%;min-width:0}
#profileData .sponsor-inline-complete input{padding-left:25px;direction:ltr;text-align:right}
#dialog .sponsor-number-toggle{position:absolute;left:1px;top:1px;width:24px;height:32px;min-width:0;padding:0;border:0;background:transparent;font-size:15px}
.sponsor-number-list{position:absolute;top:calc(100% + 3px);inset-inline:0;z-index:10;max-height:180px;overflow:auto;background:white;border:1px solid #cbbec2;border-radius:5px;box-shadow:0 3px 8px #0002}
#dialog .sponsor-number-list button{display:block;width:100%;border:0;border-radius:0;padding:6px 10px;text-align:right;font-size:13px}
#dialog .sponsor-number-list button:focus{background:#f3e5ea}
#profileData .profile-section:has(.sponsor-inline-complete){overflow:visible}

#shell[data-view=home] #message:empty{display:none}
.home-welcome{min-height:65vh;display:flex;align-items:center;justify-content:center;background:transparent}
.home-welcome img{width:min(460px,65%);height:auto;max-height:60vh;object-fit:contain;opacity:.055;user-select:none;pointer-events:none}
#dialog .dialog-head #dialogHomeButton{width:36px;height:36px;min-width:36px;padding:7px;display:flex;align-items:center;justify-content:center}

.sar-symbol{height:19px;width:auto;vertical-align:middle;margin-inline:4px}

.link-rate-label{display:inline-flex;align-items:center;gap:6px;font-size:12px;margin-inline-start:10px}.link-rate-label input{width:110px!important;min-width:0;padding:5px}#payRate{width:130px}[data-yemeni-preview]{display:block;font-size:12px;margin-top:5px;white-space:nowrap}

.link-edit-card .sar-amount-field{position:relative;width:115px;min-width:115px}
.link-edit-card .sar-amount-field img{position:absolute;left:9px;top:50%;transform:translateY(-50%);height:19px;width:auto;pointer-events:none}
.link-edit-card .sar-amount-field [data-link-amount]{width:115px;min-width:0;padding-left:34px;padding-right:6px;text-align:right;appearance:textfield;-moz-appearance:textfield}
.link-edit-card .sar-amount-field input::-webkit-inner-spin-button,.link-edit-card .sar-amount-field input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.link-edit-card [data-yemeni-preview]{display:block;min-width:100px;text-align:center;font-size:14px;font-weight:bold;margin:0;direction:ltr}

.link-edit-card th:last-child{text-align:right}.link-edit-card .link-rate-label{display:flex;justify-content:flex-start;align-items:center;gap:6px;margin:0;font-size:12px}.link-edit-card .link-rate-label #linkExchangeRate{width:76px!important;min-width:76px;height:32px;padding:4px 6px;font-size:12px;text-align:center;appearance:textfield;-moz-appearance:textfield}.link-edit-card #linkExchangeRate::-webkit-inner-spin-button,.link-edit-card #linkExchangeRate::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}


.link-edit-card .sar-amount-field,.link-edit-card .sar-amount-field [data-link-amount]{width:94px;min-width:94px}
.link-edit-card .sar-amount-field [data-link-amount]{font-size:12px;padding-left:27px}
.link-edit-card .sar-amount-field img{height:16px;left:6px}
.link-edit-card [data-yemeni-preview]{min-width:72px;font-size:12px}
.link-edit-card th,.link-edit-card td{padding-inline:6px}
.link-edit-card .link-rate-label{justify-content:flex-start;gap:4px;font-size:11px;max-width:130px}
.link-edit-card .link-rate-label #linkExchangeRate{width:60px!important;min-width:60px;height:30px;padding:3px;font-size:11px}
.link-edit-card .sponsor-number-cell{min-width:260px}

.link-edit-card [data-sponsor-number],.link-edit-card .sar-amount-field [data-link-amount],.link-edit-card [data-yemeni-preview]{font-size:16px}


.link-edit-card tbody td{padding-top:5px;padding-bottom:5px}


#shell .top #sectionHeading{font-family:AF_Jeddah,Tahoma,sans-serif;font-size:42px;font-weight:normal;line-height:1.3;color:var(--brand-burgundy);min-width:0}
#shell .intro{display:none}
#shell .top{gap:14px;flex-wrap:wrap}
@media(max-width:700px){#shell .top #sectionHeading{font-size:29px;width:100%}}

#sponsorToolbar{width:100%;max-width:none;display:flex;align-items:end;gap:12px;box-sizing:border-box}#sponsorToolbar .sponsor-search-kind{flex:0 0 180px}#sponsorToolbar .sponsor-search-query{flex:1;min-width:160px}#sponsorToolbar input,#sponsorToolbar select{width:100%;max-width:none}#sponsorToolbar #newSponsor{flex-shrink:0}@media(max-width:600px){#sponsorToolbar{flex-wrap:wrap}#sponsorToolbar .sponsor-search-kind{flex:1 1 140px}}

#sponsorTable [data-number-one],#sponsorTable [data-number-two]{width:64px!important;min-width:64px!important;max-width:64px!important;padding-inline:5px;text-align:center}
#sponsorTable th:nth-child(1),#sponsorTable th:nth-child(2),#sponsorTable td:nth-child(1),#sponsorTable td:nth-child(2){width:90px;min-width:90px;padding-inline:6px}
#sponsorTable th:nth-child(3),#sponsorTable td:nth-child(3){min-width:280px}
#sponsorTable table{min-width:780px}
#sponsorToolbar .sponsor-search-kind{flex-basis:145px}

#sponsorToolbar,#sponsorTable{width:100%;max-width:1050px;box-sizing:border-box}
#sponsorTable table{table-layout:fixed;width:100%;min-width:740px}
#sponsorTable th:nth-child(1),#sponsorTable th:nth-child(2),#sponsorTable td:nth-child(1),#sponsorTable td:nth-child(2){width:90px;min-width:0}
#sponsorTable th:nth-child(3),#sponsorTable td:nth-child(3){width:auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sponsorTable th:nth-child(4),#sponsorTable td:nth-child(4){width:140px}
#sponsorTable th:nth-child(5),#sponsorTable td:nth-child(5){width:150px}
#sponsorToolbar .sponsor-search-query{flex:1;min-width:120px}


#sponsorToolbar,#sponsorTable{max-width:950px}#sponsorTable th:nth-child(1),#sponsorTable th:nth-child(2),#sponsorTable td:nth-child(1),#sponsorTable td:nth-child(2){width:90px}#sponsorTable th:nth-child(4),#sponsorTable td:nth-child(4){width:140px}#sponsorTable th:nth-child(5),#sponsorTable td:nth-child(5){width:150px}

#payMonth{min-width:110px}#payYear{width:95px}

#paymentForm{display:flex;align-items:end;gap:10px;flex-wrap:wrap}#paymentForm .payment-sponsor{flex:1 1 300px;min-width:260px}#paymentForm>label{flex:0 0 auto;min-width:0;font-size:12px}#paymentForm #payRate{width:76px;min-width:0;padding:6px;font-size:13px}#paymentForm #payCurrency{width:108px;min-width:0;padding:6px;font-size:13px}#paymentForm #payYear{width:68px;min-width:0;padding:6px;font-size:13px;text-align:center}#paymentForm #payMonth{width:91px;min-width:0;padding:6px;font-size:13px}#paymentForm #payYear,#paymentForm #payRate{appearance:textfield;-moz-appearance:textfield}#paymentForm input::-webkit-inner-spin-button,#paymentForm input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}


#paymentForm{padding:10px 12px;gap:8px;align-items:end}#paymentForm .payment-sponsor{font-size:13px;gap:4px}#paymentForm .payment-sponsor-line{align-items:end;gap:8px;min-height:0}#paymentForm .pay-number-label,#paymentForm .pay-name-field,#paymentForm>label{gap:4px;font-size:13px;line-height:18px}#paymentForm .pay-name-field{text-align:right}#paymentForm .pay-field-label{text-align:right}#paymentForm .pay-name-field #paySponsorName{height:32px;min-height:32px;justify-content:flex-start;align-items:center;font-size:13px;line-height:1.3}#paymentForm input,#paymentForm select,#paymentForm .pay-number-label input{height:32px;min-height:32px;padding-block:4px;font-size:13px}#paymentForm .pay-month-label{width:auto}@media(min-width:701px){#paymentForm .payment-sponsor{flex:1 1 300px}#paymentForm #paySponsorName{white-space:nowrap}}


#paymentForm .pay-name-field #paySponsorName{height:auto;min-height:32px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}


.payment-summary{display:flex;align-items:stretch;gap:10px;margin:10px 0}.payment-summary .stats{flex:1;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}.payment-summary .stats article{padding:8px 12px;border-radius:7px;display:flex;flex-direction:column;justify-content:center}.payment-summary .stats span{font-size:13px}.payment-summary .stats strong,.payment-summary #payPeriod{font-size:16px;line-height:1.4;margin-top:4px}.payment-summary .sar-symbol{height:16px}.payment-report-actions{display:flex;flex-direction:column;gap:5px}.payment-report-actions button{display:flex;align-items:center;justify-content:center;gap:7px;padding:5px 12px;font-size:13px;min-height:30px}.payment-report-actions svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5}.payment-report-actions svg text{fill:currentColor;stroke:none;font:6px Arial,sans-serif}@media(max-width:500px){.payment-summary{gap:5px}.payment-summary .stats{gap:4px}.payment-summary .stats article{padding:6px}.payment-summary .stats strong,.payment-summary #payPeriod{font-size:13px}.payment-summary .stats span{font-size:11px}.payment-report-actions button{padding:5px 7px}}


.payment-report-actions .pdf-download-badge{display:inline-flex;align-items:center;justify-content:center;direction:ltr;background:#fff;color:#b42335;border:1px solid #e9b6bd;border-radius:3px;min-width:32px;height:21px;padding:0 3px;font:bold 12px Arial,sans-serif;letter-spacing:.2px}


/* Reserve scrolling space across short and long views. */
html{scrollbar-gutter:stable}#shell main{min-width:0}#content{min-width:0}#shell aside{overflow-y:auto;scrollbar-gutter:stable}#shell nav button{font-weight:400}#shell nav button.active{font-weight:400}
@supports not (scrollbar-gutter:stable){html{overflow-y:scroll}}


.receipt-options{margin-top:12px}.receipt-options p{font-size:13px}.receipt-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.receipt-months label{border:1px solid #ddd;padding:8px;min-width:0}.receipt-months input{min-width:0;width:100%;padding:5px}.receipt-months input[type=checkbox]{width:16px}@media(max-width:700px){.receipt-months{grid-template-columns:1fr}}


.link-edit-card td:first-child,.link-edit-card th:first-child{min-width:30px;width:30px;text-align:center;padding-inline:4px}.link-edit-card td:nth-child(2){min-width:175px}.link-edit-card [data-report-amount]{width:94px;min-width:0;height:38px;padding:7px 26px 7px 4px;font-size:16px}.link-edit-card .row-save-icon svg{width:20px;height:20px}


.link-edit-card{padding:10px;width:100%;min-width:0}.link-edit-card table{table-layout:fixed;width:100%;min-width:0}.link-edit-card th,.link-edit-card td{min-width:0!important;white-space:normal;padding-inline:4px;overflow-wrap:anywhere}.link-edit-card th:nth-child(1){width:30px}.link-edit-card th:nth-child(2){width:22%}.link-edit-card th:nth-child(3){width:auto}.link-edit-card th:nth-child(4),.link-edit-card th:nth-child(5){width:80px}.link-edit-card th:nth-child(6){width:78px}.link-edit-card th:last-child{width:92px}.link-edit-card .sponsor-number-cell [data-sponsor-control]{min-width:0;gap:5px;flex-wrap:wrap}.link-edit-card [data-sponsor-name]{white-space:normal;overflow-wrap:anywhere;flex:1;min-width:65px}.link-edit-card [data-sponsor-choice]{max-width:100%;min-width:0}.link-edit-card .sar-amount-field,.link-edit-card .sar-amount-field [data-link-amount],.link-edit-card .sar-amount-field [data-report-amount]{width:72px;min-width:0;height:34px;font-size:15px;padding-right:4px;padding-left:23px}.link-edit-card .sar-amount-field img{left:4px;height:14px}.link-edit-card [data-yemeni-preview]{min-width:0;font-size:15px}.link-edit-card .link-rate-label{flex-direction:column;align-items:flex-start;gap:2px}.link-edit-card .link-row-actions{gap:4px}.link-edit-card .row-save-icon{width:32px;min-width:32px;height:32px;padding:5px!important}@media(max-width:700px){.link-edit-card th:nth-child(2){width:18%}.link-edit-card th:nth-child(4),.link-edit-card th:nth-child(5){width:54px}.link-edit-card th:nth-child(6){width:50px}.link-edit-card th:last-child{width:62px}.link-edit-card .sar-amount-field,.link-edit-card .sar-amount-field [data-link-amount],.link-edit-card .sar-amount-field [data-report-amount]{width:46px;font-size:11px;padding-left:14px}.link-edit-card .sar-amount-field img{height:10px;left:2px}.link-edit-card .link-row-actions{flex-wrap:wrap}.link-edit-card [data-sponsor-number]{width:48px!important;min-width:48px!important;max-width:48px!important;flex-basis:48px}.link-edit-card [data-sponsor-name]{min-width:0;font-size:11px}.link-edit-card th{font-size:11px}}


@media(min-width:701px){.link-edit-card th:nth-child(2),.link-edit-card th:nth-child(3){width:calc((100% - 392px)/2)}.link-edit-card th:nth-child(6){width:110px}.link-edit-card td:nth-child(2),.link-edit-card td:nth-child(3){vertical-align:middle;text-align:center}.link-edit-card th:nth-child(2),.link-edit-card th:nth-child(3){text-align:center}.link-edit-card .sponsor-number-cell [data-sponsor-control]{justify-content:center}.link-edit-card [data-sponsor-name]{text-align:center}.link-edit-card [data-yemeni-preview]{white-space:nowrap}}


.link-edit-card td:nth-child(2),.link-edit-card td:nth-child(3),.link-edit-card th:nth-child(2),.link-edit-card th:nth-child(3),.link-edit-card [data-sponsor-name]{text-align:right}.link-edit-card .sponsor-number-cell [data-sponsor-control]{justify-content:flex-start}


.link-edit-card th:first-child,.link-edit-card td:first-child{width:44px;min-width:44px!important;white-space:nowrap;overflow-wrap:normal;word-break:normal;text-align:center;font-variant-numeric:tabular-nums}.link-edit-card td:nth-child(2),.link-edit-card td:nth-child(2) strong,.link-edit-card [data-sponsor-name]{font-size:14px;font-weight:400;line-height:1.5}@media(min-width:701px){.link-edit-card th:nth-child(2){width:calc((100% - 406px)*.44)}.link-edit-card th:nth-child(3){width:calc((100% - 406px)*.56)}}


#dialogBody .link-dialog-form{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;align-items:end}.link-dialog-form>label{min-width:0;gap:5px}.link-dialog-form>label:has(#linkOrphanSearch){grid-column:1/-1}.link-dialog-form>label:has([name=orphanId]){grid-column:1/6}.link-dialog-form>label:has(#existingOrphanLink){grid-column:1/6}.link-dialog-form #modalSponsorControl{grid-column:6/-1;grid-template-columns:minmax(0,1fr) 100px;gap:10px}.link-dialog-form>label:has([name=monthly]){grid-column:1/4}.link-dialog-form>label:has([name=reportAmount]){grid-column:4/7}.link-dialog-form>button{grid-column:10/-1}.link-dialog-form input,.link-dialog-form select{width:100%;min-width:0;height:36px;padding:6px 8px;font-size:14px}.link-dialog-form #modalSponsorControl label{min-width:0;gap:5px}.link-dialog-form #modalSponsorControl small{display:none}.link-dialog-form #linkOrphanSearch{height:38px}@media(max-width:700px){.link-dialog-form>label:has([name=orphanId]),.link-dialog-form>label:has(#existingOrphanLink),.link-dialog-form #modalSponsorControl{grid-column:1/-1}.link-dialog-form>label:has([name=monthly]){grid-column:1/7}.link-dialog-form>label:has([name=reportAmount]){grid-column:7/-1}.link-dialog-form>button{grid-column:1/-1}}


#annualOwnerName{display:flex;align-items:center;min-height:38px;font-size:15px}#annualForm label:has(#annualOwnerName){flex:1;min-width:180px}#annualForm label:has(#annualNumberFilter){flex:0 0 150px}#annualNumberFilter{width:150px;min-width:0}


#annualForm{padding:12px;gap:12px;align-items:end;flex-wrap:wrap}#annualForm label{gap:5px;font-size:13px;min-width:0}#annualForm label:has(#annualNumberFilter){flex:0 0 105px}#annualNumberFilter{width:105px;min-width:0;height:35px;padding:6px;text-align:center}#annualForm label:has(#annualOwnerName){flex:1 1 240px}#annualOwnerName{min-height:35px;line-height:1.4}#annualForm label:has(#annualYear){flex:0 0 76px}#annualYear{width:76px;min-width:0;height:35px;padding:6px;text-align:center}#annualForm>button{height:35px;padding:6px 12px;font-size:13px}.receipt-options{padding:12px}.receipt-options>label{max-width:380px}.receipt-months{gap:7px}.receipt-months label{padding:7px;font-size:13px}.receipt-options p{margin:8px 0}


.receipt-months{display:grid;grid-template-rows:repeat(4,auto);grid-auto-flow:column;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 14px}.receipt-months>label{display:flex;align-items:center;gap:5px;border:0;padding:2px 0;min-width:0}.receipt-months>label>span:first-child{display:flex;align-items:center;gap:4px;flex:0 0 68px;white-space:nowrap;font-size:12px}.receipt-months input[type=checkbox]{width:15px;height:15px;margin:0;flex-shrink:0}.receipt-months input[type=date]{width:108px;min-width:0;height:29px;font-size:11px;padding:3px;flex:0 1 108px}.receipt-months .receipt-amount{position:relative;flex:1;min-width:55px;max-width:90px}.receipt-months [data-receipt-amount]{width:100%;height:29px;padding:3px 4px 3px 21px;font-size:12px;direction:ltr;text-align:right}.receipt-amount img{position:absolute;left:4px;top:7px;width:13px;height:15px;object-fit:contain;pointer-events:none}@media(max-width:1100px){.receipt-months{grid-template-rows:repeat(6,auto);grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.receipt-months{grid-template-rows:none;grid-template-columns:1fr;grid-auto-flow:row}.receipt-months .receipt-amount{max-width:110px}}


.receipt-months{grid-template-rows:none;grid-auto-flow:row}.receipt-month-column{min-width:0;display:grid;gap:5px}.receipt-month-column>label{display:flex;align-items:center;gap:5px;border:0;padding:2px 0;min-width:0}.receipt-month-column>label>span:first-child{display:flex;align-items:center;gap:4px;flex:0 0 68px;white-space:nowrap;font-size:12px}.receipt-months [data-receipt-date]{width:108px;min-width:0;height:29px;font-size:11px;padding:3px;flex:0 1 108px;text-align:center;direction:ltr}.month-printed{opacity:.55}.month-group-toggle{font-size:12px;font-weight:bold}.receipt-months [data-month-group]{width:15px;height:15px;margin:0}


.receipt-month-row{display:flex;align-items:center;gap:5px;padding:2px 0;min-width:0}.receipt-month-row>span:first-child{display:flex;align-items:center;gap:4px;flex:0 0 68px;white-space:nowrap;font-size:12px;cursor:pointer}


.receipt-month-row>span:first-child{font-size:14px;flex-basis:76px}.receipt-months [data-receipt-date]{font-size:13px;height:32px;width:114px;flex-basis:114px}.receipt-months [data-receipt-amount]{font-size:14px;height:32px}.receipt-amount img{top:8px}.receipt-months .receipt-amount{min-width:62px}#annualForm label:has(#annualPrintMode){flex:0 1 240px}#annualPrintMode{width:100%;min-width:0;height:35px;padding:5px;font-size:13px}


#annualForm label:has(#annualStatus){flex:0 0 115px}#annualStatus{width:115px;min-width:0;height:35px;padding:5px;font-size:13px}


#orphanStatusFilter,#linkStatusFilter{width:115px;min-width:0;height:35px;padding:5px;font-size:13px}.toolbar label:has(#orphanStatusFilter),.toolbar label:has(#linkStatusFilter){gap:4px;font-size:13px;flex:0 0 auto}


.link-toolbar-controls{display:flex;align-items:end;gap:10px;flex-shrink:0}.link-toolbar-controls label{gap:4px;font-size:13px}.link-toolbar-controls #newLink{height:35px;padding:6px 12px;font-size:13px}@media(max-width:700px){.link-toolbar-controls{flex-wrap:wrap}}


.orphan-status-readonly{display:inline-block;font-size:11px;line-height:1.4;padding:1px 5px;margin-bottom:3px;border:1px solid #ddd;border-radius:4px;color:#65565b;background:#faf8f9;white-space:nowrap}


.link-edit-card th:nth-child(3){width:62px}.link-edit-card .link-status-cell{text-align:center}.link-status-cell .orphan-status-readonly{margin:0;padding:1px 3px}.link-edit-card th:nth-child(5),.link-edit-card th:nth-child(6){width:80px}.link-edit-card th:nth-child(7){width:110px}.link-edit-card th:nth-child(8){width:92px}@media(min-width:701px){.link-edit-card th:nth-child(2){width:calc((100% - 468px)*.42)}.link-edit-card th:nth-child(4){width:calc((100% - 468px)*.58)}}


#shell[data-view=links] #content>.toolbar.card{padding:8px 10px;gap:10px;margin-bottom:9px}#shell[data-view=links] #content>.toolbar.card p{margin:0;font-size:12px;line-height:1.5;flex:1}.link-toolbar-controls{gap:7px}.link-toolbar-controls label{gap:2px}.link-edit-card th:first-child,.link-edit-card td:first-child{width:38px;min-width:38px!important;padding-inline:3px}.orphan-status-readonly.status-active{background:#e3f3e8;color:#24613a;border-color:#b5d9bf}.orphan-status-readonly.status-inactive{background:#fff0df;color:#95561f;border-color:#edc99e}@media(min-width:701px){.link-edit-card th:nth-child(2){width:calc((100% - 462px)*.42)}.link-edit-card th:nth-child(4){width:calc((100% - 462px)*.58)}}


.payment-month-history{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0}.payment-month-history button{padding:4px 7px;font-size:12px}.payment-month-history button.printed{background:#e5eee7!important;color:#65756a!important;border-color:#cbd6cd!important;cursor:default}


#payMonth option:disabled{color:#b5b5b5;background:#f2f2f2}.payment-month-history[hidden]{display:none!important}


#paymentForm .pay-status-label{flex:0 0 84px;min-width:0}#payStatus{width:84px}
/* Keep status controls compact without overflowing their layout slots. */
#paymentForm #payStatus{width:84px;min-width:0;max-width:100%;padding-inline:6px}
#paymentForm .pay-status-label{margin-inline-end:4px}
#shell[data-view=orphans] #content>.toolbar.card{justify-content:flex-start;align-items:flex-end;gap:10px}
#shell[data-view=orphans] #orphanSearch{flex:0 1 360px;min-width:140px;max-width:100%}
#shell[data-view=orphans] #newOrphan{margin-inline-start:auto}
/* Foundation identity: burgundy actions, neutral surfaces, semantic status colors. */
:root{--accent:#6f0c1f;--brand-burgundy:#6f0c1f;color:#333238;background:#f4f4f5}
body{background:#f4f4f5;color:#333238}
#shell aside{background:#6f0c1f;color:#fff}
#shell nav button{color:#f5e9ed}
#shell nav button.active{background:#f6e9ed;color:#6f0c1f}
#shell nav button:hover:not(.active){background:#ffffff18;color:#fff}
#shell .section-label,#shell .aside-bottom{color:#ead5dc}
.auth{background:linear-gradient(130deg,#6f0c1f,#eeecee)}
.auth-card{box-shadow:0 15px 60px #3c18242b}
button{color:#6f0c1f;border-color:#d8c9ce}
button.primary,.primary{background:#6f0c1f;border-color:#6f0c1f;color:#fff}
button.primary:hover:not(:disabled){background:#530918;border-color:#530918}
a,legend{color:#6f0c1f}
input,select,textarea{color:#333238;border-color:#d3cdd0;accent-color:#6f0c1f}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:#a9566a}
.card,form,.workspace,.stats article,fieldset{border-color:#dedadd}
th,td,.top,.dialog-head{border-color:#e2dde0}
.top,p,.stats span,.auth-card small{color:#6b6569}
dialog{color:#333238}dialog::backdrop{background:#2e202699}
iframe{background:#eceaec}
.payment-month-history button.printed{background:#eee!important;color:#777!important;border-color:#d4d4d4!important}
.profile-review{padding:8px 10px;border:1px solid #ddd3d7;background:#faf7f8;border-radius:6px}.profile-review small,.review-detail{display:block;font-size:11px;color:#75666c;margin-top:4px}.review-badge{color:#24613a;background:#e3f3e8;border-radius:4px;padding:2px 5px;white-space:nowrap}

.review-badge{color:#24743c}.review-pending{color:#a85a12;white-space:nowrap;font-weight:600}
#shell[data-view=orphans] #content>.toolbar.card{padding:8px 12px;gap:10px;margin-bottom:10px;align-items:flex-end}
#shell[data-view=orphans] .orphan-search-label{flex:0 1 360px;min-width:0;gap:4px;font-size:13px}
#shell[data-view=orphans] #orphanSearch{width:100%;flex:none;min-width:0;height:35px;padding:5px 9px;font-size:13px}
#shell[data-view=orphans] #orphanStatusFilter{height:35px;padding:5px;font-size:13px}
#shell[data-view=orphans] #newOrphan{height:35px;min-height:35px;padding:5px 12px;font-size:13px;white-space:nowrap}
.profile-tabs{align-items:center}.profile-tabs .profile-review{padding:4px 8px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:transparent;border:0}.profile-tabs .profile-review label{font-size:13px;white-space:nowrap}.profile-tabs .profile-review small{font-size:10px;margin:0;max-width:220px}
#profileDocCards .archive-items{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}
#profileDocCards .compact-document{width:142px;flex:0 0 142px;padding:6px;border-radius:6px;text-align:center}
#profileDocCards .document-thumbnail{display:flex;align-items:center;justify-content:center;margin:0;height:125px;width:128px;background:#f4f2f3;border-radius:4px;overflow:hidden}
#profileDocCards .document-thumbnail img{width:100%;height:125px;object-fit:contain;border-radius:0}
#profileDocCards .compact-document h4{font-size:12px;line-height:1.4;margin:6px 0 3px}
#profileDocCards .archive-date{display:block;font-size:10px;line-height:1.5;color:#777}
.document-pdf-icon{font:bold 24px Arial;color:#8a1730;border:2px solid #8a1730;border-radius:5px;padding:14px 7px;background:#fff}
#profileDocCards .document-card-actions{display:flex;justify-content:space-between;gap:5px;margin-top:5px}
#profileDocCards .document-card-actions a{font-size:10px;margin:0;padding:3px 0}
/* Compact archive sections and headings. */
#profileDocuments .archive-group{margin-top:6px;padding-top:4px}
#profileDocuments .archive-group>h4{margin:0 0 5px;font-size:13px;line-height:1.4}
#profileDocuments .archive-items>p{margin:2px 0;font-size:12px;line-height:1.5}
#profileDocuments #profileUpload{margin-bottom:6px}
#profileDocuments .archive-hint{margin:4px 0 8px;line-height:1.4}
#profileDocuments>h3{margin-bottom:5px}
#dialog.orphan-profile #profileDocuments{padding:8px 10px;margin-top:0;margin-bottom:6px}
#profileDocuments>h3{margin:0 0 6px;font-size:14px;line-height:1.4}
#profileDocuments #profileUpload{padding:6px 8px;gap:8px;margin:0 0 5px;border-radius:5px;flex-wrap:wrap}
#profileDocuments #profileUpload label{flex:0 1 220px;min-width:140px;gap:3px;font-size:12px}
#profileDocuments #profileUpload label:nth-child(2){flex:1 1 260px}
#profileDocuments #profileUpload select,#profileDocuments #profileUpload input[type=file]{height:32px;min-height:32px;min-width:0;width:100%;padding:4px 6px;font-size:12px}
#profileDocuments input[type=file]::file-selector-button{padding:2px 7px;font-size:12px}
#archiveUploadStatus{font-size:11px;line-height:1.4}#archiveUploadStatus:empty{display:none}
#dialog.orphan-profile:has(#profileDocuments:not([hidden])) .profile-heading{margin-bottom:6px}
#dialog.orphan-profile:has(#profileDocuments:not([hidden])) #profileStatus:not(:empty){padding:5px 8px;margin:5px 0;font-size:12px}
.profile-tabs .profile-review{flex-wrap:nowrap;max-width:100%;min-width:0;gap:8px}
.profile-tabs .profile-review small{display:inline;max-width:none;white-space:nowrap;font-size:11px;line-height:1.5}
.profile-tabs .profile-review .check{flex-shrink:0}
@media(max-width:600px){.profile-tabs .profile-review{overflow-x:auto}.profile-tabs .profile-review small{font-size:10px}}

.orphan-status-editor{display:flex;align-items:center;gap:5px;white-space:nowrap}.orphan-status-editor select{width:95px;min-width:95px;height:30px;padding:3px 6px;font-size:12px}.orphan-status-editor button{height:30px;min-height:30px;padding:3px 8px;font-size:12px}.orphan-status-editor .status-active{background:#e7f4eb;color:#25673b}.orphan-status-editor .status-inactive{background:#fff0de;color:#995700}
