:root{
    --main-color: #7132CA;
    --main-light: #eadcff;
    --sec-color: #213448;
    --bg-color: #EEEEEE;
    --light-text: #BFC6C4;
    --text-color: #414141;
    --white-color: #ffffff;
    --black-color: #000000;
    --grid-data-color: #5d70c6;
    --grid-data-bg: #F5EFFF;
}

@keyframes cameUp {
    0% {
        transform: translateY(200%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    transition: all .4s ease-in-out;
    accent-color: var(--main-color);
}

body{
    display: flex;
    flex-direction: row;
    background-color: var(--bg-color);
    font-family: inter, sans-serif;
    height: 100dvh;
    color: var(--black-color);
    font-size: 16px;
    max-height: 100dvh;
    overflow-x: hidden;
    justify-content: center;
}

h1{
    font-size: clamp(24px, 1.2vw, 40px);
    margin-bottom: 20px;
    margin-top: 10px;
    color: var(--main-color);
    padding-left: 10px;
    text-transform: uppercase;
}

h2{
    text-transform: capitalize;
    font-weight: 500;
    font-size: 1.4rem;
}

h3{
    font-size: 1.4rem;
    text-align: center;
    color: var(--main-color);
    text-transform: uppercase;
}

h4{
    color: var(--grid-data-color);
    font-size: 1.2rem;
    text-transform: capitalize;
}

p{
    margin-top: 5px;
}

a{
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 10px;
}

i{
    font-style: normal;
    cursor: pointer;
}

details{
    position: relative;
    padding: 10px;
}

button, a.btn, .btn, .btn:hover{
    padding: 10px 12px;
    border-radius: 8px;
    background-color: var(--main-color);
    color: var(--white-color);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-align: center;
}

a.btn1, .btn1{
    color: var(--main-color);
    background-color: var(--main-light);
}

a.btn2, .btn2{
    color: red;
    background-color: #ffd3d3;
}

.active{
    display: flex !important;
}

/*Forms */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="datetime-local"],
input[type="file"],
input[type="file"]::file-selector-button,
select{
    padding: 8px 12px;
    flex: 1;
    width: 100%;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid var(--light-text);
    accent-color: var(--main-color);
}

input[type="file"]::file-selector-button{
    width: auto;
}

input[type="file"]{
    padding: 0px;
    border-radius: 10px;
}

form div:has(>div>input){
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 20px;
    margin-bottom: 20px;
    align-items: start;
}

form#paymentForm div.row span {
    color: red;
    font-size: 1.2rem;
    font-weight: 600;
    align-self: center;
    text-align: center;
    width: 30px;
    cursor: pointer;
}

form#paymentForm div.addRow {
    color: var(--main-color);
    justify-self: end;
    font-weight: 600;
    cursor: pointer;
}

div:has(>form){
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 12px;
}

div:has(>form) h3{
    margin-bottom: 30px;
}

form div:has(>input, >select){
    display: flex;
    flex-direction: column;
    gap: 6px;
}

form div:has(>label) div{
    flex-direction: row;
}

form p{
    margin: 30px 0px 20px 0px;
    font-weight: 600;
}

form button{
    margin-top: 30px;
    width: 200px;
    flex: 1;
    display: block;
    justify-self: center;
    align-self: center;
}

form button:hover{
    transform: scale(1.1);
}

label{
    font-size: .9rem;
    text-transform: capitalize;
    text-align: justify;
}

table{
    flex: 1;
    width: 100%;
    text-align: justify;
    align-self: flex-start;
    border-collapse: collapse;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--text-color);
}

thead{
    background-color: var(--main-color);
    color: var(--white-color);
}

td, th{
    padding: 10px 8px;
    font-weight: 400;
    text-align: start;
    min-width: 80px;
}

table .mw{
    min-width: 170px;
}

td:last-child, th:last-child{
    text-align: end;
}

table tr td:last-child {
    display: flex;
    font-size: 1rem;
    gap: 10px;
    justify-content: flex-end;
}

div#data-div tbody tr:nth-child(even){
    background-color: var(--grid-data-bg);
}

div#data-div > table tbody tr:nth-child(odd){
    background-color: var(--white-color);
}

div#data-div tbody > tr:hover, tbody > tr:hover{
    background-color: var(--main-light);
}

div:has(>table){
    overflow: auto;
    border-radius: 8px;
}

div#data-div{
    flex: 1;
}

div#pegi-div{
    border-radius: 8px;
    overflow: hidden;
}

div#pegi-div > span{
    background-color: var(--main-light);
    padding: 6px 12px;
    color: var(--main-color);
    cursor: pointer;
    flex: 1;
    text-align: center;
    justify-content: center;
}

div#pegi-div > span.active, div#pegi-div > span:hover{
    background-color: var(--main-color);
    color: var(--white-color);
}

aside{
    background-color: var(--white-color);
    padding: 10px;
    border-radius: 12px;
    height: 100%;
    min-width: 180px;
    display: flex;
    z-index: 1;
    flex-direction: column;
    justify-content: space-between;
}

aside > div#logout{
    display: flex;
    overflow: hidden;
    border-radius: 6px;
    gap: 5px;
}

div#logout > a:first-child{
    flex: 1;
    justify-content: center;
}

#slidetoggle{
    display: none;
    font-size: 1.4rem;
    color: #7132ca;
    position: absolute;
    right: 20px;
    top: 10px;
    z-index: 10;
}

nav{
    display: flex;
    flex-direction: column;
    gap: 5px;
}

nav > a{
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 6px;
}

nav i{
    width: 25px;
}

nav > a.active{
    /* font-weight: 600; */
    background-color: var(--main-light);
}

nav > a:hover{
    background-color: var(--main-color);
    color: var(--white-color);
    font-weight: 600;
}

main{
    padding: 10px 10px;
    flex: 1;
    overflow: auto;
}

main#table{
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: auto;
}

main#table > div:nth-child(2){
    height: 100%;
    overflow: auto;
}

main#table > div{
    justify-content: space-between;
}

main#table > div, main#table > div:not(:nth-child(2)) > div{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

/*Message Div*/
div#msg_div{
    position: fixed;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

div#msg_div div{
    font-size: 1.1rem;
    background: #ffffff;
    /* background: #e2ffe2; */
    padding: 8px 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 4px 0px #bbbbbb;
    cursor: pointer;
    text-align: center;
    text-transform: capitalize;
    animation: cameUp .6s ease-in-out;
}

/* div#msg_div div.error{
    background-color: #ffd3d3;
} */

/*Custome Grid Layout*/
main#table:has(div#gridTable) button#deleteAll{
    display: none;
}

div#gridTable{
    display: grid;
    gap: 10px;
    height: 100%;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    align-items: start;
    align-content: start;
}

div#gridTable table tr:first-child td,
div#gridTable table tr:last-child td,
div.client table tr:first-child td,
div.client table tr:last-child td{
    font-weight: 600;
}

div#gridTable table tr:last-child, div.client table tr:last-child{
    font-size: 1.1rem;
    border-width: 2px 0px 2px 0px;
    border-style: solid;
}

div#gridTable td{
    padding: 6px;
}

div#gridTable p i{
    width: 20px;
}

div#gridTable > div{
    border-radius: 8px;
    /* overflow: hidden; */
    background-color: var(--white-color);
}

div#gridTable > div > div > div{
    padding: 10px;
}

div#gridTable div:has(>h4){
    background-color: var(--grid-data-bg);
    border-radius: 8px 8px 0px 0px;
}

div#gridTable summary{
    display: flex;
    gap: 10px;
}

div#gridTable details div{
    background: var(--grid-data-bg);
    padding: 10px;
    margin-top: 10px;
    width: stretch;
}

div#gridTable summary a,div#gridTable summary span, div#gridTable summary button{
    flex: 1;
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    font-size: 1.1rem;
    justify-content: center;
    color: var(--grid-data-color);
    background-color: var(--grid-data-bg);
    cursor: pointer;
}

div#gridTable details[open] summary span:last-child,
div#gridTable summary a:hover,
div#gridTable summary span:hover,
div#gridTable summary button:hover{
    background-color: var(--main-color);
    color: var(--white-color);
}

/*Client Post View*/
main#client > div{
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 4px;
}

main#client div#tools{
    display: flex;
    gap: 10px;
}

div#tools a{
    flex: 1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    background-color: var(--main-light)
}

div#tools button{
    flex: 1;
}

div.client h4{
    font-size: 1.4rem;
}

div.client{
    background-color: var(--white-color);
    min-width: min(400px, 100%);
}

div.client > div, div.client > table{
    padding: 20px 10px;
}

div.client > table td{
    padding: 8px 10px;
}

div.client > table, div.client > div:first-child{
    background-color: var(--grid-data-bg);
}

/*Filter View*/
section#filter{
    animation: cameUp 1s ease-out;
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    box-shadow: 0px 0px 4px 2px #d8d8d8;
    border-radius: 12px;
    background: #ffffff;
    padding: 20px;
    width: min(400px, 100%);
    flex-direction: column;
    text-align: center;
    gap: 50px;
}

section#filter #close-btn{
    position: absolute;
    top: 0;
    right: 0;
    background: #7132ca;
    color: #ffffff;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    text-align: center;
    align-content: center;
    cursor: pointer;
}

section#filter form{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

section#filter div:has(>button),
section#filter div:has(>input[type="date"]){
    display: flex;
    gap: 12px;
    flex-direction: row;
    flex-wrap: wrap;
}

/*Mobile Style*/
@media screen and (max-width: 650px) {
    aside{
        display: none;
        animation: slide 1s ease-in-out;
        position: absolute;
        width: 100vw;
    }

    main{
        background-color: var(--white-color);
    }

    #slidetoggle{
        display: block;
    }

    main#table div:first-child div{
        width: 100%;
    }

    div#pegi-div:has(span){
        order: 1;
        width: 100%;
    }

    main#client div#tools{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: #ffffff;
    padding: 10px;
    border-radius: 8px 8px 0px 0px;
}

    main#client > div:last-child{
        margin-bottom: 50px;
    }

}

/*Laptop Style*/
@media screen and (min-width: 1000px){
    div#gridTable details div{
    position: absolute;
    left: 0;
    z-index: 1;
}
}

