/* =========================================================
   Datei: assets/css/emp-archive-personal-table.css
   Zweck: Styling für Personal-Archiv (Tabellenansicht)
   Nutzt Klassen aus archive-personal-table.php
   ========================================================= */

/* Wrapper */
.emp-archive-container.emp-archive-personal-table {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    box-sizing: border-box;
}

.emp-archive-header {
    margin-bottom: 14px;
}

.emp-archive-header h1 {
    margin: 0;
    color: var(--emp-dark, #1d2327);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.15;
}

.emp-archive-subtitle {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--emp-muted, #6b7280);
}

/* =========================================================
   Controls / Filterbar
   ========================================================= */

.emp-controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: var(--emp-radius, 14px);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    margin: 14px 0 18px;
}

.emp-controls-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin: 0;
}

.emp-filter-section {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.emp-filter-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--emp-dark, #1d2327);
}

.emp-select-style {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px 38px 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--emp-border, #dcdcde);
    background: #fff;
    color: var(--emp-dark, #1d2327);
    font-size: 0.95rem;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.03);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--emp-muted, #6b7280) 50%),
        linear-gradient(135deg, var(--emp-muted, #6b7280) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.emp-select-style:focus {
    outline: none;
    border-color: var(--emp-primary, #d63638);
    box-shadow: 0 0 0 3px var(--emp-primary-soft, rgba(214,54,56,0.12));
}

.emp-actions-right {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.emp-reset-link {
    color: var(--emp-muted, #6b7280);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.emp-reset-link:hover,
.emp-reset-link:focus {
    color: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
    background: var(--emp-primary-soft, rgba(214,54,56,0.08));
    text-decoration: none;
}

/* View Switch */
.emp-view-switch {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: 999px;
    background: #fff;
}

.emp-view-btn {
    width: 40px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid transparent;
    color: var(--emp-muted, #6b7280);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.emp-view-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.emp-view-btn:hover,
.emp-view-btn:focus {
    color: var(--emp-primary, #d63638);
    background: var(--emp-primary-soft, rgba(214,54,56,0.10));
    border-color: var(--emp-primary, #d63638);
    transform: translateY(-1px);
}

.emp-view-btn.is-active {
    color: #fff;
    background: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
}

/* =========================================================
   Tabelle
   ========================================================= */

.emp-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: var(--emp-radius, 14px);
    background: #fff;
    box-shadow: 0 10px 26px rgba(0,0,0,0.06);
}

.emp-einsatz-table.emp-personal-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
}

.emp-einsatz-table.emp-personal-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--emp-muted, #6b7280);
    background: var(--emp-bg-soft, #f6f7f7);
    border-bottom: 1px solid var(--emp-border, #dcdcde);
    white-space: nowrap;
}

.emp-einsatz-table.emp-personal-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--emp-border, #dcdcde);
    color: #2c3338;
    font-size: 0.96rem;
    line-height: 1.45;
}

.emp-einsatz-table.emp-personal-table tbody tr:last-child td {
    border-bottom: 0;
}

.emp-einsatz-table.emp-personal-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.015);
}

.emp-einsatz-table.emp-personal-table tbody tr:hover {
    background: var(--emp-primary-soft, rgba(214,54,56,0.06));
}

/* Link in Name-Spalte */
.emp-table-link {
    color: var(--emp-dark, #1d2327);
    text-decoration: none;
    font-weight: 800;
}

.emp-table-link:hover,
.emp-table-link:focus {
    color: var(--emp-primary, #d63638);
    text-decoration: underline;
}

/* Ablaufdatum */
.emp-einsatz-table.emp-personal-table td.is-expired {
    color: #b42318;
    font-weight: 700;
}

/* Empty State */
.emp-empty-state {
    text-align: center;
    padding: 28px 16px !important;
    color: var(--emp-muted, #6b7280);
    font-style: italic;
}

/* =========================================================
   Pagination
   ========================================================= */

.pagination {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--emp-border, #dcdcde);
    background: #fff;
    color: var(--emp-dark, #1d2327);
    text-decoration: none;
    font-weight: 700;
    box-sizing: border-box;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
    color: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
    background: var(--emp-primary-soft, rgba(214,54,56,0.08));
    text-decoration: none;
}

.pagination .page-numbers.current {
    color: #fff;
    background: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .emp-controls-bar {
        align-items: stretch;
    }

    .emp-actions-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .emp-archive-container.emp-archive-personal-table {
        padding: 16px 12px 28px;
    }

    .emp-controls-form {
        width: 100%;
        gap: 10px;
    }

    .emp-filter-section {
        width: 100%;
        justify-content: space-between;
    }

    .emp-select-style {
        min-width: 0;
        width: 100%;
        max-width: 220px;
    }

    .emp-actions-right {
        gap: 8px;
        align-items: center;
    }

    .emp-reset-link {
        font-size: 0.9rem;
        padding: 7px 8px;
    }

    .emp-einsatz-table.emp-personal-table {
        min-width: 680px;
    }

    .emp-einsatz-table.emp-personal-table thead th,
    .emp-einsatz-table.emp-personal-table tbody td {
        padding: 12px 12px;
    }
}

@media (max-width: 420px) {
    .emp-actions-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .emp-view-switch {
        justify-content: center;
    }

    .emp-reset-link {
        text-align: center;
    }
}