/* Farm Mtaani · Password visibility, farmer avatar and unobtrusive Premium status. */
.fm-password-wrap{position:relative;width:100%;min-width:0;display:flex;align-items:center}
.fm-password-wrap > input{display:block;flex:1;min-width:0;width:100%;padding-right:52px!important}
.fm-password-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:2;display:grid;place-items:center;width:43px;height:42px;border:0;border-radius:6px;background:transparent;color:#365a43;cursor:pointer;box-shadow:none!important;touch-action:manipulation}
.fm-password-toggle svg{height:20px;width:20px;pointer-events:none}
.fm-password-toggle:hover{background:#e9eee6;color:#18492e}
.fm-password-toggle:focus-visible{outline:3px solid #c99e5d;outline-offset:1px}
.fm-password-wrap input:focus + .fm-password-toggle{color:#214e37}
.fm-profile-photo-setting{border:1px solid #e1ded3;border-radius:10px;padding:19px;margin:0 0 22px;background:#f8f7f2}
.fm-profile-photo-setting h4{font-family:'Fraunces',Georgia,serif;font-size:1.28rem;line-height:1.25;letter-spacing:-.02em;color:#213c2a;font-weight:600;margin:0 0 8px}
.fm-profile-photo-desc{font-size:.84rem;color:#657067;line-height:1.65;margin:0 0 16px;max-width:520px}
.fm-profile-photo-row{display:flex;gap:17px;align-items:center;min-width:0}
.fm-profile-photo-preview{height:94px;width:94px;flex:0 0 94px;display:grid;place-items:center;border-radius:12px;background:#e8f0e5;border:2px solid #c9d9c9;color:#1c4b30;font:600 1.65rem 'Fraunces',Georgia,serif;overflow:hidden;box-shadow:none}
.fm-profile-photo-preview .fm-avatar-picture,.sidebar-user-avatar .fm-avatar-picture,.nav-avatar-sm .fm-avatar-picture{display:block;height:100%;width:100%;object-fit:cover;object-position:center}
.fm-profile-photo-controls{display:flex;flex-wrap:wrap;align-items:center;gap:9px;min-width:0;flex:1}
.fm-profile-photo-controls .btn{border-radius:6px!important;min-height:39px;white-space:nowrap;padding:8px 13px!important}
.fm-profile-photo-controls .btn:disabled{opacity:.4;cursor:not-allowed}
.fm-profile-photo-hint{width:100%;margin:2px 0 0;color:#718071;font-size:.75rem;line-height:1.5}
.fm-profile-photo-status{font-size:.83rem;margin:10px 0 0;color:#546b58;line-height:1.5;min-height:1.3em}
.fm-profile-photo-status[data-kind="error"]{color:#a23831}
.fm-profile-photo-status[data-kind="success"]{color:#226b38}
.fm-profile-photo-file{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.fm-refined .sidebar-user-avatar,body.fm-refined .nav-avatar-sm,
body.fm-editorial .nav-avatar-sm{overflow:hidden;display:grid;place-items:center;flex-shrink:0}
body.fm-refined .sidebar-user-name{display:inline!important;vertical-align:middle}
body.fm-refined .fm-premium-star{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;margin-left:6px;line-height:1;flex-shrink:0;filter:drop-shadow(0 1px 2px rgba(68,43,12,.18))}
body.fm-refined .fm-premium-star svg{height:21px;width:21px}
body.fm-refined #fm-premium-header-badge{display:inline-flex;align-items:center;max-width:fit-content;border:1px solid #d4b879;border-radius:5px;background:#f9f0d7;color:#74541e;padding:5px 9px;font-size:.73rem;font-weight:700;margin:9px 0 0}
body.fm-refined #farmer-premium-box{display:none!important}
body.fm-refined .fm-premium-notice{display:none!important}
@media(max-width:600px){
 .fm-profile-photo-setting{padding:14px;margin-bottom:18px}
 .fm-profile-photo-row{align-items:flex-start;gap:12px}
 .fm-profile-photo-preview{width:70px;height:70px;flex-basis:70px}
 .fm-profile-photo-controls{gap:7px}
 .fm-profile-photo-controls .btn{font-size:.77rem!important;min-height:37px}
 .fm-profile-photo-hint{font-size:.72rem}
 .fm-password-toggle{width:45px;height:44px}
}
@media(max-width:360px){
 .fm-profile-photo-row{flex-wrap:wrap}
 .fm-profile-photo-controls{flex:1 1 100%}
}

/* Profile photo editor: polished crop sheet, mobile safe, no external editor dependency. */
body .fm-profile-photo-thumb{position:relative;flex:0 0 94px;width:94px;height:94px}
body .fm-profile-photo-thumb .fm-profile-photo-preview{width:100%;height:100%;border-radius:50%;box-sizing:border-box}
body .fm-avatar-edit-badge{position:absolute;bottom:-3px;right:-4px;width:34px;height:34px;display:grid;place-items:center;background:#214e37;color:#fff;border:2px solid #f8f7f2;border-radius:50%;cursor:pointer;box-shadow:0 2px 5px rgba(19,50,27,.15)}
body .fm-avatar-edit-badge:hover{background:#32694b}
body .fm-avatar-edit-badge:focus-visible{outline:3px solid #cb9b54;outline-offset:3px}
body .fm-avatar-editor[hidden]{display:none!important}
body .fm-avatar-editor{position:fixed;inset:0;z-index:100100;display:flex;align-items:center;justify-content:center;overflow-y:auto;background:rgba(15,34,22,.72);padding:20px}
body.fm-crop-dialog-open{overflow:hidden}
body .fm-avatar-editor-window{width:min(100%,490px);max-height:min(94dvh,810px);overflow:auto;overscroll-behavior:contain;background:#fffdf8;border:1px solid #dedbcf;border-radius:14px;padding:24px;box-shadow:0 18px 60px rgba(15,39,24,.2);color:#253829}
body .fm-avatar-editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body .fm-avatar-editor-heading h2{font:600 clamp(1.6rem,3vw,1.95rem)/1.2 'Fraunces',Georgia,serif;letter-spacing:-.03em;color:#214e37;margin-top:5px}
body .fm-editor-kicker{color:#9a704a;text-transform:uppercase;letter-spacing:.16em;font-weight:700;font-size:.64rem}
body .fm-crop-close{display:grid;place-items:center;min-width:36px;height:36px;background:#fffdf8;border:1px solid #e0ddd3;border-radius:6px;color:#435547;font-size:1.5rem;cursor:pointer}
body .fm-crop-close:hover{background:#f0f3ea}
body .fm-editor-help{font-size:.87rem;line-height:1.6;color:#667567;margin:11px 0 17px}
body .fm-avatar-canvas-shell{width:min(100%,340px);margin:0 auto;aspect-ratio:1;background:#e9e8df;border-radius:10px;overflow:hidden;border:1px solid #dae1d5;box-shadow:inset 0 0 0 1px #fff}
body #fm-avatar-crop-canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab;outline-offset:-4px}
body #fm-avatar-crop-canvas:active{cursor:grabbing}
body #fm-avatar-crop-canvas:focus-visible{outline:3px solid #bd9057}
body .fm-avatar-zoom-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:23px 0 15px}
body .fm-avatar-zoom-row label{font-size:.81rem;color:#425e49;font-weight:700}
body #fm-avatar-crop-zoom{min-width:0;width:100%;accent-color:#214e37;cursor:pointer;height:24px}
body #fm-avatar-zoom-percent{font-variant-numeric:tabular-nums;color:#607064;min-width:37px;font-size:.78rem;text-align:right}
body .fm-avatar-crop-status{font-size:.82rem;line-height:1.5;color:#557258;min-height:1.4em;margin-bottom:10px}
body .fm-avatar-crop-status[data-kind="error"]{color:#a63c31;font-weight:600}
body .fm-avatar-editor-actions{display:flex;gap:12px;justify-content:flex-end;padding-top:14px;border-top:1px solid #e9e6dc}
body .fm-avatar-editor-actions .btn{border-radius:6px!important;min-height:43px;padding:10px 17px!important;font-weight:700!important}
body .fm-avatar-editor-actions .btn:focus-visible{outline:3px solid #bd9057;outline-offset:2px}
body .fm-avatar-editor-actions .btn:disabled{opacity:.55;cursor:wait}
@media(max-width:600px){
 body .fm-profile-photo-thumb{width:72px;height:72px;flex-basis:72px}
 body .fm-avatar-edit-badge{height:31px;width:31px;right:-4px;bottom:-6px}
 body .fm-avatar-editor{padding:0;align-items:flex-end}
 body .fm-avatar-editor-window{width:100%;max-height:94dvh;padding:20px 18px max(22px,env(safe-area-inset-bottom));border-radius:16px 16px 0 0}
 body .fm-editor-help{margin:9px 0 13px}
 body .fm-avatar-canvas-shell{width:min(100%,min(340px,calc(94dvh - 295px)));min-width:min(100%,210px)}
 body .fm-avatar-zoom-row{margin:15px 0 11px}
 body .fm-avatar-editor-actions{gap:10px}
 body .fm-avatar-editor-actions .btn{flex:1;min-width:0;white-space:normal}
}
@media(max-height:580px){
 body .fm-avatar-editor-window{max-height:95dvh}
 body .fm-avatar-canvas-shell{width:min(100%,230px)}
}