/* Mitarbeiter-Import — Übersicht, Detail, Anlegen-Modal
   Erweitert das HR-Konsole-Vokabular (lp-hrc-*) mit lp-emi-* Spezifika.
*/

/* ---- Header ---- */
.lp-emi-header {
    background: linear-gradient(135deg, #1e293b 0%, #0ea5e9 50%, #14b8a6 100%);
}
.lp-emi-header--detail {
    background: linear-gradient(135deg, #0f172a 0%, #4338ca 50%, #9333ea 100%);
}
.lp-emi-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.lp-emi-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.lp-emi-header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.lp-emi-header-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.lp-emi-header-sub {
    color: rgba(255,255,255,.78);
    font-size: 14px;
}
.lp-emi-cta-dark {
    background: rgba(0,0,0,.25) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.25) !important;
}
.lp-emi-cta-dark:hover { background: rgba(0,0,0,.45) !important; }
.lp-emi-cta-danger {
    background: rgba(220,38,38,.85) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.25) !important;
}
.lp-emi-cta-danger:hover { background: rgba(185,28,28,1) !important; }
.lp-emi-inline-form { display: inline-block; margin: 0; }

/* ---- Upload-Karte ---- */
.lp-emi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.lp-emi-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lp-emi-upload-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.lp-emi-file {
    flex: 1;
    min-width: 280px;
    padding: 8px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 14px;
}
.lp-emi-card-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

/* ---- Tabbar ---- */
.lp-emi-tabbar {
    flex-wrap: wrap;
}

/* ---- Tabelle ---- */
.lp-emi-table th { white-space: nowrap; }
.lp-emi-table td { vertical-align: middle; }
.lp-emi-empty {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 32px 0 !important;
}
.lp-emi-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #475569;
    font-size: 13px;
}
.lp-emi-muted { color: #9ca3af; }

/* ---- Status-Pills / Badges ---- */
.lp-emi-pill {
    display: inline-block;
    min-width: 32px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f3f4f6;
    color: #374151;
}
.lp-emi-pill--unmatched { background: #fef3c7; color: #92400e; }
.lp-emi-pill--matched   { background: #dbeafe; color: #0656b0; }
.lp-emi-pill--imported  { background: #dcfce7; color: #15803d; }
.lp-emi-pill--error     { background: #fee2e2; color: #991b1b; }

.lp-emi-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.lp-emi-badge--open { background: #fef3c7; color: #92400e; }
.lp-emi-badge--done { background: #dcfce7; color: #15803d; }

/* ---- Validation-Errors ---- */
.lp-emi-errors {
    margin: 0;
    padding-left: 18px;
    color: #b91c1c;
    font-size: 12px;
    list-style: disc;
}
.lp-emi-errors li { margin: 1px 0; }

.lp-emi-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #064a96;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ---- Anlegen-Modal ---- */
.lp-emi-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
}
.lp-emi-modal.lp-emi-modal--open { display: block; }
.lp-emi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
}
.lp-emi-modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}
.lp-emi-modal-card--wide { width: min(900px, 96vw); }
.lp-emi-modal-card > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.lp-emi-modal-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}
.lp-emi-modal-head {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.lp-emi-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}
.lp-emi-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 6px;
}
.lp-emi-modal-close:hover { color: #111827; }
.lp-emi-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.lp-emi-modal-foot {
    padding: 14px 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f9fafb;
    flex-shrink: 0;
}
.lp-emi-modal-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
}

/* ---- Form Grid ---- */
.lp-emi-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}
.lp-emi-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lp-emi-form-row--full { grid-column: 1 / -1; }
.lp-emi-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.lp-emi-form-row input,
.lp-emi-form-row select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.lp-emi-form-row input:focus,
.lp-emi-form-row select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,.2);
}
.lp-emi-req { color: #dc2626; }

/* ---- Rollen-Chips ---- */
.lp-emi-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lp-emi-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    background: #f9fafb;
    font-size: 13px;
    transition: all 0.15s;
}
.lp-emi-role-chip:hover { background: #f3f4f6; }
.lp-emi-role-chip input { margin: 0; }
.lp-emi-role-chip:has(input:checked) {
    background: #fff7ed;
    border-color: #f97316;
    color: #9a3412;
    font-weight: 600;
}

@media (max-width: 600px) {
    .lp-emi-form-grid { grid-template-columns: 1fr; }
}

/* ---- Sections im Modal ---- */
.lp-emi-section {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px 16px;
    margin-bottom: 14px;
    background: #fff;
}
.lp-emi-section:last-child { margin-bottom: 0; }
.lp-emi-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.lp-emi-section-title i { color: #f97316; font-size: 16px; }

/* ---- Vertragsart-Karten ---- */
.lp-emi-contract-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
@media (max-width: 720px) {
    .lp-emi-contract-grid { grid-template-columns: repeat(2, 1fr); }
}
.lp-emi-contract-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.lp-emi-contract-card:hover {
    background: #fff;
    border-color: #d1d5db;
    transform: translateY(-1px);
}
.lp-emi-contract-card--active {
    background: #fff7ed !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}
.lp-emi-contract-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}
.lp-emi-contract-sub {
    font-size: 11px;
    color: #6b7280;
}

/* ---- Checkbox mit Beschreibung ---- */
.lp-emi-checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: inherit !important;
    color: inherit !important;
    margin: 0;
}
.lp-emi-checkbox-label:hover { background: #f3f4f6; }
.lp-emi-checkbox-label input { margin: 0; width: 18px; height: 18px; accent-color: #f97316; flex-shrink: 0; }
.lp-emi-checkbox-label > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lp-emi-checkbox-label strong {
    font-size: 13px;
    color: #111827;
    font-weight: 600;
}
.lp-emi-checkbox-label small {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.3;
}
.lp-emi-checkbox-label:has(input:checked) {
    background: #fff7ed;
    border-color: #f97316;
}
