/* Phase 3: system-wide compact controls & neutral typography. */
:root{--p3-border:#e0eae3;--p3-muted:#68796f}
.dashboard-body{font-size:13px;line-height:1.45}
.dashboard-content{max-width:1190px!important}
.dashboard-body h1,.dashboard-body h2,.dashboard-body h3{font-weight:600;letter-spacing:-.025em}
.dashboard-body .dash-title h1{font-size:clamp(19px,2vw,25px);font-weight:600}
.dashboard-body .dash-title p{font-size:12px}
.dashboard-body .dash-panel{padding:18px;border-radius:15px}
.dashboard-body .panel-heading{margin-bottom:12px}
.dashboard-body .panel-heading h2{font-size:15px;font-weight:600}
.dashboard-body .side-link{font-size:12px;font-weight:500}
.dashboard-body .sidebar .side-category{font-weight:600}
.dashboard-body .app-topbar,.dashboard-body .topbar-user{font-size:12px}
/* Label/input gap literally zero: use label padding=0 and input margin-top=0. */
form label:not(.checkbox-label):not(.p3-photo-file):not(.p3-zoom){display:block!important;margin:0!important;padding:0!important;font-size:12px!important;line-height:1.4!important;font-weight:500!important;letter-spacing:0!important;color:#4d6054}
form label:not(.checkbox-label):not(.p3-photo-file):not(.p3-zoom) > input,
form label:not(.checkbox-label):not(.p3-photo-file):not(.p3-zoom) > select,
form label:not(.checkbox-label):not(.p3-photo-file):not(.p3-zoom) > textarea{display:block;margin:0!important;font-size:13px!important;font-weight:400!important;line-height:1.4!important;padding:9px 11px!important;border-radius:9px!important;min-height:37px}
form label:not(.checkbox-label) > small{margin-top:4px;font-size:11px;font-weight:400!important}
.form-grid{column-gap:12px!important;row-gap:12px!important}
.ajax-form:not(.p2-inline):not(.inline-status){display:flex;flex-direction:column;gap:12px}
.ajax-form .form-grid{width:100%}
.ajax-form:not(.p2-inline) > label:not(.checkbox-label){margin:0!important}
.ajax-form button[type=submit]{align-self:flex-start}
.auth-card .ajax-form button.full{align-self:stretch}
.checkbox-label{font-weight:400!important;font-size:12px!important}
.btn{font-weight:500!important;font-size:12px}
.kpi-card strong,.p2-mini>strong{font-weight:600!important}
.p3-member-head{display:flex;align-items:flex-start;gap:15px;border:1px solid var(--p3-border);background:linear-gradient(112deg,#fff,#f5faf6);border-radius:17px;padding:17px 19px;margin-bottom:13px;box-shadow:0 7px 25px #1a402b08}
.p3-member-photo{flex:0 0 auto}
.p3-member-photo button{border:0;background:none;position:relative;padding:0;cursor:pointer;display:block}
.p3-avatar{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;background:#dae9df;color:#315b49;font-size:18px;font-weight:600}
.p3-avatar img{height:100%;width:100%;object-fit:cover}
.p3-main-avatar{width:72px;height:72px;font-size:29px}
.p3-camera{position:absolute;right:-3px;bottom:0;display:flex;align-items:center;justify-content:center;width:25px;height:25px;background:var(--green);color:white;border-radius:50%;border:3px solid white;font-size:12px}
.p3-member-info{flex:1;min-width:0}
.p3-member-info h2{font-size:19px!important;margin:0 0 3px!important;line-height:1.2}
.p3-member-code{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--p3-muted);font-weight:500;margin-bottom:7px}
.p3-contact{display:flex;flex-wrap:wrap;column-gap:17px;row-gap:3px;font-size:12px;color:#5b7264;overflow-wrap:anywhere}
.p3-rank{display:flex;align-items:center;gap:7px;margin-top:8px;font-size:11px;color:#6a786d}
.p3-rank b{background:#edf5eb;color:#24533b;padding:3px 9px;border-radius:99px;font-size:11px;font-weight:600}
.p3-edit-link{flex:0 0 auto;white-space:nowrap}
.p3-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 13px}
.p3-stat{background:#fff;border:1px solid var(--p3-border);border-radius:14px;min-height:94px;display:flex;flex-direction:column;justify-content:center;padding:15px 14px;text-decoration:none;color:inherit;box-shadow:0 5px 25px #0b4c2010}
.p3-stat>span{font-size:11px;font-weight:500;color:#64796e}
.p3-stat>strong{font-size:clamp(17px,1.7vw,23px);font-weight:600;line-height:1.35;letter-spacing:-.04em;color:#174637;margin:4px 0}
.p3-stat>small{font-size:10.5px;color:#698175}
.p3-dashboard-lower{display:grid;grid-template-columns:1.25fr 1fr;gap:13px}
.p3-dashboard-lower .dash-panel{margin:0}
.p3-ref-input{display:flex;gap:7px;align-items:center;margin-bottom:9px}
.p3-ref-input input{min-width:0;width:100%;border:1px solid #d8e7dc;border-radius:8px;height:38px;padding:7px 10px;font-size:12px;color:#315142;background:#f8faf8}
.p3-ref-input button{flex:0 0 auto}
.p3-ref-buttons{display:flex;gap:8px;margin-top:10px}
.p3-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.p3-quick-grid a{padding:12px;background:#f6faf6;border:1px solid #e5eee5;border-radius:10px;text-decoration:none;font-size:12px;color:#2e5140;font-weight:500}
.p3-quick-grid a:hover{border-color:#83b99c}
.p3-profile-top{display:flex;align-items:center;gap:13px;margin-bottom:15px}
.p3-profile-top h2{margin:0 0 5px;font-size:17px}
.p3-profile-avatar{width:64px;height:64px}
.p3-photo-dialog{border:1px solid #dbe8dc;border-radius:18px;width:min(410px,calc(100vw - 25px));padding:20px;background:white;box-shadow:0 28px 80px #071e1855;color:#293c30}
.p3-photo-dialog::backdrop{background:#0a1f1c9e}
.p3-dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.p3-dialog-heading h2{font-size:17px;font-weight:600;margin:0}
.p3-photo-center{display:flex;justify-content:center;padding:8px;background:#f7faf6;border-radius:12px}
#p3-crop-canvas{display:block;border-radius:50%;width:min(270px,75vw);height:min(270px,75vw);object-fit:cover;border:4px solid #fff;touch-action:none;cursor:grab}
.p3-photo-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.p3-photo-file,.p3-zoom{font-size:12px;font-weight:500;color:#4e6757;margin:0}
.p3-photo-file input{font-size:11px;display:block;width:100%;margin-top:4px}
.p3-zoom input{display:block;width:100%;margin-top:8px;accent-color:#266249}
.p3-photo-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:17px;flex-wrap:wrap}
.p3-photo-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:980px){.p3-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.p3-dashboard-lower{grid-template-columns:1fr}}
@media(max-width:580px){.dashboard-content{padding:13px 11px!important}.dashboard-body .dash-panel{padding:13px}.p3-member-head{padding:13px;gap:10px;border-radius:14px;flex-wrap:wrap}.p3-main-avatar{width:56px;height:56px;font-size:22px}.p3-member-info h2{font-size:16px!important}.p3-contact{gap:2px 11px;font-size:11px}.p3-edit-link{margin-left:auto}.p3-stats{gap:8px}.p3-stat{min-height:85px;padding:11px;border-radius:12px}.p3-stat>strong{font-size:18px}.p3-ref-input .btn{font-size:11px;padding:8px}.p3-quick-grid a{padding:9px}.p3-photo-dialog{padding:14px}}
