/* Your exact color scheme with modern additions */
:root {
    --bg-primary: #1a2e1a;
    --bg-secondary: #2d4a2d;
    --color-primary: #3a7d44;
    --color-primary-lt: #52a85f;
    --color-primary-soft: rgba(58, 125, 68, 0.1);
    --color-accent: #e8b84b;
    --color-accent-lt: #f5d07a;
    --color-accent-soft: rgba(232, 184, 75, 0.1);

    /* Stage-specific colors */
    --stage-past: #94a3b8;
    --stage-past-bg: #f1f5f9;
    --stage-past-soft: rgba(148, 163, 184, 0.1);
    --stage-current: #3a7d44;
    --stage-current-bg: #3a7d44;
    --stage-current-soft: rgba(58, 125, 68, 0.1);
    --stage-future: #64748b;
    --stage-future-bg: #f8fafc;
    --stage-future-soft: rgba(100, 116, 139, 0.1);

    /* Recommendation colors */
    --rec-blog: #3b82f6;
    --rec-blog-soft: rgba(59, 130, 246, 0.1);
    --rec-variety: #8b5cf6;
    --rec-variety-soft: rgba(139, 92, 246, 0.1);
    --rec-rootstock: #ec4899;
    --rec-rootstock-soft: rgba(236, 72, 153, 0.1);
    --rec-practice: #f59e0b;
    --rec-practice-soft: rgba(245, 158, 11, 0.1);

    /* Modern neutral palette */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic colors */
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.1);

    /* Typography */
    --font-display: "DM Serif Display", Georgia, serif;
    --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
    --font-hindi: "Noto Sans Devanagari", "DM Sans", sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Borders & Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 999px;

    /* Shadows — modern multi-layer with subtle color tint */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.06), 0 24px 48px rgba(0, 0, 0, 0.1);

    /* Colored shadow helpers */
    --shadow-primary: 0 4px 14px rgba(58, 125, 68, 0.15);
    --shadow-accent: 0 4px 14px rgba(232, 184, 75, 0.2);

    /* Transitions — spring-like easing for natural feel */
    --transition-fast: 150ms cubic-bezier(0.2, 0, 0, 1);
    --transition-base: 250ms cubic-bezier(0.2, 0, 0, 1);
    --transition-slow: 350ms cubic-bezier(0.2, 0, 0, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-bounce: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(
        180deg,
        var(--gray-900) 0%,
        var(--bg-primary) 100%
    );
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Desktop warning message */
.desktop-warning {
    display: none;
    text-align: center;
    padding: var(--space-xl);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    animation: fadeIn 0.5s ease;
}

.desktop-warning i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.desktop-warning h2 {
    font-family: var(--font-display);
    color: var(--bg-primary);
    margin-bottom: var(--space-sm);
}

.desktop-warning p {
    color: var(--gray-500);
    margin-bottom: var(--space-lg);
}

.qr-code {
    width: 120px;
    height: 120px;
    background: var(--gray-100);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--gray-400);
}

/* Mobile app container */
.mobile-app {
    display: block;
    width: 100%;
    max-width: 428px;
    height: 100dvh; /* dynamic viewport — respects mobile browser chrome */
    height: 100vh;  /* fallback for older browsers */
    max-height: 926px;
    margin: 0 auto;
    background: #fafbfc;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-xl);
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* On actual phones (≤ 428px): fill the real screen, no frame constraints */
@media (max-width: 428px) {
    body {
        display: block;
        align-items: stretch;
        background: white;
    }
    .mobile-app {
        max-width: 100%;
        max-height: none;
        height: 100dvh;
        height: 100vh; /* fallback */
        box-shadow: none;
    }
    /* Support iOS safe area */
    @supports (height: 100dvh) {
        .mobile-app { height: 100dvh; }
    }
}

/* Hide scrollbar but keep functionality */
.mobile-app::-webkit-scrollbar {
    display: none;
}

.mobile-app {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* App header - modern gradient with subtle pattern */
.app-header {
    background: linear-gradient(
        155deg,
        #132413 0%,
        var(--bg-primary) 35%,
        var(--color-primary) 100%
    );
    color: white;
    padding: calc(14px + env(safe-area-inset-top, 0px)) var(--space-md) var(--space-md);
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    position: sticky;
    top: 0;
    z-index: 50;
    isolation: isolate;
    overflow-anchor: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(26, 46, 26, 0.18);
    transition:
        padding var(--transition-base),
        box-shadow var(--transition-base),
        border-radius var(--transition-base);
}

/* Subtle pattern overlay */
.app-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.03"><path d="M20 20 L30 20 L25 30 Z" fill="white"/><circle cx="70" cy="40" r="5" fill="white"/><circle cx="30" cy="70" r="8" fill="white"/></svg>');
    background-size: 60px 60px;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    pointer-events: none;
    z-index: -1;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    transition: margin-bottom var(--transition-fast);
}

.greeting {
    flex: 1;
}

.greeting h1 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: font-size var(--transition-fast);
}

.greeting p {
    font-size: 0.78rem;
    opacity: 0.7;
    margin: var(--space-xs) 0 0;
    font-family: var(--font-hindi);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition:
        font-size var(--transition-fast),
        margin var(--transition-fast),
        opacity var(--transition-fast);
}

.greeting p i {
    font-size: 0.7rem;
    color: var(--color-accent);
}

.header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.header-actions .hdr-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-spring);
    cursor: pointer;
}

.header-actions .hdr-action-btn:active {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(0.88);
}

/* Location chip - more tactile */
.location-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 10px;
    transition: all var(--transition-spring);
}

.location-chip:active {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.96);
}

.location-chip i {
    color: var(--color-accent);
    font-size: 0.8rem;
}

/* Weather widget - glassmorphism */
.weather-widget {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
}

.weather-widget:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.14);
}

.header-stats {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    transition:
        margin-top var(--transition-fast),
        gap var(--transition-fast);
}

.stat-pill {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    text-align: center;
    transition: padding var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stat-value {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
    transition: font-size var(--transition-fast);
}

.stat-label {
    margin-top: 2px;
    font-size: 0.62rem;
    opacity: 0.8;
    transition:
        font-size var(--transition-fast),
        opacity var(--transition-fast);
}

.weather-temp {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.weather-temp i {
    font-size: 1.6rem;
    color: var(--color-accent);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: font-size var(--transition-fast);
}

.temp-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    transition: font-size var(--transition-fast);
}

.weather-desc {
    font-size: 0.72rem;
    opacity: 0.8;
    margin-top: 2px;
    transition: font-size var(--transition-fast);
}

.spray-window {
    background: var(--color-accent);
    color: var(--bg-primary);
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(232, 184, 75, 0.3);
    transition:
        padding var(--transition-fast),
        font-size var(--transition-fast);
}

/* ── Inner page header: slim bar with brand + actions ── */
.app-header--inner {
    padding: 10px var(--space-md) 10px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.app-header--inner .header-top {
    margin-bottom: 0;
    align-items: center;
}

.header-brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.header-brand-link:hover,
.header-brand-link:active {
    color: #fff;
    opacity: 0.9;
}

.header-weather-chip {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.header-weather-chip .hw-loc { opacity: .75; font-size: 0.64rem; }
.header-weather-chip .hw-temp { font-weight: 700; color: #fff; }
.header-weather-chip .hw-sep { opacity: .35; font-size: 0.6rem; }
.header-weather-chip .hw-cond { opacity: .7; font-size: 0.62rem; overflow: hidden; text-overflow: ellipsis; }
.header-weather-chip .hw-alert { color: #fbbf24; font-size: 0.62rem; margin-left: 1px; }
.header-weather-chip:hover,
.header-weather-chip:active { background: rgba(255, 255, 255, 0.2); color: #fff; }
.header-weather-chip i { color: var(--color-accent); font-size: 0.62rem; flex-shrink: 0; }
.header-weather-chip .hw-chevron {
    font-size: 0.5rem;
    opacity: 0.5;
    margin-left: 2px;
    transition: transform 0.2s ease;
}
.header-weather-chip[aria-expanded="true"] .hw-chevron { transform: rotate(180deg); opacity: 0.8; }
@media (max-width: 360px) {
    .header-weather-chip .hw-cond { display: none; }
}

/* ─── Orchard Weather Button (Header) ──────────────────────────────────── */
.orchard-weather-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-full);
    padding: 5px 12px 5px 6px;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
    max-width: 200px;
}
.orchard-weather-btn:hover { background: rgba(255, 255, 255, 0.16); }
.orchard-weather-btn:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.2); }
.orchard-weather-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}
.owb-temp {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    border: 1.5px solid rgba(255,255,255,0.2);
}
.owb-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
    text-align: left;
}
.owb-name {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.owb-cond {
    font-size: 0.6rem;
    opacity: 0.7;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.owb-chevron {
    font-size: 0.45rem;
    opacity: 0.6;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.orchard-weather-btn[aria-expanded="true"] .owb-chevron {
    transform: rotate(180deg);
    opacity: 0.9;
}
@media (max-width: 340px) {
    .owb-cond { display: none; }
    .orchard-weather-btn { max-width: 160px; }
}

/* ─── Orchard Dropdown ─────────────────────────────────────────────────── */
.orchard-dropdown {
    min-width: 280px;
    max-width: min(320px, calc(100vw - 20px));
    padding: 0;
    right: 0;
}
/* Active orchard summary at top */
.od-active-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, rgba(58,125,68,0.06), rgba(232,184,75,0.04));
    border-bottom: 1px solid var(--gray-100);
}
.od-active-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(58,125,68,0.25);
}
.od-active-info { flex: 1; min-width: 0; }
.od-active-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.od-active-loc {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.66rem;
    color: var(--gray-500);
    margin-top: 2px;
}
.od-active-loc i { font-size: 0.52rem; color: var(--color-primary); }
/* Section label */
.od-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 16px 4px;
}
/* Orchard list */
.od-list {
    padding: 4px 0;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-200) transparent;
}
.od-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.12s ease;
    position: relative;
}
.od-item:hover { background: var(--gray-50); }
.od-item.is-selected { background: rgba(58, 125, 68, 0.05); }
.od-item.is-selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--color-primary);
}
/* Circular avatar in dropdown */
.od-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.62rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.od-avatar--active {
    background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
    color: #fff;
    box-shadow: 0 2px 6px rgba(58, 125, 68, 0.25);
}
.od-avatar--gps {
    background: var(--info-soft);
    color: var(--info);
    font-size: 0.7rem;
}
.od-avatar--gps.od-avatar--active {
    background: var(--info);
    color: #fff;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}
.od-item-body { flex: 1; min-width: 0; }
.od-item-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.od-item.is-selected .od-item-name { color: var(--color-primary); }
.od-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.64rem;
    color: var(--gray-400);
    margin-top: 2px;
}
.od-item-meta i { font-size: 0.5rem; }
.od-item-check {
    color: var(--color-primary);
    font-size: 0.72rem;
    flex-shrink: 0;
}
.od-badge-primary {
    display: inline-block;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-left: 4px;
}
.od-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 2px 16px;
}
.od-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--gray-100);
}
.od-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}
.od-footer-link:hover { opacity: 0.8; }
.od-footer-link i { font-size: 0.62rem; }
.od-footer-sep { color: var(--gray-300); font-size: 0.6rem; }

.app-header.is-compact {
    padding: 8px 12px 8px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.app-header.is-compact .header-top {
    margin-bottom: 6px;
}

.app-header.is-compact .greeting h1 {
    font-size: 1.18rem;
}

.app-header.is-compact .greeting p {
    font-size: 0.68rem;
    margin-top: 2px;
    opacity: 0.65;
}

.app-header.is-compact .header-actions .hdr-action-btn {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
}

.app-header.is-compact .location-chip {
    padding: 4px 10px;
    font-size: 0.7rem;
    margin-bottom: 6px;
}

.app-header.is-compact .weather-widget {
    padding: 7px 10px;
    border-radius: 12px;
}

.app-header.is-compact .weather-temp {
    gap: 6px;
}

.app-header.is-compact .weather-temp i {
    font-size: 1.15rem;
}

.app-header.is-compact .temp-value {
    font-size: 1.15rem;
}

.app-header.is-compact .weather-desc {
    font-size: 0.65rem;
}

.app-header.is-compact .spray-window {
    padding: 4px 8px;
    font-size: 0.62rem;
}

.app-header.is-compact .header-stats {
    display: none;
}

.app-header.is-compact .stat-pill {
    padding: 4px;
}

.app-header.is-compact .stat-value {
    font-size: 0.76rem;
}

.app-header.is-compact .stat-label {
    font-size: 0.55rem;
    opacity: 0.75;
}

/* Main content — no padding on mobile (pages handle their own), padding on desktop grid */
.main-content {
    padding: 0;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* ═══ Shared detail-page section tab bar ═══
   Sticks below the header on scroll. --header-h is set by JS.  */
.detail-tabs-scroll {
    overflow-x: auto;
    padding: 12px 16px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: var(--header-h, 0px);
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
}
.detail-tabs-scroll::-webkit-scrollbar { display: none; }
.detail-tabs {
    display: flex;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: none;
}
.detail-tab {
    flex: 0 0 auto;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background: transparent;
    color: var(--gray-500);
    border: 1.5px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-spring);
}
.detail-tab.active {
    background: var(--bg-primary);
    color: #fff;
    border-color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(26, 46, 26, 0.25);
}
.detail-tab:active {
    transform: scale(0.94);
}

.insight-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-xs);
}

.insight-strip p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.insight-strip strong {
    color: var(--color-primary);
}

.insight-chip {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Section headers - more refined */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-md);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gray-900);
    margin: 0;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
}

.section-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    margin-right: 8px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    vertical-align: middle;
}

.section-title-icon.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.section-header a {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.section-header a:active {
    background: var(--color-primary-soft);
}

/* Quick action grid - improved touch targets */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.action-icon {
    width: 64px;
    height: 64px;
    background: var(--gray-50);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: all var(--transition-spring);
    box-shadow: var(--shadow-sm);
    border: none;
}

/* Individual action icon colors — gradient backgrounds */
.action-item:nth-child(1) .action-icon {
    color: var(--danger);
    background: linear-gradient(145deg, #fff5f5, #fee2e2);
}

.action-item:nth-child(2) .action-icon {
    color: #8b5cf6;
    background: linear-gradient(145deg, #faf5ff, #ede9fe);
}

.action-item:nth-child(3) .action-icon {
    color: var(--info);
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
}

.action-item:nth-child(4) .action-icon {
    color: var(--color-primary);
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
}

.action-item:active .action-icon {
    color: white;
    transform: scale(0.85);
    box-shadow: var(--shadow-md);
}

.action-item:nth-child(1):active .action-icon {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.action-item:nth-child(2):active .action-icon {
    background: linear-gradient(145deg, #8b5cf6, #7c3aed);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.action-item:nth-child(3):active .action-icon {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.action-item:nth-child(4):active .action-icon {
    background: linear-gradient(145deg, #3a7d44, #2d6334);
    box-shadow: 0 6px 20px rgba(58, 125, 68, 0.35);
}

.action-item span {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--gray-600);
}

/* Modern cards with hover states */
.card-modern {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    transition:
        transform var(--transition-spring),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card-modern:active {
    border-color: rgba(58, 125, 68, 0.15);
    box-shadow: var(--shadow-md), var(--shadow-primary);
    transform: scale(0.985);
}

/* Alert card - more prominent */
.alert-card {
    border-left: 4px solid var(--color-accent);
    background: linear-gradient(to right, white, var(--color-accent-soft));
    margin-bottom: var(--space-md);
}

.alert-title {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    font-size: 1rem;
}

.alert-location {
    font-size: 0.8rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.alert-badge {
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    display: inline-block;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-effectiveness {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.alert-message {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: var(--space-sm);
}

.task-pill {
    background: var(--color-accent);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Card with image row */
.card-row {
    display: flex;
    gap: var(--space-md);
}

.card-img-placeholder {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 2rem;
    border: 1px solid var(--gray-200);
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.card-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.card-meta i {
    font-size: 0.65rem;
    color: var(--gray-400);
}

/* Altitude bar - refined */
.altitude-bar-wrap {
    margin: var(--space-sm) 0;
}

.altitude-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--gray-600);
    margin-bottom: 4px;
    font-weight: 500;
}

.altitude-bar {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    overflow: hidden;
}

.altitude-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(
        90deg,
        var(--color-primary),
        var(--color-primary-lt)
    );
    transition: width 0.5s ease;
}

/* Market rates card */
.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--gray-100);
}

.rate-item:last-child {
    border-bottom: none;
}

.rate-name {
    font-weight: 600;
    color: var(--gray-700);
}

.rate-value {
    font-weight: 700;
    color: var(--gray-900);
}

.trend-up {
    color: var(--success);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Community card */
.community-header {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.community-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-accent)
    );
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.community-meta {
    flex: 1;
}

.community-name {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.community-location {
    font-family: var(--font-hindi);
    font-size: 0.7rem;
    color: var(--gray-500);
}

.community-text {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.community-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.7rem;
    color: var(--gray-400);
}

.community-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Knowledge card */
.knowledge-card {
    background: var(--color-primary-soft);
    border: 1px solid rgba(58, 125, 68, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.knowledge-layout {
    display: flex;
    gap: var(--space-md);
}

.knowledge-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.knowledge-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.knowledge-content p {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Brand name: hidden on mobile, shown on desktop via media query */
.brand-name {
    display: none;
}

/* Bottom navigation - modern with active indicators */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 428px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--space-xs) var(--space-md)
        calc(var(--space-sm) + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-400);
    font-size: 0.7rem;
    gap: 4px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
    min-height: 50px;
}

.nav-item i {
    font-size: 1.4rem;
    transition: all var(--transition-fast);
}

.nav-item span {
    display: block;
    font-size: 0.55rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nav-item span:last-child {
    font-family: var(--font-hindi);
    font-size: 0.5rem;
    opacity: 0.85;
}

.nav-item:active {
    transform: scale(0.92);
    opacity: 0.8;
}

.nav-item.active {
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border-radius: var(--radius-lg);
}

.nav-item.active i {
    font-size: 1.6rem;
    transform: scale(1.15);
}

.nav-item.active::after {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* Stagger children animations */
.quick-actions .action-item {
    animation: slideUp 0.4s ease forwards;
    opacity: 0;
}

.quick-actions .action-item:nth-child(1) {
    animation-delay: 0.05s;
}

.quick-actions .action-item:nth-child(2) {
    animation-delay: 0.1s;
}

.quick-actions .action-item:nth-child(3) {
    animation-delay: 0.15s;
}

.quick-actions .action-item:nth-child(4) {
    animation-delay: 0.2s;
}

/* =============================================
         LARGE PHONE (429px–599px)
         Full-width, no phone frame, single column
         ============================================= */
@media (min-width: 429px) and (max-width: 599px) {
    body {
        background: white;
        padding: 0;
        align-items: flex-start;
    }

    .mobile-app {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
}

/* =============================================
         TABLET (600px–1023px)
         Full-width, 2-column content, bottom nav
         ============================================= */
@media (min-width: 600px) and (max-width: 1023px) {
    body {
        background: var(--gray-100);
        padding: 0;
        align-items: stretch;
    }

    .mobile-app {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Header: sticky at top so it stays in view while scrolling */
    .app-header {
        position: sticky;
        top: 0;
        z-index: 100;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        padding: 14px 28px 16px;
    }

    .app-header::before {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    /* Stats always visible — don't hide in compact mode on tablet */
    .app-header.is-compact .header-stats {
        display: grid;
    }

    .app-header.is-compact .stat-pill {
        padding: 5px 8px;
    }

    /* Location + weather inline on tablet compact */
    .location-chip {
        margin-bottom: 8px;
    }

    /* Content flows naturally — .mobile-app is the scroll container */
    .main-content {
        padding: 20px 28px;
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
        min-height: calc(100vh - 130px);
        background: var(--gray-50);
    }

    /* Bottom nav: full-width, no border-radius */
    .bottom-nav {
        max-width: 100%;
        width: 100%;
        left: 0;
        transform: none;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        padding: 8px 48px calc(8px + env(safe-area-inset-bottom));
        justify-content: space-around;
    }

    .nav-item {
        padding: 8px 20px;
    }

    .nav-item i {
        font-size: 1.25rem;
    }

    .nav-item.active i {
        font-size: 1.45rem;
    }

    .nav-item span:first-of-type {
        font-size: 0.6rem;
    }

    .nav-item span:last-of-type {
        font-size: 0.52rem;
    }

    /* Quick actions: more items per row */
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .action-icon {
        width: 68px;
        height: 68px;
        font-size: 1.6rem;
    }

    /* Home: single-column flow — each section spans full width,
           sections handle their own internal multi-column layouts */
    #home-section {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        align-items: start;
    }

    /* Disease section: 2-col card grid */
    #disease-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: start;
    }

    #disease-section .alert-banner {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    #disease-section .filter-scroller {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    #disease-section .disease-card {
        margin-bottom: 0;
        flex-direction: column;
    }

    #disease-section .disease-image {
        width: 100%;
        height: 90px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    #disease-section .disease-meta {
        flex-wrap: wrap;
    }

    /* Blog section: 2-col card grid */
    #blog-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: start;
    }

    #blog-section .section-header {
        grid-column: 1 / -1;
    }

    #blog-section .blog-topic-row {
        grid-column: 1 / -1;
    }

    #blog-section .blog-card {
        margin-bottom: 0;
    }

    /* Spray: stage scroller + info card full width; chem items in 2-col */
    .priority-section .chemical-item + .chemical-item {
        margin-top: 0;
    }

    /* Variety: tiles wrap into 2-per-row grid */
    #variety-section .variety-swipe {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .variety-tile {
        flex: 0 0 calc(50% - 6px);
    }

    /* Rootstock board: 2 rows side by side */
    .root-board {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .root-row {
        margin-bottom: 0;
    }

    /* Recommendations: 3-col grid */
    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Hover effects for pointer/touchpad users on tablet */
    .card-modern:hover {
        border-color: rgba(58, 125, 68, 0.1);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .disease-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .blog-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .action-item:hover .action-icon {
        transform: translateY(-3px) scale(1.04);
        box-shadow: var(--shadow-md);
    }
}

/* =============================================
         DESKTOP LAYOUT (≥ 1024px)
         Sidebar nav + topbar + scrollable content
         ============================================= */
@media (min-width: 1024px) {
    /* Remove old phone-frame warning */
    .desktop-warning {
        display: none !important;
    }

    body {
        background: var(--gray-100);
        padding: 0;
        display: flex;
        align-items: stretch;
        justify-content: center;
        min-height: 100vh;
    }

    /* App: grid layout — header spans top, sidebar stays in view,
       content + footer scroll together in column 2 */
    .mobile-app {
        display: grid;
        grid-template-areas:
            "header  header"
            "sidebar content"
            "sidebar footer";
        grid-template-columns: 240px 1fr;
        grid-template-rows: 58px 1fr auto;
        max-width: 1440px;
        width: 100%;
        min-height: 100vh;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: var(--gray-300) transparent;
    }

    .mobile-app::-webkit-scrollbar {
        width: 5px;
        display: block;
    }
    .mobile-app::-webkit-scrollbar-track { background: transparent; }
    .mobile-app::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
    .mobile-app::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

    /* ---- TOPBAR ---- */
    .app-header {
        grid-area: header;
        position: sticky;
        top: 0;
        z-index: 100;
        border-radius: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 28px;
        gap: 16px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
        min-height: 58px;
    }

    /* Remove leaf pattern on desktop topbar */
    .app-header::before {
        display: none;
    }

    /* Brand name hidden on desktop — sidebar already shows it */
    .brand-name {
        display: none;
    }

    /* Dissolve header-top wrapper so greeting + action buttons
           become direct flex children of the topbar */
    .header-top {
        display: contents;
    }

    .greeting {
        flex: 0 0 auto;
        /* Don't stretch */
        order: 1;
    }

    .greeting h1 {
        font-size: 0;
        /* Hide "Namaste 👋" */
        pointer-events: none;
    }

    .greeting h1 i {
        display: none;
    }

    .greeting p {
        font-size: 0.8rem;
        margin: 0;
        opacity: 0.9;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .location-chip {
        margin: 0;
        flex-shrink: 0;
    }

    .weather-widget {
        flex: 0 0 auto;
        padding: 6px 14px;
        border-radius: var(--radius-md);
    }

    .temp-value {
        font-size: 1.1rem;
    }

    .weather-temp i {
        font-size: 1.1rem;
    }

    .weather-desc {
        font-size: 0.68rem;
    }

    .spray-window {
        font-size: 0.65rem;
        padding: 5px 10px;
    }

    .header-stats {
        margin: 0;
        margin-left: auto;
        grid-template-columns: repeat(3, auto);
        gap: 8px;
    }

    .stat-pill {
        padding: 4px 12px;
    }

    .stat-value {
        font-size: 0.85rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .header-actions {
        flex-shrink: 0;
        order: 99;
        /* Always last — far right of topbar */
    }

    .header-actions button {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }

    /* ---- SIDEBAR NAV ---- */
    .bottom-nav {
        grid-area: sidebar;
        position: sticky;
        top: 58px;
        left: auto;
        bottom: auto;
        transform: none;
        width: 240px;
        max-width: 240px;
        height: calc(100vh - 58px);
        overflow-y: auto;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 20px 14px 24px;
        border-top: none;
        border-right: 1px solid var(--gray-200);
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        box-shadow: none;
        background: #ffffff;
        gap: 2px;
        z-index: 10;
    }

    /* No ::before pseudo label */
    .bottom-nav::before {
        display: none;
    }

    /* Sidebar brand header */
    .nav-sidebar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 4px 8px 18px;
        margin-bottom: 6px;
        border-bottom: 1px solid var(--gray-200);
        font-family: var(--font-display);
        font-size: 1.25rem;
        color: var(--gray-900);
        text-decoration: none;
    }

    .nav-sidebar-brand i {
        color: var(--color-primary);
        font-size: 1.1rem;
    }

    /* Sidebar footer — pinned to bottom */
    .nav-sidebar-footer {
        display: flex;
        flex-direction: column;
        gap: 1px;
        margin-top: auto;
        padding: 14px 8px 0;
        border-top: 1px solid var(--gray-200);
    }

    .nav-sidebar-footer p {
        font-size: 0.62rem;
        color: var(--gray-400);
        margin: 0;
        line-height: 1.5;
    }

    .nav-sidebar-footer p:last-child {
        font-family: var(--font-hindi);
        font-size: 0.65rem;
    }

    /* Nav items — row layout for sidebar */
    .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        padding: 11px 12px;
        border-radius: 10px;
        min-height: 44px;
        min-width: unset;
        gap: 14px;
        color: var(--gray-600);
        font-size: 0.88rem;
        background: transparent;
    }

    .nav-item:hover {
        background: var(--color-primary-soft);
        color: var(--color-primary);
        transform: none;
        opacity: 1;
    }

    /* Icon — reset pill wrapper, icon inline */
    .nav-icon-wrap {
        width: 20px !important;
        height: auto !important;
        border-radius: 0 !important;
        background: transparent !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item i {
        font-size: 1rem !important;
        transform: none !important;
        color: inherit;
    }

    /* Show English label, hide Hindi */
    .nav-label-en {
        display: block;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1;
        color: inherit;
    }

    .nav-label {
        display: none !important;
    }

    /* Active state — green accent on white */
    .nav-item.active {
        background: var(--color-primary-soft);
        color: var(--color-primary);
        border-radius: 10px;
    }

    .nav-item.active .nav-icon-wrap {
        background: transparent !important;
    }

    .nav-item.active i {
        font-size: 1rem !important;
        color: var(--color-primary) !important;
        transform: none !important;
    }

    .nav-item.active .nav-label-en {
        color: var(--color-primary);
    }

    .nav-item.active::after {
        display: none;
    }

    .nav-item:active {
        transform: none;
        opacity: 1;
    }

    /* ---- MAIN CONTENT AREA ---- */
    .main-content {
        grid-area: content;
        padding: 28px 32px 32px;
        background: var(--gray-50);
    }

    /* Home section: 2-column grid */
    #home-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 24px;
        align-items: start;
    }

    /* Full-width items in home grid — every section spans both columns */
    #home-section > * {
        grid-column: 1 / -1;
    }

    /* Quick actions: more per row on desktop */
    .quick-actions {
        grid-template-columns: repeat(8, 1fr);
    }

    /* Better hover effects for desktop (pointer device) */
    .card-modern:hover {
        border-color: rgba(58, 125, 68, 0.12);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .disease-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

    .blog-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .action-item:hover .action-icon {
        transform: translateY(-4px) scale(1.05);
        box-shadow: var(--shadow-md);
    }

    .action-item:nth-child(1):hover .action-icon {
        background: linear-gradient(145deg, #fff5f5, #fee2e2);
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
    }

    .action-item:nth-child(2):hover .action-icon {
        background: linear-gradient(145deg, #faf5ff, #ede9fe);
        box-shadow: 0 4px 14px rgba(139, 92, 246, 0.15);
    }

    .action-item:nth-child(3):hover .action-icon {
        background: linear-gradient(145deg, #eff6ff, #dbeafe);
        box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15);
    }

    .action-item:nth-child(4):hover .action-icon {
        background: linear-gradient(145deg, #f0fdf4, #dcfce7);
        box-shadow: 0 4px 14px rgba(58, 125, 68, 0.15);
    }

    /* Variety tiles larger on desktop */
    .variety-tile {
        flex: 0 0 260px;
    }

    /* Disease section content */
    #disease-section,
    #blog-section,
    #variety-section,
    #rootstock-section,
    #chemical-section {
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    /* Spray schedule section */
    #spray-schedule-section {
        margin-top: 0;
    }

    /* Recommendations grid on desktop */
    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Wide desktop: center with max-width border */
@media (min-width: 1440px) {
    .mobile-app {
        border-left: 1px solid var(--gray-200);
        border-right: 1px solid var(--gray-200);
    }
}

/* Small mobile adjustments */
@media (max-width: 380px) {
    .quick-actions {
        gap: 4px;
    }

    .action-icon {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    .weather-widget {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}

/* Accessibility - improved touch targets */
button,
.nav-item,
.action-item,
.location-chip,
.card-modern {
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

a:focus-visible,
button:focus-visible,
.location-chip:focus-visible,
.weather-widget:focus-visible,
.card-modern:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Recommendations Section */
.recommendations-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 8px solid var(--gray-100);
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.recommendations-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--gray-800);
    margin: 0;
}

.recommendations-header i {
    color: var(--color-accent);
    font-size: 1.5rem;
}

.profile-summary {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-xs);
}

.profile-tag {
    background: var(--gray-50);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: 0.75rem;
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.profile-tag i {
    color: var(--color-primary);
}

/* Recommendation cards grid */
.rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.rec-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all var(--transition-spring);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.rec-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
    border-color: rgba(58, 125, 68, 0.12);
}

.rec-card.blog {
    border-top: 3px solid var(--rec-blog);
}

.rec-card.variety {
    border-top: 3px solid var(--rec-variety);
}

.rec-card.rootstock {
    border-top: 3px solid var(--rec-rootstock);
}

.rec-card.practice {
    border-top: 3px solid var(--rec-practice);
}

.rec-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.rec-icon.blog {
    background: var(--rec-blog-soft);
    color: var(--rec-blog);
}

.rec-icon.variety {
    background: var(--rec-variety-soft);
    color: var(--rec-variety);
}

.rec-icon.rootstock {
    background: var(--rec-rootstock-soft);
    color: var(--rec-rootstock);
}

.rec-icon.practice {
    background: var(--rec-practice-soft);
    color: var(--rec-practice);
}

.rec-title {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 0.9rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.rec-meta {
    font-size: 0.7rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--space-xs);
}

.rec-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.rec-badge.high-altitude {
    background: var(--info-soft);
    color: var(--info);
}

.rec-badge.trending {
    background: var(--success-soft);
    color: var(--success);
}

.rec-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
    font-size: 0.65rem;
    color: var(--gray-400);
}

/* Horizontal scroll for recommendations */
.rec-horizontal {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-xs) 0 var(--space-md);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--space-lg);
}

.rec-horizontal::-webkit-scrollbar {
    display: none;
}

.rec-horizontal .rec-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
}


/* Section wrappers */
.section-wrapper {
    margin-bottom: var(--space-xl);
}

.spray-schedule-section {
    padding-bottom: var(--space-lg);
}

.disease-library-section {
    padding-bottom: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 2px solid var(--gray-100);
    padding-top: var(--space-lg);
}

.blog-section {
    padding-bottom: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 2px solid var(--gray-100);
    padding-top: var(--space-lg);
}

.blog-topic-row {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-xs) 0 var(--space-md);
    scrollbar-width: none;
}

.blog-topic-row::-webkit-scrollbar {
    display: none;
}

.blog-topic-pill {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.blog-topic-pill.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.blog-topic-pill.disease {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: var(--danger);
}

.blog-topic-pill.disease.active {
    background: var(--danger);
    color: white;
}

.blog-topic-pill.variety {
    background: var(--rec-variety-soft);
    color: var(--rec-variety);
    border-color: var(--rec-variety);
}

.blog-topic-pill.variety.active {
    background: var(--rec-variety);
    color: white;
}

.blog-topic-pill.practice {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: var(--warning);
}

.blog-topic-pill.practice.active {
    background: var(--warning);
    color: white;
}

.blog-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    display: flex;
    gap: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-spring);
    box-shadow: var(--shadow-sm);
}

.blog-card:active {
    transform: scale(0.985);
    border-color: rgba(58, 125, 68, 0.12);
    box-shadow: var(--shadow-md);
}

.blog-card-image {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: var(--gray-400);
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    border: 1px solid var(--gray-200);
}

.blog-card-content {
    flex: 1;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xs);
}

.blog-tag.disease {
    background: var(--danger-soft);
    color: var(--danger);
}

.blog-tag.variety {
    background: var(--rec-variety-soft);
    color: var(--rec-variety);
}

.blog-tag.practice {
    background: var(--warning-soft);
    color: var(--warning);
}

.blog-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.35;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.65rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
}

.blog-excerpt {
    font-size: 0.74rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-stats {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.65rem;
    color: var(--gray-400);
}

.variety-section,
.rootstock-section,
.chemical-section {
    padding-bottom: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 2px solid var(--gray-100);
    padding-top: var(--space-lg);
}

.variety-hero {
    background: linear-gradient(145deg, var(--rec-variety-soft), white);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.variety-hero-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
}

.variety-hero-sub {
    font-size: 0.74rem;
    color: var(--gray-600);
    margin-top: 2px;
}

.variety-pill-row,
.root-filter-row,
.chem-filter-row {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-xs) 0 var(--space-md);
    scrollbar-width: none;
}

.variety-pill-row::-webkit-scrollbar,
.root-filter-row::-webkit-scrollbar,
.chem-filter-row::-webkit-scrollbar {
    display: none;
}

.variety-pill,
.root-filter-pill,
.chem-filter-pill {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    background: var(--gray-100);
    color: var(--gray-600);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.variety-pill.active,
.root-filter-pill.active,
.chem-filter-pill.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.variety-swipe {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-xs) 0 var(--space-md);
    scroll-snap-type: x mandatory;
}

.variety-swipe::-webkit-scrollbar {
    display: none;
}

.variety-tile {
    flex: 0 0 230px;
    scroll-snap-align: start;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition:
        transform var(--transition-spring),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
}

.variety-tile:active {
    transform: scale(0.975);
    box-shadow: var(--shadow-md);
    border-color: rgba(139, 92, 246, 0.15);
}

.variety-tile.show {
    animation: varietyPop 0.45s ease forwards;
}

.variety-chip {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--rec-variety-soft);
    color: var(--rec-variety);
}

.variety-title {
    margin-top: var(--space-xs);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--gray-900);
}

.variety-metric {
    margin-top: var(--space-sm);
}

.variety-metric-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--gray-500);
}

.variety-track {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    overflow: hidden;
    margin-top: 4px;
}

.variety-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--rec-variety), var(--info));
}

.root-board {
    background: linear-gradient(145deg, #fafbfc, white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    box-shadow: var(--shadow-xs);
}

.root-row {
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-bottom: var(--space-sm);
    background: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        transform var(--transition-spring),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
    opacity: 0;
    transform: translateX(-10px);
    box-shadow: var(--shadow-xs);
}

.root-row:last-child {
    margin-bottom: 0;
}

.root-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.root-row:active::before {
    width: 8px;
}

.root-row:active {
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

.root-row.show {
    animation: rootSlide 0.38s ease forwards;
}

.root-row[data-root-size="dwarf"]::before {
    background: var(--rec-variety);
}

.root-row[data-root-size="vigorous"]::before {
    background: var(--danger);
}

.root-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.root-row-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--gray-900);
}

.root-row-tag {
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    padding: 2px 8px;
    background: var(--success-soft);
    color: var(--success);
}

.root-row-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.root-kpi {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 6px;
    text-align: center;
}

.root-kpi b {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-800);
}

.root-kpi span {
    font-size: 0.58rem;
    color: var(--gray-500);
}

.chem-panel {
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
}

.chem-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-sm);
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
}

.chem-line:last-child {
    border-bottom: 0;
}

.chem-line:active {
    background: var(--gray-50);
}

.chem-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: -140%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.7),
        transparent
    );
}

.chem-line.show {
    animation: chemRise 0.35s ease forwards;
}

.chem-line:active::after {
    animation: chemShine 0.55s ease;
}

.chem-line-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gray-900);
}

.chem-line-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0;
}

.chem-line-meta span {
    font-size: 0.62rem;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 2px 8px;
}

.chem-line-bar {
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    overflow: hidden;
}

.chem-line-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--info));
}

.chem-score {
    align-self: center;
    min-width: 56px;
    text-align: center;
    border-radius: var(--radius-full);
    padding: 6px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--success-soft);
    color: var(--success);
}

.chem-score.good {
    background: var(--info-soft);
    color: var(--info);
}

.variety-pill:active,
.root-filter-pill:active,
.chem-filter-pill:active {
    transform: scale(0.95);
}

@keyframes varietyPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rootSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes chemRise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chemShine {
    from {
        left: -140%;
    }

    to {
        left: 140%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── Section Images: Varieties, Rootstocks, Chemicals ──────────────────── */

/* ── Variety tile image banner ── */
/* The tile keeps its original padding; image bleeds to edges via negative margin */
.variety-img-wrap {
    /* Pull image flush to top/left/right of the padded tile */
    margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md))
        var(--space-sm);
    width: calc(100% + 2 * var(--space-md));
    height: 130px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    position: relative;
    background: var(--vi-bg, rgba(139, 92, 246, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.variety-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent; /* suppress alt-text / broken-image icon */
}

.variety-img-icon {
    font-size: 3rem;
    opacity: 0.22;
    pointer-events: none;
}

/* ── Rootstock row image thumbnail ── */
.root-row-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.root-img-wrap {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--ri-bg, rgba(58, 125, 68, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    align-self: center;
}

.root-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
}

.root-img-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    opacity: 0.35;
    pointer-events: none;
}

.root-row-body {
    flex: 1;
    min-width: 0;
}

/* ── Chemical line image thumbnail ── */
/* Extend grid from 2 to 3 columns to accommodate the image */
.chem-line {
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.chem-img-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--ci-bg, rgba(58, 125, 68, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.chem-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
}

.chem-img-icon {
    font-size: 1.1rem;
    color: var(--color-primary);
    opacity: 0.5;
    pointer-events: none;
}

/* Desktop: variety tiles get taller image, chemical img slightly bigger */
@media (min-width: 768px) {
    .variety-img-wrap {
        height: 160px;
    }

    .chem-img-wrap {
        width: 54px;
        height: 54px;
    }

    .root-img-wrap {
        width: 68px;
        height: 68px;
    }
}

@media (min-width: 1024px) {
    .variety-img-wrap {
        height: 140px;
    }
}

/* ─── App Footer — compact 3-row ─────────────────────────────────────────── */

.app-footer {
    background: linear-gradient(180deg, #1a2e1a, #132413);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 20px calc(76px + env(safe-area-inset-bottom));
    text-align: center;
}

.footer-copy {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
}

.footer-copy .fa-heart {
    color: #ef4444;
    font-size: 0.6rem;
    vertical-align: middle;
}

.footer-author {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-author:active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-spring);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

.footer-social-btn.fb  { color: #1877f2; }
.footer-social-btn.ig  { color: #e1306c; }
.footer-social-btn.yt  { color: #ff0000; }

.footer-social-btn:active {
    transform: scale(0.88);
    opacity: 0.8;
}

@media (min-width: 1024px) {
    .app-footer {
        grid-area: footer;
        padding: 20px 32px;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .footer-author:hover {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.6);
    }

    .footer-social-btn:hover {
        transform: scale(1.1);
        background: rgba(255, 255, 255, 0.12);
    }
}

/* ─── Header Dropdowns ─────────────────────────────────────────────────── */

.hdr-drop-wrap {
    position: relative;
    z-index: 400;
}

/* The button (same look as original header-actions button) */
.hdr-action-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.hdr-action-btn:active,
.hdr-action-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(0.94);
}

/* Notification badge */
.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1;
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid transparent;
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

/* Dropdown card */
.hdr-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 500;
    min-width: 230px;
    max-width: min(270px, calc(100vw - 24px));
    overflow: visible;
    /* hidden state */
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition:
        opacity 0.2s cubic-bezier(0.2, 0, 0, 1),
        transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.hdr-dropdown.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Dropdown header strip */
.dropdown-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
}

.dropdown-hdr-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-800, #1e293b);
}

.notif-new-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #ef4444;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 999px;
}

/* Notification list */
.notif-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    transition: background 0.12s ease;
    cursor: pointer;
}

.notif-item:active {
    background: var(--gray-50, #f8fafc);
}

.notif-item.is-unread {
    background: #f0fdf4;
}

.notif-item.is-unread:active {
    background: #dcfce7;
}

/* Notification icon circles */
.notif-icon-wrap {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    margin-top: 1px;
}

.notif-icon-wrap.spray {
    background: #d1fae5;
    color: #059669;
}
.notif-icon-wrap.alert {
    background: #fef3c7;
    color: #d97706;
}
.notif-icon-wrap.mandi {
    background: #ede9fe;
    color: #7c3aed;
}
.notif-icon-wrap.info {
    background: #dbeafe;
    color: #2563eb;
}
.notif-icon-wrap.content {
    background: rgba(58,125,68,0.12);
    color: #3a7d44;
}
.notif-icon-wrap.weather {
    background: #fef3c7;
    color: #d97706;
}
.notif-icon-wrap.disease {
    background: #fee2e2;
    color: #dc2626;
}

/* Notification item link (wraps icon + body inside <li>) */
.notif-item-link {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--gray-800, #1e293b);
    margin: 0 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-meta {
    font-size: 0.62rem;
    color: var(--gray-500, #64748b);
    margin: 0;
}

/* Footer link */
.dropdown-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary, #2d6a4f);
    border-top: 1px solid var(--gray-100, #f1f5f9);
    text-decoration: none;
    transition: background 0.12s ease;
}

.dropdown-footer-link:active {
    background: var(--gray-50, #f8fafc);
}

/* ── Profile dropdown ── */
.profile-hdr {
    gap: 8px;
    justify-content: flex-start;
}

.profile-avatar-sm {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--color-primary, #2d6a4f),
        var(--color-accent, #52b788)
    );
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.profile-hdr-sub {
    font-size: 0.62rem;
    color: var(--gray-500, #64748b);
    margin: 1px 0 0;
}

.profile-menu {
    list-style: none;
    margin: 4px 0;
    padding: 0;
}

/* Ensure the form wrapping the logout button takes full width */
.profile-menu li form {
    width: 100%;
    margin: 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700, #334155);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease;
    text-align: left;
    min-height: 0;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.profile-menu-item i {
    width: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--gray-400, #94a3b8);
    font-size: 0.78rem;
}

.profile-menu-item:active {
    background: var(--gray-50, #f8fafc);
}

.profile-menu-divider {
    height: 1px;
    background: var(--gray-100, #f1f5f9);
    margin: 3px 0;
}

/* Ensure logout button inside form is not affected by global button sizing */
.profile-menu li form button.profile-menu-item {
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: visible;
}

/* Backdrop overlay (mobile tap-to-close) */
.hdr-dropdown-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    pointer-events: none;
}

.hdr-dropdown-backdrop.is-active {
    display: block;
    pointer-events: none;
}

/* Compact mode: keep button size consistent */
.app-header.is-compact .hdr-action-btn {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
}
/* ========================================
   AI SEARCH SECTION STYLES
   ======================================== */

.ai-search-section {
    padding: 20px 12px;
    margin-bottom: 16px;
    width: 100%;
}

.ai-search-container {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ai-search-container:active {
    box-shadow: 0 15px 40px rgba(58, 125, 68, 0.15);
}

/* Animated gradient background - Green & Gold theme */
.ai-search-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(135deg, #3a7d44 0%, #52a85f 50%, #e8b84b 100%);
    opacity: 0.95;
    z-index: 1;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background: linear-gradient(
            135deg,
            #3a7d44 0%,
            #52a85f 50%,
            #e8b84b 100%
        );
    }
    50% {
        background: linear-gradient(
            135deg,
            #52a85f 0%,
            #e8b84b 50%,
            #3a7d44 100%
        );
    }
    100% {
        background: linear-gradient(
            135deg,
            #3a7d44 0%,
            #52a85f 50%,
            #e8b84b 100%
        );
    }
}

/* Pro Feature Badge */
.pro-feature-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pro-feature-badge i {
    font-size: 0.85rem;
    animation: sparkleAnimation 2s ease-in-out infinite;
}

@keyframes sparkleAnimation {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Header Section */
.ai-search-header {
    position: relative;
    z-index: 3;
    padding: 24px 20px 16px;
    text-align: center;
}

.ai-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ai-title i {
    font-size: 1.4rem;
    animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

.ai-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

/* Search Input Wrapper */
.ai-search-input-wrapper {
    position: relative;
    z-index: 3;
    padding: 0 20px 16px;
}

.ai-search-input-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.ai-search-input-box:focus-within {
    box-shadow: 0 8px 24px rgba(58, 125, 68, 0.15);
    border: 1px solid #3a7d44;
}

.ai-search-icon {
    font-size: 1.2rem;
    color: #3a7d44;
    flex-shrink: 0;
    animation: pulseAnimation 2s ease-in-out infinite;
}

@keyframes pulseAnimation {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.ai-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--gray-700);
    background: transparent;
    font-family: inherit;
}

.ai-search-input::placeholder {
    color: var(--gray-400);
}

/* Search Button */
.ai-search-btn {
    background: linear-gradient(135deg, #3a7d44 0%, #52a85f 100%);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-search-btn:active {
    transform: scale(0.95);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

/* Suggestions Section */
.ai-suggestions {
    position: relative;
    z-index: 3;
    padding: 16px 20px 20px;
    border-top: 1px solid #f1f5f9;
}

.suggestions-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 480px) {
    .suggestions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .suggestions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.suggestion-chip {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    text-align: center;
    font-family: inherit;
}

.suggestion-chip i {
    font-size: 0.9rem;
    color: #3a7d44;
}

.suggestion-chip:active {
    background: linear-gradient(135deg, #3a7d44 0%, #52a85f 100%);
    color: white;
    border-color: #3a7d44;
    transform: scale(0.98);
}

.suggestion-chip:active i {
    color: white;
}

/* AI Response Section */
.ai-response-section {
    position: relative;
    z-index: 3;
    padding: 16px 20px 20px;
    border-top: 1px solid #f1f5f9;
}

.ai-conversation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Styling */
.ai-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Message */
.user-message .message-content {
    background: linear-gradient(135deg, #3a7d44 0%, #52a85f 100%);
    color: white;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 85%;
    margin-left: auto;
    margin-right: 0;
}

.user-message .message-time {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-right: 6px;
}

/* AI Response */
.ai-response {
    align-items: flex-start;
}

.message-bubble {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
    max-width: 95%;
}

.message-bubble p {
    margin: 0 0 10px 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.ai-response .message-time {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-left: 6px;
    margin-top: 4px;
}

/* AI Response Content */
.ai-response-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #3a7d44;
}

.response-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
}

.response-label {
    color: var(--gray-600);
    font-weight: 600;
}

.response-value {
    color: #3a7d44;
    font-weight: 500;
    text-align: right;
}

@media (min-width: 480px) {
    .ai-response-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Follow-up suggestions */
.ai-followup {
    margin-top: 8px;
}

.followup-text {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 8px;
    font-weight: 500;
}

.followup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.followup-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-weight: 500;
}

.followup-btn i {
    font-size: 0.8rem;
    color: #3a7d44;
}

.followup-btn:active {
    background: linear-gradient(135deg, #3a7d44 0%, #52a85f 100%);
    color: white;
    border-color: #3a7d44;
    transform: scale(0.95);
}

.followup-btn:active i {
    color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .ai-search-section {
        padding: 16px 12px;
        margin-bottom: 12px;
    }

    .ai-search-header {
        padding: 20px 16px 12px;
    }

    .ai-title {
        font-size: 1.25rem;
    }

    .ai-subtitle {
        font-size: 0.8rem;
    }

    .ai-search-input-wrapper {
        padding: 0 16px 12px;
    }

    .ai-search-input-box {
        padding: 10px 14px;
        gap: 10px;
    }

    .ai-search-input {
        font-size: 0.95rem;
    }

    .ai-search-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .ai-suggestions {
        padding: 12px 16px 16px;
    }

    .suggestion-chip {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .suggestion-chip i {
        font-size: 0.8rem;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .ai-search-container {
        background: linear-gradient(
            135deg,
            rgba(42, 60, 42, 0.8) 0%,
            rgba(26, 46, 26, 0.9) 100%
        );
        border: 1px solid rgba(232, 184, 75, 0.15);
        backdrop-filter: blur(10px);
    }

    .ai-search-bg {
        opacity: 0.6;
        filter: brightness(0.7) saturate(0.8);
    }

    .ai-search-input-box {
        background: rgba(45, 74, 45, 0.5);
        border: 1px solid rgba(232, 184, 75, 0.2);
        backdrop-filter: blur(8px);
    }

    .ai-search-input-box:focus-within {
        background: rgba(45, 74, 45, 0.7);
        border-color: #e8b84b;
        box-shadow: 0 0 20px rgba(232, 184, 75, 0.2);
    }

    .ai-search-input {
        color: #d4e5d8;
        background: transparent;
    }

    .ai-search-input::placeholder {
        color: rgba(212, 229, 216, 0.5);
    }

    .suggestion-chip {
        background: rgba(45, 74, 45, 0.4);
        border: 1px solid rgba(232, 184, 75, 0.25);
        color: #d4e5d8;
        backdrop-filter: blur(6px);
    }

    .suggestion-chip:hover {
        background: rgba(45, 74, 45, 0.6);
        border-color: #e8b84b;
        color: #e8b84b;
    }

    .suggestion-chip i {
        color: #e8b84b;
    }

    .message-bubble {
        background: rgba(45, 74, 45, 0.3);
        border: 1px solid rgba(82, 168, 95, 0.2);
        color: #d4e5d8;
        backdrop-filter: blur(8px);
    }

    .ai-response-content {
        background: rgba(26, 46, 26, 0.5);
        border-left: 3px solid #e8b84b;
    }

    .response-label {
        color: #e8b84b;
    }

    .response-value {
        color: #d4e5d8;
    }

    .followup-btn {
        background: rgba(45, 74, 45, 0.4);
        border: 1px solid rgba(232, 184, 75, 0.3);
        color: #e8b84b;
        backdrop-filter: blur(6px);
        transition: all 0.3s ease;
    }

    .followup-btn:hover {
        background: rgba(58, 125, 68, 0.6);
        border-color: #e8b84b;
        color: white;
        box-shadow: 0 0 15px rgba(232, 184, 75, 0.2);
    }

    .followup-btn i {
        color: #e8b84b;
    }
}

/* ═══════════════════════════════════════════════════════
   BAAGICHA DESIGN v2 — Enhanced Mobile UX (March 2026)
   Applied on top of existing stylesheet — mobile-first
   ═══════════════════════════════════════════════════════ */

/* ── YATRA ONE for Hindi headings ─────────────────────── */
:root {
    --font-hindi-display: 'Yatra One', var(--font-hindi);
}

/* ── BOTTOM NAVIGATION — Material 3 pill indicator ───── */

/* Override old styles — solid bg, full-width, no extra border-radius */
.bottom-nav {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03), 0 -8px 24px rgba(0, 0, 0, 0.06);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    gap: 0;
    /* Fix: override base 428px cap so nav is always full-width on mobile/tablet */
    max-width: 100%;
    left: 0;
    transform: none;
}

/* ── Right-fade indicator — tells user more items exist ─────────── */
@keyframes nav-hint-pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.15; }
    100% { opacity: 1; }
}

.bottom-nav::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: 52px;
    background: linear-gradient(to left, #ffffff 20%, transparent);
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.25s ease;
    /* Pulse twice on load to hint scroll */
    animation: nav-hint-pulse 0.9s ease-in-out 2;
}

/* Right fade hidden once scrolled to end */
.bottom-nav.nav-at-end::after {
    opacity: 0;
}

/* ── Left-fade indicator — appears once user has scrolled ─────── */
.bottom-nav::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: 52px;
    background: linear-gradient(to right, #ffffff 20%, transparent);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bottom-nav.nav-scrolled::before {
    opacity: 1;
}

/* ── Scroll track — the actual scrollable flex row ────────────── */
.nav-scroll-track {
    display: flex;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-scroll-track::-webkit-scrollbar {
    display: none;
}

/* Nav item — fixed width so items don't squish */
.nav-item {
    flex: 0 0 auto;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 2px 2px;
    gap: 2px;
    min-height: 54px;
    border-radius: 0;
    background: transparent;
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

/* Icon pill wrapper — the "pill" floats above the label */
.nav-icon-wrap {
    width: 56px;
    height: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all var(--transition-fast);
    margin-bottom: 1px;
}

/* Icon size inside wrapper */
.nav-item i {
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    line-height: 1;
}

/* Hindi-only label */
.nav-label {
    display: block;
    font-family: var(--font-hindi);
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: inherit;
}

/* Remove the old dual-span display */
.nav-item span:first-of-type {
    display: block; /* overrides tablet rule */
}

/* ACTIVE state — pill background on icon only */
.nav-item.active {
    color: var(--color-primary);
    background: transparent;
}

.nav-item.active .nav-icon-wrap {
    background: rgba(58, 125, 68, 0.14);
    box-shadow: 0 1px 4px rgba(58, 125, 68, 0.12);
}

.nav-item.active i {
    font-size: 1.25rem;
    color: var(--color-primary);
    transform: none;
}

.nav-item.active .nav-label {
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Remove old ::after indicator */
.nav-item.active::after {
    display: none;
}

/* Tap feedback */
.nav-item:active {
    transform: scale(0.91);
    opacity: 0.85;
}

/* Sidebar-only elements — hidden on mobile */
.nav-sidebar-brand,
.nav-sidebar-footer,
.nav-label-en {
    display: none;
}

/* ── Desktop sidebar — re-override post-cascade rules ────────────── */
@media (min-width: 1024px) {
    /* Restore white sidebar background overridden by mobile Material 3 block */
    .bottom-nav {
        background: #ffffff !important;
        border-top: none !important;
        border-right: 1px solid var(--gray-200) !important;
        box-shadow: none !important;
        padding: 20px 14px 24px !important;
        gap: 2px !important;
        flex-direction: column !important;
    }

    /* No scroll indicators on desktop sidebar */
    .bottom-nav::before,
    .bottom-nav::after {
        display: none !important;
    }

    /* Make scroll track transparent — items flow as normal sidebar children */
    .nav-scroll-track {
        display: contents !important;
    }

    /* Restore sidebar nav item layout */
    .nav-item {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        flex: none !important;
        width: 100% !important;
        padding: 11px 12px !important;
        min-height: 44px !important;
        gap: 14px !important;
        color: var(--gray-600) !important;
        border-radius: 10px !important;
        background: transparent !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .nav-item:hover {
        background: var(--color-primary-soft) !important;
        color: var(--color-primary) !important;
    }

    .nav-item.active {
        background: var(--color-primary-soft) !important;
        color: var(--color-primary) !important;
    }

    .nav-item.active i {
        color: var(--color-primary) !important;
    }

    /* Restore icon wrap */
    .nav-icon-wrap {
        width: 20px !important;
        height: auto !important;
        border-radius: 0 !important;
        background: transparent !important;
        margin-bottom: 0 !important;
    }

    /* Show sidebar brand + footer labels */
    .nav-sidebar-brand {
        display: flex !important;
    }

    .nav-sidebar-footer {
        display: flex !important;
    }

    .nav-label-en {
        display: block !important;
    }

    /* Hide mobile tap feedback */
    .nav-item:active {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ── SECTION HEADERS — Hindi subtitle ────────────────── */

.section-header h2 {
    /* Keep existing font-display style */
    line-height: 1.1;
}

.section-hi {
    font-family: var(--font-hindi);
    font-size: 0.72rem;
    color: var(--gray-400);
    margin: 1px 0 0 32px; /* indent past the icon */
    line-height: 1;
    font-weight: 500;
}

/* Allow section-header left side to stack h2 + Hindi */
.section-header > div {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Align link to center of both lines */
.section-header > a {
    align-self: center;
    white-space: nowrap;
}

/* Section header right side — location tag + link */
.section-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    align-self: center;
}
.section-location-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.section-location-tag i {
    font-size: 0.6rem;
    color: var(--color-accent);
}

/* ── INSIGHT STRIP — bilingual, more prominent ────────── */

.insight-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid rgba(58, 125, 68, 0.1);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 10px 14px 10px 12px;
    margin-bottom: var(--space-md);
    box-shadow: 0 2px 8px rgba(58, 125, 68, 0.06);
}

.insight-icon {
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(58, 125, 68, 0.3);
}

.insight-body {
    flex: 1;
    min-width: 0;
}

.insight-body p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--gray-800);
    line-height: 1.3;
    font-family: var(--font-hindi);
}

.insight-body p strong {
    color: var(--color-primary);
    font-weight: 700;
}

.insight-sub {
    font-family: var(--font-body) !important;
    font-size: 0.72rem !important;
    color: var(--gray-500) !important;
    margin-top: 2px !important;
}

/* ── SHORTCUTS ROW — prominent 4-icon grid ─────────────── */

.shortcuts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: var(--space-xl);
}

.shortcut-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.shortcut-btn:active {
    transform: scale(0.88);
}

.shortcut-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
    transition: box-shadow var(--transition-fast);
    margin-bottom: 2px;
}

.shortcut-btn:active .shortcut-icon {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Color variants */
.shortcut-spray {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.shortcut-disease {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.shortcut-chemical {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.shortcut-variety {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.shortcut-en {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-700);
    line-height: 1.1;
}

.shortcut-hi {
    display: block;
    font-family: var(--font-hindi);
    font-size: 0.6rem;
    color: var(--gray-400);
    line-height: 1;
}

/* ── QUICK ACTIONS — cleaner without bottom nav conflict ── */

.quick-actions {
    margin-bottom: var(--space-lg);
}

.action-icon {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: none;
}

/* ── CARD MICRO-INTERACTIONS ────────────────────────────── */

.card-modern {
    /* Slightly more natural shadow */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
}

[role="button"]:active,
.card-modern[role="button"]:active {
    transform: scale(0.985);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border-color: rgba(58, 125, 68, 0.25);
}

/* ── HEADER GREETING — Hindi-first ─────────────────────── */

.greeting h1 {
    font-family: var(--font-hindi-display);
    font-size: 1.5rem;
}

/* ── MAIN CONTENT spacing ────────────────────────────────  */

.main-content {
    padding-top: var(--space-md);
}

/* ── KNOWLEDGE CARD — more distinct ─────────────────────── */

.knowledge-card {
    background: linear-gradient(135deg,
        rgba(58, 125, 68, 0.07) 0%,
        rgba(232, 184, 75, 0.06) 100%);
    border: 1.5px solid rgba(58, 125, 68, 0.18);
    margin-bottom: var(--space-xl);
}

.knowledge-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lt));
}

/* ── PWA STANDALONE mode extra bottom padding ────────────── */

@media (display-mode: standalone) {
    .bottom-nav {
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
}

/* ── TABLET overrides for new nav structure ─────────────── */

@media (min-width: 600px) {
    .shortcuts-row {
        gap: 16px;
    }

    .shortcut-icon {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
        border-radius: 20px;
    }

    .shortcut-en {
        font-size: 0.75rem;
    }

    .nav-icon-wrap {
        width: 64px;
        height: 34px;
    }

    .nav-item i {
        font-size: 1.3rem;
    }

    .nav-label {
        font-size: 0.65rem;
    }
}

/* ── DESKTOP: handled by the full layout block at line ~1378 ── */


/* ── COMPACT INFO BAR ─────────────────────────────────────── */

/* Hidden in expanded state */
.compact-info-bar {
    display: none;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    padding: 5px 12px;
    margin-top: 4px;
    line-height: 1;
}

.compact-info-bar i {
    font-size: 0.65rem;
    opacity: 0.85;
}

.cib-div {
    opacity: 0.4;
    font-size: 0.6rem;
}

.cib-temp {
    font-weight: 700;
    color: #fff;
}

.cib-weather {
    opacity: 0.75;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cib-spray {
    font-weight: 600;
}

.cib-spray.is-safe {
    color: #86efac; /* green-300 */
}

.cib-spray.is-caution {
    color: #fcd34d; /* yellow-300 */
}

.cib-loc {
    opacity: 0.7;
    font-size: 0.68rem;
}

/* Compact mode: show info bar, hide separate location-chip + weather-widget */
.app-header.is-compact .compact-info-bar {
    display: flex;
}

.app-header.is-compact .location-chip {
    display: none !important;
}

.app-header.is-compact .weather-widget {
    display: none !important;
}

/* Tighter compact header: reduce overall padding & greeting font */
.app-header.is-compact {
    padding: 6px 12px 8px !important;
}

.app-header.is-compact .header-top {
    margin-bottom: 4px !important;
}

.app-header.is-compact .greeting h1 {
    font-size: 1.05rem !important;
}

.app-header.is-compact .greeting p {
    display: none !important;
}

/* Tablet: keep separate rows but still hide greeting location sub-text */
@media (min-width: 481px) and (max-width: 768px) {
    .app-header.is-compact .compact-info-bar {
        display: none;
    }
    .app-header.is-compact .location-chip {
        display: flex !important;
    }
    .app-header.is-compact .weather-widget {
        display: flex !important;
    }
}

/* Desktop: compact info bar never needed */
@media (min-width: 769px) {
    .compact-info-bar {
        display: none !important;
    }
}



/* ════════════════════════════════════════════════════════════════════════════
   CARD ACTION BUTTONS — shared across all pages
   Like · Save · Done · Report · Pin
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Variety / Rootstock card component (home scroll + variety/rootstock pages) ── */
.variety-card,
.rootstock-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: 0 0 10px;
    text-decoration: none;
    position: relative;
    transition: box-shadow var(--transition-base), transform var(--transition-spring);
    cursor: default;
    box-shadow: var(--shadow-sm);
}

.vc-rank {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.03em;
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    z-index: 2;
}

.vc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.vc-thumb {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    background: var(--gray-100);
    margin: 0 0 4px;
    flex-shrink: 0;
}

.vc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vc-tag,
.vc-name,
.vc-name-hi,
.vc-altitude,
.vc-type,
.vc-spacing,
.vc-footer {
    padding-left: 10px;
    padding-right: 10px;
}

.vc-tag {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    align-self: flex-start;
}

.vc-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.vc-name-hi {
    font-family: var(--font-hindi);
    font-size: 0.7rem;
    color: var(--gray-400);
    line-height: 1.3;
    margin-bottom: 1px;
}

.vc-altitude,
.vc-type,
.vc-spacing {
    font-size: 0.68rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vc-altitude i,
.vc-type i,
.vc-spacing i {
    font-size: 0.62rem;
    color: var(--gray-400);
    width: 10px;
    text-align: center;
}

.vc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--gray-100);
}

.vc-rating {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 3px;
}

.vc-rating i {
    color: #f59e0b;
    font-size: 0.65rem;
}

.vc-votes {
    font-size: 0.62rem;
    color: var(--gray-400);
}

.vc-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    flex: 1;
    padding-bottom: 8px;
}

/* Blog card restructure */
.blog-home-card {
    text-decoration: none;
    color: inherit;
    cursor: default;
}

.bhc-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    flex: 1;
    padding-bottom: 0;
}

/* Generic action button bar (icon-only, sits below scroll cards) */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 7px 10px 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 0 0 12px 12px;
}

/* Base action button — circular, filled */
.card-act-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-spring);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

.card-act-btn:hover {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Pre-hover hints — show intent before click */
.card-act-btn[data-action="like"]:not(.liked):hover    { background: #fef2f2; color: #f87171; }
.card-act-btn[data-action="save"]:not(.saved):hover    { background: #fffbeb; color: var(--color-accent); }
.card-act-btn[data-action="report"]:not(.reported):hover { background: #fff7ed; color: #fb923c; }
.card-act-btn[data-action="task-pin"]:not(.pinned):hover { background: #fffbeb; color: var(--color-accent); }
.card-act-btn[data-action="task-done"]:not(.done):hover  { background: #f0fdf4; color: #4ade80; }

.card-act-btn:active {
    transform: scale(0.82);
}

/* ── Active states ──────────────────────────────── */

/* Liked — red heart */
.card-act-btn.liked {
    background: #fef2f2;
    color: #ef4444;
}
.card-act-btn.liked:hover { background: #fee2e2; }

/* Saved — gold bookmark */
.card-act-btn.saved {
    background: #fffbeb;
    color: var(--color-accent);
}
.card-act-btn.saved:hover { background: #fef3c7; }

/* Done — green check */
.card-act-btn.done {
    background: #f0fdf4;
    color: #16a34a;
}
.card-act-btn.done:hover { background: #dcfce7; }

/* Reported — amber flag */
.card-act-btn.reported {
    background: #fff7ed;
    color: #f97316;
}
.card-act-btn.reported:hover { background: #ffedd5; }

/* Pinned — gold bookmark */
.card-act-btn.pinned {
    background: #fffbeb;
    color: var(--color-accent);
}
.card-act-btn.pinned:hover { background: #fef3c7; }

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS — Android-style snackbar
   Usage: Toast.show('Message', { type: 'success' })
   ═══════════════════════════════════════════════════════════════════ */
#toast-container {
    position: fixed;
    bottom: 76px; /* clear mobile bottom nav */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.toast-msg {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    color: #f9fafb;
    border-radius: 24px;
    padding: 9px 16px 9px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-body);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 12px 32px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    white-space: nowrap;
    animation: toast-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    cursor: default;
    line-height: 1;
    user-select: none;
}

.toast-msg.toast-out {
    animation: toast-out 0.22s ease forwards;
}

/* Colored dot on the left */
.toast-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    flex-shrink: 0;
    color: #fff;
}

.toast-success .toast-dot { background: #16a34a; }
.toast-saved   .toast-dot { background: #d97706; }
.toast-liked   .toast-dot { background: #ef4444; }
.toast-report  .toast-dot { background: #f97316; }
.toast-done    .toast-dot { background: #16a34a; }
.toast-pinned  .toast-dot { background: #d97706; }
.toast-info    .toast-dot { background: #3b82f6; }
.toast-warn    .toast-dot { background: #f59e0b; }
.toast-error   .toast-dot { background: #dc2626; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(18px) scale(0.88); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0)    scale(1);    }
    to   { opacity: 0; transform: translateY(10px) scale(0.94); }
}

/* Desktop — shift right to account for 240px sidebar */
@media (min-width: 1024px) {
    #toast-container {
        bottom: 28px;
        left: calc(240px + ((100vw - 240px) / 2));
    }
}

/* ══════════════════════════════════════════════════════════════
   KB PAGE LAYOUT — Disease / Variety / Rootstock knowledge-base pages
   ══════════════════════════════════════════════════════════════ */
.kb-page {
    padding: 16px 16px calc(80px + env(safe-area-inset-bottom));
}

/* Filter pill — base styles (used on disease, variety, rootstock pages) */
.filter-pill {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background: white;
    color: var(--gray-600);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all var(--transition-spring);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.filter-pill i { font-size: 0.7rem; }
.filter-pill span[lang="hi"] {
    font-family: var(--font-hindi);
    font-size: 0.65rem;
    opacity: 0.75;
}
.filter-pill.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(58, 125, 68, 0.3);
}
.filter-pill:active { transform: scale(0.93); }

.kb-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0 18px;
}

.kb-page-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.kb-page-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
    font-family: var(--font-display);
}

.kb-page-sub {
    font-family: var(--font-hindi);
    font-size: 0.75rem;
    color: var(--gray-400);
    margin: 2px 0 0;
}

/* Filter pill row — horizontal scroll */
.filter-pills-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filter-pills-row::-webkit-scrollbar { display: none; }

/* 2-column card grid */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}

/* ── Disease card component (used on spray-schedule + disease pages) ── */
.disease-card {
    flex-shrink: 0;
    width: 220px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 0;
    scroll-snap-align: start;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--dc, #dc2626);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-spring);
}
.disease-card:active { transform: scale(0.97); box-shadow: var(--shadow-md); }
.disease-card-hero {
    width: 100%;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 12px 8px;
}
.disease-hero-icon { font-size: 1.4rem; line-height: 1; }
.sev-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.sev-badge i { font-size: 0.58rem; }
.disease-card-body {
    padding: 8px 12px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.disease-name { font-size: 0.88rem; font-weight: 700; color: var(--gray-900); margin: 0; line-height: 1.25; }
.disease-name-hi { font-family: var(--font-hindi); font-size: 0.7rem; color: var(--gray-400); margin: 0; }
.disease-desc {
    font-size: 0.7rem;
    color: var(--gray-600);
    line-height: 1.45;
    margin: 4px 0 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.disease-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px 6px;
    flex-shrink: 0;
    border-top: 1px solid var(--gray-100);
}
.dis-act-btn {
    flex: 1;
    height: 30px;
    width: auto !important;
    border-radius: 20px !important;
    border: 1.5px solid var(--gray-200) !important;
    background: #fafafa !important;
    color: var(--gray-600) !important;
    font-size: 0.68rem !important;
    font-weight: 600;
    gap: 5px;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s !important;
}
.dis-act-btn span { font-size: 0.67rem; font-weight: 600; white-space: nowrap; }
.dis-act-btn:hover { background: var(--gray-100) !important; color: var(--gray-700) !important; }
.dis-act-btn.reported { background: #fff7ed !important; border-color: rgba(249,115,22,0.4) !important; color: #f97316 !important; }
.dis-act-btn.saved { background: #fffbeb !important; border-color: rgba(232,184,75,0.45) !important; color: var(--color-accent) !important; }
.disease-learn-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--dc, #dc2626);
    text-decoration: none;
    padding: 0 12px 10px;
    transition: opacity 0.15s;
}
.disease-learn-btn:active { opacity: 0.7; }
.disease-learn-btn.disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}
.coming-soon-tag {
    margin-left: auto;
    font-size: 0.55rem;
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 1px 6px;
    border-radius: 10px;
}

/* Override fixed widths set for horizontal-scroll usage */
.kb-grid .disease-card,
.kb-grid .variety-card,
.kb-grid .rootstock-card {
    width: 100%;
    min-width: unset;
    max-width: unset;
    flex-shrink: 1;
    scroll-snap-align: unset;
}

/* Variety / rootstock cards fill the column height so action bar always at bottom */
.kb-grid .variety-card,
.kb-grid .rootstock-card {
    display: flex;
    flex-direction: column;
}
.kb-grid .vc-main { flex: 1; }

/* Ensure [hidden] works even when author CSS sets display:flex */
.kb-grid .disease-card[hidden],
.kb-grid .variety-card[hidden],
.kb-grid .rootstock-card[hidden] { display: none; }

/* Desktop — 3-column grid */
@media (min-width: 1024px) {
    .kb-page { padding-bottom: 32px; }
    .kb-page-title { font-size: 1.3rem; }
    .kb-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .filter-pills-row { flex-wrap: wrap; overflow-x: visible; gap: 10px; }
    .disease-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
}

/* === Header Login Button (guest state) === */
.hdr-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--color-accent);
    color: var(--bg-primary);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background var(--transition-fast), transform var(--transition-fast);
    min-height: 36px;
}
.hdr-login-btn i { font-size: 0.85rem; }
.hdr-login-btn:active {
    transform: scale(0.96);
    background: var(--color-accent-lt);
}
@media (min-width: 600px) {
    .hdr-login-btn:hover {
        background: var(--color-accent-lt);
    }
}

/* Guest login nudge — small notification-style chip */
.hdr-login-nudge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(232, 184, 75, 0.15);
    border: 1px solid rgba(232, 184, 75, 0.25);
    color: var(--color-accent-lt);
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.hdr-login-nudge i {
    font-size: 0.58rem;
}
.hdr-login-nudge:active {
    transform: scale(0.96);
    background: rgba(232, 184, 75, 0.25);
    color: var(--color-accent-lt);
}

/* ── Section View-All Link ──────────────────────────────────────────────────── */
.section-view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: var(--radius-md, 10px);
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition-fast);
}
.section-view-all-link:hover { background: var(--gray-100, #f3f4f6); }
.section-view-all-link .fa-arrow-right { margin-left: auto; font-size: 0.75rem; opacity: 0.6; }

/* === People Strip — Instagram Stories-style global avatar bar === */
.pstrip {
    margin: 0 -16px;
    padding: 10px 0 6px;
    border-bottom: 1px solid var(--gray-100);
    background: #fff;
}
.pstrip-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding: 0 16px;
}
.pstrip-track::-webkit-scrollbar { display: none; }

.pstrip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 62px;
    scroll-snap-align: start;
    position: relative;
    transition: transform var(--transition-spring);
}
.pstrip-item:active { transform: scale(0.92); }

/* Avatar wrapper — ring color indicates status */
.pstrip-avatar-wrap {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    padding: 2px;
    position: relative;
    background: var(--gray-200);
}
.pstrip-avatar-wrap.following {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}
.pstrip-avatar-wrap.suggested {
    background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
}
.pstrip-avatar-wrap.active-now {
    background: linear-gradient(135deg, var(--success), var(--color-primary));
}

/* Avatar inner */
.pstrip-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--bg-primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #fff;
    overflow: hidden;
}
.pstrip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* "Me" card — add icon overlay */
.pstrip-me .pstrip-avatar-wrap {
    background: var(--gray-200);
}
.pstrip-add-icon {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    border: 2px solid #fff;
}

/* Verified badge on avatar */
.pstrip-verified {
    position: absolute;
    bottom: -1px;
    right: -1px;
    font-size: 0.7rem;
    color: var(--info);
    background: #fff;
    border-radius: 50%;
    line-height: 1;
}

/* Name label */
.pstrip-name {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--gray-600);
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* Mini follow button */
.pstrip-follow-btn {
    position: absolute;
    top: 36px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.45rem;
    cursor: pointer;
    transition: transform var(--transition-spring);
    z-index: 2;
    padding: 0;
}
.pstrip-follow-btn:active { transform: scale(0.85); }

/* Desktop: slightly larger, hover effects */
@media (min-width: 600px) {
    .pstrip-item:hover { transform: translateY(-2px); }
    .pstrip-follow-btn:hover { background: var(--color-primary-lt); transform: scale(1.1); }
}
@media (min-width: 1024px) {
    .pstrip { margin: 0; border-radius: var(--radius-md); margin-bottom: 8px; }
    .pstrip-track { padding: 0 12px; }
}

/* Peek-btn reset */
.pstrip-peek-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Activity indicator dot */
.pstrip-avatar-wrap.has-activity::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 2px solid #fff;
}

/* === Peek Modal — Activity bottom sheet === */
.peek-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 900;
    opacity: 0; pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.2, 0, 0, 1);
}
.peek-backdrop.is-open { opacity: 1; pointer-events: auto; }

.peek-modal {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 32px 32px 0 0;
    z-index: 901;
    transform: translateY(100%);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 75vh; overflow-y: auto;
    padding: 0 16px calc(24px + 68px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.peek-modal.is-open { transform: translateY(0); }

.peek-drag-handle {
    width: 36px; height: 4px;
    border-radius: 2px;
    background: var(--gray-300);
    margin: 10px auto 14px;
}

.peek-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px;
}
.peek-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
    flex-shrink: 0;
}
.peek-user-info { flex: 1; min-width: 0; }
.peek-name { display: block; font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.peek-handle { font-size: 0.78rem; color: var(--gray-400); }
.peek-close {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--gray-100); color: var(--gray-500);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; cursor: pointer; flex-shrink: 0;
}
.peek-close:active { transform: scale(0.9); }

.peek-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.peek-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 0.68rem; font-weight: 600;
}

.peek-activity {
    display: flex; gap: 12px; padding: 14px;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: 16px; margin-bottom: 14px;
}
.peek-activity[hidden] { display: none; }
.peek-act-icon {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; flex-shrink: 0;
}
.peek-act-body { flex: 1; min-width: 0; }
.peek-act-text { font-size: 0.85rem; font-weight: 500; color: var(--gray-800); margin: 0 0 3px; line-height: 1.4; }
.peek-act-time { font-size: 0.68rem; color: var(--gray-400); }

.peek-no-activity {
    display: none; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px; color: var(--gray-400); font-size: 0.82rem; text-align: center;
}
.peek-no-activity i { font-size: 1.2rem; }
.peek-no-activity.show { display: flex; }

.peek-actions { display: flex; gap: 8px; }
.peek-view-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 16px; background: var(--color-primary); color: #fff;
    border-radius: 999px; font-size: 0.85rem; font-weight: 600;
    text-decoration: none;
}
.peek-view-btn:active { transform: scale(0.97); }
.peek-follow-btn {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 11px 20px; border: 1.5px solid var(--gray-200); background: #fff;
    color: var(--color-primary); border-radius: 999px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.peek-follow-btn:active { transform: scale(0.97); }
.peek-follow-btn.is-following { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

@media (min-width: 600px) {
    .peek-modal {
        left: 50%; right: auto; bottom: auto; top: 50%;
        transform: translate(-50%, -50%) scale(0.95); opacity: 0;
        border-radius: 24px; width: 380px; max-height: 80vh;
    }
    .peek-modal.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .peek-drag-handle { display: none; }
    .peek-close:hover { background: var(--gray-200); }
    .peek-view-btn:hover { box-shadow: 0 4px 14px rgba(58, 125, 68, 0.15); }
    .peek-follow-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
}

/* === Suggested Farmers & Groups — Horizontal Scroll Strips === */
.sstrip {
    margin: 0 -16px;
    padding: 8px 0 6px;
    border-bottom: 1px solid var(--gray-100);
    background: #fff;
}
.sstrip-header {
    padding: 0 16px 6px;
}
.sstrip-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sstrip-title i {
    color: var(--color-primary);
    margin-right: 4px;
}
.sstrip-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding: 0 16px 2px;
}
.sstrip-track::-webkit-scrollbar { display: none; }

/* ── Suggested Farmer Card (redesigned) ───── */
.sf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 120px;
    max-width: 130px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 12px 10px 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 250ms;
}
.sf-card:active { transform: scale(0.97); }

.sf-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    margin-bottom: 2px;
}
.sf-verified {
    position: absolute;
    bottom: -1px;
    right: -1px;
    font-size: 0.65rem;
    color: var(--info);
    background: #fff;
    border-radius: 50%;
    line-height: 1;
}
.sf-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.sf-handle {
    font-size: 0.6rem;
    color: var(--gray-400);
    margin-bottom: 2px;
}

/* Trust row — followers + reputation */
.sf-trust {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0;
}
.sf-trust-item {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 2px;
}
.sf-trust-item i {
    font-size: 0.5rem;
    color: var(--gray-400);
}
.sf-trust-dot {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--gray-300);
}

/* Experience badge */
.sf-exp-badge {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* Follow button — outline style */
.sf-follow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 5px 0;
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.2, 0, 0, 1);
    text-decoration: none;
}
.sf-follow-btn:active { transform: scale(0.94); }
.sf-follow-btn i { font-size: 0.55rem; }

/* ── Suggested Group Card ──────────────────── */
.gstrip-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 100px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 10px 10px 8px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    text-align: center;
    text-decoration: none;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 250ms;
}
.gstrip-card:active { transform: scale(0.97); }
.gstrip-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
}
.gstrip-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gray-800);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.gstrip-members {
    font-size: 0.56rem;
    color: var(--gray-400);
}
.gstrip-members i {
    margin-right: 2px;
    font-size: 0.5rem;
}
.gstrip-join-btn {
    padding: 3px 10px;
    background: rgba(58,125,68,0.08);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 700;
}

/* Desktop enhancements */
@media (min-width: 600px) {
    .sf-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
    .sf-follow-btn:hover { background: var(--color-primary); color: #fff; box-shadow: 0 2px 8px rgba(58,125,68,0.25); }
    .gstrip-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
}
@media (min-width: 1024px) {
    .sstrip { margin: 0; border-radius: var(--radius-md); margin-bottom: 4px; }
    .sstrip-track { padding: 0 12px 2px; }
}

/* === App Pagination — custom view (vendor/pagination/custom.blade.php) === */
.kb-pagination,
.community-pagination,
.blog-pagination {
    padding: 16px 0 24px;
    display: flex;
    justify-content: center;
}
.app-pagination {
    display: flex;
    justify-content: center;
}
.app-pg-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.app-pg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--gray-600);
    background: #fff;
    border: 1px solid var(--gray-200);
    transition: all 150ms cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
}
.app-pg-link i {
    font-size: 0.65rem;
}
.app-pg-link:active {
    transform: scale(0.93);
}
/* Active page */
.app-pg-item.active .app-pg-link {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(58, 125, 68, 0.2);
}
/* Disabled (prev/next at boundaries) */
.app-pg-item.disabled .app-pg-link {
    color: var(--gray-300);
    background: var(--gray-50);
    border-color: var(--gray-100);
    cursor: default;
    pointer-events: none;
}
/* Dots */
.app-pg-link.dots {
    border: none;
    background: none;
    min-width: 24px;
    padding: 0;
    color: var(--gray-400);
    cursor: default;
    letter-spacing: 1px;
}
/* Desktop hover */
@media (min-width: 600px) {
    .app-pg-item:not(.active):not(.disabled) .app-pg-link:hover {
        background: var(--color-primary-soft);
        border-color: var(--color-primary);
        color: var(--color-primary);
    }
}
