body {
    font-family: 'Segoe UI', Arial, sans-serif; /* Modern font */
    background-color: #F5F5F5; /* Light grey background */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 20px;
    color: #333333;
    padding-top: 30px;/* Dark text for readability */
}

/*.container {*/
/*    background-color: #FFFFFF;*/
/*    padding: 300px;*/
/*    border-radius: 12px; !* More rounded corners for modern feel *!*/
/*    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); !* Stronger, softer shadow *!*/
/*    width: 100%;*/
/*    max-width: 600px; !* Slightly wider container *!*/
/*    box-sizing: border-box;*/
/*}*/

h1, h2, h3 {
    color: #6a4d71; /* Primary Purple */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700; /* Bolder headings */
}

h3 { /* Specific style for "Recent Care Logs" or "All Care Records" */
    font-size: 1.8em;
    text-align: left; /* Align to left */
    margin-top: 30px;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

label {
    font-weight: 600; /* Slightly bolder */
    margin-bottom: 5px;
    color: #555555;
}

input[type="text"],
input[type="password"],
select,
textarea {
    padding: 12px; /* More padding */
    border: 1px solid #E0E0E0; /* Lighter border */
    border-radius: 8px; /* More rounded input fields */
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #F9A392; /* Orange highlight on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2); /* Soft orange glow */
}

button[type="submit"] {
    background-color: #6a4d71; /* Primary Purple */
    color: white;
    padding: 14px 25px; /* More padding */
    border: none;
    border-radius: 8px; /* More rounded buttons */
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background-color: #6a4d71; /* Darker purple on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.hidden {
    display: none;
}

.error-message {
    color: #dc3545;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}

.success-message {
    color: #28a745;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}

.logout-btn {
    background-color: #F9A392; /* Accent Orange for Logout */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    float: right;
    margin-top: -30px;
    margin-left: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.logout-btn:hover {
    background-color: #F9A392; /* Darker orange on hover */
    transform: translateY(-1px);
}

.customer-page-btn {
    background-color: #6a4d71; /* Accent Orange for Logout */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    float: right;
    margin-top: -30px;
    margin-left: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* --- New Styles for Modern Log Display --- */

.logs-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-left: 5px; /* Slight indent */
}

.logs-section-header .tag {
    background-color: #F9A392; /* Orange accent */
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.logs-section-header h3 {
    margin: 0; /* Override default h3 margin */
    color: #333333; /* Darker text for heading */
    font-size: 1.8em;
    font-weight: 700;
    text-align: left;
}

#care-logs-display {
    display: grid; /* Use CSS Grid for flexible columns */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 25px; /* Space between grid items */
    margin-top: 20px;
}

.care-log-item {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Soft shadow */
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push description to bottom */
    min-height: 180px; /* Ensure minimum height */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.care-log-item:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); /* Enhanced shadow on hover */
}

.care-log-item .quote-icon {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 3.5em; /* Large quote icon */
    color: rgba(111, 45, 168, 0.1); /* Very light purple for background icon */
    z-index: 0; /* Behind content */
}

.care-log-item .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1; /* Above quote icon */
}

.care-log-item .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #E0E0E0; /* Placeholder background */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* To contain image */
}

.care-log-item .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* If no image, display a generic user icon */
.care-log-item .user-avatar i {
    font-size: 2em;
    color: #6a4d71; /* Purple icon */
}

.care-log-item .user-details {
    display: flex;
    flex-direction: column;
}

.care-log-item .carer-name {
    font-weight: 700;
    font-size: 1.2em;
    color: #333333;
}

.care-log-item .customer-date {
    font-size: 0.9em;
    color: #666666;
    margin-top: 3px;
}

.care-log-item .log-description {
    font-size: 0.95em;
    line-height: 1.6;
    color: #444444;
    position: relative;
    z-index: 1;
    flex-grow: 1; /* Allow description to take up available space */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    .logout-btn {
        position: static; /* Remove float and margin-top for smaller screens */
        margin-top: 15px;
        float: none;
        width: 100%;
        text-align: center;
    }
    .logs-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .logs-section-header h3 {
        font-size: 1.5em;
    }
    #care-logs-display {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
    .care-log-item {
        min-height: auto; /* Allow height to adjust */
    }
}

/* --- Styles for the Customer Select Dropdown --- */
#customer-name {
    padding: 12px; /* More padding inside the dropdown */
    border: 1px solid #E0E0E0; /* Light grey border */
    border-radius: 8px; /* Rounded corners */
    font-size: 16px;
    width: 100%;
    box-sizing: border-box; /* Ensures padding is included in the width */
    appearance: none; /* Hide default dropdown arrow for custom arrow */
    -webkit-appearance: none; /* For Safari */
    -moz-appearance: none; /* For Firefox */
    background-color: #FFFFFF; /* White background */
    /* Custom SVG arrow, using the primary purple color defined in your theme */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236F2DA8" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center; /* Position the arrow */
    background-size: 1.2em; /* Size of the custom arrow */
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for focus effects */
}

#customer-name:focus {
    border-color: #FF6B00; /* Orange highlight on focus (your accent color) */
    outline: none; /* Remove default browser outline */
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2); /* Soft orange glow */
}

/* Optional: Styling for the options within the dropdown */
#customer-name option {
    padding: 10px; /* Padding for individual options in the dropdown list */
    font-size: 16px;
    background-color: #FFFFFF; /* White background for options */
    color: #333333; /* Dark text for options */
}

#customer-name option:hover {
    background-color: #F5F5F5; /* Light grey background on hover for options */
}

/* --- Table Specific Styling --- */

/* Define orange theme colors */
:root {
    --table-orange-primary: #F9A392; /* Main vibrant orange */
    --table-orange-dark: #e05e00;    /* Darker orange for hover/active */
    --table-orange-light: #FFDAC4;   /* Very light orange for subtle accents */
    --table-bg-light: #F8F8F8;      /* Light background for table striping */
    --table-text-dark: #333333;     /* Dark text for readability */
    --table-border-color: #EEEEEE;  /* Light border for cells */
}

.table-container {
    width: 100%;
    overflow-x: auto; /* Ensures table is scrollable on small screens if it overflows */
    margin-top: 40px; /* Space above the table */
    margin-bottom: 40px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Soft shadow for the container */
    padding: 25px; /* Padding inside the container */
}

.table-heading {
    text-align: center;
    color: var(--table-orange-primary); /* Orange heading */
    margin-bottom: 25px;
    font-size: 2em;
    font-weight: 700;
}

.styled-table {
    width: 100%;
    border-collapse: collapse; /* Removes space between cell borders */
    margin: 0; /* Remove default table margin */
    font-family: 'Segoe UI', Arial, sans-serif; /* Modern font */
    color: var(--table-text-dark);
}

.styled-table thead tr {
    background-color: var(--table-orange-primary); /* Orange header background */
    color: #ffffff; /* White text for header */
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 15px 20px; /* Generous padding for cells */
    border-bottom: 1px solid var(--table-border-color); /* Light bottom border for rows */
}

.styled-table th {
    font-weight: 600; /* Slightly bolder header text */
    text-transform: uppercase; /* Uppercase headers */
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

/* Zebra striping for table rows */
.styled-table tbody tr:nth-of-type(even) {
    background-color: var(--table-bg-light); /* Light grey for even rows */
}

/* Hover effect for rows */
.styled-table tbody tr:hover {
    background-color: var(--table-orange-light); /* Light orange on hover */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Styling for specific status cells */
.styled-table .status-completed {
    color: #28a745; /* Green */
    font-weight: 600;
}

.styled-table .status-ongoing {
    color: #007bff; /* Blue */
    font-weight: 600;
}

.styled-table .status-pending {
    color: #ffc107; /* Yellow/Orange */
    font-weight: 600;
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .table-container {
        padding: 15px;
    }

    .styled-table thead {
        display: none; /* Hide header on small screens */
    }

    .styled-table,
    .styled-table tbody,
    .styled-table tr,
    .styled-table td {
        display: block; /* Make table elements behave like blocks */
        width: 100%;
    }

    .styled-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--table-border-color);
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .styled-table td {
        text-align: right; /* Align cell content to right */
        padding-left: 50%; /* Make space for pseudo-element label */
        position: relative;
    }

    /* Add a label for each cell using data attributes */
    .styled-table td::before {
        content: attr(data-label); /* Use data-label for the content */
        position: absolute;
        left: 10px;
        width: calc(50% - 20px); /* Adjust width */
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--table-orange-primary); /* Orange label */
    }
}
