﻿/* Hồ sơ nhân sự V2 — màu thương hiệu #00519b */

.empv2-wrap {
    animation: empv2FadeIn 0.4s ease-in-out;
}

@keyframes empv2FadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empv2-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dee2e6;
}

.empv2-brand {
    color: #00519b !important;
}

.empv2-card-header {
    display: flex;
    align-items: center;
    background: #00519b;
    color: #fff;
    font-weight: 600;
}

.empv2-card-header i {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}

.empv2-lbl {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f4e79;
    white-space: nowrap;
    line-height: 1.2;
}

.empv2-lbl i {
    color: #00519b;
    font-size: 0.95rem;
    line-height: 1;
}

.empv2-inp {
    height: 35px;
    border-radius: 5px;
    border: 1px solid #d0d5dd;
    font-size: 0.9375rem;
    box-shadow: none;
}

.empv2-inp:focus {
    border-color: #4d8fd4;
    box-shadow: 0 0 0 0.2rem rgba(0, 81, 155, 0.15);
}

/* Date picker — cùng pattern trang Tra cứu văn bằng (GraduationResult) */
.empv2-item-date .empv2-date-wrap {
    position: relative;
    width: 100%;
}

.empv2-date-wrap {
    position: relative;
}

.empv2-datepicker .RadPicker {
    position: relative !important;
    width: 100% !important;
    display: block;
}

.empv2-datepicker .RadPicker table {
    width: 100% !important;
    position: static !important;
}

.empv2-datepicker .RadPicker table td {
    position: static !important;
}

.empv2-datepicker .rcInputCell {
    width: 100% !important;
    padding: 0 !important;
}

.empv2-datepicker .RadPicker table td:not(.rcInputCell) {
    width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Ưu tiên cao hơn custom-style (.RadInput .riTextBox { border-style: none }) */
html body .empv2-wrap .empv2-datepicker .RadInput .riTextBox,
html body .empv2-wrap .empv2-datepicker .RadInput_Default .riTextBox,
html body .empv2-wrap .empv2-datepicker input.riTextBox {
    height: 35px !important;
    max-height: none !important;
    min-height: 35px !important;
    padding: 0.35rem 2.25rem 0.35rem 0.75rem !important;
    border: 1px solid #d0d5dd !important;
    border-style: solid !important;
    border-radius: 5px !important;
    width: 100% !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    font-size: 0.9375rem !important;
    box-shadow: none !important;
}

html body .empv2-wrap .empv2-datepicker .RadInput .riTextBox:focus,
html body .empv2-wrap .empv2-datepicker .RadInput_Default .riTextBox:focus,
html body .empv2-wrap .empv2-datepicker input.riTextBox:focus {
    border-color: #4d8fd4 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 81, 155, 0.15) !important;
    outline: 0 !important;
}

.empv2-datepicker .rcTimePopup {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.empv2-datepicker a.rcCalPopup {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    width: 35px !important;
    height: 35px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    text-indent: -9999px;
    overflow: hidden;
    z-index: 3;
    border: 0 !important;
    cursor: pointer;
}

.empv2-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    margin-top: -8px;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.empv2-date-wrap:hover .empv2-date-icon,
.empv2-date-wrap:focus-within .empv2-date-icon {
    color: #00519b;
}

.empv2-nav-tabs .nav-link {
    border-radius: 5px;
    margin-right: 4px;
    font-weight: 500;
    color: #495057;
    background: #e9ecef;
    border: none;
}

html body .empv2-wrap .empv2-nav-tabs .nav-item.show .nav-link.active,
html body .empv2-wrap .empv2-nav-tabs .nav-link.active {
    background: #00519b;
    color: #fff !important;
    border-color: transparent;
}

html body .empv2-wrap .empv2-nav-tabs .nav-link.active:hover,
html body .empv2-wrap .empv2-nav-tabs .nav-link.active:focus {
    color: #fff !important;
}

.empv2-nav-tabs .nav-link.disabled {
    opacity: 0.55;
    cursor: default;
}

.empv2-nav-tabs .empv2-tab-link {
    border: none;
    background: transparent;
    text-decoration: none !important;
}

.empv2-wrap .empv2-grid {
    font-size: 0.875rem;
}

.empv2-wrap .empv2-grid th,
.empv2-wrap .empv2-grid thead td {
    background-color: #f4f6f9;
    color: #00519b;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.empv2-wrap .empv2-grid td {
    vertical-align: middle;
}

.empv2-view-val {
    min-height: 35px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #d9e1ec;
    border-radius: 5px;
    background-color: #f8fafc;
    font-size: 0.875rem;
}

.empv2-wrap .empv2-grid .empv2-col-stt {
    width: 3rem;
    max-width: 3rem;
}

.empv2-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 120px;
    height: 35px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1;
    padding: 0 0.875rem;
}

.empv2-actions .btn i {
    font-size: 1rem;
    line-height: 1;
}

.empv2-btn-save {
    min-width: 140px;
    color: #fff !important;
    background-color: #07875a;
    border: 1px solid #07875a;
}

.empv2-btn-save:hover,
.empv2-btn-save:focus {
    color: #fff !important;
    background-color: #066b48;
    border-color: #066b48;
}

.empv2-btn-reload {
    color: #1f2937 !important;
    background-color: #faba19;
    border: 1px solid #faba19;
}

.empv2-btn-reload:hover,
.empv2-btn-reload:focus {
    color: #111827 !important;
    background-color: #e5a816;
    border-color: #e5a816;
}

.empv2-actions-bottom {
    padding-bottom: 0.5rem;
}

.empv2-tab-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.empv2-nhanthan-modal {
    z-index: 1065;
}

.empv2-congtac-modal {
    z-index: 1065;
}

.empv2-congtac-modal.show,
.empv2-nhanthan-modal.show {
    z-index: 1065;
}

.empv2-congtac-modal.empv2-modal-stay-open,
.empv2-nhanthan-modal.empv2-modal-stay-open {
    display: block !important;
    opacity: 1;
    z-index: 1065;
}

/* Backdrop Bootstrap nằm trên body, không nằm trong tab.
   Chỉ nâng khi modal V2 đang mở — tránh đè modal Bootstrap khác (z-index 1055). */
body:has(.empv2-nhanthan-modal.show) > .modal-backdrop,
body:has(.empv2-congtac-modal.show) > .modal-backdrop,
body:has(.empv2-modal-stay-open) > .modal-backdrop {
    z-index: 1060;
}

.empv2-field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #dc3545;
    line-height: 1.3;
}

.empv2-inp.is-invalid {
    border-color: #dc3545 !important;
}

.empv2-inp.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Ô chỉ xem / ô được phép tự cập nhật.
   html body + !important để thắng rule nền trắng của .riTextBox và .form-control. */
html body .empv2-wrap .empv2-inp-locked,
html body .empv2-wrap input.form-control[readonly],
html body .empv2-wrap textarea.form-control[readonly],
html body .empv2-wrap select.empv2-inp-locked:disabled {
    background-color: #eef1f5 !important;
    color: #4b5563 !important;
    border-color: #d8dee6 !important;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    pointer-events: none !important;
}

.empv2-wrap .empv2-inp-editable:not([readonly]):not(:disabled) {
    background-color: #fff;
    border-color: #7eb3e8;
}

.empv2-wrap .empv2-inp-editable:focus {
    border-color: #00519b;
    box-shadow: 0 0 0 0.2rem rgba(0, 81, 155, 0.18);
}

.empv2-wrap .empv2-datepicker .RadPicker.empv2-inp-locked,
.empv2-wrap .empv2-datepicker .RadPicker.empv2-inp-locked * {
    pointer-events: none !important;
}

html body .empv2-wrap .empv2-datepicker .RadPicker.empv2-inp-locked .riTextBox,
html body .empv2-wrap .empv2-datepicker .RadPicker.empv2-inp-locked input.riTextBox,
html body .empv2-wrap .empv2-datepicker input.riTextBox[readonly],
html body .empv2-wrap .empv2-datepicker input.riTextBox:disabled {
    background-color: #eef1f5 !important;
    color: #4b5563 !important;
    border-color: #d8dee6 !important;
    cursor: not-allowed;
}

@media (max-width: 767.98px) {
    .empv2-item-date .empv2-date-wrap {
        width: auto !important;
        min-width: 0;
    }

    .empv2-datepicker,
    .empv2-datepicker .RadPicker {
        width: 100%;
    }
}
