﻿/* =========================================================
   BREAKPOINT: max-width 767.98px  (mobile — account/profile page)
========================================================= */
@media (max-width: 767.98px) {

    .row.gx-3 > [class*="col-"].no-padding-right {
        padding-right: var(--bs-gutter-x, 0.75rem);
    }

    .row.gx-3 > [class*="col-"] {
        padding-left: var(--bs-gutter-x, 0.75rem);
        padding-right: var(--bs-gutter-x, 0.75rem);
    }

    .form-label,
    .card-body label {
        text-align: left;
        display: block;
        width: 100%;
        margin-bottom: 6px;
        font-size: 13px;
    }

    /* Tabs: 2-column grid, no wrap issues */
    .acp-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        flex-wrap: unset;
        overflow-x: unset;
        margin-bottom: 16px;
    }

    .acp-tab-btn {
        flex: unset;
        width: 100%;
        justify-content: center;
        border-radius: 6px;
        border-bottom: 1px solid #e4e6e9;
        padding: 10px 6px;
        font-size: 12.5px;
        text-align: center;
    }

        .acp-tab-btn:nth-child(3) {
            grid-column: 1 / -1;
        }

    /* Logo actions: stack to prevent overflow/cutoff */
    .logo-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

        .logo-actions .btn {
            width: 100%;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }

    .acp-profile-img-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-bottom: 16px;
    }

    .logo-preview {
        margin: 0 auto 12px;
    }

    .acp-profile-layout {
        align-items: stretch;
    }

    .acp-profile-fields-col {
        justify-content: flex-start;
    }

    /* Save / Cancel buttons: equal width */
    .acp-actions {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        margin-top: 20px;
    }

        .acp-actions .btn,
        .btn-cancel,
        .btn-save {
            flex: 1 1 0;
            max-width: 140px;
            padding: 10px 0;
            font-size: 14px;
            text-align: center;
            margin: 0;
        }

    .card-body {
        padding: 16px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .logo-section-title {
        font-size: 12px;
        margin-bottom: 14px;
    }

    /* Account dropdown: widen and keep fully on-screen */
    .top-submenu {
        width: 180px;
        left: auto;
        right: 0;
    }
}

/* =========================================================
   BREAKPOINT: max-width 380px  (very small phones)
========================================================= */
@media (max-width: 380px) {
    .acp-tab-btn {
        padding: 9px 6px;
        font-size: 12px;
    }

    .acp-actions .btn,
    .btn-cancel,
    .btn-save {
        max-width: 130px;
        font-size: 13px;
        padding: 9px 0;
    }
}

/* =========================================================
   BREAKPOINT: max-width 768px  (site-wide layout — invoice/dashboard)
========================================================= */
@media (max-width: 768px) {

    #tbltaxeffect {
        display: none;
    }

    .invoice-summary {
        text-align: center;
        margin: 5px auto;
        padding: 5px;
    }

    .invoice-row {
        flex-direction: column;
        align-items: center;
    }

    .invoice-label, .invoice-value {
        text-align: center;
        font-size: 12px;
    }

    .col-12 {
        padding: 0px;
    }

    .add-cart-group {
        padding: 10px;
        margin-bottom: 5px;
    }

    .add-cart-group-prodcode {
        width: 100% !important;
    }

    .add-cart-group-50 {
        width: 50% !important;
    }

    #txtproductcode {
        width: 100% !important;
    }

    #txtunitprice, #txtqty {
        width: 100% !important;
    }

    .chzn-select, .classname {
        width: 100% !important;
    }

    #ProductAjaxPanel {
        display: block;
    }

        #ProductAjaxPanel > div {
            width: 100%;
            margin-bottom: 10px;
        }

    .custom-form-group label {
        font-size: 12px;
    }

    .custom-form-group select,
    .custom-form-group input {
        font-size: 14px;
        padding: 12px;
    }

    .table-title {
        text-align: center;
        color: #000000;
        font-size: 10pt;
        font-weight: bold;
    }

    .invoiceaddnewcusmodel-row-mb-3 {
        padding: 0px !important;
    }

    .hyperlink {
        color: black;
        text-decoration: none;
        font-weight: bold;
        font-size: 11px;
        cursor: pointer;
    }

    .custom-excel-btn {
        background-color: #198754;
        border: none;
        padding: 5px 10px;
        font-size: 10px;
        font-weight: bold;
        border-radius: 8px;
        color: white;
        margin-bottom: 10px;
    }

    .custom-creditinvocie-btn {
        background-color: #0a75c7;
        border: none;
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 8px;
        color: white;
        margin-bottom: 10px;
    }

        .custom-creditinvocie-btn:hover {
            background-color: #015392;
            transform: scale(1.05);
            color: white;
        }

        .custom-creditinvocie-btn i {
            margin-right: 8px;
        }

    .no-padding-right {
        padding-right: 0px !important;
        padding-left: 0px !important;
    }

    .btn-success {
        margin-bottom: 10px;
        margin-top: 20px;
    }

    .col {
        width: 50%;
    }

    .dashboard-card h4 {
        font-size: 15px !important;
        font-weight: bold;
    }

    .icon-container {
        display: flex;
        gap: 10px;
        align-items: center;
    }

        .icon-container a img {
            transition: box-shadow 0.3s ease;
        }

            .icon-container a img:hover {
                box-shadow: 0 0 8px rgba(0, 123, 255, 0.8);
                border-radius: 5px;
            }

    .dashboard-card h6 {
        font-size: 10px !important;
        margin-bottom: 2px;
    }

    .icon-box {
        font-size: 18px !important;
        padding: 0px !important;
    }

    #tbldashboardgstcomliance {
        display: none;
    }

    .social-icons i,
    .payment-icons i {
        font-size: 14px !important;
        cursor: pointer;
        text-align: center;
        align-items: center;
    }

    .footer {
        flex-direction: column;
        text-align: center !important;
    }

    .footer-left, .footer-right {
        text-align: center !important;
        margin-bottom: 12px;
    }

    .social-icons {
        text-align: center !important;
    }

    .footer-right .content-wrapper {
        align-items: center;
    }

    .grand-total {
        background-color: #CCCCCC !important;
        font-weight: bold;
    }

    .badge {
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 7pt !important;
    }

    #tbleffect table th {
        padding: 2px !important;
        font-size: 8pt;
    }

    #tbleffect table td {
        padding: 2px !important;
        font-size: 9pt;
    }

    h2.dashboard-title {
        font-size: 15px;
        font-weight: bold;
        padding-top: 10px;
        margin-bottom: 10px;
    }

    h5.dashboard-title {
        font-size: 11px;
        font-weight: bold;
        background-color: #4c4c4c;
        padding: 5px 10px;
        color: white;
        text-align: center;
        border-radius: 10px;
    }

    h6.dashboard-title,
    h7.dashboard-title {
        font-size: 15px;
        font-weight: bold;
    }

    .mainnav ul li a {
        font-size: 14px;
        padding: 10px 12px;
    }

    .submenu li a {
        font-size: 13px;
        padding-left: 15px;
    }

    .menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 3000;
        background: rgba(0, 0, 0, 0.7);
        padding: 10px;
        border-radius: 5px;
        cursor: pointer;
        display: block;
        font-size: 16px;
    }

    .mainnav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        left: -450px;
        width: 200px;
        height: 100%;
        background: #383838;
        transition: left 0.5s ease-in-out, opacity 0.3s ease-in-out;
        padding-top: 65px;
        z-index: 1050;
        opacity: 0;
    }

        .mainnav.active {
            left: 0;
            display: flex;
            opacity: 1;
        }

        .mainnav ul {
            flex-direction: column;
            width: 100%;
        }

            .mainnav ul li {
                width: 100%;
                position: relative;
            }

                .mainnav ul li.active > .submenu,
                .submenu li.active > .submenu {
                    display: block;
                    transform: translateY(0);
                }

    .submenu .submenu {
        position: relative;
        left: 100%;
        width: 150px;
    }

    .submenu {
        position: relative;
        width: 100%;
        top: 0%;
        display: none;
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

        .submenu .submenu {
            position: relative;
            width: 100%;
            left: 0;
            display: none;
        }

        .submenu li a {
            padding-left: 20px;
        }

    header {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 20px;
    }

    .header-left, .header-right {
        width: 100%;
        justify-content: center;
    }

        .header-left img {
            height: 80px;
            margin-bottom: 10px;
        }

    header h1 {
        font-size: 18px;
    }

    .logout, select {
        font-size: 14px;
    }

    .header-right {
        align-items: center;
        text-align: center;
        width: 100%;
    }

        .header-right .row {
            justify-content: center;
        }
}

/* =========================================================
   BREAKPOINT: max-width 992px  (tablets — dashboard/nav)
========================================================= */
@media (max-width: 992px) {

    .table-title {
        text-align: center;
        color: #000000;
        font-size: 11pt;
        font-weight: bold;
    }

    .invoiceaddnewcusmodel-row-mb-3 {
        padding: 0px !important;
    }

    .form-label {
        font-size: 8pt;
    }

    .hyperlink {
        color: black;
        text-decoration: none;
        font-weight: bold;
        font-size: 8pt;
        cursor: pointer;
    }

    .invoicerightcol-md-4col-12mb-3 {
        padding: 0px !important;
    }

    .logout-item {
        background-color: white !important;
        color: black !important;
    }

        .logout-item:hover {
            background-color: #cc0000 !important;
        }

    .top-submenu li a i {
        padding-right: 0px;
        font-size: 13px;
        color: #333;
        width: 16px;
        text-align: center;
    }

    .mainnav ul li a {
        color: white;
        text-decoration: none;
        font-size: 13px;
        display: block;
        padding: 7px 8px;
    }

    .top-menu {
        display: flex;
        justify-content: flex-end;
        background: #9e9e9e;
        position: relative;
        border-bottom: solid 1px #ffffff;
        align-items: center;
        text-align: center;
        padding: 2px;
        font-size: 13px;
    }

        .top-menu a {
            color: white;
            text-decoration: none;
            font-size: 12px;
            position: relative;
            margin-right: 10px;
            margin-left: 10px;
        }

    /* Account dropdown: widen + keep on-screen on tablets too */
    .top-submenu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        background: #ffffff;
        list-style: none;
        width: 180px;
        box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
        padding: 5px;
        margin: 0;
        overflow: visible;
    }

        .top-submenu li a {
            color: #000000;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            text-align: left;
            padding: 2px 0px;
        }

    .row {
        width: 100% !important;
        margin: 0 !important;
        padding-bottom: 15px;
    }

    .col {
        width: 50%;
        padding-bottom: 0px !important;
        margin-bottom: -8px;
    }

    .dashboard-card h4 {
        font-size: 15px !important;
        font-weight: bold;
    }

    .dashboard-card h6 {
        font-size: 8px !important;
        margin-bottom: 2px;
    }

    .icon-box {
        font-size: 14px !important;
        padding: 0px !important;
    }

    #tbldashboardgstcomliance {
        display: none;
    }

    .social-icons i,
    .payment-icons i {
        font-size: 14px !important;
        cursor: pointer;
        text-align: center;
        align-items: center;
    }

    .footer {
        flex-direction: column;
        text-align: center !important;
    }

    .footer-left, .footer-right {
        text-align: center !important;
        margin-bottom: 12px;
    }

    .social-icons {
        text-align: center !important;
    }

    .footer-right .content-wrapper {
        align-items: center;
    }

    #tbleffect table, #tbleffect thead, #tbleffect tbody,
    #tbleffect th, #tbleffect td, #tbleffect tr {
        display: block;
    }

    #tbleffect thead {
        display: none;
    }

    #tbleffect tr {
        margin-bottom: 10px;
        border: 2px solid white;
        padding: 10px;
        background: #DDDDDD;
        font-size: 9pt;
        padding-left: 10px;
    }

    #tbleffect td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 2px;
        font-size: 9pt;
        padding-left: 10px;
    }

        #tbleffect td::before {
            content: attr(data-label);
            font-weight: bold;
            text-transform: capitalize;
        }

    #tbleffect tr:nth-child(odd) {
        background-color: #f2f2f2;
        border-radius: 10px;
    }

    #tbleffect tr:nth-child(even) {
        background-color: rgb(0 0 0 / 2%);
        border-radius: 10px;
    }

    #tbleffect tr:hover {
        background-color: #00AEEF !important;
        color: white;
    }

    .grand-total {
        background-color: #CCCCCC !important;
        font-weight: bold;
    }

    .badge {
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 7pt !important;
    }

    #tbleffect table th {
        padding: 2px !important;
        font-size: 8pt;
    }

    #tbleffect table td {
        padding: 2px !important;
        font-size: 9pt;
    }

    h2.dashboard-title {
        font-size: 15px;
        font-weight: bold;
        padding-top: 10px;
        margin-bottom: 10px;
    }

    h5.dashboard-title {
        font-size: 11px;
        font-weight: bold;
        background-color: #0dcaf0;
        padding: 5px 10px;
        color: white;
        text-align: center;
        border-radius: 10px;
    }

    h6.dashboard-title,
    h7.dashboard-title {
        font-size: 15px;
        font-weight: bold;
    }

    header {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 20px;
    }

    .header-left, .header-right {
        width: 100%;
        justify-content: center;
    }

        .header-left img {
            height: 80px;
            margin-bottom: 10px;
        }

    header h1 {
        font-size: 18px;
    }

    .logout, select {
        font-size: 14px;
    }

    .menu-toggle {
        font-size: 16px;
    }

    .header-right {
        align-items: center;
        text-align: center;
        width: 100%;
    }

        .header-right .row {
            justify-content: center;
        }
}
