
/* BHXH Tools Pro */

.bhxh-tools{
    max-width:900px;
    margin:20px auto;
    font-family:Arial,Helvetica,sans-serif;
}

.bhxh-box{
    background:#fff;
    border:1px solid #ddd;
    border-radius:12px;
    padding:24px;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}

.bhxh-box h2{
    margin-top:0;
    color:#0d6efd;
}

.bhxh-note{
    color:#666;
    margin-bottom:20px;
}

.bhxh-field{
    margin-bottom:16px;
}

.bhxh-field label{
    display:block;
    font-weight:600;
    margin-bottom:6px;
}

.bhxh-field input,
.bhxh-field select,
.bhxh-period-row input{
    width:100%;
    padding:10px;
    border:1px solid #ccc;
    border-radius:8px;
    box-sizing:border-box;
}

.bhxh-period-row{
    display:grid;
    grid-template-columns:1fr 1fr 1fr auto;
    gap:10px;
    margin-bottom:10px;
}

.bhxh-primary,
.bhxh-secondary,
.bhxh-remove-row,
.bhxh-print{
    border:none;
    border-radius:8px;
    padding:10px 16px;
    cursor:pointer;
}

.bhxh-primary{
    background:#0d6efd;
    color:#fff;
}

.bhxh-secondary{
    background:#198754;
    color:#fff;
    margin-right:8px;
}

.bhxh-remove-row{
    background:#dc3545;
    color:#fff;
}

.bhxh-print{
    background:#6c757d;
    color:#fff;
    margin-top:15px;
}

.bhxh-result{
    margin-top:20px;
}

.bhxh-result-inner{
    border:1px solid #dbe7ff;
    background:#f8fbff;
    border-radius:10px;
    padding:20px;
}

.bhxh-result-status{
    padding:12px;
    border-radius:8px;
    margin-bottom:15px;
    font-weight:700;
}

.bhxh-result-status.is-ok{
    background:#d1e7dd;
    color:#0f5132;
}

.bhxh-result-status.is-warning{
    background:#fff3cd;
    color:#664d03;
}

.bhxh-result-table{
    width:100%;
    border-collapse:collapse;
}

.bhxh-result-table td{
    border-bottom:1px solid #eee;
    padding:10px;
}

.bhxh-total-row{
    background:#eaf4ff;
    font-size:18px;
}

.bhxh-month-list{
    margin-top:15px;
}

.bhxh-explanation{
    margin-top:15px;
    line-height:1.6;
    color:#444;
}

@media(max-width:768px){

    .bhxh-period-row{
        grid-template-columns:1fr;
    }

    .bhxh-primary,
    .bhxh-secondary{
        width:100%;
        margin-bottom:10px;
    }
}

@media print{

    .bhxh-primary,
    .bhxh-secondary,
    .bhxh-remove-row,
    .bhxh-print{
        display:none !important;
    }

    .bhxh-box{
        border:none;
        box-shadow:none;
    }
}


.bhxh-embed-section{
    margin-top:28px;
    padding-top:20px;
    border-top:1px solid #e5e7eb;
}

.bhxh-embed-section h3{
    margin-top:0;
    color:#0d6efd;
}

.bhxh-embed-code{
    width:100%;
    min-height:110px;
    padding:12px;
    border:1px solid #d7dce2;
    border-radius:8px;
    font-family:Consolas,Monaco,monospace;
    font-size:13px;
    line-height:1.5;
    resize:vertical;
    background:#fafafa;
    box-sizing:border-box;
}

.bhxh-embed-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:12px;
}

.bhxh-copy-embed,
.bhxh-preview-embed{
    display:inline-block;
    padding:10px 16px;
    border-radius:8px;
    text-decoration:none;
    cursor:pointer;
    border:none;
    font-size:14px;
}

.bhxh-copy-embed{
    background:#0d6efd;
    color:#fff;
}

.bhxh-preview-embed{
    background:#198754;
    color:#fff;
}

.bhxh-embed-note{
    color:#666;
    font-size:14px;
    margin-bottom:10px;
}

/* BHXH một lần theo mức lương */
.bhxh-onetime-periods{display:flex;flex-direction:column;gap:12px;margin:12px 0;}
.bhxh-onetime-row{display:grid;grid-template-columns:1fr 1fr 1.5fr auto;align-items:end;gap:10px;padding:14px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;}
.bhxh-onetime-row label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#374151;}
.bhxh-onetime-row input{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid #cbd5e1;border-radius:7px;font:inherit;}
.bhxh-add-onetime-period{margin-bottom:10px;}
@media(max-width:640px){.bhxh-onetime-row{grid-template-columns:1fr 1fr;}.bhxh-onetime-row label:nth-child(3){grid-column:1/-1;}.bhxh-onetime-row .bhxh-remove-row{grid-column:1/-1;width:100%;}}

/* v0.1.6: import contribution history and allowance fields */
.bhxh-import-panel{margin:16px 0;padding:16px;border:1px dashed #b7c4d8;border-radius:10px;background:#f8fafc}
.bhxh-import-panel input[type=file]{display:block;max-width:100%;margin:8px 0 12px}
.bhxh-onetime-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px;align-items:end;margin:12px 0;padding:12px;border:1px solid #e0e6ef;border-radius:10px}
.bhxh-onetime-row label{display:flex;flex-direction:column;gap:5px;font-size:13px}
.bhxh-onetime-row input{max-width:100%;min-width:0;box-sizing:border-box}
@media(max-width:600px){.bhxh-onetime-row{grid-template-columns:1fr 1fr}.bhxh-import-panel{padding:12px}}
