:root{--paper:#e8ddcd;--paper-2:#e3d4bf;--ink:#111;--teal:#10233f;--teal-2:#213c5c;--brass:#af946a;--brass-2:#cfb88e;--line:#c5b69f;--card:#f5ede0;--input:#fffaf1;--soft:#eee2d1;--muted:#292929;--ok:#10233f;--sidebar-start:#10233f;--sidebar-end:#192f4b;--seal-start:#244364;--seal-end:#10233f;--seal-border:#cfb88e}
button.btn:disabled{opacity:1}#sidebar .brand p{opacity:1}
button.btn{background:var(--input);border-color:var(--line);color:#111}button.btn:hover{background:var(--soft);color:#111}button.btn.brass,button.btn.primary{background:var(--teal);border-color:var(--teal);color:#fff}table.tbl .rowno{color:#111}.ref-body,.ref-body h5{color:#111}
.upload-area input[type=file],.asset-render input[type=file]{display:block;max-width:100%;font-size:12px;margin:7px 0;background:var(--input);color:#111}.asset-render label{display:block;margin:14px 0 7px}input[type=text],input[type=date],input[type=number],input[type=email],input[type=password],textarea,select{background:var(--input);color:#111}.btn.brass,#topbar .btn.brass{color:#fff}
table.tbl tr:nth-child(even) td{background:var(--soft)}table.tbl td input:focus,table.tbl td textarea:focus,table.tbl td select:focus{background:var(--input)}
body[data-theme=male]{--paper:#eaf3ff;--paper-2:#d6e8ff;--card:#f5f9ff;--input:#fbfdff;--soft:#dcecff;--line:#a9c8ea;--brass:#397ac2;--brass-2:#9fc8f5;--teal:#153e75;--teal-2:#0f2f5b;--ok:#153e75;--sidebar-start:#164f91;--sidebar-end:#082c5c;--seal-start:#2e6fb4;--seal-end:#0b376d;--seal-border:#9fc8f5}
body[data-theme=female]{--paper:#fde7f3;--paper-2:#f8cfe4;--card:#fff4f9;--input:#fffafd;--soft:#f8d8e9;--line:#e5a4c6;--brass:#c13f7d;--brass-2:#f0a9cd;--teal:#9d174d;--teal-2:#701a3e;--ok:#9d174d;--sidebar-start:#ad1457;--sidebar-end:#6f123d;--seal-start:#c92f73;--seal-end:#7d1748;--seal-border:#f0a9cd}
body{background:var(--paper);color:#111}.login-card,.card,.posting-card,.monthly-entry{background:var(--card);border-color:var(--line)}.login-card{border-top:5px solid #10233f;box-shadow:0 14px 38px #10233f20}.sec-title,.login-card h1,.dash-head h1,.card h3,.card h4{color:#111}.card{box-shadow:0 2px 10px #10233f0a}.dash-wrap{max-width:1120px}.dash-head{gap:15px;flex-wrap:wrap}.sec-eyebrow,.sec-sub,.field label,.note,.hint-line,.who,.status,.login-card p,.card p,.card small,.card label,.card summary{color:#111!important}.card p[style]{color:#111!important}
#sidebar{background:linear-gradient(155deg,var(--sidebar-start),var(--sidebar-end));color:#fff}#sidebar nav a,#sidebar nav a .num,#sidebar .brand p{color:#fff}#sidebar nav a.active{background:#ffffff18;border-color:var(--brass-2)}#sidebar .brand h1{color:#fff}#sidebar .brand .seal,.login-card .seal{width:126px;height:82px;border-radius:12px;border:2px solid var(--seal-border);background:linear-gradient(140deg,var(--seal-start),var(--seal-end));box-shadow:0 6px 14px #0003,inset 0 1px 0 #ffffff30;color:#fff;font-size:21px;font-weight:850;letter-spacing:.08em;line-height:1.45;white-space:normal}#sidebar .brand .seal span,.login-card .seal span{text-transform:none}#sidebar .brand .seal{margin-bottom:18px}
input,select,textarea{background:var(--input);border-color:var(--line);color:#111}input:disabled,select:disabled,textarea:disabled{background:var(--soft)!important;color:#111!important;opacity:1;cursor:default}input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 2px #10233f20}.btn{background:var(--input);border-color:var(--line);color:#111}.btn.primary,.btn.brass{background:var(--teal);border-color:var(--teal);color:#fff}.btn:hover{background:var(--soft);color:#111}.btn.primary:hover,.btn.brass:hover{background:var(--teal-2);color:#fff}button.btn:disabled{background:var(--soft);color:#111;border-color:var(--line);opacity:.55;cursor:not-allowed}button.btn:focus-visible,a:focus-visible{outline:3px solid var(--brass);outline-offset:3px}
table.tbl th{background:var(--teal);color:#fff}table.tbl td{border-color:var(--line)}table.tbl tr:nth-child(even){background:var(--soft)}table.tbl input,table.tbl textarea{color:#111}.badge{background:var(--soft);color:#111}.ref,.ref-body{background:var(--card);border-color:var(--line)}.ref summary{color:#111}
#topbar{background:var(--card);border-color:var(--line);flex-wrap:wrap}#statusMsg{flex:1 1 260px}.account-identity{display:flex;align-items:center;gap:9px;color:#111;font-size:12px;min-width:140px}.account-identity strong,.account-identity small{display:block}.account-avatar{width:42px;height:42px;object-fit:cover;border:2px solid var(--line);border-radius:50%;background:var(--soft)}.avatar-initials{display:grid;place-items:center;font-weight:750;color:#111}.dash-head .account-identity{margin-left:auto}.photo-preview{width:114px;height:144px;object-fit:cover;border:2px solid var(--line);border-radius:8px;background:var(--soft)}.upload-area{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:14px 0}.upload-area input{max-width:300px}.upload-area small{display:block;margin:6px 0}.certificate-preview{display:block;max-width:100%;max-height:450px;object-fit:contain;margin:18px auto;border:1px solid var(--line);cursor:zoom-in}.image-viewer{max-width:95vw;width:1000px;height:90vh;background:var(--card);color:#111;border:1px solid var(--line);padding:18px;border-radius:12px}.image-viewer::backdrop{background:#10233fcc}.image-viewer .viewer-toolbar{position:sticky;top:0;background:var(--card);display:flex;flex-wrap:wrap;gap:10px;z-index:1;padding-bottom:12px}.image-viewer .image-pan{overflow:auto;height:calc(100% - 55px);background:#d5d2ce;text-align:center}.image-viewer img{max-width:100%;height:auto}.image-viewer img.full-size{max-width:none}
.flash-message{border:1px solid var(--line);border-left:6px solid var(--teal);background:var(--soft);border-radius:9px;padding:18px 22px;margin:0 0 20px}.flash-message strong{display:block;font-size:19px;color:#111}.flash-message p{white-space:pre-wrap;line-height:1.6;margin:8px 0;color:#111}.flash-message small{color:#111}
.section-tools{border-top:1px solid var(--line);padding:14px 0 0;margin:20px 0 0;display:flex;flex-wrap:wrap;gap:8px}.entry-review{background:var(--card);border:1px solid var(--line);border-radius:7px;padding:10px;margin:6px 0;min-width:190px;font-size:12px;color:#111}.entry-state{display:block;color:#111;margin:7px 0 3px;font-weight:650;font-size:12px}.entry-state.verified{color:#111}.entry-review small{display:block;margin:4px 0;color:#111;line-height:1.5}.entry-actions{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 6px}.entry-actions .btn,.entry-review>.btn{font-size:11px;padding:6px 9px}.entry-review textarea{font-size:12px;min-height:52px;margin:7px 0 6px}.entry-review-cell{min-width:230px;width:270px}.review-comment{white-space:pre-wrap;font-size:12px;color:#111;border-top:1px solid var(--line);padding-top:8px;line-height:1.5}.review-combo select,.verification-pair select{margin:6px 0 8px;font-size:12px}.faculty-fields{display:grid;gap:8px;padding:10px 0}.faculty-fields label{display:block;font-size:11px;color:#111}.review-tr td{padding:4px 8px!important}.review-tr .entry-review{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border:0;padding:3px;background:transparent;min-width:0}.review-tr .entry-review .entry-actions{margin:0}.review-tr .entry-state,.review-tr small{flex-basis:100%;margin:0 0 3px}.review-tr textarea{max-width:380px}.review-tr .entry-review .review-comment{flex-basis:100%}
.hod-review{margin:22px auto 8px;text-align:center;max-width:680px;padding:18px 14px;border-top:1px solid var(--line)}.hod-review .btn{font-size:17px;font-weight:750;padding:12px 20px;background:var(--teal);border-color:var(--teal);color:#fff}.hod-review small{display:block;color:#111;margin:9px auto 0;line-height:1.5}.hod-review .previous-approval{font-size:11px}.hod-year{font-size:14px;font-weight:700;margin:0 0 10px}.verification-pair{display:flex;gap:22px;justify-content:center;align-items:flex-start;flex-wrap:wrap;margin:22px auto;max-width:850px}.verification-pair>.faculty-verification,.verification-pair>.hod-review{flex:1 1 280px;max-width:390px;margin:0;border-top:1px solid var(--line);padding:16px 12px;text-align:center}.verification-pair .faculty-verification>h4{font-size:14px;margin:0 0 10px}.verification-pair .entry-review{text-align:left}.faculty-field-pool{display:none}.deadline-note{background:var(--soft);padding:9px 12px;border-left:3px solid var(--teal);color:#111;border-radius:3px;line-height:1.5}.legacy-note{color:#111}.monthly-entry{border:1px solid var(--line);border-radius:8px;padding:18px;margin:18px 0}.admin-rule{padding:16px 0;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:10px}.admin-rule strong,.admin-rule p,.admin-rule small{width:100%;margin:0}.admin-rule p{white-space:pre-wrap;line-height:1.5}.student-card{gap:12px;flex-wrap:wrap}.student-card>span{flex:1 1 200px}.student-card select{max-width:170px}.period-list{display:grid;gap:12px;margin:14px 0}.posting-period{border:1px solid var(--line);padding:12px;border-radius:6px;background:var(--soft)}details.posting-card{padding:18px;margin:18px 0;border:1px solid var(--line);border-radius:8px}details.posting-card>summary{font-size:16px;font-weight:750;cursor:pointer;line-height:1.5}details.posting-card>.posting-body{margin-top:16px}.year-review{border-top:1px solid var(--line);padding-top:14px;margin-top:18px}
#sec-14 .skill-cat .table-scroll{max-height:590px;overflow:auto;border:1px solid var(--line);position:relative;isolation:isolate}#sec-14 table.tbl{min-width:1940px;margin:0;border-collapse:separate;border-spacing:0}#sec-14 .skill-cat th{position:sticky;top:0;z-index:4}#sec-14 .skill-cat thead tr:nth-child(2) th{top:var(--skill-head-height,33px)}#sec-14 .skill-cat th:nth-child(1),#sec-14 .skill-cat td:nth-child(1){position:sticky;left:0;min-width:40px;z-index:2;background:var(--card);color:#111}#sec-14 .skill-cat th:nth-child(2),#sec-14 .skill-cat td:nth-child(2){position:sticky;left:40px;min-width:230px;max-width:230px;z-index:2;background:var(--card);color:#111;border-right:2px solid var(--line)}#sec-14 .skill-cat thead th:nth-child(-n+2){z-index:6;background:var(--teal);color:#fff}#sec-14 .skill-cat td:has(.entry-review){min-width:300px}#sec-14 .skill-cat tr:hover td,#sec-14 .skill-cat tr:focus-within td{background:var(--soft)}.signature-slot,.signrow,.section-receipts{display:none!important}
@media(max-width:880px){#topbar{position:static}.account-identity{min-width:120px}#sidebar{height:auto}#sidebar .brand .seal{width:115px;height:74px}.dash-head .account-identity{margin-left:0}.verification-pair{gap:12px}.image-viewer{width:95vw}#sec-14 .skill-cat th:nth-child(2),#sec-14 .skill-cat td:nth-child(2){min-width:150px;max-width:150px}}
@media(max-width:700px){#facultyDash{padding:22px 16px}#adminPanel .card{padding:18px}.flash-message{padding:14px 16px}.grid2{grid-template-columns:1fr}.hod-review .btn{font-size:16px}.section-tools .btn{margin:3px 0}.account-identity strong{max-width:190px;overflow-wrap:anywhere}}
@media print{body{background:#fff}.card,.posting-card,.monthly-entry{background:#fff;box-shadow:none}.section-tools,.entry-actions,.entry-review textarea,.entry-review button,.hod-review button,.upload-area input,.upload-area button,.review-combo select,.verification-pair select{display:none!important}.entry-review{border:0;background:#fff;min-width:0;padding:3px;font-size:8px;break-inside:avoid}.entry-review small,.review-comment,.entry-state{font-size:8px}.entry-review-cell{min-width:0;width:auto}.hod-review{break-inside:avoid}.hod-review:before{content:'Head of Department Verification';font-weight:700}.verification-pair{display:block}.photo-preview{width:80px;height:102px}.certificate-preview{max-height:none;max-width:100%;break-inside:avoid}.monthly-entry{break-inside:avoid}#sec-14 .skill-cat .table-scroll{max-height:none;overflow:visible}#sec-14 table.tbl{min-width:0}#sec-14 .skill-cat th,#sec-14 .skill-cat td{position:static!important;min-width:0!important;max-width:none!important}.faculty-fields{padding:0}details.posting-card:not([open])>.posting-body{display:block!important}details.posting-card>summary{font-size:13px}dialog{display:none}}

button.btn:disabled{opacity:1}

/* ===== v7: stronger gender-aware page colours =====
   Sidebar gender colours were already correct in v6. These rules extend the
   selected student theme across the main content area, cards, headings,
   controls, tables and supporting text. Staff/admin remain unchanged. */

body[data-theme="female"]{
  --paper:#fbe3ef;
  --paper-2:#f4bfd6;
  --card:#fff0f7;
  --input:#fff8fc;
  --soft:#f8d2e4;
  --line:#df90b5;
  --brass:#c2185b;
  --brass-2:#f09ac0;
  --teal:#a70d56;
  --teal-2:#74133f;
  --ok:#9d174d;
}
body[data-theme="female"] #main{background:linear-gradient(180deg,#fbe3ef 0%,#f8d6e7 100%)}
body[data-theme="female"] #topbar{background:#f7c9dd;border-color:#dc8db2}
body[data-theme="female"] section.page{border-bottom-color:#dc8db2}
body[data-theme="female"] .card,
body[data-theme="female"] .posting-card,
body[data-theme="female"] .monthly-entry,
body[data-theme="female"] details.ref,
body[data-theme="female"] .entry-review,
body[data-theme="female"] .saved-editor,
body[data-theme="female"] .image-viewer{background:#fff0f7;border-color:#df90b5}
body[data-theme="female"] .sec-title,
body[data-theme="female"] .dash-title,
body[data-theme="female"] .card h3,
body[data-theme="female"] .card h4,
body[data-theme="female"] .skill-cat h4,
body[data-theme="female"] details.ref summary,
body[data-theme="female"] .ref-body h5,
body[data-theme="female"] .toc-list a{color:#8b164b!important}
body[data-theme="female"] .sec-eyebrow,
body[data-theme="female"] .toc-list .n{color:#c2185b!important}
body[data-theme="female"] .sec-sub,
body[data-theme="female"] .field label,
body[data-theme="female"] .field .hint,
body[data-theme="female"] .hint-line,
body[data-theme="female"] .who,
body[data-theme="female"] .status,
body[data-theme="female"] .skill-cat .note,
body[data-theme="female"] .signature-slot,
body[data-theme="female"] .review-hint,
body[data-theme="female"] .card p,
body[data-theme="female"] .card small,
body[data-theme="female"] .card label,
body[data-theme="female"] .card summary,
body[data-theme="female"] .ref-body{color:#62233f!important}
body[data-theme="female"] input,
body[data-theme="female"] select,
body[data-theme="female"] textarea{background:#fff8fc;border-color:#df90b5;color:#471326}
body[data-theme="female"] input:focus,
body[data-theme="female"] select:focus,
body[data-theme="female"] textarea:focus{background:#fffafd;border-color:#b6155a;box-shadow:0 0 0 2px #c2185b24}
body[data-theme="female"] table.tbl th{background:#a70d56;color:#fff;border-color:#8b164b}
body[data-theme="female"] table.tbl td{border-color:#df90b5;background:#fff7fb}
body[data-theme="female"] table.tbl tr:nth-child(even) td{background:#f9d9e8}
body[data-theme="female"] table.tbl td input,
body[data-theme="female"] table.tbl td textarea,
body[data-theme="female"] table.tbl td select{background:transparent}
body[data-theme="female"] .badge,
body[data-theme="female"] .posting-period,
body[data-theme="female"] .flash-message,
body[data-theme="female"] .deadline-note,
body[data-theme="female"] .account-menu>summary{background:#f6c9dd;border-color:#df90b5;color:#66143c}
body[data-theme="female"] button.btn{background:#fff7fb;border-color:#bd3a78;color:#8b164b}
body[data-theme="female"] button.btn:hover{background:#f7c9dd;color:#70123f}
body[data-theme="female"] button.btn.primary,
body[data-theme="female"] button.btn.brass,
body[data-theme="female"] .hod-review .btn,
body[data-theme="female"] .v5-emergency .faculty-verification>.btn{background:#a70d56;border-color:#a70d56;color:#fff}
body[data-theme="female"] button.btn.primary:hover,
body[data-theme="female"] button.btn.brass:hover,
body[data-theme="female"] .hod-review .btn:hover,
body[data-theme="female"] .v5-emergency .faculty-verification>.btn:hover{background:#74133f;border-color:#74133f;color:#fff}
body[data-theme="female"] .account-avatar,
body[data-theme="female"] .photo-preview{background:#f6c9dd;border-color:#c95e90}
body[data-theme="female"] .account-menu-list{background:#fff0f7;border-color:#df90b5;box-shadow:0 9px 22px #7a164b26}
body[data-theme="female"] .account-menu-list>.btn:hover{background:#f7c9dd}
body[data-theme="female"] .review-panel{background:#fbe0ec;border-color:#dc8db2;color:#6c1b43}
body[data-theme="female"] .review-item,
body[data-theme="female"] .section-receipts{border-color:#dc8db2}
body[data-theme="female"] #setupNotice:not(:empty),
body[data-theme="female"] #loginError:not(:empty){background:#f8d2e4;color:#771443}
body[data-theme="female"].readonly-mode input,
body[data-theme="female"].readonly-mode textarea,
body[data-theme="female"].readonly-mode select{background:#f8dce9;color:#5c2940}

body[data-theme="male"]{
  --paper:#e5f1ff;
  --paper-2:#bfdcff;
  --card:#f2f8ff;
  --input:#f9fcff;
  --soft:#d6e9ff;
  --line:#8db8e8;
  --brass:#2878c7;
  --brass-2:#8fc5fa;
  --teal:#165a9e;
  --teal-2:#0b3f78;
  --ok:#165a9e;
}
body[data-theme="male"] #main{background:linear-gradient(180deg,#e7f2ff 0%,#dcecff 100%)}
body[data-theme="male"] #topbar{background:#cfe5ff;border-color:#8db8e8}
body[data-theme="male"] section.page{border-bottom-color:#8db8e8}
body[data-theme="male"] .card,
body[data-theme="male"] .posting-card,
body[data-theme="male"] .monthly-entry,
body[data-theme="male"] details.ref,
body[data-theme="male"] .entry-review,
body[data-theme="male"] .saved-editor,
body[data-theme="male"] .image-viewer{background:#f2f8ff;border-color:#8db8e8}
body[data-theme="male"] .sec-title,
body[data-theme="male"] .dash-title,
body[data-theme="male"] .card h3,
body[data-theme="male"] .card h4,
body[data-theme="male"] .skill-cat h4,
body[data-theme="male"] details.ref summary,
body[data-theme="male"] .ref-body h5,
body[data-theme="male"] .toc-list a{color:#104f8f!important}
body[data-theme="male"] .sec-eyebrow,
body[data-theme="male"] .toc-list .n{color:#2878c7!important}
body[data-theme="male"] .sec-sub,
body[data-theme="male"] .field label,
body[data-theme="male"] .field .hint,
body[data-theme="male"] .hint-line,
body[data-theme="male"] .who,
body[data-theme="male"] .status,
body[data-theme="male"] .skill-cat .note,
body[data-theme="male"] .signature-slot,
body[data-theme="male"] .review-hint,
body[data-theme="male"] .card p,
body[data-theme="male"] .card small,
body[data-theme="male"] .card label,
body[data-theme="male"] .card summary,
body[data-theme="male"] .ref-body{color:#244d76!important}
body[data-theme="male"] input,
body[data-theme="male"] select,
body[data-theme="male"] textarea{background:#f9fcff;border-color:#8db8e8;color:#163b61}
body[data-theme="male"] input:focus,
body[data-theme="male"] select:focus,
body[data-theme="male"] textarea:focus{background:#fff;border-color:#1f65aa;box-shadow:0 0 0 2px #2878c724}
body[data-theme="male"] table.tbl th{background:#165a9e;color:#fff;border-color:#104f8f}
body[data-theme="male"] table.tbl td{border-color:#8db8e8;background:#f7fbff}
body[data-theme="male"] table.tbl tr:nth-child(even) td{background:#dcecff}
body[data-theme="male"] table.tbl td input,
body[data-theme="male"] table.tbl td textarea,
body[data-theme="male"] table.tbl td select{background:transparent}
body[data-theme="male"] .badge,
body[data-theme="male"] .posting-period,
body[data-theme="male"] .flash-message,
body[data-theme="male"] .deadline-note,
body[data-theme="male"] .account-menu>summary{background:#d2e8ff;border-color:#8db8e8;color:#104f8f}
body[data-theme="male"] button.btn{background:#f8fbff;border-color:#3c7fbd;color:#104f8f}
body[data-theme="male"] button.btn:hover{background:#d2e8ff;color:#0b3f78}
body[data-theme="male"] button.btn.primary,
body[data-theme="male"] button.btn.brass,
body[data-theme="male"] .hod-review .btn,
body[data-theme="male"] .v5-emergency .faculty-verification>.btn{background:#165a9e;border-color:#165a9e;color:#fff}
body[data-theme="male"] button.btn.primary:hover,
body[data-theme="male"] button.btn.brass:hover,
body[data-theme="male"] .hod-review .btn:hover,
body[data-theme="male"] .v5-emergency .faculty-verification>.btn:hover{background:#0b3f78;border-color:#0b3f78;color:#fff}
body[data-theme="male"] .account-avatar,
body[data-theme="male"] .photo-preview{background:#d2e8ff;border-color:#5e9bd2}
body[data-theme="male"] .account-menu-list{background:#f2f8ff;border-color:#8db8e8;box-shadow:0 9px 22px #0b3f7826}
body[data-theme="male"] .account-menu-list>.btn:hover{background:#d2e8ff}
body[data-theme="male"] .review-panel{background:#e0efff;border-color:#8db8e8;color:#164d80}
body[data-theme="male"] .review-item,
body[data-theme="male"] .section-receipts{border-color:#8db8e8}
body[data-theme="male"] #setupNotice:not(:empty),
body[data-theme="male"] #loginError:not(:empty){background:#d6e9ff;color:#154f87}
body[data-theme="male"].readonly-mode input,
body[data-theme="male"].readonly-mode textarea,
body[data-theme="male"].readonly-mode select{background:#e1efff;color:#315a82}

/* Build: v7 gender-page-theme */
