body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
}

.controls {
    padding: 20px;
    background-color: #fff;
    margin: 20px auto;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

/* Style for the search bar and row counter container */
.filter-controls {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#searchInput {
    padding: 10px;
    width: 60%; 
    max-width: 350px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

#rowCountDisplay {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
}

.range-display {
    padding-top: 10px; 
}

/* Basic slider styling (already present) */
label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="range"] {
    width: 100%;
}

main {
    padding: 0 20px 20px;
}

/* Container for the table to enable horizontal scrolling on small screens */
.table-responsive {
    overflow-x: auto;
    width: 80%;
    margin: 20px auto;
    max-width: 900px;
}

table {
    width: 100%;
    min-width: 750px; /* Increased minimum width slightly to accommodate new column */
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------- */
/* WRAP TEXT IMPLEMENTATION (from previous request) */
/* ---------------------------------------------------------------------- */

td:nth-child(7), /* Customer Name (House Owner) */
td:nth-child(8)  /* Location/Area (Area) */
{
    white-space: normal; /* Allow text to wrap onto multiple lines */
    word-break: break-word; /* Ensures long words break to fit the column width */
}

th {
    background-color: #e9ecef;
    font-weight: bold;
}

/* ---------------------------------------------------------------------- */
/* ZEBRA STRIPING (from previous request) */
/* ---------------------------------------------------------------------- */

tbody tr:nth-child(even) {
    background-color: #eff6f5;
}

tbody tr:nth-child(odd) {
    background-color: #ffffff; 
}

/* Hover effect should override the zebra striping for emphasis */
tr:hover {
    background-color: #f1f1f1;
}

/* Common icon styling */
.icon-btn {
    cursor: pointer;
    margin-left: 8px; /* Slightly increased margin for better icon separation */
    font-size: 2.2em;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #0056b3;
}

/* Specific styling for WhatsApp icon */
.whatsapp-icon {
    color: #25D366; /* WhatsApp Green */
}

.whatsapp-icon:hover {
    color: #128C7E; /* Darker green on hover */
}

.dial-icon {
    color: #007bff; /* Phone blue */
}


/* ---------------------------------------------------------------------- */
/* MOBILE-SPECIFIC STYLES (Media Queries) */
/* ---------------------------------------------------------------------- */

@media (max-width: 768px) {
    .controls, .table-responsive {
        width: 95%; 
    }
    
    table {
        min-width: 750px;
    }

    header h1 {
        font-size: 1.5em;
        padding: 10px 0;
    }

    .filter-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    #searchInput {
        width: 100%;
        margin-bottom: 15px;
        max-width: none;
    }

    #rowCountDisplay {
        margin-bottom: 10px;
    }

    .range-display label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
    }
}
