<style>
.editable-div {
    min-height: 100px;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    overflow-y: auto;
}
.editable-div:empty:before {
    content: attr(placeholder);
    color: #999;
}


.textarea {
  border: 1px #b2bec3;
  border-radius: 8px;
  background:  #f8f7f7ff  !important;
 
  
 
}

input[type=text], input[type=email], select {
  border: 1px #b2bec3;
  border-radius: 8px;
  background:  #f8f7f7ff;
}
</style>

<style>
.card-title {
    font-weight: 600;
}

.invoice-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Global table header styling */
table thead th {
    font-size: 13px;          /* smaller & refined */
    font-weight: 500;           /* semi-bold (not heavy) */
    text-transform: uppercase;  /* clean dashboard look */
    letter-spacing: 0.4px;      /* airy spacing */
    color: #6c757d;             /* soft gray */
    padding: 8px 10px;          /* compact height */
    border-bottom: 1px solid #e5e7eb;
    background-color: #fafafa;  /* subtle contrast */
}


.product-desc {
    height: 70px;
    resize: vertical;
}

.totals-box label {
    font-size: 14px;
    margin: 0;
    padding: 0;
}

.totals-value {
    font-weight: 700;
    font-size: 16px;
}

.add-row-btn {
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 14px;
}

.delete-row-btn {
    border-radius: 6px;
}

#invoice_totals {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 30px 30px 10px 30px;
    border: 1px solid #e6e6e6;
}

#info1 {
    background:;
    border-radius: 12px;
    padding: 30px 30px 10px 30px;
    border: 1px solid #e6e6e6;
}

#product-table {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e6e6e6;
}

#invoice_table {
    border: 1px solid #e6e6e6;          /* outer border */
    border-radius: 10px;             /* rounded corners */
    border-collapse: separate;        /* IMPORTANT for border-radius */
    overflow: hidden; 
    padding-bottom: 15px;
}


#invoice_table th,
#invoice_table td {
    border: none !important;      /* removes all inner borders */
}
</style>



<style>
/* Modern panel/card styling */
.panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #e6e6e6;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    
}

.panel-body {
    padding: 20px 25px;
}

.panel h4 {
    font-weight: 600;
    font-size: 17px;
    margin: 0;
}

.form-control {
    border-radius: 3px  !important;
    height: 42px;
    border: 1px #dcdcdc;
    background:  #f8f7f7ff  !important;
}

.margin-bottom {
    margin-bottom: 15px !important;
}

.input-group-addon {
    background: #f8f7f7ff !important;
    border-radius: 0 0 0 0 !important;
    border: 3px solid #dcdcdc !important;
}

.select-customer img {
    transition: 0.3s;
}

.select-customer:hover img {
    transform: scale(1.12);
}

.clear { clear: both; }

.header-modern {
    font-size: 26px;
    font-weight: 600;
    color: #111;
    margin-left: 20px;
    padding-left:15px;
    border-left: 4px solid #007bff !important;
    margin-bottom: 30px;
    letter-spacing: 0.3px;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}


/* Right side (user + logout) */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Username */
.user-name {
    font-family: 'Calibri', sans-serif;
    font-size: 19px;
    line-height: 1.2;
    text-align: right;
}

/* Logout button */
.logout-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.logout-btn img {
    width: 30px;
    height: 30px;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logout-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.logout-btn:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* ===== MOBILE SUPPORT ===== */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-actions {
        width: 100%;
        justify-content: space-between;
    }

    .user-name {
        text-align: left;
    }
}



/* Header layout */
.page-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* Page title */
.header-modern {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #222;
}

/* User dropdown button */
.btn-user {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    padding: 6px 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

/* Hover */
.btn-user:hover,
.btn-user:focus {
    background: #f5f7fb;
}

/* User icon */
.btn-user i {
    font-size: 18px;
    color: #0d6efd;
}

/* Dropdown menu */
.user-dropdown .dropdown-menu {
    border-radius: 12px;
    padding: 6px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

/* Dropdown links */
.user-dropdown .dropdown-menu > li > a {
    padding: 10px 18px;
    font-weight: 500;
    display: flex;
    align-items: right;
    gap: 10px;
}

/* Icons in menu */
.user-dropdown .dropdown-menu i {
    width: 16px;
    color: #666;
}

/* Hover state */
.user-dropdown .dropdown-menu > li > a:hover {
    background: #f0f4ff;
    color: #0d6efd;
}

.user-name {
    text-transform: capitalize;
}

/* Ensure dropdown opens correctly */
.user-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

@media (max-width: 767px) {
    body {
        padding-top: 50px;
    }
}


</style>

<!--mobile menu css -->
<style>
/* Mobile dropdown modern look */
.mobile-menu {
    min-width: 220px;
    padding: 8px 0;
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

/* Menu items */
.mobile-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #2c2c2c;
    transition: all 0.25s ease;
}

/* Icons */
.mobile-menu i {
    width: 18px;
    text-align: center;
    font-size: 16px;
    color: #0d6efd;
}

/* Hover effect */
.mobile-menu > li > a:hover {
    background: linear-gradient(90deg, #f1f5ff, #ffffff);
    color: #0d6efd;
}

/* Remove default Bootstrap caret spacing */
.mobile-menu > li > a:focus {
    background: none;
}

/* Active item (optional) */
.mobile-menu > li.active > a {
    background: #eef2ff;
    color: #0d6efd;
    font-weight: 600;
}

/* Fixed mobile menu button */
.mobile-menu-fixed {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
}

/* Button style */
.mobile-menu-fixed .btn {
    border-radius: 30px;
    padding: 6px 14px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

/* Ensure dropdown opens correctly */
.mobile-menu-fixed .dropdown-menu {
    right: auto;
    left: 0;
}

@media (max-width: 767px) {
    body {
        padding-top: 50px;
    }
}


/* Submenu positioning for mobile */
@media (max-width: 767px) {

    /* Hide submenu by default */
    .submenu {
        display: none;
        padding-left: 20px;
        background: #f8f9faff;
    }

    /* Show submenu */
    .submenu.show {
        display: block;
    }

    /* Submenu items */
    .submenu .dropdown-item {
        font-size: 13px;
        padding: 10px 18px;
    }

}

@media (max-width: 767px) {
    .submenu-toggle::after {
        content: "▾";
        margin-left: auto;
        font-size: 16px;
        transition: transform .2s;
    }

    .submenu.show + .submenu-toggle::after {
        transform: rotate(180deg);
    }
}








</style>

<script>
document.addEventListener('DOMContentLoaded', function () {

    document.querySelectorAll('.submenu-toggle').forEach(function (el) {

        el.addEventListener('click', function (e) {
            e.preventDefault();
            e.stopImmediatePropagation(); // 🔥 THIS is critical

            const submenu = this.nextElementSibling;
            submenu.classList.toggle('show');
        });

    });

});
</script>

