body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin: 4rem 2rem; /* 2rem top/bottom, auto left/right */
    position: relative; /* This is crucial for positioning the arrow */
    padding-top: 4rem;
}

h1 {
    color: #2c3e50;
    /* margin-bottom: 1.5rem; */
    text-align: center;
}

#search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#search-input {
    flex-grow: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#results-container {
    text-align: left;
}

#results-container .message {
    padding: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

#results-container .message.loading {
    background-color: #eaf5fd;
    color: #3498db;
}

#results-container .message.error {
    background-color: #fdeaea;
    color: #c0392b;
}

.result-card {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 1rem;
}

.result-card h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.result-card p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.result-card span {
    font-weight: 600;
}

.dependant-separator {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin: 1rem 0;
}

h1 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    position: relative;
    text-align: center;
}

.back-arrow-link {
    position: absolute; 
    left: 0;
    top: 50%;
    transform: translateY(-50%); /* This perfectly centers the icon vertically */
}

h1 span {
  flex-grow: 1;          /* Allows the text element to expand */
  text-align: center;    /* Centers the text within the expanded element */
}


.back-arrow-icon:hover {
    transform: translateX(-4px); /* Adds a nice hover effect */
}

.logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    /* margin-bottom: 1.5rem;  */
    height: 96px;
    width:  96px;
}

.top-back-arrow {
    position: absolute;
    top: 2rem; /* Adjust space from the top */
    left: 50%;
    transform: translateX(-50%); /* This perfectly centers the arrow */
    display: block;
    background: #f4f7f9; /* Optional: give it a background */
    border-radius: 50%;
    padding: 0.5rem;
    line-height: 0; /* Helps with alignment */
}

.top-back-arrow img {
    height: 32px;
    width: 32px;
    display: block;
}

@media (max-width: 600px) {
    /* 1. Make the input take up the full width */
    #search-input {
        width: 100%; 
    }

    /* 2. Tell the form to center its content */
    #search-form {
        justify-content: center;
    }
}

.passport-image {
    /* --- Basic Styling (keep these) --- */
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    border-radius: 10%;
    object-fit: cover;
    border: 4px solid #eaf5fd;

    /* --- Responsive Sizing --- */
    width: 50%;           /* Make the width a percentage of the card */
    height: auto;         /* Allow height to adjust automatically */
    aspect-ratio: 1 / 1;   /* Keep it a perfect square to maintain the circle shape */
    max-width: 160px;     /* It will NOT grow larger than 150px */
    min-width: 120px;      /* It will NOT shrink smaller than 90px */
}

/* === Add these new styles to your existing style.css file === */

/* Tab Navigation Styles */
.tabs-container {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.tab-link {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    position: relative;
    top: 2px;
    border-bottom: 2px solid transparent;
}

.tab-link:hover {
    color: #ffff;
    background-color:#3498db;
}

.tab-link.active {
    color: #2c3e50;
    border-bottom: 2.4px solid #3498db;
    font-weight: 600;
}

/* Action Buttons and Filters */
.content-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-action-add, .btn-upload {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    gap: 0.5rem;
    background-color: #3498db;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none; 
}

.btn-upload {
    background-color: #2ecc71;
}

.btn-upload:hover {
    background-color: #27ae60;
}

.btn-action-add:hover {
    background-color: #2980b9;
}
.btn-action:hover {
    background-color: #f4f7f9;
    border-color: #3498db;
}


.filter-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-controls input {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#resetFilterBtn {
    background: none;
    border: 1px solid #3498db;
    padding: 0.6rem 1.2rem;
    font-size: 1em; /* Match surrounding font size */
    font-weight: 500;
    font-family: inherit; /* Use the same font as the rest of the page */
    
    /* 2. Make it look like a blue text link */
    color: #3498db; /* The primary blue color from your theme */
    cursor: pointer; /* Keep the hand cursor to show it's clickable */
}


@media (max-width: 600px) {
    #resetFilterBtn {
        width: auto; /* Override the 'width: 100%' for this button specifically */
    }
}

.btn-action.btn-danger {
    background-color: #e74c3c; /* A calm but clear red for deletion */
    color: #ffffff;             /* White text for high contrast */
    border-color: #e74c3c;      /* Make the border match the background */
}

/* Add a hover effect to make it interactive */
.btn-action.btn-danger:hover {
    background-color: #c0392b; /* A slightly darker red on hover */
    border-color: #c0392b;
    color: #ffffff;             /* Ensure text stays white on hover */
}

/* Data Table Styles */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    font-size: 0.95rem;
}

.data-table th {
    background-color: #f4f7f9;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tbody tr:hover {
    background-color: #eaf5fd;
}

/* Status Badge Styles */
.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.status-pending {
    background-color: #f39c12; /* Orange */
}

.status-done {
    background-color: #2ecc71; /* Green */
}

.status-select {
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Row Action Buttons */
.table-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: #7f8c8d;
}

.table-actions button:hover {
    color: #c0392b; /* Red for delete */
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* Dim background */
    backdrop-filter: blur(4px); /* Blur effect */
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    animation: slide-down 0.4s ease-out;
}

@keyframes slide-down {
    from {
        top: -100px;
        opacity: 0;
    }
    to {
        top: 0;
        opacity: 1;
    }
}


.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Form Fields */
#modal-form-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

#modal-form-content .form-group {
    display: flex;
    flex-direction: column;
}

/* Make single-column for remarks/complaints */
#modal-form-content .form-group.full-width {
    grid-column: 1 / -1;
}

#modal-form-content label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

#modal-form-content input,
#modal-form-content select,
#modal-form-content textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

#modal-form-content textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 1rem;
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #2980b9;
}


/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #2ecc71;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 2000;
    right: 30px;
    top: 30px;
    font-size: 17px;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s, top 0.5s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    top: 50px;
}


/* === Add these new styles to your existing style.css file === */

/* Add margin-top for spacing between back arrow and title */
.clspaceup{
    margin-top: 4rem;
}

/* Styles for the new Delete Confirmation Modal buttons */
.confirm-buttons-container {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Make status badges look a little nicer */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-transform: capitalize;
}

.status-pending {
    background-color: #f39c12; /* Orange */
}

.status-done {
    background-color: #2ecc71; /* Green */
}

/* --- Add these styles for filter responsiveness --- */

/* 1. Allow the filter controls to wrap onto multiple lines */
.filter-controls {
    display: flex;
    flex-wrap: wrap; /* This is the key change */
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

/* 2. On smaller screens (like mobile phones), stack them vertically */
@media (max-width: 600px) {
    .filter-controls {
        flex-direction: column; /* Stack items on top of each other */
        align-items: stretch;   /* Make items stretch to full width */
    }

    /* Ensure all inputs and buttons inside take up the full width */
    .filter-controls input,
    .filter-controls button {
        width: 100%;
        box-sizing: border-box; /* Ensures padding doesn't add to the width */
        text-align: center;
    }

     /* 2. Make the tabs scrollable horizontally instead of wrapping */
    .tabs-container {
        overflow-x: auto; /* Allows horizontal scrolling */
        white-space: nowrap; /* Prevents tabs from wrapping to the next line */
        -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
        scrollbar-width: none;  /* Hide scrollbar for Firefox */
    }
    /* Hide scrollbar for Chrome, Safari and Opera */
    .tabs-container::-webkit-scrollbar {
        display: none;
    }

    /* 3. Allow the top action buttons to wrap and center themselves */
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center; /* Center the buttons when they wrap */
        gap: 0.5rem; /* Reduce gap slightly on mobile */
    }
    .btn-action, .btn-action-add, .btn-upload {
        flex-grow: 1; /* Allow buttons to grow and fill space */
        text-align: center;
        justify-content: center;
    }

    /* 6. Make the modal take up more screen space on mobile */
    .modal-content {
        width: 65%;
        margin: 5% auto;
    }
}

/* This targets ONLY the container on the client relations page */
.container-relations {
    /* --- The Key Centering and Sizing Logic --- */
    width: 95%;                 /* Makes the container slightly narrower than the screen */
    max-width: 1200px;          /* Prevents it from getting too wide on large desktops */
    margin: 4rem auto;          /* Sets top/bottom margin and auto-centers left/right */
    padding: 2rem;              /* Sets internal spacing */
}

/* On smaller screens, we only adjust the padding for our specific container */
@media (max-width: 768px) {
    .container-relations {
        width: 85%;  
        padding: 1.5rem 1rem; /* Use smaller internal padding on mobile */
        margin: 4rem;

    }

}

/* On screens 768px or smaller, make the modal form a single column */
@media (max-width: 768px) {
    #modal-form-content {
        grid-template-columns: 1fr; /* This switches the form from two columns to one */
    }
/* 
    .page-title2 {
        margin-top: 3rem;
    } */

}

/* Styling for the "Showing X of Y" text below the table */
.table-info-footer {
    padding-top: 1rem;
    color: #555;
    font-size: 0.9em;
    text-align: left;
}

/* ======================================================= */
/* ===         PAGINATION & TABLE CONTROLS           === */
/* ======================================================= */

.table-controls {
    text-align: left;
    margin-bottom: 1rem;
}

.table-controls select {
    padding: 0.25rem;
    margin: 0 0.25rem;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-info-footer {
    /* padding-top: 0; Remove old padding */
    text-align: left;
}

.pagination-controls-footer button {
    margin: 0 2px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #3498db;
    cursor: pointer;
}

.pagination-controls-footer button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-controls-footer button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-controls-footer button:hover:not(:disabled):not(.active) {
    background-color: #f4f7f9;
}