﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Jost', sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f4f8, #e6ecf5);
    color: #333;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    width: 100%;
    background: linear-gradient(90deg, #573b8a, #6d44b8);
    color: #fff;
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 200;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    animation: slideDown 0.8s ease;
}

.logo {
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 1px;
    animation: fadeIn 1s ease;
}

.logout-btn {
    background-color: orange;
    color: #573b8a;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #ffec80;
    transform: scale(1.05);
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 100;
}

.overlay.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
    animation: fadeIn 1.2s ease;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #6d44b8, #573b8a);
    color: #fff;
    padding: 20px;
    transition: right 0.3s ease;
    border-top-left-radius: 15px;
    animation: slideRight 1s ease;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 20px 0;
    cursor: pointer;
    transition: 0.3s;
    padding: 0px;
    border-radius: 8px;
}

.sidebar ul li:hover {
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    transform: translateX(5px);
}

/* Content */
.content {
    flex: 1;
    padding: 30px;
    margin-right: 20px;
}

.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    cursor:pointer;
}

.card {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 220px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeUp 0.8s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .sidebar {
        position: fixed;
        right: -250px;
        top: 0;
        height: 100%;
        z-index: 150;
    }

    .sidebar.active {
        right: 0;
    }

    .container {
        flex-direction: column;
    }

    .cards {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideDown {
    from {transform: translateY(-100%);}
    to {transform: translateY(0);}
}

@keyframes slideRight {
    from {transform: translateX(-100%);}
    to {transform: translateX(0);}
}

@keyframes fadeUp {
    from {opacity: 0; transform: translateY(30px);}
    to {opacity: 1; transform: translateY(0);}
}
table {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    width: 100%;
    margin-top:30px;
    border-radius:15px;
}

td, th {
    border: 1px solid #ddd;
    padding: 8px;

}
th {
    border-radius: 15px 15px 0px 0px;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #ddd;
}

th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: #04AA6D;
    color: white;

}
.tagh {
margin:0px;
width:100%;
height:100%;
border:0px;
cursor:pointer;
border-radius:7px;
font-size:15px;
}
table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl; 
}

th, td {
    text-align: right; 
    padding: 8px;
    border: 1px solid #ccc;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #6d44b8;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
}


    .dropdown-content a {
        color: black;
        padding: 8px 12px;
        text-decoration: none;
        display: block;
    }


        .dropdown-content a:hover {
            background-color: #ddd;
        }


.dropdown:hover .dropdown-content {
    display: block;
}

.table-wrapper {
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    max-width: 100%;
    overflow-y:visible;
}

table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    font-family: 'B IranSans', sans-serif;
    min-width: 600px;
    overflow-y: visible;
}

th, td {
    text-align: right;
    padding: 8px;
    border: 1px solid #ccc;
}

th {

    color: white;
}


td .dropbtn {
    background-color: #04AA6D;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    z-index: 10;
}

    .dropdown-content a {
        display: block;
        padding: 8px 12px;
        text-decoration: none;
        color: black;
    }

        .dropdown-content a:hover {
            background-color: #ddd;
        }

.dropdown:hover .dropdown-content {
    display: block;
}


@media screen and (max-width: 720px) {
    th, td {
        font-size: 14px;
        padding: 6px;
    }

        td .dropbtn {
            padding: 4px 8px;
            font-size: 12px;
        }
}

.table-wrapper {
    overflow-x: auto; /* اجازه اسکرول افقی برای جدول */
    overflow-y: visible; /* مهم: اجازه بده منو بیرون بزنه */
    position: relative; /* برای reference منو */
    padding-bottom:200px;
}

.dropdown {
    position: relative; /* دکمه نسبت به این absolute میشه */
}

.dropdown-content {
    position: absolute; /* بیرون از جریان جدول */
    top: 100%; /* زیر دکمه */
    right: 0; /* راستچین باشه */
    display: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 100px;
    z-index: 9999; /* همیشه روی جدول */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.dropdown:hover .dropdown-content {
    display: block;
}
.add-couns {
    display: block;
    width: 100px;
    height: 50px;
    border: 0px;
    border-radius: 15px;
    background-color: #04AA6D;
    color: white;
    cursor: pointer;
    margin: 0px auto 0px auto;
}

    .add-couns:hover {
        animation: button 0.1s ease forwards;
        box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
    }
@keyframes button{
    25% {
        transform: translateY(-1px);
    }
    50% {
        transform: translateY(-3px);
    }
    75% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(-5px);
    }

}
.topp {
    margin-top:100px;
}
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    padding-top: 100px; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}


.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}


.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

    .close:hover,
    .close:focus {
        color: #000;
        text-decoration: none;
        cursor: pointer;
    }
.dropdown-content {
    min-width:150px;
    max-width:200px;
}
.swal2-select {
    width:80%;
    margin-bottom:10px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    border: 1px solid #d9d9d9;
    background-color: #fff;
}
