﻿/* =============================================================
   SimulateSalary.css - bazat pe HTML real generat de DevExpress
   ============================================================= */

/* - Page wrap - */
.sal-page-wrap {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    overflow: visible;
}

/* Asigura scroll pe pagina - anuleaza orice overflow hidden din layout */
html, body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
}

/* - Popup card - */
.sal-popup {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #dde1e9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    overflow: hidden;
}

/* - Header - */
.sal-popup-header {
    background: linear-gradient(135deg, #000074 0%, #185FA5 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sal-popup-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* - Body - */
.sal-popup-body {
    padding: 16px 20px;
    background: #f5f7fa;
}

/* - Sections - */
.sal-section {
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.sal-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #8a90a0;
    margin-bottom: 10px;
}

/* - Field layout - */
.sal-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.sal-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sal-label {
    font-size: 11px;
    font-weight: 600;
    color: #555e6e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 3px;
}

/* - Select HTML standard (Luna) - */
.sal-select {
    height: 30px;
    min-width: 160px;
    border: 1px solid #c8cdd6;
    border-radius: 5px;
    background: #ffffff;
    color: #1a1a2e;
    font-size: 13px;
    padding: 0 8px;
    cursor: pointer;
    outline: none;
}

    .sal-select:focus {
        border-color: #185FA5;
        box-shadow: 0 0 0 2px rgba(24,95,165,0.15);
    }

/* - DevExpress SpinEdit overrides - */
/* Containerul tabelar generat de DevExpress */
.sal-main-input.dxeButtonEdit_HRThemeV1916 .dxeEditArea_HRThemeV1916 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.sal-readonly.dxeButtonEdit_HRThemeV1916 .dxeEditArea_HRThemeV1916,
.sal-readonly .dxeEditArea_HRThemeV1916 {
    background-color: #eef2f8 !important;
    color: #185FA5 !important;
}

.sal-highlight .dxeEditArea_HRThemeV1916 {
    color: #185FA5 !important;
    font-weight: 700 !important;
}

/* - Hint EUR - */
.sal-eur-hint {
    font-size: 11px;
    color: #185FA5;
    font-weight: 500;
    min-height: 14px;
    display: block;
}

/* - Toggle mod calcul - */
.sal-toggle-group {
    display: flex;
    border: 1px solid #c8cdd6;
    border-radius: 6px;
    overflow: hidden;
    height: 30px;
}

.sal-toggle-btn {
    flex: 1;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

    .sal-toggle-btn + .sal-toggle-btn {
        border-left: 1px solid #c8cdd6;
    }

    .sal-toggle-btn.active {
        background: #185FA5;
        color: #ffffff;
    }

    .sal-toggle-btn:not(.active):hover {
        background: #e5e7eb;
    }

/* - Checkboxuri - */
.sal-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sal-check-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #e4e7ed;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    background: #f9fafb;
    transition: all 0.15s;
    user-select: none;
}

    .sal-check-lbl:hover {
        border-color: #93c5fd;
        background: #eff6ff;
    }

    .sal-check-lbl.active {
        border-color: #185FA5;
        background: #dbeafe;
        color: #1e40af;
    }

    /* DevExpress CheckBox in interiorul sal-check-lbl */
    .sal-check-lbl .dxeBase_HRThemeV1916 {
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .sal-check-lbl table {
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
    }

/* - Badge - */
.sal-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    background: #dbeafe;
    color: #1e40af;
    vertical-align: middle;
}

/* - Rate fiscale display - */
.sal-rates-display {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
}

    .sal-rates-display span {
        font-size: 12px;
        color: #6b7280;
        background: #f3f4f6;
        padding: 4px 10px;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
        white-space: nowrap;
    }

    .sal-rates-display strong {
        color: #185FA5;
    }

/* - Results grid - */
.sal-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.sal-results-col {
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 14px 16px;
}

.sal-results-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #8a90a0;
    margin-bottom: 10px;
}

/* - Results table - */
.sal-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .sal-results-table tr + tr td {
        border-top: 1px solid #f3f4f6;
    }

.sal-rt-sep td {
    padding-top: 8px !important;
    border-top: 1.5px solid #e5e7eb !important;
}

.sal-rt-label {
    padding: 5px 0;
    color: #6b7280;
    line-height: 1.4;
}

.sal-rt-val {
    padding: 5px 0;
    text-align: right;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

    .sal-rt-val.neg {
        color: #b91c1c;
    }

    .sal-rt-val.pos {
        color: #185FA5;
    }

.sal-rt-total-row td {
    padding: 7px 6px;
    border-top: 1.5px solid #d1d5db !important;
    background: #f8fafd;
}

.sal-rt-total-label {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
}

.sal-rt-total-val {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

    .sal-rt-total-val.neg {
        color: #b91c1c;
    }

    .sal-rt-total-val.pos {
        color: #185FA5;
    }

/* - Nota deducere - */
.sal-ded-nota {
    margin-top: 10px;
    font-size: 11px;
    color: #8a90a0;
    padding: 5px 8px;
    background: #f9fafb;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    font-style: italic;
    min-height: 20px;
}

/* - Summary - */
.sal-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sal-summary-item {
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-top-width: 3px;
}

    .sal-summary-item.green {
        border-top-color: #166534;
    }

    .sal-summary-item.blue {
        border-top-color: #185FA5;
    }

    .sal-summary-item.red {
        border-top-color: #b91c1c;
    }

.sal-summary-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a90a0;
    font-weight: 600;
}

.sal-summary-val {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.sal-summary-item.green .sal-summary-val {
    color: #166534;
}

.sal-summary-item.blue .sal-summary-val {
    color: #185FA5;
}

.sal-summary-item.red .sal-summary-val {
    color: #b91c1c;
}

.sal-summary-eur {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

/* - Footer - */
.sal-popup-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e4e7ed;
    background: #ffffff;
}

.sal-legal-note {
    flex: 1;
    font-size: 11px;
    color: #9ca3af;
}

    .sal-legal-note strong {
        color: #374151;
    }

/* - DevExpress Button overrides - */
.sal-btn.dxbButton_HRThemeV1916 {
    border-radius: 6px !important;
    min-width: 80px;
}

.sal-btn-primary.dxbButton_HRThemeV1916 {
    background: #185FA5 !important;
    border-color: #185FA5 !important;
    color: #ffffff !important;
}

    .sal-btn-primary.dxbButton_HRThemeV1916 .dx-vam {
        color: #ffffff !important;
    }

    .sal-btn-primary.dxbButton_HRThemeV1916:hover,
    .sal-btn-primary.dxbButtonHover_HRThemeV1916 {
        background: #1a3a5c !important;
        border-color: #1a3a5c !important;
    }

/* - Print - */
@media print {
    .sal-popup {
        box-shadow: none;
        border: none;
    }

    .sal-popup-header {
        background: #185FA5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sal-popup-footer .dxbButton_HRThemeV1916 {
        display: none;
    }
}

/* -- Bonus -- */
.sal-bonus-color {
    color: #7c3aed;
    font-weight: 600;
}

.sal-summary-item.bonus {
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-top: 3px solid #7c3aed;
}

    .sal-summary-item.bonus .sal-summary-val {
        color: #7c3aed;
    }

/* Bonus SpinEdit */
.sal-bonus.dxeButtonEdit_HRThemeV1916 .dxeEditArea_HRThemeV1916 {
    color: #7c3aed !important;
    font-weight: 600 !important;
}

/* Summary grid - 4 coloane cand e bonus */
.sal-summary {
    grid-template-columns: repeat(4, 1fr);
}
