﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
/* ?????? ???????? ???-???? ?????? */
@media (min-width: 992px) {
    .dropdown-submenu {
        position: relative;
    }

        .dropdown-submenu .dropdown-menu {
            top: 0;
            left: 100%;
            margin-top: -1px;
            display: none;
        }

        .dropdown-submenu:hover > .dropdown-menu {
            display: block;
        }
}

@media (max-width: 991.98px) {
    /* ??????? ???-???? ?????????? */
    .dropdown-menu .dropdown-menu {
        margin-left: 1.5rem;
        border: none;
        background: #f8f9fa;
        display: block !important; /* ??????? ????? ????? ????? */
    }
}

/* ???????? ????? ?????? */
.custom-nav {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    backdrop-filter: blur(10px);
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
}

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }
/* ===================================
   UNIVERSAL ERP TABLE MOBILE SYSTEM
   =================================== */

@media (max-width:768px) {

    /* responsive wrapper */

    .table-responsive {
        overflow: visible;
    }

    /* hide header */

    table thead {
        display: none;
    }

    /* row becomes card */

    table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e6e6e6;
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }

    /* cell layout */

    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none !important;
        padding: 6px 0;
        font-size: 13px;
    }

        /* show column label */

        table tbody td::before {
            content: attr(data-label);
            font-weight: 600;
            color: #666;
            margin-right: 10px;
        }

        /* first column title style */

        table tbody td:first-child {
            display: block;
            border-bottom: 1px dashed #eee;
            margin-bottom: 6px;
            padding-bottom: 6px;
            font-weight: 600;
        }

        /* buttons align */

        table tbody td:last-child {
            justify-content: flex-end;
        }

    /* button group smaller */

    .btn-group {
        transform: scale(.9);
    }

    /* badge size */

    .badge {
        font-size: 11px;
    }

    /* image responsive */

    table img {
        max-width: 40px;
        height: auto;
    }
    table tbody tr:hover {
        background: #f8fbff;
    }
}
/* ================================
   Universal Mobile Table
================================ */

@media (max-width:768px) {

    /* header hide */
    table thead {
        display: none;
    }

    /* row card layout */
    table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e9ecef;
        border-radius: 10px;
        padding: 10px;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,.05);
    }

    /* cell layout */
    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 6px 8px;
    }

        /* label */
        table tbody td::before {
            content: attr(data-label);
            font-weight: 600;
            color: #6c757d;
        }

    /* =======================
   FOOTER FIX
======================= */

    /* Desktop footer normal */
    table tfoot {
        background: #f8f9fa;
    }

        table tfoot td {
            padding: 10px;
            font-weight: 600;
            border-top: 2px solid #dee2e6;
        }

    /* Mobile responsive */
    @media (max-width:768px) {

        table tfoot {
            display: block;
            width: 100%;
        }

            table tfoot tr {
                display: block;
                padding: 10px 15px; /* ???-???? padding */
                background: #f8f9fa;
                border-radius: 6px;
            }

            table tfoot td {
                display: block;
                width: 100%;
                padding: 6px 12px !important; /* ??? ???? ????? */
                border: none !important;
            }

        /* amount alignment */

    }

    @media (max-width: 768px) {
        /* ফুটারকে ব্লক হিসেবে দেখানো */
        table tfoot, table tfoot tr, table tfoot td {
            display: block;
            width: 100%;
        }

            /* ফুটারের সেলে ডাটা লেবেল যুক্ত করা */
            table tfoot td {
                display: flex; /* ফ্লেক্স ব্যবহার করলে লেবেল বামে এবং ডাটা ডানে থাকবে */
                justify-content: space-between;
                align-items: center;
                border: none !important;
                padding: 8px 12px !important;
            }

                /* ফুটারের লেবেল স্টাইল */
                table tfoot td::before {
                    content: attr(data-label);
                    font-weight: 700;
                    color: #333;
                }

                /* গ্র্যান্ড টোটাল টেক্সট এলাইনমেন্ট ফিক্স */
                table tfoot td.text-end {
                    text-align: right !important;
                }

                /* যে কলামে ডাটা নেই (যেমন খালি TD) সেটি হাইড করা */
                table tfoot td:empty {
                    display: none;
                }

        /* গ্র্যান্ড নেট অ্যামাউন্ট হাইলাইট */
        #grandNet {
            background-color: #f0f7ff;
            border-radius: 6px;
            margin-top: 5px;
        }
    }