:root{--wine:#75162e;--dark:#681229;--gold:#d4a437;--ivory:#fff8e9;--line:#e8ddd1;--muted:#6c6266}*{box-sizing:border-box}body{margin:0;background:#f8f5ef;color:#2c2025;font:16px/1.55 system-ui,-apple-system,Segoe UI,sans-serif}header{background:var(--ivory);border-bottom:5px solid var(--wine);padding:19px max(24px,calc((100vw - 1200px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}.identity{display:flex;gap:17px;align-items:center}.identity img{height:104px;width:104px;object-fit:contain;flex-shrink:0}.eyebrow{font-size:11px;letter-spacing:.11em;color:var(--wine);font-weight:800}h1{font-family:Georgia,serif;font-size:23px;color:var(--wine);margin:6px 0 2px;font-weight:700}header p{margin:0;font-size:13px;color:var(--muted)}.identity-copy{min-width:0}.institute-name{font-family:Georgia,serif;font-size:34px;line-height:1.1;font-weight:800;color:var(--wine);letter-spacing:.045em}.institute-subname{font-size:17px;line-height:1.35;font-weight:800;letter-spacing:.045em;color:var(--wine);margin-top:3px}.headright{display:flex;align-items:center;gap:12px}.pill{border:1px solid #ddc998;background:#fff6db;border-radius:25px;padding:5px 12px;color:#72501e;font-size:12px;white-space:nowrap}main{max-width:1160px;margin:36px auto 80px;padding:0 24px;min-height:60vh}.panel{border:1px solid var(--line);background:white;border-radius:15px;padding:28px;margin:22px 0;box-shadow:0 4px 15px #2c202509}.panel h2,.panel h3{color:var(--wine);margin:0 0 12px;font-family:Georgia,serif}.panel p{color:#594f53}.auth{max-width:480px;margin:55px auto;padding:36px}.lock{font-size:36px;color:var(--gold)}label{display:block;font-weight:650;margin:16px 0 6px}input{width:100%;padding:12px 14px;border:1px solid #cfc6c8;border-radius:8px;font:inherit}button{font:inherit;cursor:pointer}.primary{background:var(--wine);color:white;border:0;border-radius:8px;padding:13px 20px;font-weight:700;margin-top:22px;width:100%}.outline{border:1px solid var(--wine);color:var(--wine);border-radius:8px;padding:9px 15px;background:transparent}.message{font-size:14px;color:#76501b}.auth small,.panel small{color:var(--muted)}.welcome{display:flex;justify-content:space-between;align-items:center;gap:20px}.welcome h2{font:30px Georgia,serif;color:var(--wine);margin:4px 0}.welcome p{margin:0;color:var(--muted);font-size:14px}.tabs{display:flex;flex-wrap:wrap;gap:6px;margin-top:27px;border-bottom:2px solid #e2d8d8}.tab{padding:12px 17px;border:0;border-bottom:3px solid transparent;background:transparent;color:#55434a;font-weight:650}.tab.active{color:var(--wine);border-color:var(--gold)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:22px}.tile{background:white;border:1px solid var(--line);border-radius:12px;padding:22px;display:flex;flex-direction:column;gap:12px}.tile span{font-size:14px;color:#65555c}.tile strong{font:23px Georgia,serif;color:var(--wine)}.tile small{color:var(--muted)}.split{display:flex;justify-content:space-between;gap:16px;align-items:start}.note{background:#fff6e8;padding:12px;border-left:3px solid var(--gold)}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:12px;border-bottom:1px solid var(--line);font-size:14px}th{background:#faf5eb;color:var(--wine)}footer{padding:25px;background:var(--dark);color:#f8e4bb;text-align:center;font-size:13px}footer span{display:block;color:#d0c1c5;margin-top:6px}@media(max-width:800px){header{padding:15px;align-items:start}.identity img{width:70px;height:70px}.institute-name{font-size:26px}.institute-subname{font-size:13px}h1{font-size:19px}.cards{grid-template-columns:repeat(2,1fr)}.welcome{align-items:start;flex-direction:column}}@media(max-width:520px){.cards{grid-template-columns:1fr}.headright .pill{display:none}.auth{padding:22px}main{padding:0 15px}}

@media(max-width:520px){header{gap:8px}.identity{gap:10px}.identity img{width:56px;height:56px}.institute-name{font-size:22px}.institute-subname{font-size:11px;letter-spacing:0}header h1{font-size:17px}header p{font-size:11px}.headright{align-self:flex-start}}

/* Review revision: keep the crest close to the centered institutional labels. */
header{display:flex;justify-content:center;align-items:center;position:relative;gap:0}
.identity{display:flex;align-items:center;gap:10px}
.identity img{width:104px;height:104px;flex-shrink:0}
.identity-copy{text-align:center;min-width:0}
.headright{position:absolute;right:24px;top:50%;transform:translateY(-50%)}
.institute-name{font-size:38px;letter-spacing:.045em}
.institute-subname{font-size:18px;letter-spacing:.035em}
@media(max-width:900px){header{padding-right:110px;padding-left:12px}.identity{gap:8px}.identity img{width:75px;height:75px}.institute-name{font-size:29px}.institute-subname{font-size:14px}.headright{right:12px}}
@media(max-width:600px){header{padding:14px 10px;display:flex;flex-direction:column;gap:8px}.identity{gap:7px;width:100%;justify-content:center}.identity img{width:58px;height:58px}.identity-copy{flex:1}.institute-name{font-size:25px}.institute-subname{font-size:12px}header h1{font-size:16px}header p{font-size:10px}.headright{position:static;transform:none;align-self:center}}

/* Header refinement: slim gold outline and clean circular crest edge. */
header{border:2px solid #d4a437;border-bottom:5px solid #75162e;outline:1px solid #d4a437;outline-offset:-7px}
.identity img{border-radius:50%;clip-path:circle(49.2% at 50% 50%);object-fit:contain}

/* SFIS form extension: preserve V1.1 theme and layout. */
.staff-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 20px}.staff-fields select{width:100%;padding:12px 14px;border:1px solid #cfc6c8;border-radius:8px;background:white;font:inherit}.staff-submit{max-width:280px}.staff-fields input:focus,.staff-fields select:focus{outline:2px solid var(--gold);outline-offset:2px}@media(max-width:650px){.staff-fields{grid-template-columns:1fr}.staff-submit{max-width:none}}

/* Staff record editing, matched to approved V1.1 visual system. */
.staff-edit-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.staff-edit-actions .primary{width:auto;min-width:210px}.staff-edit-actions .outline{margin-top:22px}.staff-edit-button{padding:5px 12px;font-size:13px}@media(max-width:650px){.staff-edit-actions .primary{width:100%}}

/* Password controls use the approved V1.1 palette. */
.password-wrap{position:relative}.password-wrap input{padding-right:78px}.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--wine);padding:7px 9px;font-weight:650}.text-action{display:inline-block;background:none;border:0;color:var(--wine);text-decoration:underline;padding:8px 0;margin-top:9px;font-weight:600}.password-toggle:focus-visible,.text-action:focus-visible{outline:2px solid var(--gold);outline-offset:2px}#changePasswordPanel{max-width:550px}#changePasswordPanel .staff-submit{width:auto}

/* Center registry column headings and corresponding entries only. */
#staff .tablewrap th,
#staff .tablewrap td { text-align: center; vertical-align: middle; }

/* V1.4: separate, compact staff status controls */
.staff-status-button { margin-left: 8px; white-space: nowrap; }

/* V1.5 staff profile extensions */
.staff-fields textarea{width:100%;padding:12px 14px;border:1px solid #cfc6c8;border-radius:8px;font:inherit;resize:vertical}.staff-fields input[readonly]{background:#f4f0e8;color:#574a4f}.staff-fields textarea:focus{outline:2px solid var(--gold);outline-offset:2px}.staff-fields small{display:block;margin-top:4px}

#sensitivePanel h4 {margin-top:1.4rem} #sensitivePanel textarea {width:100%;min-height:5rem} #numberPanel {border-top:3px solid #d4a437}

/* V1.5.3: responsive header; keep identity and account controls in separate flow areas. */
header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-content:normal;column-gap:24px;row-gap:12px;padding:19px max(24px,calc((100vw - 1200px)/2));}
header .identity{min-width:0;justify-self:center;grid-column:1;gap:10px;}
header .headright{position:static;transform:none;grid-column:2;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;min-width:0;}
header .headright .pill{display:inline-block;}
@media(max-width:1050px){
 header{grid-template-columns:minmax(0,1fr);padding:16px 18px;}
 header .identity{grid-column:1;justify-self:center;max-width:100%;}
 header .headright{grid-column:1;justify-self:center;justify-content:center;align-self:auto;}
}
@media(max-width:600px){
 header{display:grid;grid-template-columns:minmax(0,1fr);padding:14px 12px;gap:12px;}
 header .identity{width:100%;justify-content:center;}
 header .identity img{width:58px;height:58px;}
 header .identity-copy{flex:0 1 auto;}
 header .institute-name{font-size:clamp(20px,5vw,25px);}
 header .institute-subname{font-size:clamp(10px,2.5vw,12px);}
 header h1{font-size:clamp(15px,3.5vw,17px);}
 header p{font-size:10px;}
 header .headright{position:static;transform:none;align-self:auto;}
}
@media(max-width:380px){header .identity img{width:44px;height:44px}header .identity{gap:5px}}

/* V1.5.3: make the staff action column usable without stacked/overlapping buttons. */
#staff .tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
#staff .tablewrap table{min-width:760px;}
#staff .tablewrap th:last-child,#staff .tablewrap td:last-child{min-width:190px;white-space:nowrap;}
#staff .tablewrap td:last-child .staff-edit-button,
#staff .tablewrap td:last-child .staff-status-button{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin:3px 4px;padding:8px 12px;white-space:nowrap;}
#staff .tablewrap td:last-child .staff-status-button[hidden]{display:none;}
#staff .tablewrap td:last-child .staff-status-button:disabled{display:none;}
/* V5.60 master-detail staff registry and profile */
.staffFilters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;align-items:end}.staffFilters select{width:100%;min-height:48px;padding:12px;border:1px solid #cfc6c8;border-radius:8px;background:white;font:inherit}.staffPager{display:flex;gap:12px;align-items:center;justify-content:center;margin:16px 0}.staffName{display:block;margin:auto;background:none;border:none;color:var(--wine);font-weight:700;text-decoration:underline;padding:5px;overflow-wrap:anywhere}.profileBanner{margin:18px 0;background:var(--ivory);border:1px solid var(--line);border-radius:12px;padding:24px}.profileBanner h2{font-size:30px;margin:4px 0}.profileBanner hr{border:0;border-top:1px solid var(--line);margin:12px 0}.profileBanner #profileStatus{font-weight:650;color:var(--wine)}.profileTabs{display:flex;gap:7px;flex-wrap:wrap;margin:20px 0}.profileTabs button{background:var(--ivory);font-size:14px}.profileTabs button.active{background:var(--wine);color:white}.profileGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 20px}.profileCard{background:var(--ivory);border:1px solid var(--line);border-radius:9px;text-align:center;min-height:105px;padding:17px;display:flex;flex-direction:column;justify-content:center;gap:8px;overflow-wrap:anywhere}.profileCard strong{font-size:12px;text-transform:uppercase;color:var(--wine)}.profileCard.wide{grid-column:span 2}.profileCard .narrative{text-align:left;white-space:pre-wrap}#profileBody h3{margin:15px 0}#staffProfile .tablewrap table{min-width:520px}#staffProfile .tablewrap th:last-child,#staffProfile .tablewrap td:last-child{white-space:normal;min-width:0}#staffProfile .tablewrap td{white-space:normal;overflow-wrap:anywhere}#staffRegisterPanel .tablewrap table{min-width:660px}#staffRegisterPanel .tablewrap td{white-space:normal}button:disabled{cursor:default;opacity:.5}@media(max-width:720px){.staffFilters,.profileGrid{grid-template-columns:1fr}.profileCard.wide{grid-column:span 1}.profileBanner h2{font-size:24px}}[hidden]{display:none!important}
