/* Farm Mtaani | Marketplace + dashboard visual refresh. No application behaviour here. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* All pages: shared logo and favicon visual language */
body .nav-logo::before {
  content:"" !important;
  background:#fffdf8 url('/assets/farm-mtaani-mark.svg') center/cover no-repeat !important;
  width:43px !important;height:43px !important;
  display:block !important;flex-shrink:0 !important;
  border:1px solid #dfdbcf !important;border-radius:6px !important;
  box-shadow:none !important;color:transparent !important;font-size:0 !important;
}
body .nav-logo {letter-spacing:-.035em !important}
body .nav-logo span {color:#214e37 !important}
body.fm-editorial .nav-logo{gap:10px}
body.fm-editorial .nav-logo::before{width:40px!important;height:40px!important}
body.fm-editorial .nav-links a:focus-visible{outline:2px solid #ad714b;outline-offset:3px}

/* Scoped palette; redesign does not touch homepage structure. */
body.fm-refined {
  --bg:#f6f2e9;--bg-soft:#efebe2;--surface:#fffdf8;--surface-2:#fffdf8;--surface-3:#f4f0e7;
  --text:#253229;--muted:#657064;--line:#dcd7ca;--line-strong:#c8c3b8;
  --green:#214e37;--green-2:#214e37;--green-3:#35764f;--green-4:#e4eee3;
  --amber:#a56c43;--amber-2:#b37c51;--amber-3:#f4e9da;
  --red:#a63a37;--red-2:#f9efeb;
  --shadow:0 1px 2px rgba(20,40,25,.04);--shadow-lg:0 5px 20px rgba(20,40,25,.08);
  --radius:12px;--radius-md:10px;--radius-sm:6px;
  background:var(--bg) !important;background-image:none!important;
  font-family:'IBM Plex Sans',system-ui,sans-serif;color:var(--text);
  padding-top:89px!important;
}
body.fm-refined button,body.fm-refined input,body.fm-refined select,body.fm-refined textarea{font-family:inherit}
body.fm-refined :is(a,button,input,textarea,select,[tabindex]):focus-visible{outline:3px solid #b57b4c;outline-offset:2px}
body.fm-refined .navbar {
 position:fixed;top:0!important;left:0!important;right:0!important;width:100%;
 height:73px!important;border-radius:0!important;background:var(--surface);
 border:0!important;border-bottom:1px solid var(--line)!important;box-shadow:none!important;
 backdrop-filter:none!important;padding:0 clamp(18px,4vw,66px)!important;
}
body.fm-refined .nav-logo{font-size:1.14rem;font-weight:700;color:var(--text)}
body.fm-refined .nav-links{gap:12px}
body.fm-refined .nav-links a{font-size:.87rem;color:var(--green);font-weight:600}
body.fm-refined .nav-avatar-sm,body.fm-refined .sidebar-user-avatar{background:var(--green);border-radius:5px;box-shadow:none}
body.fm-refined .nav-user-pill{border-radius:6px;border:1px solid var(--line);background:transparent}
body.fm-refined :is(.btn,.btn-sm,.btn-logout,.dash-logout-btn,.sidebar-logout-btn,.sidebar-nav-shortcut) {
 border-radius:6px!important;box-shadow:none!important;transform:none!important;
 transition:background-color .16s,color .16s,border-color .16s;font-weight:600;
}
body.fm-refined .btn-primary{background:var(--green);color:#fff;border-color:var(--green)}
body.fm-refined .btn-primary:hover{background:#153e2a}
body.fm-refined .btn-outline{background:transparent;color:var(--green);border-color:var(--line-strong)}
body.fm-refined .btn-outline:hover{background:var(--bg-soft)}
body.fm-refined .btn-amber{background:var(--amber);box-shadow:none;color:#fff}
body.fm-refined .btn-amber:hover{background:#845134}
body.fm-refined .btn-danger{background:var(--red);color:#fff}
body.fm-refined .btn-ghost{background:var(--surface-3);color:var(--text);border-color:var(--line)}
body.fm-refined :is(h1,h2,.dash-header h1,.section-title,.stat-val,.modal h2,.empty-state h3){
 font-family:'Fraunces',Georgia,serif;letter-spacing:-.035em;
}
body.fm-refined :is(.card,.stat-card,.notif-panel,.chat-container,.produce-card,.analytics-card,.dash-header,.dash-sidebar,.premium-section) {
 background:var(--surface);background-image:none;border:1px solid var(--line);border-radius:12px;box-shadow:none;
}
body.fm-refined .analytics-card::before{background:none}
body.fm-refined .analytics-card:hover,body.fm-refined .produce-card:hover{transform:none;box-shadow:0 3px 12px rgba(30,60,41,.06);border-color:var(--line-strong)}
body.fm-refined .card-header{border-bottom:1px solid var(--line);padding:1.12rem 1.35rem}
body.fm-refined .card-header h3{font-weight:600;font-size:1.03rem}
body.fm-refined .card-body{padding:1.1rem 1.3rem}
body.fm-refined .empty-state{padding:2.2rem 1rem}
body.fm-refined .empty-state .es-icon{font-size:1.7rem;opacity:.45}
body.fm-refined .empty-state h3{font-weight:500;font-size:1.44rem}
body.fm-refined .empty-state p{line-height:1.6}
body.fm-refined :is(.modal,.install-modal-box){
 background:var(--surface);background-image:none;border:1px solid var(--line);
 border-radius:12px;box-shadow:0 9px 35px rgba(20,30,20,.13);
}
body.fm-refined .modal-close{border-radius:6px;background:var(--surface);box-shadow:none!important}
body.fm-refined .modal-tabs{border-radius:6px;background:var(--bg-soft)}
body.fm-refined .modal-tab,body.fm-refined .role-tab{border-radius:5px}
body.fm-refined :is(.form-group input,.form-group textarea,.form-group select){
 background:#fffefa;border:1px solid var(--line-strong);border-radius:6px;
}
body.fm-refined :is(.form-group input,.form-group textarea,.form-group select):focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(33,78,55,.10)}
body.fm-refined .toast{border-radius:8px;box-shadow:var(--shadow-lg);background:var(--surface)}

/* Marketplace: editorial page intro, functional filters and compact produce cards */
body.fm-refined .listings-header{max-width:1320px;padding:24px 25px 0}
body.fm-refined .listings-header h1{
 color:var(--text);background:transparent;background-image:none;box-shadow:none;border:0;
 border-bottom:1px solid var(--line);border-radius:0!important;
 padding:35px 0 31px!important;font-size:clamp(2rem,4vw,3.45rem)!important;line-height:1.18;
 align-items:end;
}
body.fm-refined .listings-header-content{font-weight:500}
body.fm-refined .listings-header-content>div:first-child{color:var(--green)!important;font-family:'IBM Plex Sans',sans-serif}
body.fm-refined .listings-header-content>div:last-child{color:var(--muted);font:400 .99rem/1.5 'IBM Plex Sans',sans-serif!important;margin-top:12px!important}
body.fm-refined .listings-header-actions #listings-username{color:var(--text)!important}
body.fm-refined .listings-header-actions .btn{background:transparent!important;color:var(--green)!important;border:1px solid var(--line)!important}
body.fm-refined .listings-controls,body.fm-refined .listings-body{max-width:1320px}
body.fm-refined .listings-controls{padding:19px 25px!important;margin-top:0;gap:12px;align-items:stretch}
body.fm-refined .listings-controls > * {
 border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);
 box-shadow:none;
}
body.fm-refined .listings-controls .search-box{flex:1 1 300px;min-width:195px}
body.fm-refined .search-box input{padding:.87rem 1rem .87rem 2.8rem;border-radius:6px}
body.fm-refined .filter-select{border:1px solid var(--line-strong)!important;border-radius:6px!important;padding:.82rem 1rem;background:var(--surface)}
body.fm-refined .listings-controls #sell-btn-top{background:var(--green);border-color:var(--green);color:#fff;align-self:stretch;padding:0 18px}
body.fm-refined .listings-body{padding:10px 25px 70px}
body.fm-refined .listings-grid{grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:17px}
body.fm-refined .produce-card{overflow:hidden;position:relative}
body.fm-refined .produce-img{height:205px;background:#e6e8df}
body.fm-refined .produce-body{padding:16px 16px 10px}
body.fm-refined .produce-name{font:500 1.28rem/1.25 'Fraunces',Georgia,serif;letter-spacing:-.025em}
body.fm-refined .produce-farmer{font-size:.81rem;color:var(--muted);line-height:1.55}
body.fm-refined .produce-price{font-size:1.03rem;color:var(--text);font-weight:700}
body.fm-refined .produce-price span{font-size:.77rem;color:var(--muted)}
body.fm-refined .produce-meta{margin-top:13px;gap:8px}
body.fm-refined .produce-actions{padding:5px 16px 17px;gap:7px!important}
body.fm-refined .produce-actions .btn{border-radius:5px!important;min-height:35px!important}
body.fm-refined .produce-actions .btn-primary{font-size:.82rem!important;background:var(--green)!important}
body.fm-refined .produce-actions .btn:not(.btn-primary){font-size:.72rem!important;padding:7px 8px!important;border-radius:5px!important}
body.fm-refined .organic-badge,body.fm-refined .premium-badge{border-radius:4px;background:var(--green);padding:5px 8px}
body.fm-refined .premium-badge{background:var(--amber)}
body.fm-refined .gallery-main{border-radius:6px}
body.fm-refined .gallery-thumb{border-radius:5px}

/* Dashboards: purposeful dense operational surfaces */
body.fm-refined .dash-layout{max-width:1380px;grid-template-columns:245px minmax(0,1fr);gap:22px;padding:10px 24px 54px}
body.fm-refined .dash-sidebar{top:90px;height:calc(100vh - 110px);padding:16px;overflow:auto}
body.fm-refined .dash-sidebar h3{font-size:.70rem;letter-spacing:.13em;color:var(--muted);padding:5px 9px 17px}
body.fm-refined .sidebar-nav{gap:3px}
body.fm-refined .sidebar-nav button{
 font-size:.88rem;font-weight:500;text-align:left;padding:11px 12px;border-radius:5px;
 background:transparent;color:var(--text);box-shadow:none!important;border:none;
}
body.fm-refined .sidebar-nav button:hover{background:var(--bg-soft)}
body.fm-refined .sidebar-nav button.active{background:var(--green);color:#fff;box-shadow:none!important}
body.fm-refined .sidebar-badge{border-radius:3px;background:var(--amber);padding:3px 5px}
body.fm-refined .sidebar-user-pill{background:var(--bg-soft);border:1px solid var(--line);border-radius:7px}
body.fm-refined .dash-header{padding:24px 28px;margin-bottom:20px}
body.fm-refined .dash-header h1{font-size:clamp(1.75rem,2.8vw,2.45rem);font-weight:500}
body.fm-refined .dash-breadcrumb{font-size:.72rem;letter-spacing:.015em;margin-bottom:10px}
body.fm-refined .dash-header-actions{gap:8px}
body.fm-refined .stats-row,body.fm-refined .analytics-grid{gap:13px;margin-bottom:19px}
body.fm-refined :is(.stat-card,.analytics-card){padding:19px 20px!important;overflow:hidden}
body.fm-refined .analytics-card-header{margin-bottom:11px}
body.fm-refined .stat-label,body.fm-refined .analytics-card-header h3{
 font-size:.75rem;letter-spacing:.035em;text-transform:uppercase;color:var(--muted);font-weight:600;
}
body.fm-refined .stat-val,body.fm-refined .analytics-card-value{
 color:var(--text);font:500 clamp(1.75rem,3vw,2.4rem)/1.15 'Fraunces',Georgia,serif;
 letter-spacing:-.035em;margin:4px 0 10px;
}
body.fm-refined .analytics-card-sub,body.fm-refined .stat-sub{color:var(--muted)}
body.fm-refined .analytics-icon{display:none}
body.fm-refined .order-item{
 background:var(--surface);border:1px solid var(--line);border-radius:7px;gap:13px;
 padding:17px;margin-bottom:10px;
}
body.fm-refined .od-name{font-weight:600}
body.fm-refined .od-meta{font-size:.82rem;line-height:1.65}
body.fm-refined .order-emoji{width:38px;height:38px;border-radius:6px;background:var(--bg-soft)}
body.fm-refined .order-status{border-radius:4px;font-size:.73rem}
body.fm-refined .status-approved{background:#e2efe5;color:#235737}
body.fm-refined .status-pending{background:#f7ecd5;color:#8c5a1f}
body.fm-refined .status-delivered{background:#e5eceb;color:#315d60}
body.fm-refined .status-rejected{background:#f8e4e3;color:#953632}
body.fm-refined .notif-panel{padding:14px}
body.fm-refined .notif-item{border:1px solid var(--line);border-radius:6px;background:var(--surface);padding:13px}
body.fm-refined .notif-item.unread{background:#f1f5ed;border-color:#bdd0bb}
body.fm-refined .notif-icon{background:var(--bg-soft);border-radius:4px}
body.fm-refined .chat-container{grid-template-columns:280px minmax(0,1fr);min-height:580px}
body.fm-refined .chat-sidebar{background:var(--bg-soft);border-right:1px solid var(--line)}
body.fm-refined .chat-search input,body.fm-refined .chat-input-area textarea{background:var(--surface);border-radius:6px;border-color:var(--line-strong)}
body.fm-refined .chat-thread{border-bottom:1px solid var(--line);transition:background .12s}
body.fm-refined .chat-thread.active,body.fm-refined .chat-thread:hover{background:#e1e9dd;box-shadow:none}
body.fm-refined .chat-thread-avatar{border-radius:6px;background:var(--green)}
body.fm-refined .chat-main,body.fm-refined .chat-messages{background:var(--surface);background-image:none}
body.fm-refined .chat-order-banner{background:var(--bg-soft);border-bottom:1px solid var(--line)}
body.fm-refined .msg-bubble{border-radius:9px;box-shadow:none;background:var(--surface)}
body.fm-refined .msg.sent .msg-bubble{background:var(--green);color:#fff}
body.fm-refined .quick-replies{background:var(--surface);gap:6px}
body.fm-refined .quick-reply-btn{border-radius:5px;background:var(--bg-soft);color:var(--text)}
body.fm-refined .send-btn{border-radius:6px;background:var(--green);box-shadow:none}
body.fm-refined .send-btn:hover{transform:none;background:#143d29}
body.fm-refined .photo-upload-area,body.fm-refined .photo-drop-zone{border-radius:7px;border-color:var(--line-strong);background:var(--bg-soft)}
body.fm-refined .photo-upload-area:hover,body.fm-refined .photo-drop-zone:hover{background:#e3eadf}
body.fm-refined .photo-thumb{border-radius:6px}
body.fm-refined .emoji-opt{border-radius:5px}
body.fm-refined .premium-section{background:#f9f2e3;border-color:#e5d3ac}
body.fm-refined .premium-feat{border-radius:5px;background:#fff9ee;border-color:#e5d3ac}
body.fm-refined .swipe-hint{animation:none!important}

/* Responsive: keep all existing menu, chat and order handlers working */
@media(max-width:1060px){
 body.fm-refined .dash-layout{grid-template-columns:1fr;padding:10px 18px 45px}
 body.fm-refined .dash-sidebar{position:static;height:auto;padding:11px}
 body.fm-refined .dash-sidebar h3{display:none}
 body.fm-refined .sidebar-nav{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;gap:4px;scrollbar-width:thin}
 body.fm-refined .sidebar-nav button{white-space:nowrap;flex-shrink:0}
 body.fm-refined .sidebar-footer{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}
 body.fm-refined .sidebar-user-pill{min-width:160px;flex:1}
 body.fm-refined .sidebar-logout-btn,body.fm-refined .sidebar-nav-shortcut{width:auto}
 body.fm-refined .chat-container{grid-template-columns:1fr}
 body.fm-refined .chat-sidebar{border-right:0;border-bottom:1px solid var(--line);max-height:220px}
}
@media(max-width:760px){
 body.fm-refined{padding-top:85px!important}
 body.fm-refined .navbar{top:0!important;left:0!important;right:0!important;height:67px!important;padding:0 15px!important}
 body.fm-refined .nav-logo{font-size:1rem}
 body.fm-refined .nav-logo::before{width:32px!important;height:32px!important}
 body.fm-refined .nav-links{gap:5px}
 body.fm-refined #nav-auth-btns .btn-outline{display:none}
 body.fm-refined #nav-auth-btns .btn-primary{margin-left:0!important}
 body.fm-refined .nav-user-pill{padding:4px}
 body.fm-refined #nav-username{display:none}
 body.fm-refined .listings-header{padding:0 16px}
 body.fm-refined .listings-header h1{padding:20px 0 23px!important;font-size:clamp(1.75rem,8vw,2.45rem)!important;display:flex;flex-direction:column;gap:14px;align-items:start}
 body.fm-refined .listings-controls{padding:14px 16px!important;gap:8px}
 body.fm-refined .listings-controls .search-box{flex:1 1 100%;min-width:0}
 body.fm-refined .listings-controls .filter-select{flex:1 1 42%;min-width:0}
 body.fm-refined .listings-controls #sell-btn-top{flex:1 1 100%;padding:12px 16px}
 body.fm-refined .listings-body{padding:0 16px 45px}
 body.fm-refined .listings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body.fm-refined .produce-img{height:160px}
 body.fm-refined .produce-body{padding:11px 11px 7px}
 body.fm-refined .produce-name{font-size:1.07rem}
 body.fm-refined .produce-farmer{font-size:.74rem}
 body.fm-refined .produce-actions{padding:3px 11px 13px;flex-wrap:wrap!important}
 body.fm-refined .produce-actions .btn-primary{flex:1 1 100%!important}
 body.fm-refined .produce-actions .btn:not(.btn-primary){flex:1 1 auto!important}
 body.fm-refined .dash-layout{padding:0 13px 30px}
 body.fm-refined #page-farmer-dash,body.fm-refined #page-customer-dash{padding-top:0!important}
 body.fm-refined .dash-header{padding:17px 18px}
 body.fm-refined .dash-header h1{font-size:1.65rem}
 body.fm-refined .stats-row,body.fm-refined .analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.fm-refined :is(.stat-card,.analytics-card){padding:15px!important}
 body.fm-refined .stat-val,body.fm-refined .analytics-card-value{font-size:1.85rem}
 body.fm-refined .order-item{padding:13px;gap:8px}
 body.fm-refined .order-actions{width:100%;flex-wrap:wrap}
 body.fm-refined .order-actions .btn{flex:1 1 auto;min-width:92px}
 body.fm-refined .card-header{padding:13px 15px}
 body.fm-refined .card-body{padding:14px}
 body.fm-refined .modal-overlay{align-items:flex-end}
 body.fm-refined .modal{border-radius:12px 12px 0 0;padding:1.25rem}
 body.fm-refined .chat-sidebar{max-height:185px}
}
@media(max-width:390px){
 body.fm-refined .listings-grid{grid-template-columns:1fr}
 body.fm-refined .produce-img{height:195px}
 body.fm-refined .stats-row,body.fm-refined .analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){body.fm-refined *{scroll-behavior:auto}body.fm-refined .swipe-hint{animation:none}}

/* Consistent supporting surfaces and optional footer on listings */
body.fm-refined .footer{background:transparent;padding:35px 19px 28px}
body.fm-refined .footer-inner{
 background:#1b4330;background-image:none;border:0;border-radius:10px;
 padding:35px;box-shadow:none;color:#f8f5ec;
}
body.fm-refined .footer-brand .logo{font:500 1.35rem 'Fraunces',Georgia,serif}
body.fm-refined .footer-brand .logo span{color:#dac6a8}
body.fm-refined .footer-col a:hover{color:#fff}
body.fm-refined .footer-bottom{border-top:1px solid rgba(255,255,255,.14)}
body.fm-refined :is(.chat-header,.chat-input-area,.quick-replies,.attach-preview,.emoji-tray){background:var(--surface)}
body.fm-refined :is(.chat-header-name,.chat-sidebar-header){font-weight:600}
body.fm-refined .photo-count-badge,body.fm-refined .photo-main-badge{border-radius:5px}
