/* Farmer × Buyer matches dashboard */

.fm-page { min-height: 100vh; background: #f8fafc; font-family: 'Inter', sans-serif; }
.fm-hero { position: relative; color: #fff; min-height: 220px; background: linear-gradient(135deg, rgba(15,23,42,0.85), rgba(5,150,105,0.55)), url('https://images.unsplash.com/photo-1574943320219-553eb213f72d?w=1600&h=400&fit=crop') center/cover; }
.fm-hero-inner { max-width: none; margin: 0; padding: 2rem 0; width: 100%; }
.fm-badge { display: inline-block; background: rgba(16,185,129,0.25); border: 1px solid #34d399; color: #a7f3d0; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; padding: 0.3rem 0.75rem; border-radius: 9999px; margin-bottom: 0.75rem; }
.fm-hero h1 { margin: 0; font-size: 1.75rem; font-weight: 900; }
.fm-hero p { margin: 0.5rem 0 0; opacity: 0.85; max-width: 42rem; font-size: 0.9rem; }
.fm-stats { max-width: none; margin: -1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; position: relative; z-index: 2; width: 100%; }
@media (min-width: 768px) { .fm-stats { grid-template-columns: repeat(4, 1fr); } }
.fm-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.fm-stat strong { display: block; font-size: 1.5rem; font-weight: 900; color: #0f172a; }
.fm-stat span { font-size: 0.7rem; color: #64748b; }
.fm-container { max-width: none; margin: 0; padding: 2rem 0 3rem; width: 100%; }
.fm-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 1rem; }
.fm-toggle { display: flex; background: #f1f5f9; border-radius: 9999px; padding: 0.2rem; }
.fm-toggle button { padding: 0.4rem 1rem; border-radius: 9999px; border: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; background: transparent; color: #64748b; }
.fm-toggle button.active { background: #059669; color: #fff; }
.fm-controls input, .fm-controls select { padding: 0.5rem 0.75rem; border: 1px solid #e2e8f0; border-radius: 0.5rem; font-size: 0.875rem; }
.fm-controls input { flex: 1; min-width: 10rem; }
.fm-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .fm-grid { grid-template-columns: repeat(3, 1fr); } }
.fm-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.2s; }
.fm-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.fm-card-body { padding: 1rem; }
.fm-card-top { display: flex; gap: 0.75rem; }
.fm-score { width: 2.5rem; height: 2.5rem; border-radius: 9999px; color: #fff; font-size: 0.65rem; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fm-score.high { background: #10b981; }
.fm-score.mid { background: #f59e0b; }
.fm-score.low { background: #60a5fa; }
.fm-card-title { font-weight: 700; font-size: 0.9rem; color: #0f172a; margin: 0; }
.fm-card-sub { font-size: 0.75rem; color: #94a3b8; margin: 0.125rem 0 0; }
.fm-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.fm-tag { font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 9999px; }
.fm-tag.province { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.fm-tag.commodity { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.fm-tag.demand { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.fm-expand { width: 100%; border: none; border-top: 1px solid #f1f5f9; background: #fff; padding: 0.5rem; font-size: 0.75rem; font-weight: 600; color: #94a3b8; cursor: pointer; }
.fm-expand:hover { color: #059669; }
.fm-details { padding: 0 1rem 1rem; border-top: 1px solid #f1f5f9; font-size: 0.8rem; color: #475569; }
.fm-details p { margin: 0.375rem 0; }
.fm-engage { width: 100%; margin-top: 0.75rem; padding: 0.5rem; border-radius: 9999px; border: none; background: #059669; color: #fff; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.fm-engage:disabled { opacity: 0.5; cursor: not-allowed; }
.fm-empty { text-align: center; padding: 3rem 1rem; color: #64748b; background: #fff; border-radius: 1rem; border: 1px solid #e2e8f0; }
.fm-loading { min-height: 40vh; display: flex; align-items: center; justify-content: center; color: #64748b; }
.fm-btn { padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.8rem; font-weight: 600; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; text-decoration: none; color: #0f172a; }
.fm-btn.primary { background: #059669; color: #fff; border-color: #059669; }
