img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

.invoice-layout {
    background-color: #ebebeb;
    padding: 30px;
}

.form-area {
    background-color: #FFF;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
}


.top-header-part {
    padding: 20px 0;
    text-align: center;
}

.top-header-main-logo img {
    max-width: 100px;
}

.top-header-logo-name {
    font-size: 30px;
    font-weight: 600;
    color: #970102;
}

.top-header-invoice-text {
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 2px solid;
    display: inline-block;
}


.header-part {
    text-align: center;
}

.top-header-part .logo-name {
    font-size: 40px;
    font-weight: 600;
    color: #970102;
}

.header-part .invoice-text {
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 600;
}


.bill-container {
    position: relative;
    min-height: 277mm;
    /* Adjusted for 20mm margins (297mm - 10mm top - 10mm bottom) */
    max-height: 277mm;
    /* Ensure it doesn't exceed A4 content area */
    width: 190mm;
    /* Adjusted for 10mm left/right margins (210mm - 20mm) */
    background: #FFF;
    padding: 10mm 10mm 10mm;
    /* Consistent 10mm margins */
    margin: auto;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    color: #000;
    border-radius: 20px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
    font-size: 12px;
    /* Reduced font size to fit more content */
    overflow: hidden;
    /* Prevent content from spilling over */
}

.stamp img {
    max-width: 120px;
}

.signature img {
    max-width: 130px;
}

.footer-section {
    position: absolute;
    bottom: 10mm;
    left: 10mm;
    right: 10mm;
    width: 170mm;
    /* Fit within adjusted width */
}

.table th,
.table td {
    padding: 4px !important;
    /* Reduced padding to save space */
}

@media print {
    .no-print {
        display: none !important;
    }

    .table,
    .table th,
    .table td {
        border: 1px solid black !important;
        border-collapse: collapse !important;
        color: black !important;
    }

    .table th,
    .table td {
        background-color: white !important;

    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

}

.table,
.table th,
.table td {
    border: 1px solid black !important;
    border-collapse: collapse !important;
}

.table th,
.table td {
    padding: 8px !important;
}

.print-visible {
    display: block !important;
}

.old-invoices {
    padding: 50px;
}

#suggestions {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 5px;
}

#suggestions .suggestion {
    padding: 5px 10px;
    cursor: pointer;
}

#suggestions .suggestion:hover {
    background-color: #f0f0f0;
}

@media (max-width: 576px) {
    .invoice-layout {
        padding: 10px 10px 20px 10px;
    }

    .top-header-logo-name {
        font-size: 20px;
    }


    .old-invoices {
        padding: 20px 10px;
    }


    .print-btn {
        display: none !important;
    }

}

@media (max-width: 576px) {
    .preview-wrapper {
        width: 100%;
        max-height: 64vh;
    }

    .preview-content {
        transform: scale(0.5);
        transform-origin: top left;
    }
}

.table td.w-50 {
    border-bottom: 1px solid black !important;
}

@media print {
    .table td.w-50 {
        border-bottom: 1px solid black !important;
    }
}

.table td.w-50 {
    position: relative;
}

.table td.w-50::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: black;
}

@media print {
    .table td.w-50::after {
        background: black;
        /* Ensure visibility in print */
    }
}

.login-section {
    background: #CCCCCC;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}



.login-section h2 {
    font-size: 20px;
    font-weight: 600;
}

.login-section .login-panel {
    max-width: 400px;
    background-color: #FFF;
    padding: 50px;
    margin: 10px 20px;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
    border-radius: 20px;

}


/* For cross-browser compatibility */
.login-section .login-panel input::placeholder {
    font-size: 12px;
}
.login-section .login-panel input:-ms-input-placeholder { /* Internet Explorer 10-11 */
    font-size: 12px;
}
.login-section .login-panel input::-ms-input-placeholder { /* Microsoft Edge */
    font-size: 12px;
}