/* ================================================================ */
/* MODAL SETĂRI ANGAJAT                                             */
/* Fișier: /isu-core/setari/css/modal-setari-angajat.css           */
/* ================================================================ */

/* ---- OVERLAY ---- */
.msa-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: msaFadeIn .18s ease;
}
@keyframes msaFadeIn { from { opacity:0 } to { opacity:1 } }

.msa-modal-wrapper {
    width: 100%; max-width: 720px;
    animation: msaSlideUp .22s ease;
}
@keyframes msaSlideUp {
    from { transform:translateY(-14px); opacity:0 }
    to   { transform:translateY(0);     opacity:1 }
}

/* ---- CONTAINER ---- */
.msa-modal-container {
    background: #fff;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    height: 82vh;
    max-height: 780px;
    min-height: 420px;
    overflow: hidden;
}

/* ---- HEADER ---- */
.msa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.msa-modal-header-left {
    display: flex; align-items: center; gap: 9px; color: #6b7280;
}
.msa-modal-title {
    margin: 0; font-size: 16px; font-weight: 500; color: #111827;
}
.msa-modal-close-btn {
    width: 30px; height: 30px; border-radius: 8px;
    background: #f9fafb; border: 1px solid #e5e7eb;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; color: #9ca3af;
    transition: background .15s, color .15s; flex-shrink: 0;
}
.msa-modal-close-btn:hover { background: #f3f4f6; color: #374151; }

/* ---- BODY ---- */
.msa-modal-body { display: flex; flex: 1; overflow: hidden; }

/* ---- SIDEBAR ---- */
.msa-modal-sidebar {
    width: 230px; flex-shrink: 0;
    border-right: 1px solid #f3f4f6;
    background: #fafafa;
    padding: 14px 10px;
    display: flex; flex-direction: column;
}
.msa-modal-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }

.msa-nav-btn {
    width: 100%; text-align: left;
    padding: 8px 11px; border-radius: 8px;
    border: none; background: transparent;
    font-size: 14px; color: #374151; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: background .13s, color .13s; font-family: inherit;
}
.msa-nav-btn:hover { background: #eff6ff; color: #1d4ed8; }
.msa-nav-btn.active { background: #eff6ff; color: #1d4ed8; }
.msa-nav-btn.active svg { stroke: #1d4ed8; }

.msa-sidebar-footer { padding-top: 10px; border-top: 1px solid #f0f0f0; margin-top: 8px; }
.msa-sidebar-link {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 10px; border-radius: 7px;
    font-size: 12px; color: #374151; text-decoration: none;
    transition: background .13s, color .13s;
}
.msa-sidebar-link:hover { background: #f0f0f0; color: #374151; }

/* ---- CONTINUT TAB-URI ---- */
.msa-modal-content { flex: 1; overflow: hidden; position: relative; }
.msa-tab-panel { display: none; height: 100%; }
.msa-tab-panel.active { display: block; }

.msa-tab-scroll {
    height: 100%; overflow-y: auto;
    padding: 22px 26px;
    max-height: calc(82vh - 120px);
    box-sizing: border-box;
}
.msa-tab-scroll::-webkit-scrollbar { width: 5px; }
.msa-tab-scroll::-webkit-scrollbar-track { background: transparent; }
.msa-tab-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ---- AVATAR ---- */
.msa-avatar-row {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 22px; padding-bottom: 22px;
    border-bottom: 1px solid #f3f4f6;
}
.msa-avatar {
    width: 58px; height: 58px;
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,130,246,.35);
    overflow: hidden;
    position: relative;
    border-radius: 14px;
}
.msa-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.msa-avatar-initial {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    font-size: 22px; font-weight: 700; color: #fff;
}
.msa-avatar-name { font-weight: 600; font-size: 18px; color: #111827; }
.msa-avatar-change-btn {
    margin-top: 6px; font-size: 12px; color: #3b82f6;
    background: none; border: none; cursor: pointer;
    padding: 0; font-family: inherit;
}
.msa-avatar-change-btn:hover { color: #1d4ed8; text-decoration: underline; }

/* ---- FORMULAR ---- */
.msa-form-group { margin-bottom: 15px; }
.msa-form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.msa-form-label {
    display: block; font-size: 14px; font-weight: 500;
    color: #111827; margin-bottom: 5px;
}
.msa-form-input {
    width: 100%; padding: 8px 11px;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 14px; color: #111827; background: #f9fafb;
    box-sizing: border-box; font-family: inherit;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.msa-form-input:focus {
    outline: none; border-color: #3b82f6; background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.msa-form-input.msa-mono {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: .06em; font-size: 12.5px;
}

/* ---- DIVIDER & TITLU SECTIUNE ---- */
.msa-divider { border: none; border-top: 1px solid #f3f4f6; margin: 20px 0; }
.msa-section-title {
    font-size: 14px; font-weight: 500; color: #111827;
    margin-bottom: 12px;
}

/* ---- SWITCH ---- */
.msa-switch-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; padding: 9px 12px; margin: 0 -12px 2px;
    border-radius: 8px; cursor: pointer; transition: background .13s;
}
.msa-switch-row:hover { background: #f9fafb; }
.msa-switch-info { display: block; }
.msa-switch-title { display: block; font-size: 14px; font-weight: 500; color: #111827; }
.msa-switch-desc { display: block; font-size: 13px; color: #9ca3af; margin-top: 2px; line-height: 1.4; }

.msa-switch-wrap {
    position: relative; flex-shrink: 0;
    width: 36px; height: 20px; display: inline-block;
}
.msa-switch-wrap input { display: none; }

.msa-switch-track {
    position: absolute; inset: 0;
    background: #d1d5db; border-radius: 999px;
    transition: background .2s ease;
}
.msa-switch-wrap input:checked ~ .msa-switch-track { background: #3b82f6; }

.msa-switch-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; background: #fff;
    border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.22);
    transition: transform .2s ease; pointer-events: none;
    z-index: 1;
}
.msa-switch-wrap input:checked ~ .msa-switch-track ~ .msa-switch-thumb {
    transform: translateX(16px);
}

/* ---- STATUS BADGE ---- */
.msa-status-badge {
    display: flex; align-items: center; gap: 13px;
    padding: 14px 16px; border-radius: 10px; margin-bottom: 22px;
}
.msa-status-ok { background: #f0fdf4; border: 1px solid #bbf7d0; }
.msa-status-warn { background: #fff7ed; border: 1px solid #fed7aa; }
.msa-status-icon {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.msa-status-icon-ok { background: #22c55e; }
.msa-status-icon-warn { background: #f97316; }
.msa-status-title { font-weight: 600; font-size: 13.5px; color: #15803d; }
.msa-status-desc { font-size: 12px; color: #16a34a; margin-top: 2px; }
.msa-status-warn .msa-status-title { color: #c2410c; }
.msa-status-warn .msa-status-desc  { color: #ea580c; }

/* ---- SEMNATURA PREVIEW ---- */
.msa-sign-current-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.msa-sign-current-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.msa-sign-preview-area {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
    padding: 10px;
}
.msa-sign-preview-img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    display: block;
}
.msa-sign-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
.msa-sign-empty p { margin: 6px 0 0; }

.msa-sign-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: none;
    border: 1px solid #3b82f6;
    border-radius: 7px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.msa-sign-change-btn:hover { background: #eff6ff; color: #1d4ed8; }

/* ---- FOOTER ---- */
.msa-modal-footer {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 10px; padding: 13px 20px;
    border-top: 1px solid #f3f4f6; flex-shrink: 0;
}
.msa-btn-secondary {
    padding: 8px 16px; border: 1px solid #e5e7eb;
    background: #fff; color: #374151; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: background .13s, border-color .13s;
}
.msa-btn-secondary:hover { background: #f9fafb; border-color: #d1d5db; }
.msa-btn-primary {
    padding: 8px 18px; background: #1d4ed8; color: #fff;
    border: 1px solid #1e40af; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: background .13s;
}
.msa-btn-primary:hover { background: #1e40af; }
.msa-btn-primary:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 1;
}
.msa-btn-primary:disabled:hover { background: #9ca3af; }

/* ---- INFO CERTIFICAT ---- */
.msa-divider { border: none; border-top: 1px solid #f3f4f6; margin: 20px 0; }

/* ---- RESPONSIVE ---- */
@media (max-width:600px) {
    .msa-modal-sidebar { width: 150px; }
    .msa-form-row-2col { grid-template-columns: 1fr; }
    .msa-tab-scroll { padding: 16px; }
}