﻿:root {
    --header-height: 64px;
    --sidebar-width: 260px;
}

body {
    overflow-x: hidden;
    font-family: 'Segoe UI', sans-serif;
    background: #f6f9ff;
}

/* HEADER */
.navbar {
    height: var(--header-height);
}

/* LOGO */
.app-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .6px;
    color: #fff;
}

    .app-title span {
        color: #ffe082;
    }

/* PROFILE */
.profil-pic {
    height: 40px;
    width: 40px;
    border: 2px solid white;
    padding: 4px;
    border-radius: 50%;
}
/* Dropdown Container */
.user-dropdown-menu {
    width: 260px;
    border-radius: 12px;
    padding: 0.5rem 0;
}

/* Profile Header */
.dropdown-header {
    padding: 1rem;
}

.dropdown-profile-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0d6efd;
}

/* Items */
.user-dropdown-menu .dropdown-item {
    padding: 0.6rem 1.2rem;
    font-size: 14px;
    transition: all 0.2s ease;
}

    .user-dropdown-menu .dropdown-item i {
        width: 20px;
    }

    /* Hover Effect */
    .user-dropdown-menu .dropdown-item:hover {
        background-color: #f5f7fa;
        padding-left: 1.5rem;
    }

    /* Logout */
    .user-dropdown-menu .dropdown-item.text-danger:hover {
        background-color: #ffecec;
    }

.profil-notic {
    height: 40px;
    width: 40px;
    line-height: 36px;
    text-align: center;
    border: 2px solid white;
    border-radius: 50%;
}


/* Bell Icon */
.notification-icon {
    font-size: 20px;
    cursor: pointer;
}

/* Badge */
.notification-badge {
    position: absolute;
    top: 0;
    right: -5px;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 50%;
}

/* Dropdown */
.notification-menu {
    width: 320px;
    border-radius: 12px;
    padding: 0;
}

    /* Header */
    .notification-menu .dropdown-header {
        padding: 0.8rem 1rem;
        font-size: 14px;
        font-weight: 600;
    }

/* Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.7rem 1rem;
    transition: background 0.2s ease;
}

    .notification-item i {
        font-size: 18px;
        margin-top: 3px;
    }

    .notification-item:hover {
        background-color: #f5f7fa;
    }

/* Content */
.notification-content {
    display: flex;
    flex-direction: column;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
}

/* Footer */
.dropdown-footer {
    padding: 0.7rem;
}
.select-btn-close {
    background: none;
    border: none;
}

.dropdown-grd {
    padding: 3px !important;
    width: 90px;
    font-size: 0.8em !important;
}
.btn-xs-custom {
    padding: 1px 6px;
    font-size: 0.78rem;
    line-height: 1.1;
    border-radius: 1rem;
}

/* TOGGLER */
.navbar-toggler {
    border: 2px solid #fff;
    color: #fff;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler:hover {
        box-shadow: none;
        color: gainsboro;
        border: 2px solid gainsboro;
    }


/* SIDEBAR */
#sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: #fff;
    border-right: 1px solid #dee2e6;
    padding-top: 5px;
    overflow-y: auto;
    transition: .3s;
    z-index: 1050;
}

    #sidebar .nav-link {
        color: #495057;
        padding: 10px 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        border-radius: 6px;
    }

        #sidebar .nav-link:hover {
            background: #e2e6ea;
            color: #0d6efd;
        }


li.nav-item {
    padding-left: 5px;
    padding-right: 5px;
}


/* SUBMENU */
.submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

    .submenu .nav-link {
        padding: 8px 20px;
        font-size: .9rem;
    }

/* ARROW */
.has-submenu::after {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: auto;
    transition: transform .3s;
}

.has-submenu.show::after {
    transform: rotate(90deg);
}

.menu-toggle.active {
    background-color: rgba(255,255,255,0.1);
}
.menu-head {
    background-color: #0070fc;
    color: #ffffff;
    padding-left:5px;
    margin-top:5px;
    margin-bottom:5px;
}
/* CONTENT */
#content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) + 20px);
    transition: .3s;
}

/* COLLAPSE DESKTOP */
body.sidebar-collapsed #sidebar {
    transform: translateX(-100%);
}

body.sidebar-collapsed #content {
    margin-left: 0;
}

/* OVERLAY */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: none;
    z-index: 1049;
}

body.sidebar-open #overlay {
    display: block;
}

.entryarea {
    position: relative;
    height: 40px;
    margin-bottom: 15px;
}

    /* INPUT + SELECT COMMON */

    .entryarea input,
    .entryarea select {
        color: black;
        position: absolute;
        width: 100%;
        height: 100%;
        background: transparent;
        outline: none;
        border: 1px solid #ccc;
        padding: 0 15px;
        transition: 0.2s ease;
        z-index: 1;
    }

        /* Focus */
        .entryarea input:focus,
        .entryarea select:focus {
            border-color: black;
        }

    /* LABEL */
    .entryarea .labelline {
        position: absolute;
        left: 5px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1em;
        color: #6e707e;
        background-color: white;
        padding: 0 6px;
        pointer-events: none;
        transition: 0.2s ease;
        z-index: 2;
    }

    /* INPUT FLOAT */
    .entryarea input:focus + .labelline,
    .entryarea input:not(:placeholder-shown) + .labelline,
    /* SELECT FLOAT */
    .entryarea select:focus + .labelline,
    .entryarea select:not([value=""]) + .labelline {
        top: 0;
        transform: translateY(-50%) scale(0.85);
        color: black;
    }


.validation-message {
    position: absolute;
    bottom: -25px; /* distance below the textbox */
    right: 0;
    background-color: #f44336; /* red for error */
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    /* Arrow */
    position: absolute;
}

    .validation-message::after {
        content: "";
        position: absolute;
        top: -10px; /* position above the tooltip */
        right: 10px; /* align with the textbox */
        border-width: 5px;
        border-style: solid;
        border-color: transparent transparent #f44336 transparent;
        z-index: 1000;
    }




.login-logo {
    height: 150px;
    width: 150px;
    background-color: white;
    border-radius: 50%;
    margin-top: -100px;
    border: #0000002d 1px solid;
}

.loginpanel {
    margin-top: 100px;
}




.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.6); /* translucent white overlay */
    z-index: 1056; /* stays above modals/content */
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notify-toast {
    display: flex;
    align-items: center;
    width: 360px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    animation: slideIn .4s ease;
    overflow: hidden;
}

    .notify-toast::before {
        content: "";
        width: 6px;
        height: 100%;
    }

    .notify-toast.error::before {
        background: #e74c3c;
    }

    .notify-toast.warning::before {
        background: #f39c12;
    }

    .notify-toast.info::before {
        background: #3498db;
    }

    .notify-toast.success::before {
        background: #2ecc71;
    }

.toast-icon {
    width: 48px;
    height: 48px;
    margin: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.error .toast-icon {
    background: #e74c3c;
}

.warning .toast-icon {
    background: #f39c12;
}

.info .toast-icon {
    background: #3498db;
}

.success .toast-icon {
    background: #2ecc71;
}

.toast-body {
    flex: 1;
    padding: 12px 0;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.toast-text {
    font-size: 14px;
    color: #555;
}

.toast-close {
    border: none;
    background: transparent;
    font-size: 20px;
    padding: 0 12px;
    cursor: pointer;
    color: #999;
}

    .toast-close:hover {
        color: #000;
    }

.tbl-font13 {
    font-size: 13px;
}

.tbl-editbtn {
    height: 24px;
    width: 100px;
    font-size: 12px;
    padding: 3px 5px;
    text-align: center;
}

.tbl-chkstatus {
    height: 20px;
    width: 40px !important;
}

.card {
    border: none !important;
    margin-bottom: 10px;
}

.input-group {
    align-items: stretch;
}

    .input-group .entryarea {
        position: relative;
        flex: none;
    }


        
        /* FIRST item → remove RIGHT radius only */
        .input-group .entryarea:first-child .form-control,
        .input-group .entryarea:first-child .form-select,
        .input-group .entryarea:first-child button {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }

        /* LAST item → remove LEFT radius only */
        .input-group .entryarea:last-child .form-control,
        .input-group .entryarea:last-child .form-select,
        .input-group .entryarea:last-child button {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }

        /* MIDDLE items (if any) */
        .input-group .entryarea:not(:first-child):not(:last-child) .form-control,
        .input-group .entryarea:not(:first-child):not(:last-child) .form-select,
        .input-group .entryarea:not(:first-child):not(:last-child) .button {
            border-radius: 0;
        }

        /* Remove double borders between controls */
        .input-group .entryarea:not(:first-child) .form-control,
        .input-group .entryarea:not(:first-child) .form-select,
        .input-group .entryarea:not(:first-child) .button {
            border-left: 0;
        }

.pfimage {
    text-align: center !important;
    padding: 20px !important;
}

.emp-profilepic {
    width: 200px;
    height: 200px;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Desktop view – never show overlay */
@media (min-width: 992px) {
    #overlay {
        display: none !important;
    }
}

/* MOBILE */
@media (max-width: 991px) {
    #sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open #sidebar {
        transform: translateX(0);
    }

    #content {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .notification-menu {
        left: 0px !important;
        right: auto !important;
        transform: translateX(-50%);
        width: 75vw;
        max-width: 75vw;
        border-radius: 12px;
    }
}

@media (max-width: 402px) {
    .notification-menu {
        left: 45px !important;
        right: auto !important;
        transform: translateX(-50%);
        width: 85vw;
        max-width: 85vw;
        border-radius: 12px;
    }
}

@media (max-width: 354px) {
    .notification-menu {
        left: 65px !important;
        right: auto !important;
        transform: translateX(-50%);
        width: 85vw;
        max-width: 85vw;
        border-radius: 12px;
    }
}


@media (min-width: 768px) {
    .side-panel {
        width: 600px;
    }

    .hide-desktop {
        display: none;
    }

    .paynow-btn {
        display: none;
    }

    .Desktop-view {
        display: block;
    }

    .mobile-purchase-inv {
        display: none;
    }

    .Rep-carbody {
        padding-top: 20px;
        padding-bottom: 10px;
        overflow: auto;
    }

    .icm {
        margin-bottom: 10px;
    }
}



/* Mobile stacked view */


@media (max-width: 767px) {
    .mb-pd-0 {
        padding: 0px;
    }

    .bg_mbile {
        background: none !important;
        background-color: transparent;
        box-shadow: none !important;
        padding: 0px;
        margin-bottom: 0px !important;
        border: none;
    }

    .Rep-carbody {
        padding-top: 0px;
        padding-bottom: 0px;
        overflow: visible !important;
    }

    .mb-tblbg {
        --bs-table-bg: transparent; /* Use transparent instead of 'none' */
        margin-bottom: 0px;
    }

    .side-panel {
        padding-left: 40px !important;
    }

    .ft-right {
        float: right !important;
        margin-right: 5px !important;
    }

    .responsive-table thead {
        display: none; /* hide header */
    }

    td.hide-mobile {
        display: none !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
        border: none;
        padding: 0px;
    }

        .responsive-table tr {
            padding: 5px 10px;
            margin-bottom: 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            display: flex;
            flex-wrap: wrap;
        }

        /* First row layout (#, Item, Total) */
        .responsive-table td[data-label="#"].cartslno {
            flex: 1 0 10%;
            font-weight: bold;
        }

        .responsive-table td[data-label="Item"].itemName {
            flex: 1 0 60%;
            font-weight: bold;
        }

        .responsive-table td[data-label="Total"].hide-desktop {
            flex: 1 0 30%;
            text-align: right;
            font-weight: bold;
        }


        /* Second row layout (Qty, Price, Disc, GST, Remove button) */
        .responsive-table td[data-label="Qty"].grdqty,
        .responsive-table td[data-label="Price"].grdprice,
        .responsive-table td[data-label="Disc"].grddisc,
        .responsive-table td[data-label="GST"].grdgst,
        .responsive-table .tblremovebtn {
            display: inline-block; /* force inline layout */
            width: auto !important; /* allow them to size naturally */
            padding-right: 10px; /* space between items */
            font-size: 11px;
            flex: 0 0 auto; /* prevent flex from stretching */
        }

        .responsive-table
        td.grdqty[data-label="Qty"]::before,
        td.grddisc[data-label="Disc"]::before,
        td.grdgst[data-label="GST"]::before,
        td.grdprice[data-label="Price"]::before {
            content: attr(data-label) " : ";
            font-weight: bold;
            font-size: 11px;
            display: inline-block;
            margin-right: 4px;
        }

        /* Remove button aligned to the right */
        .responsive-table .tblremovebtn {
            margin-left: auto;
            padding-right: 0;
        }


    .paynow-btn {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1030; /* Lower than modal's z-index */
        border-radius: 0; /* Optional: make it full width like a bar */
    }

    .Desktop-view {
        display: none;
    }

    .icm {
        background-color: #ffffff;
        --bs-card-border-color: var(--bs-border-color-translucent);
        border-radius: 5px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        padding: 16px;
        margin-bottom: 10px;
    }
}
