.site-header {
    background-color: #333333;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    flex: 0 0 auto;
    min-height: 60px;
    max-height: 60px;
    height: 60px;
}

.site-header.container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 10px 15px;
}

.site-header .header-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
}

.site-header .left,
.site-header .center,
.site-header .right {
    display: flex;
    align-items: center;
}

.site-header .right {
    padding-right: 15px;
}

.site-logo {
    max-width: 240px;
    height: auto;
    margin-top: 0px;
}

.logo-green {
    fill: var(--primary-green, #4FA564);
}

#menuButton, #notificationButton {
    background: none;
    border: none;
    color: #E6E6E6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0px 5px;
}

#menuButton:hover, #notificationButton:hover {
    color: #44a659;
}

#menuDropdown {
    position: absolute;
    top: 90px;
    left: 15px;
    background-color: #1F1F1F;
    border: 1px solid #684d70;
    border-radius: 8px;
    display: none;
    min-width: 200px;
    z-index: 101;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #E6E6E6;
    text-decoration: none;
    border-bottom: 1px solid #684d70;
    transition: background-color 0.3s ease;
}

.menu-link:hover {
    background-color: #3A3A3A;
}

.menu-icon {
    margin-right: 10px;
    width: 16px;
    height: 16px;
}

.has-submenu .menu-link {
    position: relative;
}

.submenu-toggle {
    position: absolute;
    right: 10px;
    font-size: 0.8rem;
}

.submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #2A2A2A;
    border: 1px solid #684d70;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 200px;
    z-index: 102;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.submenu-item .menu-link {
    padding: 8px 15px;
    border-bottom: 1px solid #684d70;
}

.submenu-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.theme-toggle .menu-link {
    justify-content: space-between;
}

@media (max-width: 768px) {
    #menuDropdown {
        top: 70px;
        left: 10px;
        right: 10px;
        min-width: unset;
        width: calc(100% - 20px);
    }
    
    .submenu {
        position: static;
        width: 100%;
        border: none;
        border-topstat: inherit;
        border-top: 1px solid #684d70;
        border-bottom: 1px solid #684d70;
        border-radius: 0;
        background-color: #262626;
    }
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 100;
}

#cropButtonsContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

#cropButtonsContainer button {
    width: 150px;
    padding: 10px;
    font-size: 16px;
}

@media (max-width: 600px) {
    #cropButtonsContainer {
        flex-direction: column;
        align-items: center;
    }
    #cropButtonsContainer button {
        width: 100%;
    }
}

.clickable-label {
    cursor: pointer;
    display: inline-block;
}

.clickable-label:hover .profile-pic {
    opacity: 0.8;
}

.profile-pic {
    transition: opacity 0.2s ease;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
    display: block;
    margin: 10px auto;
}

body {
    background-color: #0c0c0c;
    background-image: url('Wallpaper_Tree1.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: #E6E6E6;
    font-family: 'Helvetica', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

body.no-scroll {
    height: 100vh;
    overflow-y: auto;
}

.container {
    flex: 1 0 auto;
    max-width: 600px;
    width: calc(90% - 20px);
    margin: 1rem auto;
    padding: 1.5rem;
    background-color: #262626;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.wide-container {
    flex: 1 0 auto;
    width: 60%;
    min-width: 800px;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1.5rem;
    background-color: #262626;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

body > .container,
body > .wide-container {
    flex-grow: 1;
    flex-shrink: 0;
}

.section-box {
    border: 2px solid #684d70;
    padding: 1.0rem;
    border-radius: 10px;
    margin-bottom: 1.875rem;
    background-color: #1F1F1F;
}

.section-box2 {
    border: 2px solid #684d70;
    padding: 1.0rem;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 1.875rem;
    background-color: #1a1a1a;
}

.header {
    background: #333333;
    padding: 1.0rem 1.0rem;
    border-radius: 8px;
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
}

.logo {
    max-width: 250px;
    height: auto;
    margin-top: 6px;
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    margin-bottom: 1.0rem;
    margin-top: 0.0rem;
    width: 100%;
}

.search-form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.0rem;
    width: 100%;
}

label { 
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 3px; 
    color: #44a659;
}

input, select {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    padding: 6px; 
    background: #333; 
    color: #819b51; 
    border: none; 
    border-radius: 5px;
    margin: 0 auto;
}

input#invoice-search {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    background: #333 url('data:image/svg+xml;utf8,<svg fill="%23E6E6E6" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat 10px center;
    padding-left: 35px;
}

select#status-filter {
    width: 150px;
    padding: 6px;
    color: #E6E6E6; /* Match the off-white/grey of table text */
}

select#status-filter option {
    color: #E6E6E6; /* Match the off-white/grey of table text */
}

h2 {
    color: #B0B0B0;
    font-size: clamp(1.4rem, 3.8vw, 1.8rem);
    text-align: center;
    margin-bottom: 0.3rem;
}

h3 {
    color: #44a659;
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-top: 0;
    margin-bottom: 0.625rem;
}

a {
    color: #44a659;
}

.advanced-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #333;
    color: #707070;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.advanced-search-btn:hover {
    background-color: #707070;
}

.checkbox-group {
    width: 90%;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-group {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9375rem;
    justify-content: center;
}

button, .dashboard-btn {
    padding: 0.5rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: clamp(0.8rem, 2vw, 1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #44a659;
    color: #FFFFFF;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

button:hover, .dashboard-btn:hover {
    background-color: #a0dda0;
    color: #2A2A2A;
}   

button:disabled, .dashboard-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
}

/* Styling for icon buttons */
.icon-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-btn {
    background: none;
    border: none;
    color: #FF4444;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.delete-btn:hover {
    color: #FF6666;
}

.username-item {
    color: #B0B0B0;
    font-size: clamp(1.2rem, 3.8vw, 1.6rem);
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.username-role {
    color: #B0B0B0;
    font-size: clamp(0.8rem, 3.8vw, 1.0rem);
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.info-item {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.info-label {
    color: #44a659;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-right: 0.4rem;
    min-width: 130px;
}

.info-value, .empty-field {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    transition: color 0.3s ease;
}

.info-value, .empty-field {
    cursor: pointer;
}

.info-value:hover:not([data-field="username"]), .empty-field:hover:not([data-field="username"]) {
    color: #20B2AA;
}

.empty-field {
    color: #666666;
    font-style: italic;
}

.info-input {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    background-color: #333333;
    border: 2px solid #B0B0B0;
    border-radius: 8px;
    color: #E6E6E6;
    font-size: 1rem;
    box-sizing: border-box;
}

.info-input[type="date"] {
    color-scheme: dark;
}

select.info-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #333333 url('data:image/svg+xml;utf8,<svg fill="%23E6E6E6" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 0.75rem center;
    padding-right: 2rem;
}

select.info-input option {
    text-align: left;
}

textarea {
    width: 90%;
    resize: vertical;
    padding: 6px;
    background: #333;
    color: #819b51;
    border: none;
    border-radius: 5px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin: 0 auto;
}

.notification-bar {
    width: 100%;
    background-color: #819b51;
    color: rgb(0, 0, 0);
    padding: 1rem;
    text-align: center;
    display: none;
    z-index: 1000;
    border-radius: 0px;
}

.notification-error {
    color: #FF4444;
}

.welcome-banner {
    background-color: #819b51;
    color: #1f1f1f;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    text-align: center;
}

.welcome-banner h3, .welcome-banner p {
    color: #1f1f1f;
}

.banner-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0.8rem;
}

.welcome-banner button {
    position: absolute;
    top: 3px;
    right: 5px;
    background: none;
    border: none;
    color: black;
    font-size: 1.2rem;
    cursor: pointer;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: fixed;
}

.contacts-table th, .contacts-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #684d70;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative; /* Ensure position context */
}

.contacts-table th {
    background-color: #333333;
    color: #44a659;
    position: relative;
}

/* Updated column widths for vs_invoices.php table */
.contacts-table th:nth-child(1), .contacts-table td:nth-child(1) {
    width: 5%;
    text-align: center;
}

.contacts-table th:nth-child(2), .contacts-table td:nth-child(2) {
    width: 15%;
}

.contacts-table th:nth-child(3), .contacts-table td:nth-child(3) {
    width: 15%;
}

.contacts-table th:nth-child(4), .contacts-table td:nth-child(4) {
    width: 12%;
}

.contacts-table th:nth-child(5), .contacts-table td:nth-child(5) {
    width: 12%;
}

.contacts-table th:nth-child(6), .contacts-table td:nth-child(6) {
    width: 10%;
}

.contacts-table th:nth-child(7), .contacts-table td:nth-child(7) {
    width: 10%;
}

.contacts-table th:nth-child(8), .contacts-table td:nth-child(8) {
    width: 16%; /* Adjusted for three icons */
    text-align: center;
}

.contacts-table tr:nth-child(even) {
    background-color: #2A2A2A;
}

.contacts-table tr:hover {
    background-color: #3A3A3A;
}

.sort-symbol {
    color: #E6E6E6;
    font-size: 0.8em;
    margin-left: 0.25rem;
}

.contact-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.contact-details {
    position: relative;
    background-color: #1F1F1F;
    border: 2px solid #684d70;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-clip: padding-box;
}

.contact-header {
    position: sticky;
    top: 0;
    background-color: #1F1F1F;
    border-bottom: 1px solid #684d70;
    padding: 0.75rem 1.5rem;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.contact-header h2 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.contact-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #44a659 #2A2A2A;
}

.contact-content::-webkit-scrollbar {
    width: 8px;
}

.contact-content::-webkit-scrollbar-track {
    background: #2A2A2A;
    border-radius: 4px;
}

.contact-content::-webkit-scrollbar-thumb {
    background: #44a659;
    border-radius: 4px;
}

.contact-content::-webkit-scrollbar-thumb:hover {
    background: #a0dda0;
}

.contact-footer {
    position: sticky;
    bottom: 0;
    background-color: #1F1F1F;
    border-top: 1px solid #684d70;
    padding: 0.5rem 1.5rem;
    z-index: 10;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.footer-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: clamp(0.7rem, 1.8vw, 0.9rem);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #44a659;
    color: #FFFFFF;
    text-decoration: none;
    text-align: center;
    min-width: 60px;
}

.footer-btn:hover {
    background-color: #a0dda0;
    color: #2A2A2A;
}

.contact-group {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #684d70;
    border-radius: 8px;
    background-color: #2A2A2A;
}

.contact-group h3 {
    margin-top: 0;
    border-bottom: 1px solid #684d70;
    padding-bottom: 0.3rem;
}

.contact-group p {
    margin: 0.3rem 0;
}

.overlay-close-btn {
    position: static;
    background-color: rgba(68, 166, 89, 0.7);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 0.9rem;
    color: #FFFFFF;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 10;
    line-height: 24px;
    text-align: center;
    padding: 0;
}

.overlay-close-btn:hover {
    opacity: 1;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
}

.pagination-container .page-info {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #44a659;
    position: relative;
}

.pagination-container .small-select {
    width: 70px;
    padding: 0.3rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.contacts-table .narrow-column a {
    position: relative;
}

.icon {
    color: #44a659;
}

.icon-secondary {
    color: #e6e6e6;
}

.icon-tertiary {
    color: #684d70;
}

@media (max-width: 768px) {
    .container {
        width: 90%;
        margin: 1rem auto;
        padding: 1rem;
    }
    .wide-container {
        width: 90%;
        min-width: 0;
        padding: 1rem;
    }
    .section-box {
        padding: 1rem;
    }
    .header {
        max-width: 90%;
    }
    .button-group {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
    }
    button, .dashboard-btn {
        min-width: 80px;
        padding: 0.4rem 0.5rem;
    }
    .search-form-group {
        flex-direction: column;
        align-items: center;
    }
    input#invoice-search {
        max-width: 100%;
    }
    select#status-filter {
        width: 100%;
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    body.no-scroll {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .info-input {
        padding: 0.625rem;
    }
    .info-item {
        margin: 0.75rem 0;
    }
    .contact-header {
        padding: 0.5rem 1rem;
    }
    .contact-header h2 {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }
    .contact-content {
        padding: 1rem;
    }
    .contact-footer {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    .footer-btn {
        min-width: 50px;
        padding: 0.3rem 0.6rem;
        font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    }
    input#invoice-search {
        max-width: 100%;
        padding: 6px 6px 6px 30px;
        background-position: 5px center;
        background-size: 18px;
    }
}

#menuDropdown.is-visible {
    opacity: 50;
    transition: opacity 0.1s ease-in-out;
}

#menuDropdown:not(.is-visible) {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.menu-overlay.is-visible {
    opacity: 1;
}

.menu-overlay:not(.is-visible) {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.submenu[style*="display: block"] {
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

.submenu[style*="display: none"] {
    opacity: 0;
}

.site-footer {
    background-color: #1a1a1a;
    padding: 15px 15px;
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    flex: 0 0 auto;
    min-height: 50px;
    max-height: 50px;
    height: 50px;
}

.site-devfooter {
    background-color: #ffe100;
    padding: 15px 15px;
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    flex: 0 0 auto;
    min-height: 50px;
    max-height: 50px;
    height: 50px;
}

.site-devfooter .footer-links a {
    color: #000000;
    text-decoration: none;
}

.site-devfooter .footer-links a:hover {
    text-decoration: underline;
}

.site-footer.container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 15px 15px;
}

.site-footer .footer-content {
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
    color: #e0e0e0;
    font-size: 0.8rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
}

.site-footer .footer-links {
    margin-top: 5px;
}

.site-footer .footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    margin: 0 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
}

.site-footer .footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-header {
        padding: 8px 10px;
        min-height: 50px;
        max-height: 50px;
        height: 50px;
    }
    .site-footer {
        padding: 10px;
        min-height: 40px;
        max-height: 40px;
        height: 40px;
    }
    .site-header .header-inner,
    .site-footer .footer-content {
        width: 90%;
    }
    .site-header .right {
        padding-right: 10px;
    }
}