td.cvalue-column {
    width: 300px;
}

.banggiadau span {
    color: #000;
}

.banggiadau strong {
    color: #4d8d36;
}
.tool-header-actions h2 {
    text-align: center;
}
/* Export PDF functionality */
.tool-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tool-header-actions h2 {
    margin: 0;
    flex: 1;
}

.export-pdf-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-pdf-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.export-pdf-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-pdf-btn .export-icon {
    font-size: 16px;
}

.export-pdf-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Export Actions Container */
.export-actions {
    display: flex !important;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.export-actions .export-pdf-btn,
.export-actions .export-excel-btn {
    flex: 0 0 auto;
    min-width: 120px;
}

/* Export Excel Button Styles */
.export-excel-btn {
    background: linear-gradient(135deg, #1f7a4c, #198b47);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-excel-btn:hover {
    background: linear-gradient(135deg, #198b47, #156b39);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.export-excel-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-excel-btn .export-icon {
    font-size: 16px;
}

.export-excel-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state for export button */
.export-pdf-btn.loading {
    background: #cccccc;
    cursor: wait;
    color: #4d8d36;
}

.export-pdf-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* PDF-specific styles */
@media print {
    .export-pdf-btn,
    .export-excel-btn {
        display: none !important;
    }

    .lng-tool-container {
        background-color: white !important;
        box-shadow: none !important;
        padding: 10px !important;
    }

    .lng-tool-container table {
        page-break-inside: avoid;
        border-collapse: collapse;
    }

    .lng-tool-container td,
    .lng-tool-container th {
        border: 1px solid #333 !important;
        padding: 3px !important;
        font-size: 10px !important;
    }
}

/* PDF export specific classes */
.pdf-export-container {
    background-color: white;
    padding: 20px;
    color: #000;
}

.pdf-export-container .tool-header-actions h2 {
    text-align: center;
    color: #00b050;
    font-weight: bold;
    margin: 10px 0 20px 0;
    font-size: 18px;
}

.pdf-value {
    display: inline-block;
    font-weight: bold;
    color: #000;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
}
.result-table td, .result-table th {
    border: 1px solid #ddd;
    padding: 12px !important;
    color: #000;
    font-size: 16px;
    vertical-align: middle;
}
.result-table .header-table {
    text-align: center;
    font-weight: bold;
}

.form-tool-container {
    margin: 0 auto;
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lng-tool-container .text-right {
    text-align: right;
}

.lng-tool-container .text-left {
    text-align: left;
}

.form-tool-container .form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.form-tool-container .form-group {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.form-tool-container .form-group:nth-child(3n) {
    border-right: none;
}

.form-tool-container .form-group:nth-last-child(-n+3) {
    border-bottom: none;
}

.form-tool-container .form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}
td#coal-chi-phi-tiet-kiem-thang {
    font-weight: 700;
}
.form-tool-container .form-group input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: #dddddd24;
    transition: border-color 0.2s ease;
    width: 100%;
}

.form-tool-container .form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-tool-container .form-group input::placeholder {
    color: #999;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .form-tool-container .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-tool-container {
        padding: 20px;
        margin: 10px;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-tool-container .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Export actions section */

.export-actions .export-pdf-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    min-width: 160px;
    justify-content: center;
}

.export-actions .export-pdf-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.export-actions .export-pdf-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.export-actions .export-pdf-btn .export-icon {
    font-size: 18px;
}

/* No print class - hide elements during PDF export */


/* Footnotes section styling */
.footnotes-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-top: 30px;
}

.footnotes-section p {
    margin: 10px 0;
    line-height: 1.6;
}

.footnotes-section strong {
    color: #495057;
}

/* Enhanced PDF and print styles */
@media print {
    .no-print,
    .export-actions,
    .export-pdf-btn {
        display: none !important;
        visibility: hidden !important;
    }
    
    .lng-tool-container {
        background-color: white !important;
        box-shadow: none !important;
        padding: 15px !important;
        margin: 0 !important;
    }

    .form-tool-container {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }

    .result-table {
        page-break-inside: avoid;
        border-collapse: collapse !important;
    }

    .result-table td,
    .result-table th {
        border: 1px solid #000 !important;
        padding: 8px !important;
        font-size: 12px !important;
        color: #000 !important;
    }

    .footnotes-section {
        background: white !important;
        border: 1px solid #000 !important;
        border-left: 3px solid #000 !important;
        page-break-inside: avoid;
    }
}

/* PDF generation specific styles */
.pdf-generating .no-print {
    display: none !important;
    visibility: hidden !important;
}

/* Popup for access control */
.access-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.access-popup {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.access-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.access-popup-close:hover {
    color: #333;
}

.access-popup h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.access-popup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group input.error {
    border-color: #f44336;
}

.form-group .error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.popup-submit-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.popup-submit-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.popup-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.access-denied-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    color: #856404;
    text-align: center;
    display: none;
}

.access-granted-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    color: #155724;
    text-align: center;
    display: none;
}

.additional-fields {
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

.email-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #1565c0;
}

/* Responsive */
@media (max-width: 600px) {
    .access-popup {
        padding: 20px;
        margin: 20px;
    }
    
    .access-popup h3 {
        font-size: 20px;
    }
}