/**
 * MAHA GOAT - Premium Agricultural Marketplace Stylesheet
 * Brand: Natural Green, Warm Cream, Earthy Terracotta & Gold Accents
 */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@200;300;400;500;600&family=Outfit:wght@300;400;500;600&family=Noto+Sans+Devanagari:wght@300;400;500;600&family=Noto+Sans+Kannada:wght@300;400;500;600&display=swap');

:root {
    --mg-primary: #1b5e20;
    --mg-primary-dark: #123e15;
    --mg-primary-light: #2e7d32;
    --mg-primary-subtle: #e8f5e9;
    --mg-primary-gradient: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    
    --mg-secondary: #c26910;
    --mg-secondary-dark: #8c4505;
    --mg-secondary-light: #e08324;
    --mg-secondary-subtle: #fff3e0;
    
    --mg-accent: #f59e0b;
    --mg-accent-subtle: #fef3c7;
    
    --mg-cream: #faf7f2;
    --mg-cream-dark: #f0ebe1;
    --mg-sand: #e6dfd1;
    
    --mg-dark: #1f2937;
    --mg-text: #2d3748;
    --mg-text-muted: #6b7280;
    --mg-border: #e5e7eb;
    
    --mg-white: #ffffff;
    --mg-shadow-sm: 0 2px 8px rgba(27, 94, 32, 0.06);
    --mg-shadow: 0 8px 24px rgba(27, 94, 32, 0.08);
    --mg-shadow-lg: 0 16px 36px rgba(27, 94, 32, 0.12);
    --mg-radius-sm: 8px;
    --mg-radius: 14px;
    --mg-radius-lg: 20px;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Geist', 'Outfit', 'Noto Sans Devanagari', 'Noto Sans Kannada', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 350;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: var(--mg-cream);
    color: var(--mg-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Typography Overrides - Modern Slim Geometric Aesthetic */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Geist', 'Outfit', 'Noto Sans Devanagari', 'Noto Sans Kannada', sans-serif;
    font-weight: 500;
    color: var(--mg-primary-dark);
    letter-spacing: -0.025em;
    line-height: 1.25;
}

h1 { font-weight: 500; letter-spacing: -0.035em; }
h2 { font-weight: 500; letter-spacing: -0.03em; }
h3 { font-weight: 500; letter-spacing: -0.025em; }
h4 { font-weight: 500; letter-spacing: -0.02em; }
h5 { font-weight: 500; letter-spacing: -0.015em; }
h6 { font-weight: 500; letter-spacing: -0.01em; }

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 400 !important;
    letter-spacing: -0.04em;
}

/* Header & Top Bar */
.mg-topbar {
    background-color: #123e15;
    color: #d1fae5;
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mg-topbar a {
    color: #d1fae5;
    text-decoration: none;
    transition: color 0.2s;
}

.mg-topbar a:hover {
    color: var(--mg-accent);
}

.mg-navbar {
    background-color: var(--mg-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 2px solid var(--mg-cream-dark);
}

.mg-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.mg-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--mg-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.25);
}

.mg-brand-text {
    display: flex;
    flex-direction: column;
}

.mg-brand-title {
    font-weight: 600;
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--mg-primary);
    letter-spacing: -0.025em;
}

.mg-brand-tagline {
    font-size: 0.72rem;
    font-weight: 450;
    text-transform: uppercase;
    color: var(--mg-secondary);
    letter-spacing: 0.06em;
}

.mg-nav-link {
    font-weight: 450;
    color: var(--mg-text);
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--mg-radius-sm);
    transition: all 0.2s ease;
}

.mg-nav-link:hover, .mg-nav-link.active {
    color: var(--mg-primary) !important;
    background-color: var(--mg-primary-subtle);
}

/* Custom Buttons */
.btn-mg-primary {
    background: var(--mg-primary-gradient);
    border: none;
    color: #ffffff;
    font-weight: 450;
    padding: 0.6rem 1.4rem;
    border-radius: var(--mg-radius-sm);
    box-shadow: 0 4px 14px rgba(27, 94, 32, 0.25);
    transition: all 0.25s ease;
}

.btn-mg-primary:hover {
    background: linear-gradient(135deg, #164e1a 0%, #256629 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(27, 94, 32, 0.35);
}

.btn-mg-secondary {
    background: linear-gradient(135deg, var(--mg-secondary) 0%, #d97706 100%);
    border: none;
    color: #ffffff;
    font-weight: 450;
    padding: 0.6rem 1.4rem;
    border-radius: var(--mg-radius-sm);
    box-shadow: 0 4px 14px rgba(194, 105, 16, 0.25);
    transition: all 0.25s ease;
}

.btn-mg-secondary:hover {
    background: linear-gradient(135deg, #a85408 0%, #b45309 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-mg-outline {
    background: transparent;
    border: 1.5px solid var(--mg-primary);
    color: var(--mg-primary);
    font-weight: 450;
    padding: 0.5rem 1.25rem;
    border-radius: var(--mg-radius-sm);
    transition: all 0.2s ease;
}

.btn-mg-outline:hover {
    background-color: var(--mg-primary);
    color: #ffffff;
}

/* Hero Section */
.mg-hero {
    background: linear-gradient(180deg, #123e15 0%, #1b5e20 60%, #236d29 100%);
    color: #ffffff;
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.mg-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 48px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C150,90 350,-40 500,40 C650,120 900,10 1200,60 L1200,120 L0,120 Z' fill='%23faf7f2'%3E%3C/path%3E%3C/svg%3E") bottom center no-repeat;
    background-size: cover;
}

.mg-hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fef3c7;
    font-weight: 450;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.mg-hero-title {
    font-size: 3rem;
    font-weight: 450;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.mg-hero-subtitle {
    font-size: 1.15rem;
    color: #d1fae5;
    margin-bottom: 2rem;
    max-width: 620px;
}

/* Quick Search Card in Hero */
.mg-search-card {
    background: var(--mg-white);
    border-radius: var(--mg-radius);
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    color: var(--mg-text);
}

/* Badges */
.badge-verified {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-breed {
    background: var(--mg-primary-subtle);
    color: var(--mg-primary-dark);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge-category {
    background: var(--mg-secondary-subtle);
    color: var(--mg-secondary-dark);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-status-available { background: #ecfdf5; color: #065f46; }
.badge-status-sold { background: #f3f4f6; color: #4b5563; }
.badge-status-pending { background: #fffbeb; color: #b45309; }
.badge-status-approved { background: #ecfdf5; color: #065f46; }
.badge-status-rejected { background: #fef2f2; color: #b91c1c; }

/* Animal Listing Card */
.mg-listing-card {
    background: var(--mg-white);
    border-radius: var(--mg-radius);
    border: 1px solid var(--mg-border);
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--mg-shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mg-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mg-shadow);
    border-color: #cbd5e1;
}

.mg-listing-img-box {
    position: relative;
    height: 220px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.mg-listing-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mg-listing-card:hover .mg-listing-img {
    transform: scale(1.04);
}

.mg-listing-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 2;
}

.mg-listing-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.mg-listing-wishlist-btn:hover {
    transform: scale(1.1);
    background: #ffffff;
}

.mg-listing-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mg-listing-title {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--mg-primary-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.mg-listing-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--mg-text-muted);
    margin-bottom: 0.75rem;
}

.mg-listing-price-box {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mg-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mg-price {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--mg-primary);
}

.mg-price-negotiable {
    font-size: 0.75rem;
    color: var(--mg-secondary);
    font-weight: 450;
    display: block;
}

/* Breed Card */
.mg-breed-card {
    background: var(--mg-white);
    border-radius: var(--mg-radius);
    padding: 1.25rem;
    border: 1px solid var(--mg-border);
    text-align: center;
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--mg-text);
    display: block;
    height: 100%;
}

.mg-breed-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mg-shadow);
    border-color: var(--mg-primary);
    color: var(--mg-primary-dark);
}

.mg-breed-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.85rem;
    background: var(--mg-primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--mg-white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.mg-breed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mg-breed-title {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    margin-bottom: 2px;
}

.mg-breed-regional {
    font-size: 0.82rem;
    color: var(--mg-secondary);
    font-weight: 450;
}

/* Mandatory Statutory Disclaimer Banner */
.mg-disclaimer-banner {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid var(--mg-secondary);
    border-radius: var(--mg-radius-sm);
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: #92400e;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Dashboard Layout */
.mg-dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 160px);
}

.mg-sidebar {
    width: 260px;
    background: var(--mg-white);
    border-right: 1px solid var(--mg-border);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.mg-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mg-sidebar-item {
    margin-bottom: 4px;
}

.mg-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 1rem;
    color: var(--mg-text);
    text-decoration: none;
    font-weight: 450;
    font-size: 0.92rem;
    border-radius: var(--mg-radius-sm);
    transition: all 0.2s;
}

.mg-sidebar-link:hover, .mg-sidebar-link.active {
    background-color: var(--mg-primary-subtle);
    color: var(--mg-primary);
}

.mg-sidebar-link i {
    width: 20px;
    font-size: 1.1rem;
}

.mg-dashboard-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--mg-cream);
}

.mg-stat-card {
    background: var(--mg-white);
    border-radius: var(--mg-radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--mg-border);
    box-shadow: var(--mg-shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.mg-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.mg-stat-icon-green { background: #dcfce7; color: #15803d; }
.mg-stat-icon-amber { background: #fef3c7; color: #b45309; }
.mg-stat-icon-blue { background: #dbeafe; color: #1d4ed8; }
.mg-stat-icon-purple { background: #f3e8ff; color: #7e22ce; }

.mg-stat-val {
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--mg-primary-dark);
}

.mg-stat-lbl {
    font-size: 0.85rem;
    color: var(--mg-text-muted);
    font-weight: 400;
}

/* Footer */
.mg-footer {
    background: #112d13;
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.mg-footer h5 {
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.mg-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.mg-footer a:hover {
    color: var(--mg-accent);
}

.mg-footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #64748b;
}

/* Mobile-First Navigation & Language Pills */
.mg-lang-pills {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.06);
    padding: 3px;
    border-radius: 20px;
    gap: 3px;
}

.mg-lang-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.18s ease;
    line-height: 1.4;
}

.mg-lang-pill:hover {
    color: var(--mg-primary);
}

.mg-lang-pill.active {
    background: var(--mg-primary);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(27, 94, 32, 0.28);
}

.mg-topbar .mg-lang-pills {
    background: rgba(255, 255, 255, 0.16);
}

.mg-topbar .mg-lang-pill {
    color: #e2e8f0;
}

.mg-topbar .mg-lang-pill.active {
    background: var(--mg-accent);
    color: #123e15 !important;
    font-weight: 550;
}

/* Quick Breed Horizontal Chip Scroller (Mobile-First) */
.mg-chips-wrapper {
    background: var(--mg-white);
    border-bottom: 1px solid var(--mg-cream-dark);
    padding: 8px 0;
}

.mg-chips-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.mg-chips-scroller::-webkit-scrollbar {
    display: none;
}

.mg-chip-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--mg-cream);
    border: 1px solid var(--mg-border);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--mg-dark);
    font-size: 0.82rem;
    font-weight: 450;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.mg-chip-item img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
}

.mg-chip-item:hover,
.mg-chip-item.active {
    background: var(--mg-primary);
    border-color: var(--mg-primary);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.2);
}

.mg-chip-item.active img {
    border-color: #ffffff;
}

/* App-like Sticky Mobile Bottom Bar */
.mg-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: #ffffff;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    z-index: 1045;
    padding: 0 4px;
}

.mg-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #64748b;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 450;
    transition: all 0.15s ease;
    padding: 3px 2px;
    user-select: none;
}

.mg-bottom-nav-item i {
    font-size: 1.25rem;
    line-height: 1.1;
    margin-bottom: 2px;
    transition: transform 0.15s ease;
}

.mg-bottom-nav-item:hover,
.mg-bottom-nav-item:active {
    color: var(--mg-primary);
}

.mg-bottom-nav-item.active {
    color: var(--mg-primary);
    font-weight: 550;
}

.mg-bottom-nav-item.active i {
    transform: scale(1.15);
    color: var(--mg-primary);
}

/* Floating Raised Center "+ Sell Free" Button */
.mg-bottom-sell-btn {
    position: relative;
    top: -14px;
    background: linear-gradient(135deg, #c26910 0%, #e08324 100%);
    color: #ffffff !important;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(194, 105, 16, 0.45);
    border: 3px solid #ffffff;
    font-size: 0.62rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
}

.mg-bottom-sell-btn i {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 1px;
}

.mg-bottom-sell-btn:active {
    transform: scale(0.92);
}

/* Mobile Quick Filter Action Bar for /listings */
.mg-mobile-filter-bar {
    display: none;
    position: sticky;
    top: 58px;
    z-index: 1015;
    background: #ffffff;
    border-bottom: 1px solid var(--mg-border);
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Mobile-First Layout Rules */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 74px !important; /* Space for sticky bottom nav */
    }

    .mg-mobile-bottom-nav {
        display: flex;
        align-items: center;
        justify-content: space-around;
    }

    .mg-mobile-filter-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .mg-hero {
        padding: 2.25rem 0 2rem;
    }

    .mg-hero-title {
        font-size: clamp(1.65rem, 6vw, 2.3rem);
        line-height: 1.25;
    }

    .mg-hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .mg-search-card {
        padding: 1.25rem;
        margin-top: 1rem;
        border-radius: var(--mg-radius);
    }

    .mg-navbar {
        padding: 0.5rem 0;
    }

    .mg-brand-title {
        font-size: 1.25rem;
    }

    .mg-brand-tagline {
        font-size: 0.65rem;
    }

    .mg-dashboard-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .mg-sidebar {
        display: none !important;
    }
    
    .mg-dashboard-content {
        padding: 1rem 0.85rem 5.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    .mg-listing-card .mg-listing-img-box {
        height: 180px;
    }

    .mg-footer {
        padding: 2.5rem 0 5rem; /* Room above bottom bar */
    }
}

/* Mobile Dashboard Subnav (Sticky Horizontal Tab Scroll) */
.mg-mobile-subnav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--mg-border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 50px;
    z-index: 1010;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mg-mobile-subnav::-webkit-scrollbar {
    display: none;
}

.mg-subnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mg-subnav-pill:hover {
    color: var(--mg-primary);
    background: #f1f5f9;
}

.mg-subnav-pill.active {
    background: var(--mg-primary);
    color: #ffffff !important;
    border-color: var(--mg-primary);
    box-shadow: 0 2px 6px rgba(27, 94, 32, 0.22);
}

.mg-subnav-pill i {
    font-size: 0.9rem;
}

/* Mobile App-Style Cards */
.mg-mobile-card {
    background: #ffffff;
    border-radius: var(--mg-radius);
    border: 1px solid var(--mg-border);
    padding: 1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mg-mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--mg-border);
}

.mg-mobile-card-code {
    font-family: monospace;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--mg-primary);
}

.mg-mobile-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mg-text);
    margin-bottom: 0.35rem;
}

.mg-mobile-card-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mg-primary-dark);
}

@media (max-width: 575.98px) {
    .mg-hero-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .mg-listing-body {
        padding: 0.85rem;
    }

    .mg-price {
        font-size: 1.25rem;
    }

    .mg-stat-card {
        padding: 0.85rem 0.75rem;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .mg-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .mg-stat-val {
        font-size: 1.25rem;
    }

    .mg-stat-lbl {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .mg-dashboard-content {
        padding: 0.85rem 0.6rem 5.5rem !important;
    }
}

/* ==========================================================================
   Slim Typography System Overrides
   Ensures uniform crisp, slender aesthetic across all UI elements & components
   ========================================================================== */

/* Bootstrap Weight Refinement (Soften chunky browser & framework defaults) */
.fw-bold {
    font-weight: 550 !important;
}

.fw-bolder {
    font-weight: 600 !important;
}

.fw-semibold {
    font-weight: 450 !important;
}

.fw-medium {
    font-weight: 400 !important;
}

.fw-normal {
    font-weight: 350 !important;
}

.fw-light {
    font-weight: 250 !important;
}

/* Button & Interactive Controls */
.btn {
    font-weight: 450;
    letter-spacing: -0.01em;
}

.btn-lg {
    font-weight: 450;
}

.btn-sm {
    font-weight: 450;
}

/* Form Elements */
.form-label {
    font-weight: 450;
    letter-spacing: -0.01em;
}

.form-control, .form-select {
    font-weight: 350;
    letter-spacing: -0.01em;
}

/* Card & Content Components */
.card-title {
    font-weight: 500;
    letter-spacing: -0.02em;
}

.card-header {
    font-weight: 500;
}

.dropdown-item {
    font-weight: 400;
}

.nav-link {
    font-weight: 450;
}

.navbar-brand {
    font-weight: 500;
}

.table th {
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.badge {
    font-weight: 450;
    letter-spacing: 0.01em;
}

