/* General Styles */
body {
    background-image: url(../Images/BI\ -\ 1.jpeg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding-top: 70px;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: -1;
}

/* Heading */
h2 {
    color: #4d8b31;
    margin: 30px auto 20px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
}

/* Table Styles */
table {
    width: 85%;
    max-width: 1200px;
    margin: 30px auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

th {
    background-color: #4d8b31;
    color: white;
    padding: 15px 12px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
}

td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    vertical-align: middle;
}

tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Image Styling */
td img {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
    object-fit: cover;
}

/* Image Hover Effect */
img:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Editable cells */
td[contenteditable="true"] {
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #ddd;
}

td[contenteditable="true"]:hover {
    background-color: #f0f0f0;
}

td[contenteditable="true"]:focus {
    background-color: #e6f7e7;
    outline: 2px solid #4d8b31;
    border: none;
}

/* Animation Effect for Table Rows */
tr {
    transition: all 0.3s ease-in-out;
}

tr:hover {
    background-color: #f0f7e6;
}

/* Total Profit Row */
.total-profit {
    font-weight: bold;
    background-color: #4d8b31 !important;
    color: white;
    font-size: 18px;
}

.total-profit td {
    font-weight: bold;
    border-color: #4d8b31;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #4d8b31;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 99;
}

.scroll-to-top:hover {
    background-color: #3a6a25;
    transform: translateY(-5px);
}

/* Editor Button */
.editor-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 99;
}

.editor-button:hover {
    background-color: #e68900;
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    table {
        width: 95%;
    }
}

@media (max-width: 992px) {
    th, td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    td img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 22px;
    }
    
    table {
        width: 98%;
    }
    
    th, td {
        padding: 8px 5px;
        font-size: 13px;
    }
    
    .editor-button, .scroll-to-top {
        transform: scale(0.9);
    }
}

@media (max-width: 576px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    td img {
        width: 50px;
        height: 50px;
    }
}