/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 20px;
    background-color: #f4f4f4;
}

/* Headings */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

/* Form Container - Flexbox */
#indexBody {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Form Inputs */
input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input:focus, select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Button */
button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

/* Image */
#image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
}

/* Search Bar */
#search {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    display: block;
}

/* Table Container - Grid */
#clientTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Table Headers */
th {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

/* Table Cells */
td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

/* Table Rows */
tr:hover {
    background-color: #f5f5f5;
}

tr:last-child td {
    border-bottom: none;
}

/* Table Buttons */
td button {
    width: auto;
    padding: 6px 12px;
    margin: 0 5px;
    font-size: 14px;
}

/* Mobile Responsive - Tablet */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    #indexBody {
        padding: 15px;
    }
    
    #clientTable {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 8px;
    }
}

/* Mobile Responsive - Phone */
@media screen and (max-width: 480px) {
    /* Stack table vertically */
    #clientTable, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
    }
    
    td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
    }
    
    td button {
        width: 100%;
        margin: 5px 0;
    }
}