﻿/* Reset & base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: #f3f6fd;
    color: #333;
}

/* Default sidebar styles */
/*.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: #1c2331;
    display: flex;
    flex-direction: column;
    z-index: 10;
}*/

/*.nav-item {
    color: #fff;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .nav-item:hover,
    .nav-item.active {
        background-color: #34415e;
    }

    .nav-item .icon {
        display: block;
        font-size: 18px;
        margin-bottom: 4px;
    }*/

/* Bottom nav for smaller screens */
/*@media (max-width: 768px) {
    .nav {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        width: 100%;
        background-color: #1c2331;
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
    }

    .nav-item {
        flex: 1;
        padding: 10px 0;
    }*/
    

/*tbl as card */
.responsiveTable {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

    .responsiveTable th  {
        background-color: #dddddd;
        width: fit-content;
        padding:3px;
    }

    .responsiveTable td,th {
        border: 1px solid white;
        padding: 2px;
        word-wrap: break-word;
    }

    .responsiveTable tr:nth-child(even) {
        background-color: #dddddd;
    }


@media (max-width: 768px) {
   .responsiveTable, .responsiveTable tbody, .responsiveTable th, .responsiveTable td, .responsiveTable tr{
        display: block;
    }

    .responsiveTable thead{
        display: none; /* Hide header on small screen */
 }

    .responsiveTable tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 8px;
    }

    .responsiveTable td {
        display: flex;
        justify-content: space-between;
        padding: 6px;
        border: none;
        border-bottom: 1px solid #eee;
    }

        .responsiveTable td::before {
            content: attr(data-label);
            font-weight: bold;
        }
}




/* To avoid overlapping with bottom nav */

  .main {
        margin-left: 0 !important;
        padding-bottom: 80px; 
    }
/*}*/



/* Header */
.header {
    height: fit-content;
    background-color: #0e1730;
    margin-left: 0 !important;
    display: flex;
    align-items: center;
    padding: 5px 20px;
    color: white;
    justify-content: space-between;
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-btn {
    background: none;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #1c2331;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    padding: 10px 0;
    z-index: 100;
    display: none;
    border-radius: 5px;
}

.dropdown-search {
    width: 90%;
    margin: 5px auto;
    padding: 6px;
    border: none;
    border-radius: 4px;
    display: block;
}

.dropdown-item {
    color: white;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s;
}

    .dropdown-item:hover {
        background-color: #34415e;
    }

    .dropdown-item i {
        margin-right: 8px;
    }


    /* Change text color when moved */
    .inside-analytics .user-btn {
        color: black !important;
        font-size: 15px;
        margin-top: 4px;
        display: inline-block;
    }

    /* Keep dropdown visible and correctly positioned */
    .inside-analytics .dropdown {
        position: absolute;
        top: 40px; /* just below the user-btn */
        left: 0;
        z-index: 9999;
    }

    /* Default dropdown position in header */
    .header .dropdown {
        position: absolute;
        right: 0;
        top: 100%;
        z-index: 9999;
    }


.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow-y: auto;
    box-sizing: border-box;
    font-family: sans-serif;
    padding-top: 15px;
    max-height: 100vh; /* Prevent container from exceeding viewport */
}

/* Prevent body from scrolling when overlay is active */
body.no-scroll {
    overflow: hidden;
}

.profile-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 auto;
}

/* Layout on large screens */
.center-profile{
    flex:3;
}

.right-profile {
    flex: 1;
}

/* Stack right profile below center on small screens */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
    }

    .right-profile {
        order: 2; /* Ensure it comes after center-profile */
    }
}


/*.profile-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}


.profile-center {
    width: 60%;
}

 .profile-right {
    width: 20%;
    text-align: center;
}*/

.save-btn {
    background-color: #6c2eb9;
    color: white;
    padding: 5px 10px;
    border: none;
    margin-top: 5px;
    cursor: pointer;
    border-radius: 5px;
}



.form-wrapper {
    display: flex;
    /*gap: 10px;*/
    flex-wrap: wrap;
    /* max-width: 900px;*/
    margin: 0 auto;
    width: 100%;
}

.left-form,
.right-form {
    flex: 1 1 50%; /*calc(50% - 5px);  Changed this line */
    /* padding: 5px;*/
    box-sizing: border-box;
    border: none;
    min-width: 0 !important;
}

.image-section {
    background: #fff7f1;
    display: flex;
    align-items: start;
    justify-content: start;
    padding: 30px;
}

    .image-section img {
        width: 100%;
        max-width: 300px;
    }


/* Stack vertically on small screens */
@media screen and (max-width: 768px) {
    .left-form,
    .right-form {
        flex: 1 1 100%;
        min-width: 0px;
    }

   
    .image-section {
        background: #fff7f1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

}


.nxtline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}




/* Main content */
.main {
    margin-left: 200px;
    padding: 15px;
}

.analytics-header {
    font-weight: bold;
    margin-bottom: 20px;
    color: #0e1730;
    gap: 10px;
}


/* Cards grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor:pointer;
}

    .card.green {
        background-color: #a2e8c5;
        color: #003b2f;
    }

    .card.pink {
        background-color: #f8c4e1;
        color: #6b003f;
    }

    .card.yellow {
        background-color: #f9e79f;
        color: #6c4b00;
    }

    .card.blue {
        background-color: #bbd4ff;
        color: #00336e;
    }

    .card.red {
        background-color: #f5a9a9;
        color: #680000;
    }


/* CSS button */
.btn {
    align-items: center;
    background-color: #ffdfba;
    border-radius: 24px;
    border-style: none;
    box-shadow: rgba(0, 0, 0, .2) 0 3px 5px -1px,rgba(0, 0, 0, .14) 0 6px 10px 0,rgba(0, 0, 0, .12) 0 1px 18px 0;
    box-sizing: border-box;
    color: #3c4043;
    justify-content: center;
    max-width: 100%;
    padding: 5px 13px;
    text-align: center;
    width: auto;
}

    .btn:hover {
        background: #F6F9FE;
        color: #174ea6;
    }

    .btn:active {
        box-shadow: 0 4px 4px 0 rgb(60 64 67 / 30%), 0 8px 12px 6px rgb(60 64 67 / 15%);
        outline: none;
    }

    .btn:focus {
        outline: none;
        border: 2px solid #4285f4;
    }

    .btn:not(:disabled) {
        box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;
    }

        .btn:not(:disabled):hover {
            box-shadow: rgba(60, 64, 67, .3) 0 2px 3px 0, rgba(60, 64, 67, .15) 0 6px 10px 4px;
        }

        .btn:not(:disabled):focus {
            box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;
        }

        .btn:not(:disabled):active {
            box-shadow: rgba(60, 64, 67, .3) 0 4px 4px 0, rgba(60, 64, 67, .15) 0 8px 12px 6px;
        }

    .btn:disabled {
        box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;
    }


/* Graph section */
.graph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.graph-box {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    height: 250px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Table */
.table-box {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    height: 250px;
    overflow-y: auto;
}

    .table-box table {
        width: 100%;
        border-collapse: collapse;
    }

    .table-box th,
    .table-box td {
        padding: 8px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

/* Donut chart and advert */
.donut-graph,
.advert {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    height: 250px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}






/*Diff floating*/
.container {
    height: 100%;
    display: flex;
    justify-content: left;
    align-items: flex-start;
    margin-top: 8px;
    gap:5px;
}


.material-textfield {
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

.lbl {
    position: absolute;
    font-size: 13px;
    left: 0;
    top: 48%;
    transform: translateY(-50%);
    background-color: inherit;
    color: gray;
    padding: 0 0.3rem;
    margin: 0 0.5rem;
    transition: 0.1s ease-out;
    transform-origin: left top;
    pointer-events: none;
}

.input {
    font-size: 14px;
    outline: none;
    border: 1px solid gray;
    border-radius: 5px;
    padding: 3px;
    color: black;
    transition: 0.1s ease-out;
    box-sizing: border-box;
    width: 100%;
    box-sizing: border-box;
}

    .input:focus {
        border-color: dodgerblue;
    }

        .input:focus + .lbl {
            color: dodgerblue;
            background-color: white;
            top: 0;
            transform: translateY(-50%) scale(0.9) !important;
        }

    .input:not(:placeholder-shown) + .lbl {
        top: 0;
        background-color: white;
        transform: translateY(-50%) scale(0.9) !important;
    }

    .input:not(:focus)::placeholder {
        opacity: 0;
    }


.edit {
    background-color: inherit;
    border: none;
    font-size: 20px;
    cursor: pointer;
}