@import url('https://fonts.googleapis.com/css2?family=Encode+Sans+Semi+Condensed:wght@100;200;300;400;500;600;700;800;900&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Encode Sans Semi Condensed", sans-serif;
}

:root{
    --body-color: #E4E9F7;
    --sidebar-color: #FFF;
    --primary-color: #695CFE;
    --primary-color-light: #F6F5FF;
    --text-color: white; /* This was white, check if sidebar text is visible */
}

/* Body Styles */
body{
    min-height: 100vh;
    background-color: var(--body-color);
    /* Removed display:flex from body for this approach */
}

::selection{
    background-color: var(--primary-color);
    color: #fff;
}



/* Styles for the new page wrapper */
.page-wrapper {
    margin-left: 300px; /* Crucial: Same as sidebar width. Pushes this container to the right of the sidebar. */
    width: calc(100% - 300px); /* Occupies the remaining width */
    min-height: 100vh; /* Ensures wrapper fills viewport height, helping with sticky footer */
    display: flex;
    flex-direction: column; /* Stacks .container and .footer vertically */
    box-sizing: border-box;
    padding-bottom: 50px;
    background: rgb(233, 244, 231);
}

/* Main Content Container (.container) Styles */
.container {
    padding: 20px;
    width: 100%;
    max-width: none; /* or 100% !important */
    flex-grow: 1;
    box-sizing: border-box;
    padding-left: 100px;
    padding-right: 100px;
    padding-top: 50px; 
}

/* Footer Styles */
.footer {
    position: fixed; /* Makes the footer sticky relative to the viewport */
    bottom: 0;       /* Sticks it to the bottom */
    left: 0;         /* Aligns it to the far left of the viewport */
    width: 100%;     /* Makes it span the entire viewport width */
    z-index: 1050;   /* Ensures it's on top of other content (e.g., sidebar might be 1000) */

    background: rgb(02, 38, 32);
    color: white;
    
    /* Consistent padding for a predictable height, adjust as needed */
    padding-top: 8px;
    padding-bottom: 8px;
    /* If you prefer your original padding:
    padding-top: 8px;
    padding-bottom: 0px; 
    Be mindful that this makes the total height calculation more dependent on line-height */

    box-sizing: border-box; /* Includes padding in the element's total width and height */

    /* These flex properties are good for centering the text content within the footer */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* Fallback or if you have multiple lines/elements */
    
    /* flex-shrink: 0; is not directly relevant for a position:fixed element's own behavior
       but doesn't harm anything here. */
}

/* It's good practice to ensure the direct child (e.g., <p>) has no default margins
   if you want precise control over footer height based on padding. */
.footer p {
    margin: 0; 
}


/* --- Review and Adjust Your Existing Styles --- */
/* Many of your existing styles should still work, but pay attention to any
   absolute or fixed positioning within .container that might now behave differently.
   Styles like .upload--main that had 'left: -400px' will need re-evaluation.
   They should now be positioned relative to the .container. */
/* Sidebar Styles */
.sidebar {
    position: fixed; /* Or 'sticky' if preferred and structured accordingly */
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width, 300px); /* Fallback if var is not defined */
    background: var(--sidebar-background, #023832); /* Fallback background */
    padding: 15px 0; /* Vertical padding; horizontal padding will be on links */
    z-index: 1000; /* Ensure it's above other content */
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* For scrollable sidebar if content overflows */
}

.sidebar .menu-bar {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sidebar .menu {
    flex-grow: 1;
}

.sidebar .menu-links {
    list-style: none; /* This removes bullet points */
    padding: 0; /* Reset default padding */
    margin: 0; /* Reset default margin */
}

/* Sidebar List Items (li) and Links (a) */
/* This replaces/updates your original '.sidebar li' */
.sidebar li.nav-link {
    list-style: none; /* Ensure no list style */
    margin: 5px 0; /* Vertical margin between items */
    /* Removed fixed height: 70px; rely on padding in <a> for flexible height */
    /* display: flex and align-items: center are now handled by the <a> tag */
}

.sidebar li.nav-link a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-text-color, #fff); /* Text color for links */
    padding: 12px 20px; /* Padding inside each link (top/bottom, left/right) */
    width: 100%;
    transition: background 0.3s ease;
    border-radius: 4px; /* Optional: for hover effect consistency */
}

.sidebar li.nav-link a:hover {
    background: var(--sidebar-item-hover-bg, rgba(255, 255, 255, 0.1)); /* Hover effect */
}

/* Sidebar Icons */
/* This replaces/updates your original '.sidebar .icon' */
.sidebar .icon {
    font-size: 22px; /* Icon size */
    color: var(--icon-color, #fff); /* Icon color, potentially same as text */
    margin-right: 18px; /* Space between icon and text */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px; /* Ensure a minimum width for icon alignment consistency */
    flex-shrink: 0; /* Prevent icon from shrinking */
    /* Removed min-width: 60px; which might have caused excessive spacing */
    /* Removed height: 100%; rely on flex alignment within <a> */
    /* border-radius: 6px; -- you can keep this if icons have their own background */
}

/* Sidebar Text */
/* This replaces/updates your original '.sidebar .text' */
.sidebar .text.nav-text {
    font-size: 15px;
    color: var(--primary-text-color, #fff); /* Ensure text color is set */
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden;    /* Hide text that overflows */
    text-overflow: ellipsis; /* Add '...' if text is too long */
}

/* User Profile Section (#userName) - specific styling */
#userName a {
    /* You can add specific padding if this item needs to be different */
    /* e.g., padding-top: 10px; padding-bottom: 10px; */
}

#profileImage {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Makes it a circle */
    background-color: rgba(255, 255, 255, 0.25); /* Light background for the initials circle */
    color: var(--primary-text-color, #fff); /* Color for the initials text */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em; /* Font size for initials */
    margin-right: 15px; /* Space between profile image and name details */
    flex-shrink: 0; /* Prevent shrinking */
}

/* This new class is for the wrapper around first name and last name */
#userName .user-details {
    display: flex;
    flex-direction: column; /* Stack first name and last name */
    justify-content: center;
    line-height: 1.3; /* Adjust line height for stacked names */
}

#userName .user-details #firstName,
#userName .user-details #lastName {
    display: block; /* Ensure they stack if not already */
    font-size: 0.9em; /* Slightly smaller font for name details */
    /* color: var(--primary-text-color, #fff); -- Inherited from .text.nav-text or <a> */
}



  .search--bar {
    width: 30%;
    height: 40px;
    border: solid 2px lightgray;
    border-radius: 10px;
    /* left: 300px; */
  }

  .pager-nav {
    margin: 15px 0;
}
.pager-nav span {
    display: inline-block;
    padding: 4px 8px;
    margin: 1px;
    cursor: pointer;
    font-size: 14px;
    background-color: #FFFFFF;
    border: 1px solid #e1e1e1;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.pager-nav span:hover,
.pager-nav .pg-selected {
    background-color: gray;
    border: 1px solid #CCCCCC;
}



.search--box {
    display: flex;
    /* margin-top: 15px; */
    flex-direction: row;
    align-items: center;
    height: 70%;
    border: 2px solid #CCCCCC;
    border-radius: 5px;
}

.search--area {
    border: none;
    height: 100%;
    width: 100%;
}

.search--area:focus {
    box-shadow: none;
    outline: none;
}

.search--icon {
    margin: 2px;
}

.search--entries {
    display: flex;
    width: 20%;
    flex-direction: row;
    align-items: center;
}

.entries {
    width: 40px;
    height: 30px;
}

.pagination {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 5px;
}

.pagination--button {
    margin: 5px;
}

.entries--search {
    display: flex;
    width: 80%;
    margin: 5px;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

.entries-selector {
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.Entries {
    padding: 10px;
    font-size: 16px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: border-color 0.3s;
}

.Entries:hover,
.Entries:focus {
    border-color: #666;
}

/* input[type="file"] {
    display: none;
} */

.upload--select {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload--ins {
    font-size: 12px;
    padding: 2px;
}

.messages {
        list-style: none;
        padding: 0;
        margin: 10px 0;
    }
    .messages li {
        padding: 10px 15px;
        margin-bottom: 10px;
        border-radius: 5px;
        font-weight: bold;
        color: #fff;
        opacity: 0.95;
    }
    .messages .error { background-color: #dc3545; }
    .messages .info { background-color: #17a2b8; }
    .messages .success { background-color: #28a745; }
    .messages .warning { background-color: #ffc107; color: #333; }

    .form-container {
        width: 100%;               /* Take full width of parent */
        max-width: none;           /* Remove width constraint */
        margin: 0;                 /* Remove horizontal centering */
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #e3e3e3;
        box-sizing: border-box;
    }
    .form-header { text-align: center; margin-bottom: 20px; font-weight: bold; }
    .form-header h2 { font-weight: 600; }
    .form-container label { display: block; margin-bottom: 10px; font-weight: 500; }
    .form-container .input-group {
        display: flex; gap: 15px; flex-wrap: nowrap; margin-bottom: 15px;
    }
    .form-container .input-group .form-group { flex: 1; min-width: 150px; }
    .form-container input[type="text"], .form-container select {
        width: 100%; padding: 10px; border: 1px solid #ccc;
        border-radius: 5px; font-size: 16px; box-sizing: border-box;
    }
    /* Styles for the main search button */
    #searchButton { /* Target by ID for specific overrides */
        background-color: #38706b;
        color: rgb(247, 247, 247);
        padding: 10px 30px; /* Adjusted padding for width */
        min-width: 150px;   /* Ensure a minimum width */
        border: none;
        border-radius: 25px;
        cursor: pointer;
        font-size: 16px;
        position: relative; /* For spinner */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: background-color 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    #searchButton:hover {
        background-color: #28534e;
    }

    #searchButton.loading {
        cursor: not-allowed;
        opacity: 0.7;
    }

    #searchButton .spinner {
        display: none; width: 20px; height: 20px;
        border: 2px solid rgba(255, 255, 255, 0.6); border-top-color: #fff;
        border-radius: 50%; animation: spin 1s linear infinite;
    }

    #searchButton.loading .spinner { display: inline-block; }

    @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

    .results-container {
        margin-top: 20px; padding: 20px; border: 1px solid #ccc;
        border-radius: 5px; background-color: #edfcff;
        overflow-x: auto; overflow-y: visible;
    }
    .results-container table { width: 100%; border-collapse: collapse; }
    .results-container th {
        background-color: #38706b; color: #f7f7f7;
        position: sticky; top: 0; z-index: 1;
    }
    .results-container th, .results-container td {
        padding: 10px; border: 1px solid #ccc;
        text-align: left; white-space: nowrap;
    }
    .results-container td.long-text-cell {
        max-width: 300px; white-space: nowrap; overflow: hidden;
        text-overflow: ellipsis; vertical-align: middle;
    }
    .results-container td.artemis-true-flag {
        background-color: #ffcccc; font-weight: bold; color: #a00000;
    }
    .results-container td img.merchant-logo-img {
        max-height: 40px; max-width: 100px;
        object-fit: contain; display: block; margin: auto;
    }
    .hidden-column { display: none; }

    /* General button group styling for pagination */
    .button-group {
        display: flex; justify-content: flex-start; gap: 10px;
        margin-bottom: 15px; margin-top: 15px; flex-wrap: wrap;
    }
    .button-group button {
        background-color: #38706b; color: #f7f7f7; padding: 8px 15px;
        border: none; border-radius: 20px; cursor: pointer; font-size: 14px;
        transition: background-color 0.3s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }
    .button-group button:hover { background-color: #28534e; }
    .button-group button.pagination-active { background-color: #1a3d3a; font-weight: bold; }
    .button-group button:disabled {
        background-color: #cccccc; color: #666666;
        cursor: not-allowed; opacity: 0.7;
    }
    
    /* Styles for the new action row containing checkbox and search button */
    .form-actions-row {
        display: flex;
        justify-content: center; /* Centers items on the line */
        align-items: center;    /* Vertically aligns items */
        gap: 25px;              /* Space between checkbox group and button */
        margin-top: 20px;       /* Space above this row */
        margin-bottom: 20px;    /* Space below this row */
    }
    .form-actions-row .logo-checkbox-item {
        display: flex;
        align-items: center;
    }
    .form-actions-row .logo-checkbox-item input[type="checkbox"] {
        margin-right: 6px;
        vertical-align: middle;
        /* Optional: make checkbox slightly larger */
        transform: scale(1.1); 
    }
    .form-actions-row .logo-checkbox-item label {
        margin-bottom: 0; /* Override default label margin */
        font-weight: normal; /* Keep label text normal weight */
        white-space: nowrap; /* Prevent label from wrapping */
        vertical-align: middle;
    }