/* Farm Mtaani · approved dashboard and mobile experience */
:root{--fm2-green:#1b5036;--fm2-paper:#fffdf8;--fm2-cream:#f7f2e9;--fm2-border:#e3ded4;--fm2-ink:#29332b;--fm2-muted:#6b746b;--fm2-tangerine:#b76b3a}
body{overflow-x:clip}
body.fm-refined,body.fm-editorial{--green:#1b5036;--green-2:#24583c}
body .navbar .nav-logo::before{background-image:url('/assets/farm-mtaani-mark.svg?v=4')!important;background-color:#fffdf8!important;background-size:cover!important;border-radius:9px!important;box-shadow:none!important}
body.fm-refined .navbar .nav-logo{gap:9px!important;white-space:nowrap!important}
body.fm-refined .dash-layout{max-width:1510px;column-gap:24px}
body.fm-refined .dash-sidebar{background:#173f30!important;color:#f8f8f0;border:none;box-shadow:none}
body.fm-refined .dash-sidebar h3,body.fm-refined .sidebar-user-role{color:#bdd4c7!important}
body.fm-refined .sidebar-nav button{color:#f0f7f2!important}
body.fm-refined .sidebar-nav button.active{background:#316348!important;color:#fff!important}
body.fm-refined .sidebar-nav button:hover{background:#285540!important;color:#fff!important}
body.fm-refined .sidebar-user-pill{background:#214b39!important;border:1px solid #3c6753!important;color:#fff!important}
body.fm-refined .sidebar-user-name,body.fm-refined .sidebar-footer{color:#fff}
body.fm-refined .sidebar-logout-btn,body.fm-refined .sidebar-nav-shortcut{color:#f2f8f4!important;border-color:#628272!important}
body.fm-refined .dash-main{min-width:0}
body.fm-refined .dash-section{min-width:0}
body.fm-refined .dash-header{display:block;box-shadow:none;overflow:hidden}
body.fm-refined .dash-header-top{gap:16px;flex-wrap:wrap}
body.fm-refined .dash-header-actions{display:flex;flex-wrap:wrap}
body.fm-refined .dash-header h1{line-height:1.22}
body.fm-refined .card{margin-bottom:20px}
body.fm-refined .analytics-grid,body.fm-refined .stats-row{grid-template-columns:repeat(auto-fit,minmax(155px,1fr))!important;gap:12px}
body.fm-refined .card-body{min-width:0}
body.fm-refined .dash-section h2:not(.modal h2){font-family:'Fraunces',Georgia,serif!important;font-weight:600!important;letter-spacing:-.03em}
body.fm-refined #farmer-overview>.card .card-body,body.fm-refined #customer-overview>.card .card-body{padding:10px 17px 14px}

/* The actual produce thumbnail is preferred, never a generic package for active orders */
body.fm-refined .fm-order-row{display:grid;grid-template-columns:78px minmax(0,1fr) auto;gap:15px;align-items:center;background:#fffdf9;border:1px solid var(--line);padding:13px;margin-bottom:10px;border-radius:10px;min-width:0;box-shadow:0 1px 2px rgba(22,52,32,.025)}
body.fm-refined .fm-order-row:hover{border-color:#bdcdbb;background:#fff}
body.fm-refined .fm-order-media{width:78px;height:78px;display:grid;place-items:center;background:#eef1e7;color:#214e37;border-radius:7px;overflow:hidden;flex-shrink:0;font-size:2.1rem}
body.fm-refined .fm-order-media img{height:100%;width:100%;object-fit:cover;display:block}
body.fm-refined .fm-order-info{min-width:0}
body.fm-refined .fm-order-info h3{font-family:'IBM Plex Sans',Arial,sans-serif;font-size:.97rem;font-weight:700;letter-spacing:0;color:var(--text);line-height:1.35;margin-bottom:4px;overflow-wrap:anywhere}
body.fm-refined .fm-order-info p{font-size:.81rem;color:var(--muted);line-height:1.42;margin:2px 0;overflow-wrap:anywhere}
body.fm-refined .fm-order-info time{display:block;font-size:.77rem;color:#7b8479;margin-top:6px}
body.fm-refined .fm-order-side{align-self:center;display:flex;flex-direction:column;align-items:flex-end;gap:9px;min-width:120px}
body.fm-refined .fm-status{display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;line-height:1.3;font-weight:700;border-radius:5px;padding:5px 10px;white-space:nowrap;color:#23432d;background:#e3efe6}
body.fm-refined .fm-status-pending{background:#fff0cf;color:#98601f}
body.fm-refined .fm-status-approved{background:#daeddc;color:#245c32}
body.fm-refined .fm-status-delivered{background:#d5eadd;color:#184f33}
body.fm-refined .fm-status-rejected,body.fm-refined .fm-status-cancelled{background:#fbe5e4;color:#a4443b}
body.fm-refined .fm-action-button{font-family:'IBM Plex Sans',Arial,sans-serif;background:#fffefa;border:1px solid #8aaa93;color:#21543a;padding:8px 12px;min-height:35px;border-radius:5px;font-size:.78rem;font-weight:700;cursor:pointer;max-width:100%;transition:background .15s}
body.fm-refined .fm-action-button:hover{background:#edf3e9}
body.fm-refined .fm-action-button.primary{background:#214e37;border-color:#214e37;color:#fff}
body.fm-refined .fm-action-button.primary:hover{background:#153a28}
body.fm-refined .fm-action-button.danger{border-color:#ca8a82;color:#993d35}
body.fm-refined .fm-action-button:focus-visible{outline:3px solid #c18b54;outline-offset:2px}
body.fm-refined .fm-action-button:disabled{opacity:.4;cursor:not-allowed}
body.fm-refined .fm-order-row-actions{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:9px;align-items:center}
body.fm-refined .fm-empty-state{padding:32px 20px;text-align:center}
body.fm-refined .fm-empty-state h3{font:500 1.55rem/1.3 'Fraunces',Georgia,serif;margin-bottom:8px}
body.fm-refined .fm-empty-state p{color:var(--muted);max-width:460px;margin:auto;line-height:1.6;font-size:.88rem}
body.fm-refined .fm-empty-state button{margin-top:15px}

/* Detailed order card: no invented delivery fee or payment-confirmation data */
.fm-inspect-overlay[hidden]{display:none!important}
.fm-inspect-overlay{position:fixed;inset:0;z-index:6000;display:flex;align-items:center;justify-content:center;overflow:auto;padding:22px;background:rgba(12,27,17,.58)}
body.fm-modal-open{overflow:hidden}
.fm-inspect-panel{background:#fffdf8;color:#263329;width:min(100%,700px);max-height:min(90vh,870px);display:flex;flex-direction:column;overflow:hidden;border-radius:12px;border:1px solid #e0d9cb;box-shadow:0 16px 50px rgba(20,35,22,.15)}
.fm-inspect-top{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:18px 24px;border-bottom:1px solid #e3ded4}
.fm-inspect-top h2{font:600 1.6rem 'Fraunces',Georgia,serif;letter-spacing:-.03em}
.fm-icon-close{width:36px;height:36px;border-radius:5px;border:1px solid #e2ded4;background:#fffdf8;color:#283d30;cursor:pointer;font-size:1.5rem}
.fm-inspect-content{padding:24px;overflow-y:auto}
.fm-inspect-product{display:flex;align-items:center;gap:18px;border-bottom:1px solid #e6e0d5;padding-bottom:18px;margin-bottom:19px}
.fm-inspect-image{width:108px;height:108px;flex:0 0 108px;border-radius:8px;overflow:hidden;background:#ecf1e5;display:grid;place-items:center;font-size:3.2rem}
.fm-inspect-image img{width:100%;height:100%;object-fit:cover}
.fm-inspect-product h3{font:500 clamp(1.25rem,3vw,1.75rem) 'Fraunces',Georgia,serif;line-height:1.2;margin-bottom:5px}
.fm-inspect-product p{color:#687568;font-size:.9rem;margin-bottom:9px}
.fm-inspect-section>h3,.fm-inspect-note h3{font-weight:700;font-size:.96rem;margin-bottom:13px}
.fm-inspect-section dl{margin:0}
.fm-inspect-data-row{display:grid;grid-template-columns:minmax(105px,40%) minmax(0,1fr);gap:20px;padding:11px 0;border-bottom:1px solid #eee9e0}
.fm-inspect-data-row dt{font-size:.83rem;color:#6b746b}
.fm-inspect-data-row dd{font-size:.85rem;font-weight:600;overflow-wrap:anywhere}
.fm-inspect-note{background:#f4f2ea;border-radius:7px;padding:15px;margin-top:18px}
.fm-inspect-note p{font-size:.85rem;color:#58645b;line-height:1.6;overflow-wrap:anywhere}
.fm-inspect-footnote{margin-top:18px;color:#667369;font-size:.8rem;line-height:1.6}
.fm-inspect-actions{display:flex;flex-wrap:wrap;gap:9px;justify-content:flex-end;margin-top:22px}
.fm-order-preview{display:flex;align-items:center;gap:14px;margin:14px 0 20px;padding:13px;border:1px solid #e5ded2;border-radius:8px;background:#f7f4ec}
.fm-order-preview>img,.fm-order-preview>.fm-emoji-media{height:76px;width:76px;flex-shrink:0;object-fit:cover;border-radius:6px;background:#e3ebda;display:grid;place-items:center;font-size:2.1rem}
.fm-order-preview>div{min-width:0;display:flex;flex-direction:column;gap:5px}
.fm-order-preview strong{font-size:1rem;font-weight:700;overflow-wrap:anywhere}
.fm-order-preview span:not(.fm-emoji-media){font-size:.88rem;color:#235a38}
.fm-order-preview small{font-size:.76rem;color:#637066}
body.fm-refined #produce-detail-modal .modal{max-width:min(94vw,680px)!important}
body.fm-refined #produce-detail-modal .modal h2{line-height:1.25}
body.fm-refined #produce-detail-modal .gallery-main{width:100%;max-height:330px;object-fit:cover;border-radius:8px}
body.fm-refined #produce-detail-modal .gallery-thumbs{gap:8px}
body.fm-refined #order-modal .modal{max-width:min(94vw,570px)}
body.fm-refined .modal-overlay{overflow-y:auto}
body.fm-refined .modal-overlay .modal{max-height:92dvh;overflow-y:auto}

/* Useful notification experience with tabs and deliberate read controls */
body.fm-refined .fm-notif-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
body.fm-refined .fm-notif-tabs{display:flex;gap:5px;flex-wrap:wrap}
body.fm-refined .fm-notif-tabs button{border-radius:5px;border:1px solid #e1dbce;background:#fffefa;color:#4d5a50;font-size:.79rem;font-weight:600;cursor:pointer;padding:9px 13px}
body.fm-refined .fm-notif-tabs button.active{background:#214e37;color:#fff;border-color:#214e37}
body.fm-refined .fm-mark-all{border:none;background:transparent;color:#214e37;font-weight:700;font-size:.8rem;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
body.fm-refined .fm-notif-tools button:focus-visible{outline:3px solid #d2a575;outline-offset:2px}
body.fm-refined .fm-mark-all:disabled{opacity:.35;cursor:default}
body.fm-refined .notif-panel{padding:10px 15px}
body.fm-refined .fm-notification{display:flex;align-items:flex-start;gap:15px;border-bottom:1px solid #e8e4db;padding:17px 6px;min-width:0}
body.fm-refined .fm-notification:last-child{border-bottom:0}
body.fm-refined .fm-notification.unread{background:#f5f8f0}
body.fm-refined .fm-notif-symbol{width:42px;height:42px;flex:0 0 42px;background:#e6efe6;border-radius:8px;display:grid;place-items:center;font-weight:700;font-size:1.08rem;color:#1e5739}
body.fm-refined .fm-notif-symbol.fm-notif-order{background:#e8f0df}
body.fm-refined .fm-notif-symbol.fm-notif-warning,body.fm-refined .fm-notif-symbol.fm-notif-rejected{background:#fde4df;color:#983e36}
body.fm-refined .fm-notification-content{min-width:0;flex:1}
body.fm-refined .fm-notification h3{font-size:.91rem;font-weight:700;overflow-wrap:anywhere;margin-bottom:5px}
body.fm-refined .fm-notification p{font-size:.83rem;color:#657063;line-height:1.5;overflow-wrap:anywhere}
body.fm-refined .fm-notification time{display:block;color:#899185;margin-top:7px;font-size:.75rem}
body.fm-refined .fm-mark-single{background:none;border:1px solid #cad6c9;border-radius:5px;padding:7px 9px;color:#23583d;cursor:pointer;white-space:nowrap;font-size:.77rem}
body.fm-refined .fm-read-label{font-size:.74rem;color:#9a9e94}
body.fm-refined .fm-premium-badge{display:inline-flex;align-items:center;width:fit-content;color:#5c451a;background:#f5dfa9;font-weight:700;letter-spacing:.01em;font-size:.7rem;line-height:1.3;border-radius:4px;padding:5px 9px;margin:6px 0}
body.fm-refined #fm-premium-sidebar-badge{margin:5px 0 0 0}
body.fm-refined .fm-premium-notice{padding:16px 19px!important;border:1px solid #c9d8be!important;background:#f1f6ec!important;border-radius:9px!important;box-shadow:0 2px 10px rgba(10,40,12,.04)!important}
body.fm-refined .fm-premium-notice-content{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}
body.fm-refined .fm-premium-notice strong{font-size:.92rem;color:#264731}
body.fm-refined .fm-premium-notice p{font-size:.81rem;color:#55745a;margin-top:5px;line-height:1.55}
body.fm-refined .fm-premium-notice .fm-icon-close{flex-shrink:0}
body.fm-refined .premium-badge{background:#b46e38;border-radius:4px}

/* Cards, chat, earnings, ratings and all dashboard sections */
body.fm-refined .listings-grid{gap:16px}
body.fm-refined .produce-card{min-width:0;overflow:hidden}
body.fm-refined .produce-body{padding:16px}
body.fm-refined .produce-actions{gap:8px}
body.fm-refined .order-item{box-shadow:none}
body.fm-refined .chat-container,body.fm-refined .chat-main{min-width:0;overflow:hidden}
body.fm-refined .chat-sidebar{min-width:0}
body.fm-refined .chat-input-area{display:flex;min-width:0;gap:9px}
body.fm-refined .chat-input-wrap{min-width:0;flex:1}
body.fm-refined .chat-input-area textarea{max-width:100%}
body.fm-refined .chat-bubble,body.fm-refined .msg-bubble{overflow-wrap:anywhere}
body.fm-refined .form-grid{gap:14px}
body.fm-refined #farmer-add>.card,body.fm-refined #farmer-settings>.card{max-width:690px!important}
body.fm-refined .form-group{min-width:0}
body.fm-refined .form-group label{font-weight:600}
body.fm-refined .form-group input,body.fm-refined .form-group select,body.fm-refined .form-group textarea{max-width:100%}
body.fm-refined #farmer-earnings .stat-val{overflow-wrap:anywhere}
body.fm-refined #rate-farmers-list>div{background:var(--surface)!important;border-radius:9px!important;box-shadow:none!important;gap:14px!important;flex-wrap:wrap;padding:18px!important}
body.fm-refined #farmer-notifications .notif-panel,body.fm-refined #customer-notifications .notif-panel{border-radius:8px}
body.fm-refined #farmer-overview>.card,body.fm-refined #customer-overview>.card{min-width:0}
body.fm-refined #farmer-settings .btn,body.fm-refined #farmer-add .btn{min-height:40px}

/* Fit at every practical breakpoint */
@media(max-width:1080px){
 body.fm-refined .dash-layout{grid-template-columns:1fr!important}
 body.fm-refined .dash-sidebar{height:auto!important;position:static!important}
 body.fm-refined .sidebar-nav{overflow-x:auto;white-space:nowrap;display:flex!important}
}
@media(max-width:700px){
 body.fm-refined{padding-top:78px!important}
 body.fm-refined .navbar{height:62px!important}
 body.fm-refined .navbar .nav-logo{gap:6px;font-size:.96rem}
 body.fm-refined .navbar .nav-logo::before{width:32px!important;height:32px!important}
 body.fm-refined .dash-layout{padding:0 12px 30px;gap:12px}
 body.fm-refined .dash-header{padding:16px}
 body.fm-refined .dash-header-actions{width:100%}
 body.fm-refined .dash-header-actions button{flex:1 1 auto;min-width:0;white-space:normal}
 body.fm-refined #page-farmer-dash,body.fm-refined #page-customer-dash{padding-top:0!important}
 body.fm-refined .analytics-grid,body.fm-refined .stats-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
 body.fm-refined .stat-card,body.fm-refined .analytics-card{min-width:0;padding:12px!important}
 body.fm-refined .stat-val,body.fm-refined .analytics-card-value{font-size:clamp(1.35rem,5vw,1.8rem)!important;overflow-wrap:anywhere}
 body.fm-refined .stat-label,body.fm-refined .analytics-card-header h3{font-size:.7rem}
 body.fm-refined .card-header{gap:8px;flex-wrap:wrap}
 body.fm-refined .fm-order-row{grid-template-columns:61px minmax(0,1fr);gap:10px;padding:10px}
 body.fm-refined .fm-order-media{height:61px;width:61px;font-size:1.5rem}
 body.fm-refined .fm-order-info h3{font-size:.9rem}
 body.fm-refined .fm-order-info p{font-size:.76rem}
 body.fm-refined .fm-order-info time{font-size:.72rem}
 body.fm-refined .fm-order-side{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center;gap:8px;width:100%}
 body.fm-refined .fm-order-row-actions{grid-column:1/-1}
 body.fm-refined .fm-order-row-actions>*{flex:1 1 auto}
 body.fm-refined .fm-notif-tools{align-items:flex-start;gap:10px}
 body.fm-refined .fm-notif-tabs{width:100%;overflow:auto;flex-wrap:nowrap;padding-bottom:3px}
 body.fm-refined .fm-notif-tabs button{flex-shrink:0;padding:8px 11px}
 body.fm-refined .fm-notification{gap:9px}
 body.fm-refined .fm-notif-symbol{width:34px;height:34px;flex-basis:34px;font-size:.9rem}
 body.fm-refined .fm-mark-single{padding:6px}
 body.fm-refined .chat-container{grid-template-columns:1fr!important;min-height:unset}
 body.fm-refined .chat-sidebar{max-height:200px!important;overflow-y:auto;border-right:0}
 body.fm-refined .chat-main{min-height:340px}
 body.fm-refined .send-btn{width:40px;height:40px}
 body.fm-refined .quick-replies{overflow-x:auto;flex-wrap:nowrap}
 body.fm-refined .quick-reply-btn{flex:0 0 auto}
 body.fm-refined .modal-overlay{padding:0;align-items:flex-end}
 body.fm-refined .modal-overlay .modal{width:100%;max-width:100vw!important;max-height:min(93dvh,900px);padding:18px;border-radius:15px 15px 0 0}
 .fm-inspect-overlay{padding:0;align-items:flex-end}
 .fm-inspect-panel{border-radius:16px 16px 0 0;width:100%;max-height:92dvh}
 .fm-inspect-top{padding:16px 18px}
 .fm-inspect-content{padding:18px}
 .fm-inspect-image{width:84px;height:84px;flex-basis:84px}
 .fm-inspect-data-row{grid-template-columns:112px minmax(0,1fr);gap:10px}
 .fm-inspect-actions{justify-content:stretch}
 .fm-inspect-actions .fm-action-button{flex:1 1 auto}
 body.fm-refined .produce-actions{flex-wrap:wrap!important}
 body.fm-refined .produce-actions .btn{flex:1 1 100%!important}
 body.fm-refined .produce-actions .btn:not(.btn-primary){flex:1 1 auto!important}
}
@media(max-width:375px){
 body.fm-refined .nav-logo{font-size:.84rem!important}
 body.fm-refined .nav-links{gap:4px!important}
 body.fm-refined .btn-logout{font-size:.7rem!important}
 body.fm-refined .stats-row,body.fm-refined .analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.fm-refined .fm-order-row{grid-template-columns:54px minmax(0,1fr)}
 body.fm-refined .fm-order-media{width:54px;height:54px}
 .fm-inspect-data-row{grid-template-columns:1fr;gap:3px}
}
@media(prefers-reduced-motion:reduce){body.fm-refined *,body.fm-editorial *{animation-duration:0.01ms!important;transition-duration:0.01ms!important}}


/* Customer account settings and two-step account deletion dialog */
body.fm-refined .fm-settings-intro{margin:4px 0 22px}
body.fm-refined .fm-settings-intro h2{font:600 clamp(1.6rem,3vw,2.15rem) 'Fraunces',Georgia,serif;letter-spacing:-.04em}
body.fm-refined .fm-settings-intro p{font-size:.9rem;color:var(--muted);margin-top:9px}
body.fm-refined .fm-settings-card{max-width:720px}
body.fm-refined .fm-settings-card .card-body{padding:23px}
body.fm-refined .fm-settings-card .form-group{max-width:520px}
body.fm-refined .fm-settings-hint{font-size:.8rem;color:var(--muted);line-height:1.6;margin:-5px 0 20px}
body.fm-refined .fm-settings-danger{max-width:720px;margin-top:25px;border:1px solid #e6c6bf;background:#fffaf7}
body.fm-refined .fm-settings-danger .card-body{padding:22px}
body.fm-refined .fm-settings-danger p{font-size:.88rem;line-height:1.7;color:#6d5d55;max-width:590px;margin-bottom:17px}
body.fm-refined .fm-danger-settings{border-top:1px solid #e9c4b9;margin-top:27px;padding:22px 0 3px}
body.fm-refined .fm-danger-settings h4{font:600 1.2rem 'Fraunces',Georgia,serif;color:#904137;margin-bottom:9px}
body.fm-refined .fm-danger-settings p{color:#665e59;font-size:.87rem;line-height:1.7;margin-bottom:16px}
.fm-delete-panel{width:min(100%,510px);max-height:90dvh;overflow-y:auto;border-radius:13px;background:#fffdf8;color:#27332b;box-shadow:0 16px 45px rgba(20,40,24,.17)}
.fm-delete-body{padding:23px}
.fm-delete-body p{font-size:.9rem;line-height:1.7;color:#606e63;margin-bottom:20px}
.fm-delete-body label{display:block;font-size:.85rem;font-weight:600;margin-bottom:10px}
.fm-delete-body input{width:100%;border:1px solid #d6cabc;border-radius:6px;padding:13px 14px;font:600 1rem 'IBM Plex Sans',Arial,sans-serif;background:#fff}
.fm-delete-body input:focus{outline:3px solid #e2bba2}
.fm-delete-body .fm-delete-note{color:#a43e35;font-weight:600;font-size:.8rem;min-height:16px;margin:11px 0}
.fm-delete-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.fm-delete-actions .fm-action-button.danger{background:#a8433a;color:#fff;border-color:#a8433a}
.fm-delete-actions .fm-action-button.danger:hover{background:#8c312a}
@media(max-width:700px){body.fm-refined .fm-settings-card .card-body,body.fm-refined .fm-settings-danger .card-body{padding:16px}.fm-delete-panel{width:100%;border-radius:15px 15px 0 0;max-height:92dvh}.fm-delete-body{padding:18px}.fm-delete-actions .fm-action-button{flex:1 1 auto}}
