html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
}

.mobile-shell [data-role="farmer"] .desktop-only,
body[data-layout="mobile"] .desktop-only {
    display: none;
}

body[data-role="farmer"] .sidebar-shell {
    display: none !important;
}

body[data-role="farmer"] .farmer-mobile-frame {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

body[data-layout="desktop"][data-role="admin"] .mobile-only,
body[data-layout="desktop"][data-role="technician"] .mobile-only {
    display: none;
}

body[data-layout="mobile"][data-role="admin"] .desktop-admin-only,
body[data-layout="mobile"][data-role="technician"] .desktop-admin-only {
    display: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -3rem -3rem auto;
    height: 8rem;
    width: 8rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(15, 23, 42, 0));
}

@media (min-width: 1024px) {
    body[data-role="farmer"] .mobile-nav {
        left: 50%;
        max-width: 480px;
        transform: translateX(-50%);
        border-radius: 1.5rem 1.5rem 0 0;
    }
}

@media (max-width: 768px) {
    body[data-role="technician"][data-layout="mobile"] table.tech-table {
        display: block;
        width: 100%;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table thead {
        display: none;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table tbody {
        display: block;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table tr {
        display: block;
        border-bottom: 1px solid #e2e8f0;
        padding: 0.75rem 1rem;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table tr:last-child {
        border-bottom: none;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.25rem 0;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table td::before {
        content: attr(data-label);
        flex: 0 0 8rem;
        max-width: 10rem;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: #94a3b8;
    }

    body[data-role="technician"][data-layout="mobile"] table.tech-table td > *:not(:last-child) {
        margin-bottom: 0.1rem;
    }
}
