:root{--orange:#d85b20;--ink:#192b29;--green:#245a48;--muted:#71807a;--line:#e1e7e1;--paper:#f5f7f3}*{box-sizing:border-box}body{margin:0;font:15px/1.55 'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--paper)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}input,select,textarea{width:100%;padding:12px;border:1px solid #d5ddd6;border-radius:9px;background:white;color:var(--ink);min-height:46px}input:focus,select:focus,textarea:focus{outline:3px solid #e9bd8b;outline-offset:1px}label{display:block;font-weight:600;margin:14px 0}label b{color:var(--orange)}label input,label select,label textarea{margin-top:6px}h1{font-size:29px;line-height:1.3;margin:12px 0}h2{font-size:20px;margin:0}h3{font-size:18px}.muted{color:var(--muted)}.small,small{font-size:12px}.optional{font-size:12px;font-weight:400;color:var(--muted);margin-left:7px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:700;color:var(--green)}.primary,.secondary,.file-button{padding:12px 20px;border-radius:9px;border:1px solid transparent;font-weight:600;display:inline-block}.primary{color:white;background:var(--orange);box-shadow:0 3px 0 #b7441420}.primary:hover{background:#bf4d18}.secondary,.file-button{background:#fff;border-color:#d6dfd6;color:var(--green)}.text-button{border:0;background:none;color:var(--green);padding:8px}.full{width:100%;margin-top:15px}.brand{display:flex;gap:12px;align-items:center;font-size:24px;font-weight:800}.brand>span{font-size:23px}.brand small{display:block;font-size:10px;letter-spacing:.5px;font-weight:400}.auth{display:grid;grid-template-columns:1.1fr 1fr;max-width:1120px;min-height:690px;margin:6vh auto;background:white;border-radius:22px;overflow:hidden;box-shadow:0 20px 80px #213c2410}.intro{padding:48px;background:#eaf0e6;position:relative}.intro .brand{margin-bottom:65px;color:var(--green)}.intro h1{font-size:44px;line-height:1.28;margin:18px 0}.intro p{max-width:365px;color:#647369}.event-chip{display:inline-block;margin-top:35px;color:var(--orange);font-size:12px;font-weight:700;border:1px solid #d6bca6;padding:5px 12px;border-radius:25px}.intro h2{margin-top:12px;font-size:30px}.intro h2 span{font-size:17px;font-weight:400}.intro-foot{margin-top:45px;font-size:12px;color:#65776d}.auth-card{padding:70px 55px}.auth-card h2{font-size:30px;margin:12px 0}.switch{display:flex;background:#f1f4ef;border-radius:10px;padding:4px;margin:26px 0}.switch button{flex:1;background:transparent;border:0;padding:9px;border-radius:7px;color:#718074}.switch button.selected{background:white;color:var(--green);box-shadow:0 2px 6px #0001}.notice{padding:13px 16px;background:#edf4ec;border-left:3px solid #4e8062;border-radius:6px;font-size:13px;white-space:pre-line}.note{font-size:12px;color:var(--muted)}.sidebar{position:fixed;inset:0 auto 0 0;width:245px;background:#fff;border-right:1px solid var(--line);padding:30px 20px;display:flex;flex-direction:column}.sidebar .brand{padding:0 10px;color:var(--green)}.side-label{font-size:11px;color:#94a096;margin:45px 15px 15px}nav button{display:block;width:100%;text-align:left;background:none;border:0;padding:14px;border-radius:9px;color:#68796e;margin:4px 0}nav button.active{background:#fbeee5;color:#bd4e1a;font-weight:700}.side-bottom{margin-top:auto;padding:15px 10px;border-top:1px solid var(--line)}.side-bottom span{display:block;font-size:12px;color:var(--muted)}.side-bottom button{margin-top:15px;background:none;border:0;color:var(--muted)}main{margin-left:245px}header{height:88px;display:flex;justify-content:space-between;align-items:center;padding:20px 42px;background:#fff;border-bottom:1px solid var(--line)}header strong{font-size:18px}.avatar{width:42px;height:42px;border-radius:50%;background:#e9f0e6;display:grid;place-items:center;color:var(--green);font-weight:700}.content{padding:25px 42px;max-width:1350px;margin:auto}.event-bar{display:flex;align-items:center;gap:14px;margin-bottom:28px}.event-bar span{font-size:12px;color:var(--muted);white-space:nowrap}.event-bar select{max-width:420px;min-height:40px;padding:8px 12px;font-size:13px}.welcome{display:flex;justify-content:space-between;gap:20px;padding:32px 35px;background:#eaf0e4;border:1px solid #dbe5d4;border-radius:16px}.welcome p{color:#6f7d6c}.welcome-mark{align-self:center;color:#8aa17f;font-size:23px;text-align:right}.welcome-mark strong{font-size:29px;color:#4d6e4e}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin:24px 0}.stat{background:white;border:1px solid var(--line);padding:20px;border-radius:12px}.stat span{font-size:12px;color:var(--muted)}.stat strong{display:block;font-size:30px;margin-top:9px;font-weight:600}.section-title{margin:34px 0 18px;font-size:17px}.work-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.work-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:24px;text-align:left;color:var(--ink)}.work-card p{color:var(--muted);font-size:13px;min-height:45px}.work-card>strong{color:var(--orange);font-size:13px}.icon{width:43px;height:43px;display:grid;place-items:center;border-radius:10px;font-size:25px}.orange{background:#fff0e3;color:#c66427}.green{background:#e9f1e9;color:#4c755a}.blue{background:#eaf0f6;color:#54738a}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.section-head p{margin:5px 0}.pill{background:#edf2e9;padding:8px 12px;border-radius:8px;font-size:12px}.panel{background:white;border:1px solid var(--line);border-radius:13px;padding:25px;margin:18px 0}.step-title{display:flex;gap:14px;align-items:center;margin-bottom:20px}.step-title>span{display:grid;place-items:center;min-width:32px;height:32px;background:#edf2e8;color:var(--green);border-radius:50%;font-size:14px;font-weight:700}.step-title h2{font-size:17px}.step-title p{font-size:12px;color:var(--muted);margin:4px 0}.mobile-search{display:flex;align-items:end;gap:12px}.mobile-search label{flex:1;margin:0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.wide{grid-column:1/-1}.mediums{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mediums label{position:relative;margin:5px 0 20px}.mediums input{position:absolute;opacity:0;width:1px;height:1px}.mediums span{display:block;padding:15px;text-align:center;border:1px solid var(--line);border-radius:10px;font-size:22px;cursor:pointer}.mediums strong,.mediums small{display:block;font-size:13px}.mediums small{font-size:11px;color:var(--muted)}.mediums input:checked+span{border:2px solid var(--orange);padding:14px;background:#fff6ed}.mediums input:focus-visible+span{outline:3px solid #e9bd8b}.photo-box{border:1px dashed #ccd9cc;border-radius:10px;background:#fafbf8;padding:20px;display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:20px}.photo-box img{width:90px;height:100px;object-fit:cover;border-radius:8px}.file-button{font-size:13px;cursor:pointer;margin:4px 0}.file-button input{position:absolute;width:1px;height:1px;opacity:0}.save-bar{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid var(--line);margin-top:25px;padding-top:20px}.save-bar span{font-size:12px;color:var(--muted)}.repeat input,.inline input{width:auto;min-height:auto;margin:0}.repeat,.inline{font-size:13px}.filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.filters>input{flex:1;min-width:190px}.filters button{padding:10px 13px}.compact .stat{padding:13px}.compact .stat strong{font-size:23px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{font-size:11px;color:#6c7e70;background:#f3f6ef;padding:12px;white-space:nowrap}td{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:top}td small{display:block;color:var(--muted)}td img{width:42px;height:46px;object-fit:cover}.empty{padding:45px 15px;text-align:center;color:var(--muted)}.account-row{display:flex;justify-content:space-between;gap:15px;padding:17px 0;border-bottom:1px solid var(--line)}.account-row small{display:block;color:var(--muted)}.badge{font-size:10px;border-radius:5px;background:#edf2e9;padding:4px 7px;color:var(--green)}.badge.PENDING{color:#b57424;background:#fff2d9}dialog{border:1px solid var(--line);border-radius:15px;max-width:670px;width:94%;padding:25px;max-height:92vh}dialog::backdrop{background:#1d332d80}footer{padding:25px 42px;font-size:11px;color:#8a998d;display:flex;justify-content:space-between}#toast{position:fixed;top:15px;left:50%;transform:translateX(-50%);padding:14px 22px;border-radius:10px;color:#fff;background:var(--green);z-index:100;max-width:94vw;box-shadow:0 5px 25px #0002;display:none}#toast.error{background:#a53e26}[hidden]{display:none!important}hr{border:0;border-top:1px solid var(--line);margin:25px 0}
@media(max-width:1000px){.sidebar{width:205px}main{margin-left:205px}.content{padding:22px}.work-grid{gap:10px}.work-card{padding:18px}.welcome-mark{display:none}.auth{margin:20px}.intro{padding:35px}.auth-card{padding:55px 35px}.intro h1{font-size:36px}header{padding:20px 25px}.stats{gap:10px}.stat{padding:15px}}
@media(max-width:700px){.auth{display:block;margin:0;border-radius:0;min-height:100vh}.intro{padding:25px}.intro .brand{margin:0 0 20px}.intro h1{font-size:28px;margin:12px 0}.intro>p,.intro-foot{display:none}.event-chip{margin-top:10px}.intro h2{font-size:22px}.intro h2 br{display:none}.intro h2 span{font-size:13px}.auth-card{padding:28px 25px}.sidebar{position:static;width:100%;padding:15px;border-right:0;border-bottom:1px solid var(--line)}.sidebar .brand{font-size:22px}.sidebar .brand>span{font-size:19px}.side-label,.side-bottom{display:none}nav{display:flex;overflow:auto;margin-top:12px;gap:5px}nav button{white-space:nowrap;width:auto;font-size:12px;padding:10px}main{margin:0}header{height:68px;padding:13px 18px}.content{padding:16px}.event-bar{display:block;margin-bottom:18px}.event-bar select{max-width:none;margin-top:5px}.welcome{padding:22px}.welcome h1{font-size:25px}.welcome p{font-size:13px}.stats{grid-template-columns:1fr 1fr;margin:16px 0}.stat strong{font-size:26px}.work-grid{grid-template-columns:1fr}.work-card p{min-height:auto}.section-head{align-items:start;flex-direction:column}.panel{padding:18px;margin:14px 0}.fields{grid-template-columns:1fr;gap:0}.mobile-search{align-items:stretch;flex-direction:column}.mobile-search button{align-self:start}.mediums{gap:7px}.mediums span{padding:12px 5px}.mediums input:checked+span{padding:11px 4px}.mediums strong{font-size:11px}.save-bar{flex-direction:column;align-items:stretch}.save-bar button{width:100%;padding:15px}.photo-box{padding:15px}.photo-box img{width:65px;height:80px}.filters button{font-size:12px}footer{padding:20px 16px}footer span{display:none}}
@media print{body{background:white;font-size:10pt}.sidebar,header,.event-bar,footer,.filters,.section-head button,.no-print,#toast{display:none!important}main{margin:0}.content{padding:0;max-width:none}.panel{border:0;padding:0}.table-wrap{overflow:visible}table{font-size:9pt;table-layout:fixed;overflow-wrap:anywhere}th,td{padding:6px}thead{display:table-header-group}tr{break-inside:avoid}.stats{margin:10px 0}.stat{padding:5px}.stat strong{font-size:18px}@page{size:A4 portrait;margin:12mm}}

.colony-picker{position:relative}.colony-picker>label{margin-bottom:6px}.colony-suggestions{border:1px solid #cbd9cb;background:#fff;border-radius:9px;margin:5px 0 12px;max-height:280px;overflow-y:auto;box-shadow:0 5px 15px #244b2910}.colony-suggestion,.colony-new-action{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;padding:12px 14px;text-align:left;background:white;color:#24382c;border:0;border-bottom:1px solid #edf1e9}.colony-suggestion:hover,.colony-suggestion:focus{background:#edf5e7}.colony-suggestion small{color:#7b8e78;white-space:nowrap}.colony-new-action{background:#fff2e6;color:#b75420;font-weight:600}.colony-picker>select{margin:8px 0}.colony-picker .notice input{background:#fff}.colony-picker .notice p{font-size:12px}

#recordsPage .table-wrap table{min-width:700px}#recordsPage td{line-height:1.6}#recordsPage td strong{font-weight:600}#recordsPage td small{margin-top:4px}#recordsPage .record-number{width:42px;color:#738373}#recordsPage .record-remark{max-width:240px;overflow-wrap:anywhere;white-space:pre-wrap}#recordsPage .record-photo{min-width:90px}#recordsPage .record-photo .text-button{display:block;padding:5px 0;font-size:12px}#recordsPage tbody tr:hover{background:#fafcf7}@media print{#recordsPage .table-wrap table{min-width:0}#recordsPage td{line-height:1.35}#recordsPage .record-number{width:25px}}

#recordsPage .records-overview{margin:22px 0 8px}#recordsPage .records-overview .stats{margin:8px 0 16px}#recordsPage .records-panel{padding:20px}#recordsPage .filters{padding-bottom:15px;border-bottom:1px solid var(--line)}#recordsPage .filters>input{min-width:210px}#recordsPage #recordCount{background:#f4f7f0;border-radius:7px;padding:10px 12px;margin:15px 0;font-size:12px}#recordsPage table th{font-size:12px}#recordsPage .record-number{font-variant-numeric:tabular-nums}#recordsPage .record-photo img{border-radius:6px;border:1px solid #e0e6dc}@media screen and (max-width:700px){#recordsPage .records-panel{padding:13px}#recordsPage .filters>input{width:100%;flex-basis:100%}#recordsPage .table-wrap{overflow:visible}#recordsPage .table-wrap table{min-width:0;display:block}#recordsPage thead{display:none}#recordsPage tbody{display:block}#recordsPage tbody tr{display:block;margin:12px 0;border:1px solid #dce5d8;border-radius:10px;padding:5px 12px;background:#fff}#recordsPage tbody td{display:grid;grid-template-columns:100px minmax(0,1fr);gap:2px 12px;padding:9px 0;border-bottom:1px solid #edf1e9;max-width:none;min-width:0;overflow-wrap:anywhere}#recordsPage tbody td::before{content:attr(data-label);grid-column:1;grid-row:1 / span 2;font-size:11px;color:#7c8c79}#recordsPage tbody td>*{grid-column:2}#recordsPage tbody td small{margin-top:0}#recordsPage tbody td.record-number{display:none}#recordsPage tbody td:last-child{border:0}#recordsPage tbody td.record-photo .text-button{text-align:left;margin:0;justify-self:start}#recordsPage .record-photo img{width:48px;height:54px}}@media print{#recordsPage .records-overview{margin:8px 0}#recordsPage .records-panel{padding:0}#recordsPage #recordCount{background:none;padding:5px 0}#recordsPage table th{font-size:9pt}}

#recordsPage .record-photo .photo-thumbnail{display:block;padding:0;border:1px solid #d3dfd0;border-radius:9px;width:68px;height:78px;background:#f0f5eb;overflow:hidden;cursor:pointer}#recordsPage .record-photo .photo-thumbnail img{width:100%;height:100%;object-fit:cover;border:0;border-radius:0}.photo-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#7e9578;font-size:30px}.photo-placeholder small{font-size:9px!important;margin:0!important}.record-photo-dialog{width:min(440px,94vw);padding:22px;max-height:92dvh;overflow-y:auto}.photo-dialog-heading{display:flex;align-items:start;justify-content:space-between;gap:15px}.photo-dialog-heading h2{font-size:19px}.photo-dialog-heading p{margin:5px 0 15px}.record-photo-stage{background:#f0f4ed;border:1px solid #dfe7d8;border-radius:12px;height:300px;display:flex;align-items:center;justify-content:center;overflow:hidden}.record-photo-stage img{width:100%;height:100%;object-fit:contain}.record-photo-empty{display:flex;flex-direction:column;text-align:center;gap:6px;color:#71866a}.record-photo-empty>span{font-size:64px;line-height:1.2}.record-photo-empty>strong{font-size:15px}.record-photo-empty>small{font-size:12px}.photo-source-buttons{display:flex;gap:10px}.photo-source-buttons button{flex:1;min-height:46px}.record-photo-dialog .full{margin-top:13px}.photo-thumbnail:focus-visible{outline:3px solid #e9bd8b;outline-offset:2px}@media screen and (max-width:700px){.record-photo-dialog{padding:18px}.record-photo-stage{height:min(42dvh,320px)}#recordsPage tbody td.record-photo .photo-thumbnail{grid-column:2;width:76px;height:88px}#recordsPage tbody td.record-photo .photo-thumbnail img{width:100%;height:100%}.record-photo-dialog .photo-source-buttons button{padding:12px 9px}.record-photo-dialog #saveRecordPhoto{min-height:48px}}@media print{.record-photo-dialog{display:none!important}}

/* Compact horizontal invitation cards */
#recordsPage .ic-record-list{display:flex;flex-direction:column;gap:10px}#recordsPage #recordsTitle{font-size:24px;line-height:1.4;margin:0 0 5px}#recordsPage .ic-record{background:#fff;border:1px solid #dce5d8;border-left:4px solid #cf6429;border-radius:10px;padding:10px 14px;break-inside:avoid;page-break-inside:avoid}#recordsPage .ic-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:#7a8874;font-size:11px;margin-bottom:6px}#recordsPage .ic-top time{margin-left:auto}#recordsPage .ic-medium{background:#edf3e7;color:#365e38;border-radius:15px;padding:2px 9px;font-size:11px;font-weight:600}#recordsPage .ic-main{display:grid;grid-template-columns:70px minmax(0,1fr);gap:14px;align-items:start}#recordsPage .ic-photo-area{display:flex;flex-direction:column;gap:2px}#recordsPage .ic-photo{height:76px;width:70px;border:1px solid #d3dfcc;border-radius:7px;background:#eff4e9;padding:0;overflow:hidden;display:grid;place-items:center;color:#83977a}#recordsPage .ic-photo img{height:100%;width:100%;object-fit:cover}#recordsPage .ic-avatar{font-size:38px;line-height:1}#recordsPage .ic-photo-action{border:0;background:transparent;color:#bd5928;font-size:11px;min-height:30px;padding:2px 0;text-align:center}#recordsPage .ic-details h3{font-size:18px;line-height:1.45;margin:0 0 2px;font-weight:600;overflow-wrap:anywhere}#recordsPage .ic-mobile-line{display:flex;align-items:center;gap:7px 14px;flex-wrap:wrap;margin:2px 0 6px}#recordsPage .ic-mobile{font-size:14px;color:#2e5c40;font-variant-numeric:tabular-nums}#recordsPage .ic-contact-actions{display:flex;gap:5px;flex-wrap:wrap}#recordsPage .ic-contact-actions a{border:1px solid #dce5d5;background:#f1f5eb;color:#35633f;border-radius:6px;padding:4px 9px;min-height:30px;display:inline-flex;align-items:center;font-size:11px;text-decoration:none}#recordsPage .ic-contact-actions a:hover{background:#e5eedb}#recordsPage .ic-location{font-size:13px;color:#6e8066;overflow-wrap:anywhere}#recordsPage .ic-location strong{font-weight:600;color:#283e2a}#recordsPage .ic-separator{color:#bac7b3;margin:0 6px}#recordsPage .ic-giver{font-size:12px;color:#6d7c65;margin-top:4px}#recordsPage .ic-remark{font-size:12px;line-height:1.5;color:#71826a;white-space:pre-wrap;overflow-wrap:anywhere;border-top:1px solid #edf1e7;padding-top:6px;margin-top:6px}#recordsPage .ic-photo:focus-visible{outline:3px solid #e7bc8b;outline-offset:2px}@media(max-width:700px){#recordsPage #recordsTitle{font-size:20px}#recordsPage .ic-record{padding:9px 10px;border-left-width:3px}#recordsPage .ic-main{grid-template-columns:60px minmax(0,1fr);gap:10px}#recordsPage .ic-photo{width:60px;height:70px}#recordsPage .ic-details h3{font-size:17px}#recordsPage .ic-mobile-line{gap:4px;margin-bottom:5px}#recordsPage .ic-location{font-size:12px}#recordsPage .ic-top{gap:6px;font-size:10px}#recordsPage .ic-top time{margin-left:0}#recordsPage .ic-photo-action{font-size:11px;min-height:44px}#recordsPage .ic-contact-actions a{min-height:44px;padding:5px 7px}#recordsPage .ic-contact-actions{gap:4px}#recordsPage .ic-separator{margin:0 3px}}@media print{#recordsPage .ic-record-list{gap:7px}#recordsPage .ic-record{padding:8px 10px;border-radius:5px;border-left-width:3px}#recordsPage #recordsTitle{text-align:center;font-size:16pt}#recordsPage #recordsScope{text-align:center}#recordsPage .ic-main{grid-template-columns:55px minmax(0,1fr);gap:12px}#recordsPage .ic-photo{width:55px;height:65px}#recordsPage .ic-details h3{font-size:12pt}#recordsPage .ic-location{font-size:10pt}#recordsPage .ic-mobile{font-size:10pt}#recordsPage .ic-top{font-size:8pt}#recordsPage .ic-remark{font-size:9pt}.record-photo-dialog{display:none!important}}

.crop-dialog{width:min(410px,94vw);padding:18px;max-height:94dvh;overflow-y:auto}.crop-dialog #cropCanvas{display:block;width:min(100%,280px,36dvh);max-width:280px;max-height:none;aspect-ratio:3/4;height:auto;margin:0 auto;border-radius:8px;touch-action:none;cursor:move;background:#eef3e8}.crop-dialog label{margin:9px 0 0;font-size:12px}.crop-dialog input[type=range]{padding:0;min-height:35px}.crop-dialog p{margin:5px 0}.crop-dialog .full{margin-top:7px}.crop-dialog #applyCrop{font-size:13px;min-height:46px}@media print{.crop-dialog{display:none!important}}

/* Officer portal login — approved photo-only header */
#auth.officer-login{display:block;width:calc(100% - 28px);max-width:440px;min-height:0;margin:28px auto;border:1px solid #e0e6da;border-top:4px solid #ce6224;border-radius:15px;overflow:hidden;background:#fff;box-shadow:0 12px 45px #23372b10}#auth.officer-login .auth-card{padding:24px 28px}#auth .officer-brand{text-align:center}#auth .officer-logo{width:54px;height:54px;object-fit:contain}#auth .officer-brand h1{font-size:26px;font-weight:600;margin:5px 0 0;line-height:1.4}#auth .officer-brand p{font-size:16px;color:#315e3d;margin:0}#auth .officer-brand small{display:block;font-size:12px;color:#75816b;margin-top:3px}#auth .officer-leaders{display:flex;justify-content:center;align-items:center;gap:20px;margin:20px 0}#auth .officer-leaders img{width:76px;height:80px;object-fit:cover;object-position:center 20%;border:2px solid #dce5d5;border-radius:10px}#auth .switch{margin:16px 0}#auth #authTitle{font-size:20px;font-weight:600;margin:12px 0 4px}#auth #authHelp{font-size:12px;margin:0 0 14px}#auth label{font-size:12px;margin:12px 0}#auth label input{font-size:16px;min-height:46px;font-weight:400}#auth #authSubmit{margin-top:9px;min-height:47px}#auth .officer-login-help{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#77826d;margin-top:12px}#auth .officer-login-footer{text-align:center;border-top:1px solid #e1e7da;margin-top:19px;padding-top:12px;color:#7a866f;font-size:11px}#auth .officer-login-footer span{display:block;margin-top:3px;color:#43684b}@media(max-width:480px){#auth.officer-login{margin:14px auto}#auth.officer-login .auth-card{padding:20px}#auth .officer-leaders{gap:14px;margin:17px 0}#auth .officer-leaders img{width:72px;height:76px}}@media(max-width:350px){#auth.officer-login .auth-card{padding:17px}#auth .officer-leaders{gap:11px}#auth .officer-leaders img{width:66px;height:71px}}

/* Mobile-first post-login workspace */
#portal .sidebar-logo{width:35px;height:35px;object-fit:contain;flex-shrink:0}#portal .sidebar .brand{gap:10px;font-size:21px}#portal .sidebar .brand>span{font-size:21px}#portal nav button{display:flex;gap:10px;align-items:center}#portal .nav-symbol{font-size:22px;line-height:1;min-width:22px;text-align:center}#portal .portal-header{height:auto;min-height:84px;gap:15px}#portal .portal-heading{display:flex;align-items:center;gap:23px;min-width:0}#portal .portal-brand{display:flex;align-items:center;gap:8px;min-width:0}#portal .portal-brand img{width:34px;height:34px;object-fit:contain}#portal .portal-brand>span{font-size:19px;line-height:1.35;font-weight:600;white-space:nowrap}#portal .portal-brand small{display:block;font-size:11px;font-weight:400;color:#73816c}#portal .portal-header-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}#portal .avatar{border:0;min-width:40px;min-height:40px;cursor:pointer}#portal .header-logout{display:none;border:1px solid #dde5d7;border-radius:7px;background:white;color:#75806b;font-size:12px;padding:8px 10px;min-height:40px}#portal .officer-welcome{background:transparent;border:0;border-radius:0;padding:5px 0 16px;display:block}#portal .officer-welcome h1{font-size:27px;margin:5px 0 3px}#portal .officer-welcome .home-area{font-size:13px;color:#72836b;margin:0}#portal .home-main-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}#portal .home-action{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;padding:23px;border-radius:13px;min-width:0;min-height:155px;border:1px solid #dbe5d3}#portal .home-action-primary{background:#cb6025;color:white;border-color:#cb6025}#portal .home-action-secondary{background:#edf3e7;color:#31573b}#portal .home-action-symbol{font-size:30px;line-height:1}#portal .home-action strong{font-size:19px;font-weight:600}#portal .home-action small{font-size:12px;opacity:.85}#portal .home-profile-link{display:flex;justify-content:space-between;gap:15px;width:100%;margin:16px 0 0;border:1px solid #dee6d7;border-radius:9px;background:#fff;color:#56704e;padding:15px;text-align:left;font-size:14px}#portal #homePage .section-title{font-size:15px;margin:23px 0 10px}#portal #homeStats{margin:0}#portal .event-bar select{max-width:100%}
@media screen and (max-width:700px){
#portal .sidebar{display:contents}#portal .sidebar>.brand,#portal .sidebar>.side-label,#portal .sidebar>.side-bottom{display:none}#portal .sidebar nav{position:fixed;bottom:0;left:0;right:0;z-index:60;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px;margin:0;padding:6px 5px calc(6px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #dce5d6;box-shadow:0 -4px 18px #2e4b2110;overflow:visible}#portal .sidebar nav button{display:flex;flex-direction:column;justify-content:center;gap:5px;margin:0;padding:8px 2px;min-height:61px;font-size:11px;line-height:1.25;border-radius:9px;text-align:center;white-space:normal;overflow-wrap:normal;color:#76836b}#portal .sidebar nav button.active{color:#c05c25;background:#fff0e5}#portal .sidebar nav .nav-symbol{font-size:24px;height:24px}#portal main{margin:0;padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))}#portal .portal-header{padding:11px 14px;min-height:68px;background:#fff;border-bottom:1px solid #e0e7d9}#portal .portal-brand{display:flex}#portal .portal-heading{display:block}#portal #pageHeading{display:none}#portal .portal-header-actions{gap:7px}#portal .avatar{width:35px;height:35px;min-width:35px;min-height:35px;font-size:15px}#portal .header-logout{display:block;font-size:11px;padding:7px;min-height:40px}#portal .content{padding:14px 13px 18px}#portal .event-bar{margin:0 0 16px;display:block}#portal .event-bar>span{font-size:11px}#portal .event-bar select{font-size:13px;min-height:44px;margin:5px 0 0;padding:10px;width:100%}#portal .officer-welcome{padding:0 0 15px}#portal .officer-welcome .eyebrow{font-size:10px}#portal .officer-welcome h1{font-size:23px;line-height:1.4;overflow-wrap:anywhere}#portal .home-action{min-height:135px;padding:16px 13px;gap:8px;border-radius:11px}#portal .home-main-actions{gap:10px}#portal .home-action strong{font-size:16px}#portal .home-action small{font-size:11px}#portal .home-action-symbol{font-size:28px}#portal #homeStats{grid-template-columns:1fr 1fr;gap:10px}#portal #homeStats .stat{padding:14px}#portal #homeStats .stat span{font-size:11px}#portal #homeStats .stat strong{font-size:25px;margin-top:4px}#portal .section-head{gap:8px;margin-bottom:12px}#portal .section-head h1,#portal #profilePage>h1{font-size:23px;margin:0 0 4px}#portal .section-head p{font-size:12px}#portal .panel{padding:15px;margin:12px 0}#portal .step-title{gap:9px;margin-bottom:13px}#portal .step-title h2{font-size:16px}#portal .step-title p{font-size:11px}#portal input:not([type=checkbox]):not([type=radio]):not([type=range]),#portal select,#portal textarea{font-size:16px;min-height:46px}#portal label{font-size:13px;margin:12px 0}#portal .mobile-search .secondary{width:100%;min-height:44px}#portal .mediums{gap:7px}#portal .mediums label{margin:4px 0 14px}#portal .mediums span{min-height:82px;padding:12px 4px}#portal .mediums input:checked+span{padding:11px 3px}#portal .save-bar{margin-top:17px;padding-top:14px;gap:12px}#portal .save-bar button{min-height:49px;font-size:15px}#portal .photo-box{padding:12px}#portal .file-button{font-size:12px;min-height:44px;padding:11px}#portal .home-profile-link{min-height:48px}#portal #recordsPage .section-head>.primary{min-height:44px;width:100%;font-size:13px}#portal #recordsPage .filters{gap:7px}#portal #recordsPage .filters button{min-height:42px;padding:9px 11px}#portal #recordsPage #recordCount{line-height:1.6;font-size:11px}#portal footer{display:none}#toast{top:10px;width:calc(100% - 26px);font-size:13px;text-align:center;padding:12px}
}
@media screen and (max-width:355px){#portal .portal-brand>span{font-size:17px}#portal .portal-brand img{width:28px;height:28px}#portal .portal-header{padding:10px}#portal .portal-header-actions{gap:5px}#portal .home-action strong{font-size:15px}#portal .home-action{padding:15px 10px}}
@media print{#portal .sidebar,#portal .portal-header,#portal .home-main-actions{display:none!important}body{padding-bottom:0!important}#portal main{padding-bottom:0}}

#profileColonyHost>input,#profileColonyHost>select{margin-top:6px}#profileColonyHost .notice{margin-top:12px}#profileColonyHost .colony-suggestion{font-size:14px;min-height:46px}#profileColonyHint{display:block;margin-top:5px}#profileNewBox input{background:#fff}

/* Login and registration password visibility */
#auth .auth-password-wrap{position:relative;margin-top:6px}
#auth .auth-password-wrap input{width:100%;box-sizing:border-box;padding-right:58px;margin:0}
#auth .password-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:44px;min-height:44px;padding:10px;border:0;background:transparent;color:#536174;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:8px}
#auth .password-eye:focus-visible{outline:2px solid #e87516;outline-offset:-2px}
#auth .password-eye:hover{background:#fff3e8}
#auth #passwordEyeSlash{display:none}
/* Diwali contacts and team workspace */
.campaign-bar{display:flex;align-items:center;gap:13px;padding:15px 18px;margin:0 0 18px;border:1px solid #f0d9b5;border-radius:16px;background:linear-gradient(100deg,#fff5e6,#fffdf7);color:#713b17}.campaign-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#f8dfb7;font-size:23px;color:#b65b13}.campaign-bar strong,.campaign-bar small{display:block}.campaign-bar small{margin-top:3px;color:#88694f}.contact-form-wrap{margin-bottom:18px}.contact-form-wrap .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.contact-form-wrap .fields label{display:grid;gap:6px}.contact-form-wrap .fields .wide{grid-column:1/-1}.contact-form-wrap select,.contact-form-wrap input,.contact-form-wrap textarea{width:100%;box-sizing:border-box}.profile-photo-card{display:flex;align-items:center;gap:16px;padding:15px;margin:14px 0 20px;border:1px solid var(--line);border-radius:15px;background:#fbfcf8}.profile-photo-frame{width:100px;height:128px;overflow:hidden;display:grid;place-items:center;border-radius:12px;border:1px solid #d8e0d7;background:#eef2ec;color:#7a887e;font-size:14px;flex:none}.profile-photo-frame img{width:100%;height:100%;object-fit:cover}.directory-list{display:flex;flex-direction:column;gap:11px}.directory-card{display:flex;align-items:center;gap:15px;padding:14px;border:1px solid var(--line);border-radius:15px;background:#fff}.directory-photo{width:70px;height:84px;display:grid;place-items:center;overflow:hidden;flex:none;border-radius:11px;background:#edf2eb;color:#59715f;font-size:26px}.directory-photo img{width:100%;height:100%;object-fit:cover}.directory-details{min-width:0;flex:1}.directory-details h3{margin:5px 0 3px;font-size:17px}.directory-top{display:flex;gap:7px}.type-chip,.team-chip{display:inline-flex;padding:3px 8px;border-radius:20px;background:#f3eee3;color:#75512e;font-size:12px}.team-chip{background:#e5f2e8;color:#276347}.directory-mobile{display:block;margin-bottom:4px}.directory-location{margin:4px 0;color:var(--muted);font-size:13px}.contact-actions{display:flex;gap:10px;margin-top:7px}.contact-actions a{font-size:12px;color:#276347;text-decoration:none}.team-toggle{flex:none;border:1px solid #ccddd0;border-radius:9px;padding:8px 10px;background:#f4faf5;color:#22583e;cursor:pointer;font-size:13px}.team-toggle.selected{background:#fff4ec;border-color:#f1d3bd;color:#91431a}.photo-box img{width:74px;height:98px;object-fit:cover;border-radius:8px;border:1px solid var(--line);margin-left:auto}.photo-box{display:flex;align-items:center;justify-content:space-between;gap:10px}.photo-box>div{min-width:0}.photo-box .file-button{display:inline-flex}.crop-dialog{width:min(420px,94vw);padding:18px;border:0;border-radius:18px;box-shadow:0 20px 70px #12231e55}.crop-dialog::backdrop{background:#10201dcc}.crop-dialog canvas{display:block;width:min(100%,360px);height:auto;max-height:55vh;object-fit:contain;margin:10px auto;border-radius:10px;touch-action:none;background:#eee}.crop-dialog input[type=range]{width:100%}.crop-dialog .full{width:100%;margin-top:10px}.profile-photo-card .text-button{margin-left:8px}.contact-form-wrap .save-bar{margin-top:15px}.team-toggle:disabled{opacity:.65}@media(max-width:700px){.contact-form-wrap .fields{grid-template-columns:1fr}.directory-card{align-items:flex-start;gap:10px;padding:11px}.directory-photo{width:58px;height:72px}.team-toggle{font-size:12px;padding:7px}.profile-photo-card{align-items:flex-start}.campaign-bar{margin-top:2px}}@media print{.campaign-bar,.team-toggle,.contact-actions,.profile-photo-card,.contact-form-wrap{display:none!important}#contactsPage .filters,#teamPage .filters{display:none!important}.directory-card{break-inside:avoid;border:1px solid #bbb}.directory-list{gap:6px}}

.initial-reset-panel{border:1px solid #e6b781;background:#fffaf3}.initial-reset-panel h2{margin-top:0}.initial-reset-panel .filters{display:flex;flex-wrap:wrap;gap:10px}.initial-reset-panel .notice{margin-bottom:0}#forcePasswordPage{min-height:100vh;align-items:center;justify-content:center;padding:24px}#forcePasswordPage:not([hidden]){display:flex}#forcePasswordPage .auth-card{width:min(100%,440px)}#forcePasswordForm{display:grid;gap:14px}

.duty-heading{grid-column:1/-1;margin-top:8px}.duty-heading h2{margin:0 0 4px;font-size:1.08rem;color:var(--green)}.duty-heading p{margin:0}.duty-fields{margin-top:4px}.duty-summary{grid-column:1/-1;padding:10px 12px;background:#f4f7f3;border-left:3px solid var(--orange);border-radius:7px}
/* Profile cards and mobile-style portal navigation. */
:root{--orange:#ed7c24;--green:#176b3e;--paper:#f4f7f3}#portal main{margin:0;min-height:100dvh;display:flex;flex-direction:column}.content{width:100%;max-width:1040px;flex:1;padding:24px}.app-header{height:auto;min-height:78px;padding:12px max(16px,calc((100% - 992px)/2));border-top:5px solid var(--orange);gap:12px}.app-header .portal-brand{display:flex;gap:10px;align-items:center;flex:1;justify-content:center}.app-header .portal-brand img{width:45px;height:45px;object-fit:contain}.app-header .portal-brand span{font-size:21px;font-weight:700;color:var(--green)}.app-header .portal-brand small{display:block;font-size:11px;font-weight:400}.header-actions{display:flex;align-items:center;gap:8px}.ui-icon{display:inline-block;width:24px;height:24px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;vertical-align:middle}.icon-button{width:44px;height:44px;border:0;border-radius:12px;background:#edf4e9;color:var(--green);display:inline-flex;align-items:center;justify-content:center}.app-header .avatar{border:0;cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bottom-menu{position:fixed;z-index:30;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1040px);display:flex;padding:8px 7px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce7dd;box-shadow:0 -5px 20px #163b2910}.bottom-menu button{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;text-align:center;padding:9px 3px;margin:0;min-height:70px;color:var(--green);border-radius:12px;font-size:13px;font-weight:600;transition:background .15s,transform .15s}.bottom-menu button .ui-icon{width:29px;height:29px}.bottom-menu button.active,.bottom-menu button:hover{background:#edf5e9;color:var(--green)}.bottom-menu button:active{transform:scale(.97)}.menu-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;min-height:20px;background:#e5efdf;color:var(--green);padding:0 5px;border-radius:20px;font-size:11px;font-variant-numeric:tabular-nums}.portal-home #portal main{padding-bottom:100px}.app-powered{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;padding:16px;background:white;border-top:1px solid #e0e8df}.powered-mark{position:relative;display:block!important;width:190px;height:auto;aspect-ratio:1379/445;overflow:hidden;margin:0 auto;flex-shrink:0}.powered-mark img{position:absolute;width:148.51%!important;max-width:none!important;height:auto!important;left:-24.51%;top:-27.19%;margin:0!important}.officer-login-footer{display:block!important;padding-top:18px!important;background:white}.logout-button{border:0;background:transparent;color:#c62828;font-weight:600;padding:8px 16px;min-height:40px}.welcome-card{max-width:720px;margin:28px auto 40px;border:1px solid #dce7d8;border-top:5px solid var(--orange);background:white;border-radius:20px;overflow:hidden;box-shadow:0 8px 25px #264a2910}.welcome-main{display:flex;align-items:center;gap:23px;padding:28px}.welcome-person-photo{width:96px;height:123px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#edf5e9;box-shadow:0 0 0 1px #dae5d5;overflow:hidden;color:#6d8a70}.welcome-person-photo img{width:100%;height:100%;object-fit:cover}.welcome-person-photo .ui-icon{width:45px;height:45px}.welcome-person{min-width:0}.welcome-person small{color:#75856c}.welcome-person h1{font-size:26px;color:#163e29;margin:4px 0 8px;overflow-wrap:anywhere}.welcome-person p{font-size:17px;color:var(--green);font-weight:600;margin:0 0 8px}.welcome-area{display:flex;align-items:center;gap:6px;color:#70816b;font-size:14px}.welcome-area .ui-icon{width:17px;height:17px}.welcome-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:17px 24px;border-top:1px solid #e6eddf;background:#f8faf5}.welcome-bottom .primary{display:inline-flex;align-items:center;gap:9px;background:var(--green)}.incomplete-note{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#a25a16}.incomplete-note .ui-icon{width:18px;height:18px}.profile-heading{max-width:650px;margin:0 auto 18px}.profile-heading h1{font-size:23px}.profile-heading .secondary{display:inline-flex;align-items:center;gap:7px}.profile-edit-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap}.member-card{max-width:440px;margin:0 auto 26px;background:#fff;border:1px solid #eadcca;border-radius:22px;overflow:hidden;box-shadow:0 12px 32px #183b2316}.member-stripe{height:8px;background:var(--orange)}.member-top{padding:18px 20px;background:linear-gradient(125deg,#fff9ef,#ffead2)}.member-brand{display:flex;align-items:center;justify-content:center;gap:10px}.member-brand img{width:60px;height:60px;background:#fff;border-radius:50%;object-fit:contain}.member-brand strong{display:block;font-size:19px;font-weight:700}.member-brand small{display:block;color:#6d6a4e;font-size:12px}.member-leaders{display:flex;justify-content:center;gap:22px;margin-top:16px}.member-leaders img{width:80px;height:84px;object-fit:cover;object-position:top;border:2px solid #fff;border-radius:12px}.member-divider{height:4px;background:linear-gradient(90deg,var(--orange) 0 45%,#fff 45% 54%,var(--green) 54%)}.member-body{padding:22px 24px;text-align:center}.member-photo{width:122px;height:162px;margin:0 auto 17px;border-radius:14px;box-shadow:0 0 0 2px #f2a152;border:5px solid #fff;background:#edf4e9;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#6d8a70}.member-photo img{width:100%;height:100%;object-fit:cover}.member-photo .ui-icon{width:50px;height:50px}.member-label{display:inline-block;padding:3px 10px;border-radius:20px;background:#fff1df;color:#a4510e;font-size:12px}.member-name{font-size:25px;font-weight:700;line-height:1.35;margin:8px 0;overflow-wrap:anywhere}.member-role{font-size:17px;color:var(--green);font-weight:600;margin:0 0 20px;overflow-wrap:anywhere}.member-details{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;text-align:left;margin:0;padding-top:17px;border-top:1px solid #e3ebdd}.member-details div{min-width:0}.member-details .span-all{grid-column:1/-1}.member-details dt{font-size:12px;color:#74836e}.member-details dd{font-size:15px;margin:3px 0 0;overflow-wrap:anywhere}.member-footer{padding:12px 15px;background:var(--green);color:white;text-align:center;font-size:12px}.profile-heading+.panel,#profileEditor{max-width:850px;margin:0 auto 22px}button:focus-visible{outline:3px solid #f2ba76;outline-offset:3px}.officer-leaders img{object-position:top}
@media(max-width:600px){.content{padding:18px 14px}.app-header{padding:10px 12px;gap:8px}.app-header .portal-brand span{font-size:18px}.app-header .portal-brand img{width:38px;height:38px}.header-actions{gap:5px}.app-header .avatar{width:35px;height:35px}.icon-button{width:40px;height:40px}.bottom-menu button{font-size:11px;gap:5px;padding:8px 2px}.bottom-menu button .ui-icon{width:27px;height:27px}.welcome-main{padding:21px 17px;gap:16px}.welcome-person-photo{width:76px;height:99px}.welcome-person h1{font-size:21px}.welcome-person p{font-size:15px}.welcome-area{font-size:13px}.welcome-bottom{padding:16px 18px}.welcome-bottom .primary{width:100%;justify-content:center}.welcome-card{margin:16px auto 30px}.profile-heading h1{font-size:20px}.profile-heading .secondary{font-size:13px;padding:10px 12px}.member-leaders{gap:17px}.member-leaders img{width:73px;height:79px}.member-body{padding:21px 19px}.member-name{font-size:23px}#profileEditor{padding:18px}.member-details{gap:13px}.app-powered{padding:13px}.member-brand strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){.bottom-menu button{transition:none}}
@media print{.app-header,.bottom-menu,.app-powered,.profile-heading button{display:none!important}#portal main{margin:0;padding:0!important;min-height:0}.member-card{box-shadow:none;break-inside:avoid}}
/* Final compact layout: footer and menu follow the page on every screen. */
#portal{display:flex;flex-direction:column;min-height:100dvh}#portal main{min-height:0;flex:1;width:100%;padding-bottom:0!important}.app-header{position:static;padding-top:9px;padding-bottom:9px}.app-header .header-actions{gap:7px}.app-header .logout-button{padding:8px 10px;border-radius:9px;background:#fff0ee;font-size:13px;white-space:nowrap}.bottom-menu{position:static;bottom:auto;left:auto;right:auto;transform:none;width:100%;max-width:1040px;flex-shrink:0;align-self:center;margin:0 auto;box-shadow:none;padding:5px 6px calc(8px + env(safe-area-inset-bottom,0px));background:#fff}.bottom-menu button{min-height:56px;gap:3px;font-size:12px}.bottom-menu button .ui-icon{width:24px;height:24px}.app-powered{position:static;margin-top:auto;padding:9px 14px;border-top:1px solid #e3e8df;background:#fff}.app-powered .powered-mark{width:135px}.content{padding:18px}.member-card{max-width:400px;border-radius:17px}.member-top{padding:12px 15px}.member-brand img{width:46px;height:46px}.member-brand strong{font-size:17px}.member-leaders{gap:18px;margin-top:11px}.member-leaders img{width:61px;height:65px;border-radius:9px}.member-body{padding:16px 19px}.member-photo{width:94px;height:125px;border-width:4px;border-radius:11px;margin-bottom:12px}.member-label{padding:2px 9px}.member-name{font-size:22px;margin:6px 0 4px}.member-role{font-size:15px;margin-bottom:12px}.member-footer{padding:8px 12px;font-size:11px}.member-details{display:flex;flex-direction:column;gap:0;padding-top:4px}.member-detail-row{display:flex;align-items:flex-start;gap:9px;padding:8px 0;border-bottom:1px solid #edf1e9}.member-detail-row:last-child{border-bottom:0}.detail-icon{width:29px;height:30px;flex:0 0 29px;display:flex;align-items:center;justify-content:center;border-radius:8px}.detail-icon .ui-icon{width:17px;height:17px}.member-details .detail-pair{display:grid;grid-template-columns:94px minmax(0,1fr);gap:7px;flex:1;min-width:0}.member-details dt,.member-details dd{font-size:13px;line-height:1.6}.member-details dt{color:#687660}.member-details dt::after{content:':';margin-left:3px}.member-details dd{margin:0;font-weight:600;color:#244231;overflow-wrap:anywhere}.tone-blue{background:#eaf2ff;color:#2563a3}.tone-orange{background:#fff0df;color:#c86412}.tone-green{background:#e9f5e9;color:#287848}.tone-purple{background:#f2edff;color:#7651a5}.tone-teal{background:#e6f6f2;color:#137c72}.tone-red{background:#ffeded;color:#b64a4a}.welcome-card{margin:16px auto 24px}.welcome-main{padding:20px;gap:18px}.welcome-bottom{padding:13px 18px}.profile-heading{margin-bottom:12px}.profile-heading h1{font-size:21px}.profile-photo-card{display:block;padding:16px;margin:14px 0 18px;background:#f8faf6}.profile-photo-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.profile-photo-heading span{font-size:12px;color:var(--muted)}.profile-photo-layout{display:grid;grid-template-columns:88px minmax(0,1fr);gap:17px;align-items:center}.profile-photo-frame{width:88px;height:117px;border-radius:12px}.profile-photo-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;min-width:0}.profile-photo-actions .file-button,.profile-photo-actions .secondary{display:inline-flex;align-items:center;justify-content:center;gap:7px;margin:0;font-size:13px;min-height:44px;padding:10px 13px;line-height:1.5}.profile-photo-actions .ui-icon{width:20px;height:20px}.profile-photo-actions .text-button{margin:0}.profile-photo-card #profilePhotoHelp{font-size:13px;line-height:1.6;margin:13px 0 0}.profile-edit-actions{margin-top:16px}.crop-dialog{max-width:420px;max-height:90dvh;overflow-y:auto}.crop-dialog canvas{max-height:48dvh}.photo-dialog-heading{display:flex;align-items:start;justify-content:space-between;gap:10px}.photo-dialog-heading h2{font-size:18px}.photo-dialog-heading p{margin:3px 0 0}
@media(max-width:600px){.content{padding:14px 11px}.app-header{padding:8px 10px;gap:6px}.app-header .portal-brand{gap:6px}.app-header .portal-brand img{width:34px;height:34px}.app-header .portal-brand span{font-size:17px}.app-header .portal-brand small{font-size:10px}.app-header .icon-button{width:34px;height:38px}.app-header .logout-button{font-size:12px;min-height:38px;padding:7px 8px}.bottom-menu button{min-height:56px;font-size:11px}.bottom-menu button .ui-icon{width:23px;height:23px}.member-top{padding:11px 13px}.member-body{padding:14px 15px}.member-leaders img{width:58px;height:62px}.member-name{font-size:21px}.member-details .detail-pair{grid-template-columns:81px minmax(0,1fr);gap:6px}.member-detail-row{gap:7px}.profile-photo-card{padding:14px}.profile-photo-layout{display:flex;flex-direction:column;gap:13px}.profile-photo-frame{width:88px;height:117px}.profile-photo-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%}.profile-photo-actions .file-button,.profile-photo-actions .secondary{padding:9px 6px;font-size:12px;min-height:46px;gap:5px;white-space:normal}.profile-photo-actions .text-button{grid-column:1/-1;justify-self:center}.profile-photo-heading{gap:8px}.profile-photo-card #profilePhotoHelp{text-align:center;font-size:12px}.welcome-main{padding:18px 15px}.welcome-bottom{padding:12px 15px}}
@media print{#portal{min-height:0}.bottom-menu,.app-powered,.logout-button,.profile-edit-actions{display:none!important}}

/* PWA install controls stay in document flow with the footer. */
.pwa-install{text-align:center;padding:4px 12px 14px}.pwa-install[hidden]{display:none!important}.pwa-install button{font-size:13px;padding:7px 14px;min-height:36px}.pwa-install p{font-size:12px;max-width:340px;margin:8px auto 0}.pwa-install p[hidden]{display:none}

/* Mobile layout v14: allow every flex/grid child to shrink and wrap. */
@media screen {
#portal, #portal main,.content,.panel,.fields,.fields>*,.auth-card,.directory-list{min-width:0;max-width:100%}
input,select,textarea{min-width:0;max-width:100%}button,.notice,.directory-details,.account-row,.welcome-area,.welcome-person p{overflow-wrap:anywhere}
.app-header .portal-brand{min-width:0}.app-header .portal-brand>span{min-width:0}.app-header .header-actions,.app-header>.icon-button{flex-shrink:0}
.fields{grid-template-columns:repeat(2,minmax(0,1fr))}.filters>input{min-width:0;flex-basis:180px}.account-row>div{min-width:0}.account-row button{flex-shrink:0}
.bottom-menu{overflow:visible;flex-wrap:wrap}.bottom-menu button{white-space:normal;overflow-wrap:anywhere;min-width:0}.bottom-menu button span{max-width:100%}
.directory-top,.contact-actions{flex-wrap:wrap}.directory-details{overflow-wrap:anywhere}.photo-box{flex-wrap:wrap}.photo-box>div{flex:1 1 180px}.photo-box img{flex-shrink:0}
dialog{overflow:auto;max-height:90dvh}.pwa-install{width:100%}.pwa-install button{min-height:44px}.pwa-install p{white-space:normal}
}
@media screen and (max-width:700px){
.fields{grid-template-columns:minmax(0,1fr)}.content{padding:12px 10px}.panel{padding:14px}.filters{align-items:stretch}.filters>input,.filters>select{width:100%;flex-basis:100%}.filters button{flex:1 1 120px}.section-head{gap:10px}.section-head>button{max-width:100%}
input,select,textarea{font-size:16px}.directory-card{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:start}.directory-card .team-toggle{grid-column:1/-1;width:100%;min-height:44px}.directory-photo{width:58px;height:76px}.contact-actions a{display:inline-block;padding:7px 9px}.account-row{flex-wrap:wrap}.account-row>div{flex:1 1 190px}
#forcePasswordPage{padding:12px;min-height:100dvh;width:100%;margin:0}#forcePasswordPage .auth-card{padding:18px 12px}.save-bar{gap:12px}.save-bar>button{white-space:normal}.profile-photo-heading{flex-wrap:wrap}.crop-dialog{padding:12px}.crop-dialog canvas{max-width:100%;max-height:48dvh}.photo-source-buttons{flex-wrap:wrap}.photo-source-buttons button{flex:1 1 120px}
}
@media screen and (max-width:380px){
.app-header{flex-wrap:wrap;gap:5px;padding:8px}.app-header .portal-brand{justify-content:flex-start}.app-header .portal-brand span{font-size:15px}.app-header .portal-brand small{font-size:9px}.app-header .portal-brand img{width:28px;height:28px}.app-header .header-actions{gap:3px}.app-header .icon-button{width:30px}.app-header .logout-button{padding:7px 5px;font-size:11px}
.welcome-main{gap:10px;padding:14px 10px}.welcome-person-photo{width:60px;height:80px}.welcome-person h1{font-size:18px}.welcome-person p{font-size:13px}.member-body{padding:12px 10px}.member-details .detail-pair{grid-template-columns:72px minmax(0,1fr);gap:4px}.member-details dt,.member-details dd{font-size:12px}.bottom-menu button{font-size:10px;padding:8px 1px}.profile-photo-actions{grid-template-columns:minmax(0,1fr)}
}
@media print{.pwa-install{display:none!important}}

/* App download card: mobile and desktop, normal document flow. */
.pwa-install{max-width:440px;margin:10px auto 16px;padding:14px;border:1px solid #f0d8be;border-radius:14px;background:#fffaf4}.install-identity{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:10px}.install-identity img{width:48px;height:48px;border-radius:12px;flex-shrink:0}.install-identity strong{font-size:15px;overflow-wrap:anywhere}.pwa-install .primary{display:inline-flex;align-items:center;justify-content:center;min-width:160px;min-height:44px}.app-powered+.pwa-install{width:calc(100% - 24px)}

/* Global app controls above login and portal; scroll with the page. */
.app-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;width:100%;padding:9px max(12px,calc((100% - 992px)/2));background:#fff;border-bottom:1px solid #e0e8df}.connection-status{display:inline-flex;align-items:center;gap:7px;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:600;background:#edf2ed}.connection-status::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}.connection-status.online{color:#166534;background:#eaf6ec}.connection-status.offline{color:#b91c1c;background:#fff0ee}#topInstall{text-align:right;max-width:100%}#topInstall .primary{min-height:40px;padding:8px 15px;font-size:13px}#installHelp{max-width:420px;font-size:12px;margin:7px 0 0;overflow-wrap:anywhere}@media print{.app-topbar{display:none!important}}

/* Bound overlays to the visual viewport; retain vertical scrolling only. */
@media screen{
html,body{width:100%;max-width:100%;overflow-x:clip}body:has(dialog[open]){overflow:hidden}
.app-topbar>*{min-width:0}#topInstall{min-width:0}#installHelp{max-width:min(320px,calc(100vw - 24px));white-space:normal}
#portal,.content,.panel,.contact-form-wrap,.fields>*,.filters>*,.section-head>div{min-width:0}
dialog{box-sizing:border-box;width:calc(100% - 24px);max-width:670px;max-height:calc(100dvh - 24px);margin:auto;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:18px}
#contactFormWrap{border:1px solid var(--line);border-radius:16px;margin:auto;padding:20px}#contactFormWrap:not([open]){display:none}#contactFormWrap .section-head{align-items:flex-start}#contactFormWrap .section-head h2{margin:0}#contactFormWrap .fields{grid-template-columns:repeat(2,minmax(0,1fr))}#contactFormWrap .photo-box{margin-top:10px}#contactFormWrap .photo-box>div{max-width:100%;min-width:0}#contactFormWrap .photo-box button{white-space:normal}#contactFormWrap input,#contactFormWrap select,#contactFormWrap textarea{width:100%;min-width:0}
.crop-dialog canvas{width:min(100%,360px,36dvh);height:auto;max-height:none;aspect-ratio:3/4;object-fit:fill}.crop-dialog .photo-dialog-heading>div{min-width:0}.crop-dialog .photo-dialog-heading button{flex-shrink:0}
}
@media screen and (max-width:700px){
#contactFormWrap{padding:14px;width:calc(100% - 20px);max-height:calc(100dvh - 20px)}#contactFormWrap .fields{grid-template-columns:minmax(0,1fr)}#contactFormWrap .section-head{flex-direction:row;gap:8px}#contactFormWrap .section-head .text-button{flex-shrink:0;padding:6px}#contactFormWrap .section-head p{font-size:12px}#contactFormWrap .photo-box{display:flex;flex-direction:column;align-items:stretch}#contactFormWrap .photo-box>div{flex:auto}#contactFormWrap .photo-box img{margin:6px auto}#contactFormWrap .file-button,#contactFormWrap #contactCameraButton{display:flex;width:100%;justify-content:center;margin:6px 0}dialog .fields{grid-template-columns:minmax(0,1fr)}
}

/* Shared party masthead, with compact app actions at every viewport. */
@media screen{
header.app-topbar{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;height:auto;min-height:76px;gap:16px;padding:10px max(16px,calc((100% - 1008px)/2));border-top:4px solid #ed7c24;border-bottom:1px solid #e0e8df;background:#fff}
.app-party-brand{display:flex;align-items:center;gap:11px;min-width:0}.app-party-brand img{width:48px;height:48px;flex:0 0 48px;object-fit:contain;border-radius:12px}.app-party-brand>div{min-width:0}.app-party-brand strong{display:block;color:#176b3e;font-size:21px;line-height:1.35}.app-party-brand small{display:block;color:#647260;font-size:13px;line-height:1.6;margin-top:2px}.app-top-actions{display:flex;align-items:flex-end;flex-direction:column;justify-content:center;gap:4px;flex:0 0 auto}.app-top-actions .connection-status{font-size:11px;line-height:1.3;padding:2px 7px}.app-top-actions .connection-status::before{width:6px;height:6px}#topInstall .primary{font-size:12px;line-height:1.4;min-height:34px;padding:7px 12px;border-radius:8px;box-shadow:none;white-space:nowrap}
#portal .portal-header.app-header{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:54px;padding:6px max(16px,calc((100% - 1008px)/2));border-top:0;background:#fbfcf9;flex-wrap:nowrap}.app-page-heading{font-size:15px!important;color:#53654e;text-align:left;font-weight:600}#portal .app-header .header-actions{gap:6px}#portal .app-header .icon-button{width:38px;height:38px;border-radius:10px}#portal .app-header .logout-button{min-height:36px;padding:7px 11px;color:#b91c1c;font-size:12px}.welcome-card{margin-top:0}.welcome-main{padding:18px 20px}.welcome-person h1{font-size:23px}.welcome-person p{font-size:15px}.welcome-person-photo{width:78px;height:101px}.welcome-bottom{padding:12px 18px}#auth.officer-login{margin:18px auto}#auth.officer-login .auth-card{padding-top:16px}#auth .officer-brand p{margin:0;color:#176b3e;font-size:15px;font-weight:600}#auth .officer-leaders{margin-top:12px}#installDialog{width:calc(100% - 28px);max-width:380px;padding:18px}#installHelp{max-width:100%;text-align:left;line-height:1.7;margin:14px 0 0;font-size:14px}#installDialog h2{font-size:18px}
}
@media screen and (max-width:600px){
header.app-topbar{min-height:72px;padding:8px 10px;gap:8px}.app-party-brand{gap:8px}.app-party-brand img{width:40px;height:40px;flex-basis:40px;border-radius:10px}.app-party-brand strong{font-size:17px}.app-party-brand small{font-size:11px}.app-top-actions{gap:4px}#topInstall .primary{padding:7px 9px;font-size:11px;min-height:34px}#portal .portal-header.app-header{padding:5px 10px;min-height:48px;grid-template-columns:36px minmax(0,1fr) auto;gap:8px}#portal .app-header .icon-button{width:36px;height:36px}.welcome-main{padding:15px 13px;gap:13px}.welcome-person-photo{width:66px;height:86px}.welcome-person h1{font-size:20px}.welcome-area{font-size:12px}.welcome-bottom{padding:11px 13px}#auth.officer-login{margin:12px auto}
}
@media screen and (max-width:350px){.app-party-brand{gap:6px}.app-party-brand img{width:34px;height:34px;flex-basis:34px}.app-party-brand strong{font-size:15px}.app-party-brand small{font-size:10px}.app-top-actions .connection-status{font-size:10px}#topInstall .primary{font-size:10px;padding:7px 8px}.welcome-person h1{font-size:18px}}

/* Connection below constituency; download immediately before Home inside portal. */
@media screen{
.app-party-brand .connection-status{display:inline-flex;width:max-content;margin-top:3px;padding:2px 7px;font-size:10px;line-height:1.3;font-weight:600}.app-party-brand .connection-status::before{width:6px;height:6px}.app-top-actions:empty{display:none}#downloadApp{display:inline-flex;align-items:center;justify-content:center;gap:6px}#downloadApp .ui-icon{width:18px;height:18px}#portal .header-actions #topInstall{display:flex;align-items:center}#portal .header-actions #topInstall[hidden]{display:none!important}#portal #downloadApp{width:36px;height:36px;min-height:36px;padding:7px;border:1px solid #f2d4b6;border-radius:10px;background:#fff3e6;color:#ba5314}#portal #downloadApp span{display:none}#portal #downloadApp .ui-icon{width:21px;height:21px}header.app-topbar{min-height:84px}
}
@media screen and (max-width:600px){header.app-topbar{min-height:78px}.app-party-brand .connection-status{font-size:10px;padding:1px 6px}#portal .app-header .header-actions{gap:5px}#topInstall .primary .ui-icon{width:16px;height:16px}}


/* Center the party name, constituency and connection status on the screen. */
@media screen{
header.app-masthead{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,360px) minmax(160px,1fr);gap:12px;min-height:82px}
.app-masthead>.app-party-brand{grid-column:2;grid-row:1;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:8px;width:100%;justify-self:center}.app-party-brand>div{text-align:center}.app-party-brand .connection-status{margin-left:auto;margin-right:auto}.app-party-brand img{grid-column:1}.app-party-brand>div{grid-column:2}
.app-masthead>#portalBack{grid-column:1;grid-row:1;justify-self:start}.app-masthead>.app-top-actions,.app-masthead>.masthead-actions{grid-column:3;grid-row:1;justify-self:end}.app-top-actions:has(#topInstall[hidden]){display:none}
.app-masthead .icon-button{width:38px;height:38px;border-radius:10px}.app-masthead .masthead-actions{gap:7px}.app-masthead .logout-button{border-radius:9px;background:#fff0ee;color:#b91c1c;min-height:38px;padding:7px 10px;font-size:12px}.masthead-actions #topInstall{display:flex;align-items:center}.masthead-actions #topInstall[hidden]{display:none!important}.masthead-actions #downloadApp{width:38px;height:38px;min-height:38px;padding:7px;border:1px solid #f2d4b6;border-radius:10px;background:#fff3e6;color:#ba5314}.masthead-actions #downloadApp span{display:none}.masthead-actions #downloadApp .ui-icon{width:21px;height:21px}
}
@media screen and (max-width:760px){
header.app-masthead{grid-template-columns:38px minmax(0,1fr) auto;gap:6px;row-gap:7px;min-height:0;padding:9px 10px}.app-masthead>.app-party-brand{grid-column:1/-1;grid-row:1;max-width:360px;grid-template-columns:40px minmax(0,1fr) 40px}.app-masthead>#portalBack{grid-row:2}.app-masthead>.masthead-actions,.app-masthead>.app-top-actions{grid-column:2/-1;grid-row:2;justify-self:end}.app-masthead .icon-button,.masthead-actions #downloadApp{width:36px;height:36px;min-height:36px}.app-masthead .logout-button{min-height:36px}.content{padding-top:12px}.app-party-brand img{width:40px;height:40px}
}

/* 2026-11-02 mobile-first visual refinement; no changes to existing form IDs or data logic */
html,body{max-width:100%;overflow-x:clip}body{background:linear-gradient(160deg,#f3f8f3 0%,#fff9f1 100%) fixed}
#portal,#auth,main,.content,.panel,.fields,.section-head,.records-panel{max-width:100%;min-width:0}
button,.primary,.secondary{transition:background-color .16s ease,transform .16s ease,box-shadow .16s ease}
button:active{transform:scale(.985)}
.panel,.auth-card,.welcome-card,.work-card,.directory-card{box-shadow:0 5px 22px rgba(21,72,45,.055);border-color:#dee9df}
input,select,textarea{max-width:100%;min-width:0;border-color:#cfded2;border-radius:12px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #e98a3b;outline-offset:1px}
.primary{background:linear-gradient(125deg,#e87825,#cc5318);border-radius:11px;box-shadow:0 5px 13px #d85b2026}
.primary:hover{background:linear-gradient(125deg,#ed8235,#b84413)}
.secondary{border-radius:11px;background:#fff;color:#176b3e}
header.app-masthead{border-top:4px solid #ef8b32;box-shadow:0 3px 16px #164b2a0d;background:#fff}
.app-party-brand strong{color:#116535!important;font-weight:800;letter-spacing:-.2px}
.app-party-brand small{font-weight:650;color:#4d6656}
.app-party-brand .connection-status.online{background:#e5f6e8;color:#146c37}
.app-party-brand .connection-status.offline{background:#fff0e9;color:#a43b17}
#downloadApp{white-space:nowrap}
#installDialog{border:0;border-radius:20px;box-shadow:0 24px 90px #102c2240}
#installDialog::backdrop,.contact-form-wrap::backdrop{background:rgba(14,35,26,.66);backdrop-filter:blur(3px)}
/* A true contained popup prevents left/right scrolling on phone. */
dialog.contact-form-wrap[open]{position:fixed;inset:0;margin:auto;width:min(720px,calc(100vw - 24px));max-width:720px;max-height:min(92dvh,900px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:clamp(14px,3vw,26px);background:#fff;border:1px solid #dfe9df;border-radius:20px;box-shadow:0 22px 80px #12291e44}
.contact-form-wrap form,.contact-form-wrap .fields,.contact-form-wrap .fields label,.contact-form-wrap .photo-box,.contact-form-wrap .save-bar{min-width:0;max-width:100%}
.contact-form-wrap .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}
.contact-form-wrap .fields label{margin:8px 0}
.contact-form-wrap .section-head{position:sticky;top:-1px;background:#fff;z-index:2;padding:8px 0 12px;border-bottom:1px solid #edf0ed}
.contact-form-wrap .save-bar{position:sticky;bottom:-1px;background:#fff;padding:12px 0 4px;z-index:2}
@media(max-width:760px){
 header.app-masthead{grid-template-columns:38px minmax(0,1fr) auto;row-gap:5px;padding:8px 10px 7px}
 .app-masthead>.app-party-brand{grid-column:1/-1;grid-row:1;grid-template-columns:42px minmax(0,1fr) 42px;max-width:100%;gap:6px}
 .app-party-brand strong{font-size:clamp(16px,4.4vw,20px)!important}
 .app-party-brand small{font-size:12px}
 .app-masthead>.app-top-actions,.app-masthead>.masthead-actions{grid-column:2/-1;grid-row:2}
 .app-masthead>#portalBack{grid-column:1;grid-row:2}
 #auth.officer-login{width:calc(100% - 20px);margin:10px auto;border-radius:19px;min-height:auto}
 #auth.officer-login .auth-card{padding:16px clamp(14px,4vw,25px) 22px}
 .auth-card h2{font-size:23px}
 .content{padding:12px 10px 80px}
 .panel{padding:15px 12px;border-radius:15px}
 .section-head{flex-wrap:wrap;gap:10px}
 .section-head>div{flex:1 1 170px}
 .fields,.contact-form-wrap .fields{grid-template-columns:minmax(0,1fr)}
 .fields>.wide,.contact-form-wrap .fields .wide{grid-column:1}
 dialog.contact-form-wrap[open]{width:calc(100vw - 16px);max-height:calc(100dvh - 18px);border-radius:17px;padding:12px}
 .contact-form-wrap .photo-box{display:flex;flex-wrap:wrap;padding:12px}
 .contact-form-wrap .save-bar{flex-direction:column;align-items:stretch;gap:7px}
 .contact-form-wrap .save-bar button{width:100%}
 .filters>*{max-width:100%}
 .filters>input{flex:1 1 100%;min-width:0}
 .section-head h1{font-size:22px}
}
@media(max-width:380px){.app-party-brand img{width:36px;height:36px}.app-party-brand strong{font-size:15px!important}.masthead-actions{gap:3px!important}.app-masthead .logout-button{font-size:11px;padding:6px 7px}}
@media print{body{background:white}header.app-masthead{box-shadow:none}}


/* Approved compact footer: navigation first, branding below; scrolls with page. */
@media screen {
  #portal{min-height:0;display:flex;flex-direction:column}
  #portal main{flex:0 0 auto;min-height:0;padding-bottom:0!important}
  #portal .content{padding-bottom:14px}
  #portal .bottom-menu{position:static;inset:auto;transform:none;order:1;display:flex;flex-wrap:nowrap;align-self:center;flex-shrink:0;width:calc(100% - 24px);max-width:680px;margin:0 auto;padding:6px;gap:5px;background:#fff;border:1px solid #dde7d9;border-radius:16px;box-shadow:0 3px 10px #204d2810}
  #portal .bottom-menu button{position:relative;flex:1 1 0;min-width:0;min-height:68px;margin:0;padding:7px 3px;gap:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;border:0;border-radius:11px;background:transparent;color:#52694e;font-size:13px;line-height:1.4;text-align:center}
  #portal .bottom-menu button.active{color:#146332;background:#eaf4e7}
  #portal .bottom-menu button:hover{background:#f0f6ed}
  #portal .bottom-menu button .ui-icon{width:24px;height:24px;flex-shrink:0}
  #portal .bottom-menu .menu-count{display:inline-flex;align-items:center;justify-content:center;min-width:17px;padding:0 4px;border-radius:9px;background:#e8eee4;color:#36603c;font-size:11px;margin-left:2px}
  #portal .app-powered{order:2;display:flex;position:static;align-self:center;width:100%;max-width:680px;margin:0 auto;padding:10px 12px 12px;border:0;background:transparent;gap:0}
  #portal .app-powered .powered-mark{width:112px;margin:0 auto}
  @media(max-width:420px){#portal .bottom-menu{gap:3px}#portal .bottom-menu button{font-size:12px;min-height:66px}}
  @media(max-width:360px){#portal .bottom-menu button{font-size:11px}#portal .bottom-menu:has(#adminNav:not([hidden])) button{font-size:10px}}
}

/* 2026-11-02 v21: contact/team mobile layout hotfix. Keep existing IDs and handlers. */
@media screen and (max-width:760px){
  #portal main{display:block!important;min-height:0!important;height:auto!important;flex:none!important}
  #portal main>.content{display:block!important;flex:none!important;min-height:0!important;height:auto!important;padding:12px 12px 16px!important}
  #portal #contactsPage,#portal #teamPage{display:block;min-height:0!important;height:auto!important}
  #portal #contactsPage[hidden],#portal #teamPage[hidden]{display:none!important}
  #portal #contactsPage>.section-head,#portal #teamPage>.section-head{display:flex!important;flex-direction:row!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;margin:4px 0 12px!important;min-height:0!important;height:auto!important}
  #portal #contactsPage>.section-head>div,#portal #teamPage>.section-head>div{flex:1 1 165px!important;min-width:0!important;height:auto!important;min-height:0!important}
  #portal #contactsPage>.section-head h1,#portal #teamPage>.section-head h1{font-size:23px!important;line-height:1.25!important;margin:0 0 3px!important}
  #portal #contactsPage>.section-head p,#portal #teamPage>.section-head p{font-size:12px!important;line-height:1.4!important;margin:0!important}
  #portal #showContactForm{flex:0 0 auto!important;align-self:flex-start!important;max-width:100%!important;min-height:42px!important;margin:0!important;padding:9px 12px!important;font-size:13px!important;white-space:nowrap}
  #portal #contactsPage .records-overview{margin:12px 0 8px!important}
  #portal #contactsPage .records-overview>.muted{display:block;margin-bottom:7px}
  #portal #recordStats,#portal #teamStats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin:0 0 12px!important}
  #portal #recordStats .stat,#portal #teamStats .stat{padding:12px!important;min-width:0!important}
  #portal #recordStats .stat strong,#portal #teamStats .stat strong{font-size:25px!important;margin-top:3px!important}
  #portal #contactsPage .filters,#portal #teamPage .filters{gap:8px!important}
  #portal #contactsPage .filters>input,#portal #teamPage .filters>input{flex:1 1 100%!important;min-width:0!important}
  header.app-masthead{height:auto!important;min-height:0!important;grid-template-columns:40px minmax(0,1fr) auto!important;gap:7px!important;padding:8px 12px!important}
  .app-masthead>.app-party-brand{grid-column:1/-1!important;grid-row:1!important;max-width:100%!important;grid-template-columns:40px minmax(0,1fr) 40px!important;gap:6px!important;justify-self:stretch!important}
  .app-party-brand strong{font-size:clamp(16px,4.3vw,20px)!important;line-height:1.25!important}
  .app-party-brand small{font-size:11px!important;line-height:1.3!important}
  .app-party-brand .connection-status{margin-top:3px!important}
  .app-masthead>#portalBack{grid-column:1!important;grid-row:2!important}
  .app-masthead>.masthead-actions,.app-masthead>.app-top-actions{grid-column:2/-1!important;grid-row:2!important;justify-self:end!important}
}
@media screen and (max-width:360px){#portal #contactsPage>.section-head{gap:8px!important}#portal #showContactForm{font-size:12px!important;padding:8px 10px!important}}

/* v22 — Compact contact header and mobile overflow correction. */
@media screen and (max-width:760px){
  html,body{max-width:100%;overflow-x:hidden}
  #portal,#portal main,#portal main>.content{width:100%;max-width:100%;box-sizing:border-box;min-height:0!important}
  #portal #contactsPage{display:block!important;min-height:0!important;align-content:start!important;justify-content:flex-start!important}
  #portal #contactsPage[hidden]{display:none!important}
  #portal #contactsPage>.contacts-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;align-content:start!important;justify-content:stretch!important;gap:8px!important;min-height:0!important;height:auto!important;margin:0 0 12px!important;padding:0!important}
  #portal #contactsPage>.contacts-heading>.contacts-heading-text{min-height:0!important;height:auto!important;min-width:0!important;display:block!important;flex:none!important}
  #portal #contactsPage>.contacts-heading h1{margin:0 0 4px!important;font-size:24px!important;line-height:1.2!important}
  #portal #contactsPage>.contacts-heading p{margin:0!important;font-size:12px!important;line-height:1.35!important}
  #portal #contactsPage>.contacts-heading #showContactForm{margin:0!important;min-height:40px!important;min-width:0!important;width:auto!important;max-width:145px!important;padding:8px 10px!important;font-size:13px!important;white-space:nowrap!important;align-self:center!important}
  #portal #contactsPage .records-overview{margin:0 0 10px!important;padding:0!important}
  #portal #contactsPage .records-panel{margin-top:0!important}
  #portal #contactsPage .records-panel .filters{display:flex!important;flex-wrap:wrap!important;align-items:center!important}
  #portal #contactsPage .records-panel .filters>#recordSearch{flex:1 1 100%!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
  #portal #recordStats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  #portal #recordStats>*{min-width:0!important}
  #portal #contactsPage .directory-list{max-width:100%;min-width:0}
}
@media screen and (max-width:360px){
  #portal #contactsPage>.contacts-heading{grid-template-columns:minmax(0,1fr) auto!important}
  #portal #contactsPage>.contacts-heading #showContactForm{max-width:125px!important;padding:8px!important;font-size:12px!important}
}

/* v23: Dashboard, full-screen-width navigation, appearance modes */
html,body{width:100%;max-width:100%;overflow-x:clip}
#portal{max-width:100%;width:100%;min-width:0}
#bottomMenu.bottom-menu{left:0!important;right:0!important;width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;display:flex;justify-content:space-around;gap:0;padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right));padding-bottom:env(safe-area-inset-bottom)}
#bottomMenu.bottom-menu button{flex:1 1 0;min-width:0;white-space:normal}
.dash-actions{margin:18px 0 20px}.dash-actions h2{margin:0 0 10px}.dash-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dash-action-grid button{display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:112px;gap:5px;text-align:left;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:15px;padding:14px;box-shadow:0 5px 16px #142c1d12}.dash-action-grid small{color:var(--muted);font-weight:400}.dash-action-icon{font-size:23px;color:var(--green);line-height:1.2}
.account-settings{margin:16px 0}.account-setting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.account-setting-grid>div{min-width:0}.theme-buttons{display:flex;flex-wrap:wrap;gap:8px}.theme-buttons button[aria-pressed=true]{outline:2px solid var(--orange)}.quick-theme{align-self:center;min-width:38px;min-height:38px;font-size:20px}
.self-password-dialog{width:min(94vw,460px);max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:20px}
@media(max-width:600px){#portal main{width:100%;max-width:100%}#portal main>.content{width:100%;max-width:100%;box-sizing:border-box;padding-left:12px!important;padding-right:12px!important}#bottomMenu.bottom-menu button{font-size:11px;padding-left:2px!important;padding-right:2px!important}#bottomMenu.bottom-menu .ui-icon{max-width:23px}.account-setting-grid{grid-template-columns:1fr}.dash-action-grid{gap:9px}.dash-action-grid button{min-height:103px;padding:12px}.dash-actions{margin-top:10px}}
html[data-theme=dark]{color-scheme:dark;--ink:#ecf3ee;--paper:#0f1b17;--line:#30493c;--muted:#aebfb5;--green:#7bd6a1}
html[data-theme=dark] body{background:#0f1b17;color:#ecf3ee}
html[data-theme=dark] :is(.panel,.welcome-card,.auth-card,.dash-action-grid button,.account-settings,.stats>*,.member-card,.records-panel,.records-overview,.section-head,.profile-photo-card,.self-password-dialog,dialog){background-color:#192c23;color:#ecf3ee;border-color:#30493c}
html[data-theme=dark] :is(input,textarea,select,.secondary,.file-button){background-color:#21392c!important;color:#f1f6f2!important;border-color:#45604e!important}
html[data-theme=dark] :is(.bottom-menu,.app-topbar,.app-masthead){background:#14251b!important;color:#f2f8f3!important;border-color:#30493c!important}
html[data-theme=dark] :is(.bottom-menu button,.icon-button,.text-button,.dash-action-icon,.dash-action-grid strong){color:#e4f6e8!important}
html[data-theme=dark] .muted,html[data-theme=dark] small{color:#b8c8be!important}
html[data-theme=dark] .dash-action-grid small{color:#b8c8be}
html[data-theme=dark] .primary{color:#fff}
