@charset "utf-8";
/* CSS Document */
@import url('https://fonts.googleapis.com/css?family=Changa|Reem+Kufi&display=swap');
@import url('https://fonts.googleapis.com/earlyaccess/droidarabickufi.css');

/* CSS Custom Properties for modern theme */
:root {
    --primary-color: #36c76c;
    --primary-dark: #2fab5c;
    --primary-light: #e7f8ed;
    --bg-color: #f4f7fb;
    --text-color: #2c3e50;
    --text-light: #6c7a89;
    --white: #ffffff;
    --border-color: #e1e8ef;
    --shadow-sm: 0px 2px 4px -1px rgba(175, 182, 201, 0.2);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --header-height: 60px;
    --font-primary: 'Droid Arabic Kufi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-secondary: 'Changa', sans-serif;
    --spacing-unit: 1rem;
    --menu-bg: #36c76c;
    --menu-hover: #3e9a1d;
    --gradient-bg: linear-gradient(180deg, #4a4a4a 0%, #e5e5e5 100%);
    --menu-primary: #36c76c;
    --menu-dark: #40a91a;
    --header-bg: linear-gradient(180deg, #36c76c 0%, #ebfaf0 100%);
    --body-bg: linear-gradient(180deg, #719f31 0%, #e5e5e5 20%);
}

/* Base styles */
body {
    font-family: var(--font-primary);
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout containers using flexbox */
.wrapper {
    max-width: 1300px;
    margin: 5px auto 0;
    min-height: 475px;
    padding: 0 var(--spacing-unit);
    flex: 1 0 auto;
    position: relative;
    width: 90%;
}

.title {
    margin-top: 145px;
    margin-right: 20px;
}

.logo {
    margin: 0;
    padding: 0;
}

    .logo img {
        height: 60px;
        width: auto;
        display: block;
        margin: -4px;
    }

.headerleft {
    display: flex !important;
    background: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
}

    .headerleft > div {
        display: flex;
        gap: 10px;
        width: 100%;
    }

.formcontainer {
    width: 100%;
}

.loginform {
    max-width: 300px;
    margin: 200px auto 0;
}

/* Table styles with modern borders and spacing */
table {
    width: 100%;
    min-width: 500px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

    td:last-child {
        border-right: none;
    }

tr:last-child td {
    border-bottom: none;
}

tr.row1 {
    background: var(--bg-color);
    font-weight: 500;
}

    tr.row1 td {
        border-bottom: 2px solid var(--border-color);
    }

tr:nth-child(even) {
    background: var(--bg-color);
}

/* Modern button styles */
input[type="submit"],
input[type="button"] {
    background: var(--primary-color);
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 14px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

    input[type="submit"]:hover,
    input[type="button"]:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

/* Modern navigation menu */
.top-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    margin-bottom: var(--spacing-unit);
}

    .top-menu a {
        background: #4CAF50;
        padding: 8px 16px;
        color: var(--white);
        text-decoration: none;
        font-size: 14px;
        transition: background-color 0.3s ease;
    }

        .top-menu a:hover {
            background-color: #339900;
        }

h1 {
    font-size: 18px;
    color: #666;
}

.footer {
    background: var(--text-color);
    min-height: 100px;
    color: var(--bg-color);
    font-size: 12px;
    text-align: center;
    padding: var(--spacing-unit);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.bgFooter {
    flex-shrink: 0; /* Prevents footer from shrinking */
    background: var(--white);
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    margin: 0;
    padding: 0;
    width: 100%;
}

table.news td:nth-child(1) {
    width: 150px;
}

table.news td:nth-child(2) {
    width: 200px;
}

.greenlink a {
    color: #719f31;
    text-decoration: none;
}

table.PrivateMessages {
    border: none;
    border: 1px solid #ddd;
}

    table.PrivateMessages td {
        border: none;
    }

        table.PrivateMessages td:nth-child(1) {
            background: #e1e1e1;
        }

    table.PrivateMessages tr:nth-child(5) {
        background: #719f31;
        color: #fff;
    }

        table.PrivateMessages tr:nth-child(5) td:nth-child(2) {
            background: #719f31 !important;
            color: #fff;
        }

    table.PrivateMessages tr:nth-child(9) td:nth-child(1) {
        background: #719f31 !important;
        color: #fff;
    }

    table.PrivateMessages tr:nth-child(5) td:nth-child(1) {
        background: #719f31 !important;
        color: #fff;
    }

    table.PrivateMessages tr:nth-child(9) td:nth-child(2) {
        background: #719f31 !important;
        color: #fff;
    }

    table.PrivateMessages tr:nth-child(9) {
        background: #719f31;
        color: #fff;
    }

    table.PrivateMessages td:nth-child(2) {
        background: #fff;
    }

table.adduser {
    width: auto;
}

    table.adduser td:nth-child(1) {
        width: auto;
        background: #719f31 !important;
        color: #fff;
    }

    table.adduser td:nth-child(2) {
        width: auto;
        background: #fff !important;
    }

table.login-form {
    width: 300px;
}

    table.login-form td:nth-child(1) {
        font-size: 12px;
        background: #E2E2E2 !important
    }

    table.login-form td:nth-child(2) {
        font-size: 12px;
        background: #E2E2E2 !important;
    }

.welcome-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    /* background: var(--primary-color); */
    background: white;
    box-shadow: var(--shadow-sm);
    /* box-shadow: rgba(0, 0, 0, 0.05) 0px 9px 17.5px; */
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
}

.welcome-text {
    display: flex;
    gap: 20px;
    align-items: center;
}

.HeadWelcome,
.headdate {
    /* color: var(--white); */
    color: rgba(92, 92, 92, 0.715);
    font-size: 12px;
    white-space: nowrap;
}

/* Dropdown menu styles */
.dropdown {
    position: relative;
    display: inline-block;
    margin: 0 5px;
}

.dropbtn {
    background: white;
    color: rgb(84, 84, 84);
    padding: 12px 20px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-family: var(--font-secondary);
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dropdown:hover .dropbtn {
    background: #e7f8ed;
    cursor: pointer;
}

.dropbtn i {
    font-size: 14px;
    color: var(--primary-color);
}

.dropdown-content {
    display: block;
    position: absolute;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    z-index: 1000;
    top: calc(100% + 5px);
    right: 0;
    padding: 8px;
    border: 1px solid var(--border-color);
    /* Animation setup */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keep the hover bridge */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px;
    right: 0;
    left: 0;
    height: 15px;
    background: transparent;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    font-size: 14px;
}

    .dropdown-content a i {
        width: 16px;
        color: var(--primary-color);
        font-size: 14px;
    }

    .dropdown-content a:hover {
        background: var(--primary-light);
        color: var(--primary-dark);
    }

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .dropdown {
        width: 100%;
        margin: 5px 0;
    }

    .dropbtn {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 15px;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: var(--primary-light);
        margin-top: 5px;
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        padding: 12px 15px;
        color: var(--text-color);
    }

        .dropdown-content a:hover {
            background: var(--white);
        }

    .headerleft {
        display: none !important;
    }

        .headerleft.active {
            display: flex !important;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            border-radius: 0;
            width: 94%;
        }
}

/* Filter table styles */
table.filter {
    min-width: unset;
    max-width: 1200px;
    width: 95%;
    margin: 1rem auto;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    outline: 1px solid var(--border-color);
}

    table.filter td {
        padding: 10px;
        vertical-align: middle;
        border: none;
    }

    table.filter input[type="text"],
    table.filter select {
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        width: 180px;
        transition: all 0.2s ease;
    }

        table.filter input[type="text"]:focus,
        table.filter select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(136, 183, 27, 0.1);
            outline: none;
        }

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive improvements */
@media screen and (max-width: 1024px) {
    .headerbar {
        flex-direction: column;
        padding: 10px;
    }

    .headerright {
        width: auto;
        padding: 0;
        margin-bottom: 15px;
        text-align: center;
    }

    .headerleft {
        width: 100%;
        padding: 10px;
    }

        .headerleft > div {
            justify-content: center;
            gap: 5px;
            /* flex-wrap: wrap; */
        }

    .dropdown {
        flex: 0 0 calc(33.33% - 10px);
        margin: 0;
    }

    .dropbtn {
        width: 100%;
        padding: 8px;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }
}

@media screen and (max-width: 768px) {
    .wrapper {
        padding: 0;
        width: 100%;
        overflow-x: hidden; /* Prevent horizontal scroll on wrapper */
        padding-top: 0;
    }

    .dropdown {
        flex: 0 0 calc(50% - 5px);
    }

    .headerleft > div {
        gap: 10px;
    }

    .title {
        margin-top: 20px;
        text-align: center;
    }

    .dropdown-content {
        position: absolute;
        width: auto;
        min-width: 200px;
        max-width: calc(100vw - 20px);
        width: 94%;
        margin: auto;
    }

    .welcome-container {
        flex-direction: column-reverse;
        padding: 10px;
        position: relative;
    }

    .logo img {
        height: 50px;
        margin-bottom: 10px;
    }

    .welcome-text {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .wrapper {
        /* margin-top: 120px; */
    }

    .hamburger-menu {
        display: block;
    }

    .headerleft {
        display: none; /* Hide by default */
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }

        .headerleft.active {
            display: block; /* Show when active */
        }

        .headerleft > div {
            flex-direction: column;
            padding: 10px;
        }

    .dropdown {
        width: 100%;
        margin: 5px 0;
    }

    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: var(--shadow-sm);
        margin-top: 5px;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    /* Animate hamburger to X when active */
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

@media screen and (max-width: 480px) {
    .headerbar {
        padding: 5px;
    }

    .headerleft {
        padding: 5px;
    }

        .headerleft > div {
            flex-direction: column;
            gap: 5px;
        }

    .logo img {
        height: 40px;
    }

    .dropdown {
        width: 100%;
        margin: 2px 0;
    }

    .dropbtn {
        padding: 10px;
        font-size: 15px;
    }

    .dropdown-content {
        position: relative;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .HeadWelcome,
    .headdate {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }

    /* Better table handling on mobile */
    table.filter td {
        display: block;
        width: 100%;
        text-align: center;
    }

    table.filter input[type="text"],
    table.filter select,
    table.filter input[type="submit"] {
        width: 100%;
        margin: 5px 0;
        box-sizing: border-box;
    }

    /* Improve form elements on mobile */
    input[type="submit"],
    input[type="button"] {
        width: 100%;
        padding: 10px;
        margin: 5px 0;
    }

    /* Further mobile optimizations */
    .formcontainer {
        padding: 0 5px;
    }

    table.filter td {
        padding: 3px 5px;
    }

    /* Ensure all inputs and selects are properly sized */
    input[type="text"],
    select,
    input[type="submit"],
    input[type="button"] {
        max-width: 100%;
        box-sizing: border-box;
    }

    table.filter {
        width: 85%;
        padding: 0.5rem;
    }

        table.filter input[type="text"],
        table.filter select {
            font-size: 14px;
            padding: 6px;
        }
}

/* Smooth transitions */
.dropdown,
.dropbtn,
.dropdown-content,
.logo img,
input[type="submit"],
input[type="button"] {
    transition: all 0.2s ease-in-out;
}

/* Fix RTL dropdown positioning */
.dropdown-content {
    right: 0;
    left: auto;
}

/* Add responsive table container */
.table-responsive {
    width: 93%;
    margin: 1rem 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    overflow-x: auto;
    position: relative;
    right: 50%;
    transform: translateX(50%);
    max-width: 1150px;
    margin-bottom: 100px;
}

    .table-responsive table {
        min-width: unset; /* Remove the fixed min-width */
        width: 100%;
        border: none;
        margin: 0;
        border-radius: var(--radius-md);
        overflow: hidden;
    }

    .table-responsive tr.row1 {
        background: var(--primary-color);
        color: var(--white);
    }

        .table-responsive tr.row1 td {
            padding: 1rem;
            font-weight: 500;
            white-space: nowrap;
            border-left: 1px solid rgba(255, 255, 255, 0.2); /* Lighter separator for header */
        }

            .table-responsive tr.row1 td:first-child {
                border-right: 1px solid rgba(255, 255, 255, 0.2); /* Lighter separator for header */
            }

        .table-responsive tr.row1 a {
            color: var(--white);
            text-decoration: none;
        }

    .table-responsive tr.row3 {
        transition: all 0.2s ease;
    }

    /* .table-responsive tr.row3:hover {
  background: var(--primary-light);
} */

    .table-responsive td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
        border-left: 1px solid var(--border-color); /* Add vertical separators */
    }

        .table-responsive td:first-child {
            border-right: 1px solid var(--border-color); /* Add border for first column */
        }

    .table-responsive tr.row1 td i {
        margin-left: 8px;
    }

    .table-responsive tr.row1 td a i {
        margin-left: 8px;
    }

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    .table-responsive {
        width: 95%; /* Changed from 80% */
        margin: 50px auto 100px auto;
        border-radius: 0;
        padding: 0.5rem;
        transform: none;
        right: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

        .table-responsive td {
            padding: 0.5rem;
            font-size: 0.9rem;
        }

    /* Adjust wrapper padding */
    .wrapper {
        padding: 0;
        width: 100%;
        margin: 0 auto;
        overflow-x: hidden;
    }

    /* Adjust welcome container */
    .welcome-container {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    /* Adjust headerbar */
    .headerbar {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
        margin: 0;
    }

    /* Ensure filter table doesn't overflow */
    table.filter {
        width: 90%;
        margin: 1rem auto;
        box-sizing: border-box;
    }
}

/* Additional fixes for very small screens */
@media screen and (max-width: 480px) {
    .table-responsive {
        width: 100%;
        padding: 0;
        margin: 30px 0 100px 0;
    }

    table.filter {
        width: 95%;
        padding: 10px;
    }
}

/* Add hamburger menu styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
}

    .hamburger-menu span {
        width: 100%;
        height: 3px;
        background: var(--text-color);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

/* Mobile navigation styles */
@media screen and (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .headerleft {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        max-height: calc(100vh - 100px); /* Prevent overflow */
        overflow-y: auto; /* Allow scrolling if content is too tall */
    }

        .headerleft.active {
            display: block !important;
        }

        .headerleft > div {
            flex-direction: column;
            gap: 10px;
            align-items: center; /* Center items */
        }

    .dropdown {
        width: 100%;
        text-align: center; /* Center dropdown buttons */
    }

    .dropbtn {
        width: 100%;
        justify-content: center; /* Center button text and icon */
        text-align: center;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 5px;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

        .dropdown-content a {
            justify-content: center; /* Center dropdown items */
            text-align: center;
        }

    /* Adjust welcome container for mobile */
    .welcome-container {
        flex-direction: row;
        padding: 10px;
        width: 100%;
        box-sizing: border-box; /* Prevent horizontal scroll */
    }

    /* Adjust header layout */
    .headerbar {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .headerright {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Dropdown animation for mobile */
@media screen and (max-width: 768px) {
    .dropdown-content {
        transition: max-height 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }

    .dropdown.active .dropdown-content {
        max-height: 500px;
    }
}

/* Update responsive breakpoint for filter table */
@media screen and (max-width: 992px) {
    table.filter {
        width: 90%;
        border-collapse: separate;
        padding: 15px;
    }

        table.filter td {
            display: block;
            width: 100%;
            text-align: right;
            padding: 5px 10px;
            box-sizing: border-box;
        }

        table.filter input[type="text"],
        table.filter select,
        table.filter input[type="submit"] {
            width: 100%;
            margin: 5px 0;
            box-sizing: border-box;
        }
}

/* Update footer */
.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .footer a:hover {
        color: var(--primary-dark);
    }

/* Add user section styles */
#add-user-title {
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

table.adduser {
    margin: 4rem auto;
    max-width: 834px;
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

    table.adduser td:first-child {
        background: var(--primary-color) !important;
        color: var(--white);
        font-weight: 500;
        width: 180px;
        padding: 1rem;
    }

    table.adduser td:nth-child(2) {
        padding: 1rem;
        background: var(--white) !important;
    }

    table.adduser input[type="text"],
    table.adduser input[type="password"] {
        width: 100%;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        font-size: 14px;
        transition: all 0.2s ease;
        box-sizing: border-box;
    }

        table.adduser input[type="text"]:focus,
        table.adduser input[type="password"]:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(69, 183, 27, 0.1);
            outline: none;
        }

    table.adduser select[multiple] {
        width: 100%;
        min-height: 200px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 8px;
    }

        table.adduser select[multiple] option {
            padding: 6px 8px;
        }

    table.adduser input[type="submit"] {
        width: 100%;
        margin-top: 1rem;
    }

    table.adduser .error {
        color: #dc3545;
        font-size: 0.875rem;
        margin-top: 0.25rem;
        display: block;
    }

/* Center the add user section */
form#frm_ins {
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    #add-user-title {
        display: block;
        text-align: center;
        margin: 2rem 1rem 1rem;
        font-size: 1.25rem;
    }

    table.adduser td {
        display: block;
        width: 100% !important;
    }

        table.adduser td:first-child {
            border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        }

    table.adduser select[multiple] {
        min-height: 150px;
    }
}

/* Date picker styles */
input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    background: var(--white);
    color: var(--text-color);
    transition: all 0.2s ease;
    width: 130px;
}

    input[type="date"]:focus {
        border-color: var(--primary-color);
        outline: none;
    }

    /* Remove the datepicker button on Edge */
    input[type="date"]::-webkit-calendar-picker-indicator {
        background: var(--primary-color);
        padding: 4px;
        cursor: pointer;
        border-radius: var(--radius-sm);
    }

        input[type="date"]::-webkit-calendar-picker-indicator:hover {
            background: var(--primary-dark);
        }

@media screen and (max-width: 768px) {
    input[type="date"] {
        width: calc(100% - 20px);
    }
}

.login-container {
    max-width: 400px;
    margin: 2rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin: 17vh auto;
}

.login-title {
    color: var(--text-color);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-secondary);
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0.5rem;
        color: var(--text-color);
        font-weight: 500;
    }

        .form-group label i {
            color: var(--primary-color);
            font-size: 16px;
            width: 16px;
            text-align: center;
        }

    /* Multiple select styling */
    .form-group select[multiple] {
        height: 200px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 0;
        overflow: auto;
    }

        .form-group select[multiple] option {
            padding: 10px 12px;
            border-bottom: 1px solid var(--border-color);
            transition: all 0.2s ease;
            color: var(--text-color);
        }

            .form-group select[multiple] option:last-child {
                border-bottom: none;
            }

            .form-group select[multiple] option:checked {
                background: var(--primary-light) !important;
                color: var(--primary-color);
                font-weight: 500;
            }

            .form-group select[multiple] option:hover {
                background: var(--primary-light);
                color: var(--primary-color);
            }

/* Custom checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 5px 0;
}

    .checkbox-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        user-select: none;
        margin: 0;
    }

    .checkbox-group input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

    .checkbox-group label::before {
        content: '';
        height: 20px;
        width: 20px;
        border: 2px solid var(--border-color);
        border-radius: var(--radius-sm);
        transition: all 0.2s ease;
        display: inline-block;
        flex-shrink: 0;
    }

    .checkbox-group input[type="checkbox"]:checked + label::before {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .checkbox-group label::after {
        content: '';
        position: absolute;
        right: 7px;
        top: 11px;
        width: 6px;
        height: 11px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        display: none;
    }

    .checkbox-group input[type="checkbox"]:checked + label::after {
        display: block;
    }

    .checkbox-group:hover label::before {
        border-color: var(--primary-color);
    }

    /* Focus styles */
    .checkbox-group input[type="checkbox"]:focus + label::before {
        box-shadow: 0 0 0 3px var(--primary-light);
    }

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .form-group input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(69, 183, 27, 0.1);
        outline: none;
    }

.form-group .error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-secondary);
}

    .login-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }

    .login-btn:active {
        transform: translateY(0);
    }

@media screen and (max-width: 768px) {
    .login-container {
        margin-bottom: 110px;
        padding: 1.5rem;
    }
}

/* Modern scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(155, 155, 155, 0.5);
    border-radius: 20px;
    transition: all 0.2s ease;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(155, 155, 155, 0.8);
    }

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 155, 155, 0.5) transparent;
}

/* Total income styles */
.total-income {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    margin: 20px 0;
}

    .total-income i {
        /* color: var(--primary-color); */
        color: white;
        background: var(--primary-color);
        font-size: 18px;
        padding: 10px;
        border-radius: 50%;
        box-shadow: var(--shadow-md);
        margin-left: 10px;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Permission tags container */
.permission-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
}

.permission-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s ease;
}

    .permission-tag .remove-tag {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        cursor: pointer;
        font-size: 10px;
        transition: all 0.2s ease;
    }

        .permission-tag .remove-tag:hover {
            background: #dc3545;
            transform: scale(1.1);
        }

.add-permission {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 2px dashed var(--border-color);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .add-permission:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

/* Permission dropdown */
.permission-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
    z-index: 100;
    display: none;
}

    .permission-dropdown.active {
        display: block;
    }

    .permission-dropdown a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        color: var(--text-color);
        text-decoration: none;
        border-radius: var(--radius-sm);
        transition: all 0.2s ease;
    }

        .permission-dropdown a:hover {
            background: var(--primary-light);
            color: var(--primary-color);
        }

/* Custom Dialog Styles */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(0px);
    transition: all 0.2s ease;
    opacity: 0;
}

    .dialog-overlay.active {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 1;
    }

.dialog-box {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.dialog-overlay.active .dialog-box {
    opacity: 1;
    transform: translateY(0);
}

.dialog-content {
    margin-bottom: 1.5rem;
}

.dialog-title {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.dialog-message {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.dialog-btn {
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dialog-btn-confirm {
    background: #dc3545;
    color: white;
}

    .dialog-btn-confirm:hover {
        background: #c82333;
    }

.dialog-btn-cancel {
    background: var(--bg-color);
    color: var(--text-color);
}

    .dialog-btn-cancel:hover {
        background: var(--border-color);
    }

/* Permission dropdown menu */
.add-permission-container {
    position: relative;
    display: inline-flex;
}

.add-permission-dropdown {
    position: absolute;
    top: 0;
    right: calc(100% + 8px); /* Position to the right of the button with 8px gap */
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    overflow-x: hidden;
}

    .add-permission-dropdown.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    .add-permission-dropdown .search-box {
        position: sticky;
        top: 0;
        background: white;
        padding-bottom: 12px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }

    .add-permission-dropdown input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        font-size: 13px;
        transition: all 0.2s ease;
    }

        .add-permission-dropdown input:focus {
            border-color: var(--primary-color);
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-light);
        }

.permission-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-color);
    font-size: 13px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .permission-option:hover {
        background: var(--primary-light);
        color: var(--primary-color);
    }

    .permission-option i {
        color: var(--primary-color);
        font-size: 14px;
        width: 16px;
        text-align: center;
    }

/* Add this to your existing styles */
.permission-highlight {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.user-name {
    font-weight: 500;
}

/* Add this to your existing styles */
.no-permissions-message {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

select, input {
    font-family: var(--font-primary);
}

/* Table actions */
.table-actions {
    display: flex;
    justify-content: flex-end;
    margin: 1rem 3.5rem;
    gap: 1rem;
}

.add-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

    .add-user-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .add-user-btn i {
        font-size: 14px;
    }

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-container {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

    .modal-header h3 {
        margin: 0;
        color: var(--text-color);
        font-size: 1.25rem;
        font-weight: 500;
    }

.close-modal {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 5px;
    transition: all 0.2s ease;
}

    .close-modal:hover {
        color: var(--text-color);
        transform: scale(1.1);
    }

.modal-content {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Form styles */
.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0.5rem;
        color: var(--text-color);
        font-weight: 500;
    }

        .form-group label i {
            color: var(--primary-color);
            font-size: 16px;
            width: 16px;
            text-align: center;
        }

    /* Multiple select styling */
    .form-group select[multiple] {
        height: 200px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 0;
        overflow: auto;
    }

        .form-group select[multiple] option {
            padding: 10px 12px;
            border-bottom: 1px solid var(--border-color);
            transition: all 0.2s ease;
            color: var(--text-color);
        }

            .form-group select[multiple] option:last-child {
                border-bottom: none;
            }

            .form-group select[multiple] option:checked,
            .form-group select[multiple] option:active {
                background: var(--primary-light) !important;
                color: var(--primary-color);
                font-weight: 500;
            }

            .form-group select[multiple] option:hover {
                background: var(--primary-light);
                color: var(--primary-color);
            }

            .form-group select[multiple] option:focus {
                background: var(--primary-light) !important;
                color: var(--primary-color);
                -moz-appearance: none;
                appearance: none;
            }
/* Custom checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 5px 0;
}

    .checkbox-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        user-select: none;
        margin: 0;
    }

    .checkbox-group input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

    .checkbox-group label::before {
        content: '';
        height: 20px;
        width: 20px;
        border: 2px solid var(--border-color);
        border-radius: var(--radius-sm);
        transition: all 0.2s ease;
        display: inline-block;
        flex-shrink: 0;
    }

    .checkbox-group input[type="checkbox"]:checked + label::before {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .checkbox-group label::after {
        content: '';
        position: absolute;
        right: 7px;
        top: 11px;
        width: 6px;
        height: 11px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        display: none;
    }

    .checkbox-group input[type="checkbox"]:checked + label::after {
        display: block;
    }

    .checkbox-group:hover label::before {
        border-color: var(--primary-color);
    }

    /* Focus styles */
    .checkbox-group input[type="checkbox"]:focus + label::before {
        box-shadow: 0 0 0 3px var(--primary-light);
    }

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

    .form-group input[type="text"]:focus,
    .form-group input[type="password"]:focus,
    .form-group select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px var(--primary-light);
        outline: none;
    }

    .form-group select[multiple] {
        height: 200px;
    }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.submit-btn,
.cancel-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

    .submit-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

.cancel-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

    .cancel-btn:hover {
        background: var(--border-color);
    }

/* Error message styles */
.error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 1rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .submit-btn,
    .cancel-btn {
        width: 100%;
    }

    .table-actions {
        margin: 1rem;
    }
}


::selection {
    background: rgb(144 227 173 / 57%);
}

::-moz-selection {
    background: rgb(144 227 173 / 57%);
}
