.hrc-wrapper {
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #f4f7f6;
    border-radius: 12px;
    direction: rtl;
    border: 1px solid #e0e0e0;
}
.hrc-main-title {
    text-align: center;
    color: #2c3e50;
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
}
.hrc-intro {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}
.hrc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.hrc-fieldset {
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 15px 20px 20px 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.hrc-fieldset.hrc-span-2 {
    grid-column: 1 / -1;
}
.hrc-legend {
    font-weight: 600;
    color: #0056b3;
    padding: 0 10px;
    font-size: 16px;
    margin-right: 10px;
}
.hrc-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}
.hrc-form-row:last-child {
    margin-bottom: 0;
}
.hrc-form-row label {
    flex-basis: 140px;
    flex-shrink: 0;
    text-align: left;
    margin-left: 15px;
    color: #34495e;
}
.hrc-wrapper input[type="text"],
.hrc-wrapper input[type="number"],
.hrc-wrapper select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}
.hrc-wrapper input.hrc-numeric { direction: ltr; text-align: left; }
.hrc-wrapper input:focus, .hrc-wrapper select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    outline: none;
}
.hrc-settings-container {
    display: flex;
    justify-content: space-around;
}
.hrc-settings-col { flex-basis: 45%; }
.hrc-divider { border: 0; border-top: 1px dashed #ccc; margin: 10px 0; }
.hrc-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
    font-size: 14px;
}
.hrc-checkbox-row input[type="checkbox"] { margin-left: 10px; transform: scale(1.1); }
.hrc-checkbox-row.small label { font-size: 13px; color: #444; }
.hrc-radio-group { display: flex; align-items: center; }
.hrc-radio-group input[type="radio"] { margin: 0 5px 0 10px; }
.hrc-radio-group label { flex-basis: auto; }
.hrc-small-legend { font-size: 13px; color: #333; margin: 0 0 10px; font-weight: 500;}
.hrc-submit-row { display: flex; justify-content: center; gap: 15px; padding-top: 25px; }
.hrc-button-primary, .hrc-button-secondary, .hrc-button-print {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}
.hrc-button-primary { background-color: #007bff; color: white; }
.hrc-button-primary:hover { background-color: #0056b3; }
.hrc-button-primary:disabled { background-color: #5a9ced; cursor: not-allowed; }
.hrc-button-secondary { background-color: #6c757d; color: white; }
.hrc-button-secondary:hover { background-color: #5a6268; }
.hrc-button-print { background-color: #28a745; color: white; margin: 0 auto; }
.hrc-button-print:hover { background-color: #218838; }
#hrc-result-wrapper {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #b2ebf2;
    background-color: #f1faff;
    border-radius: 8px;
}
#hrc-payslip-header { text-align: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #b2ebf2;}
#hrc-payslip-header .hrc-result-title { color: #00838f; margin-bottom: 15px; font-size: 22px; }
.hrc-header-info { display: flex; justify-content: space-between; font-size: 14px; color: #333; }
.hrc-header-info span { flex-basis: 48%; text-align: right; margin: 4px 0; }
.hrc-header-info strong { min-width: 60px; display: inline-block; }
/* 1. کانتینر اصلی: حالت فلکس را غیرفعال می‌کنیم تا رفتار بلوکی داشته باشد */
.hrc-tables-container {
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px;
}

/* 2. خنثی‌سازی اثر قالب: کلاسی که قالب شما اضافه کرده را هدف می‌گیریم */
.hrc-tables-container .table-is-responsive,
.hrc-tables-container > div {
    width: 100% !important;
    display: block !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    border: none !important;
    float: none !important;
}

/* 3. استایل خود جدول: اجبار به عرض کامل */
.hrc-result-table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    font-size: 13px;
    background-color: #fff;
    table-layout: auto !important; /* اجازه می‌دهد ستون‌ها بر اساس محتوا تنظیم شوند */
}

/* استایل سلول‌ها (برای اطمینان) */
.hrc-result-table th, .hrc-result-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: right;
}

.hrc-result-table th, .hrc-result-table td { border: 1px solid #dee2e6; padding: 10px; text-align: right; }
.hrc-result-table th { background-color: #e9ecef; color: #495057; font-weight: bold; text-align: center; }
.hrc-result-table td:last-child { text-align: left; direction: ltr; font-weight: 500; letter-spacing: 0.5px; }
.hrc-total-row td { background-color: #f8f9fa; color: #212529; font-weight: bold; }
.hrc-deduction-row td:first-child { color: #c0392b; }
.hrc-empty-row { visibility: hidden; }
.hrc-net-table { width: 100%; margin-top: 10px; border: 2px solid #155724; }
.hrc-net-row td { font-size: 1.4em; font-weight: bold; background-color: #d4edda; color: #155724; padding: 12px; }
.hrc-print-row { text-align: center; padding: 20px 0 0 0; }
@media (max-width: 800px) {
    .hrc-form-grid { grid-template-columns: 1fr; }
    .hrc-tables-container { flex-direction: column; }
    .hrc-result-table { width: 100%; }
    .hrc-settings-container { flex-direction: column; gap: 15px; }
}