/* ==========================================
   Kleiderkammer Frontend Styles
   ========================================== */

/* Allgemeine Wrapper */
.kkv-frontend-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Formular-Sektion */
.kkv-frontend-form-section {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(229, 57, 53, 0.3);
}

.kkv-frontend-form-section h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Formular Grid */
.kkv-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kkv-form-field {
    display: flex;
    flex-direction: column;
}

.kkv-form-field label {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-form-field input[type="text"],
.kkv-form-field input[type="number"],
.kkv-form-field select {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    color: #333;
}

.kkv-form-field input:focus,
.kkv-form-field select:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Buttons */
.kkv-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.kkv-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-btn-primary {
    background: #ffffff;
    color: #e53935;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.kkv-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.kkv-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.kkv-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
}

/* Sekundäre Buttons auf weißem Hintergrund */
.kkv-actions-footer .kkv-btn-secondary,
.kkv-user-articles-section .kkv-btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: 2px solid #bbb;
}

.kkv-actions-footer .kkv-btn-secondary:hover,
.kkv-user-articles-section .kkv-btn-secondary:hover {
    background: #d0d0d0;
    border-color: #999;
}

.kkv-actions-footer .kkv-btn-secondary:disabled,
.kkv-user-articles-section .kkv-btn-secondary:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
}

/* Nachrichten */
.kkv-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.kkv-message-success {
    background: rgba(76, 175, 80, 0.2);
    color: #ffffff;
    border: 2px solid rgba(76, 175, 80, 0.5);
}

.kkv-message-error {
    background: rgba(244, 67, 54, 0.2);
    color: #ffffff;
    border: 2px solid rgba(244, 67, 54, 0.5);
}

.kkv-message-info {
    background: rgba(33, 150, 243, 0.2);
    color: #ffffff;
    border: 2px solid rgba(33, 150, 243, 0.5);
}

/* Tabellen-Sektion */
.kkv-frontend-table-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.kkv-frontend-table-section h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Filter */
.kkv-frontend-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.kkv-filter-field {
    display: flex;
    flex-direction: column;
}

.kkv-filter-field label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-filter-field input,
.kkv-filter-field select {
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
    height: 48px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    box-sizing: border-box;
}

.kkv-filter-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

.kkv-filter-field input:focus,
.kkv-filter-field select:focus {
    outline: none;
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
    background: #ffffff;
}

.kkv-filter-field input::placeholder {
    color: #999;
    opacity: 1;
}

/* Tabelle */
.kkv-frontend-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.kkv-frontend-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

.kkv-frontend-table thead {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.kkv-frontend-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.kkv-frontend-table thead th.kkv-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
}

.kkv-frontend-table thead th.kkv-sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.kkv-frontend-table thead th.kkv-sortable .kkv-sort-icon {
    margin-left: 8px;
    font-size: 14px;
    opacity: 0.7;
}

.kkv-frontend-table thead th:first-child {
    border-top-left-radius: 8px;
}

.kkv-frontend-table thead th:last-child {
    border-top-right-radius: 8px;
}

.kkv-frontend-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.kkv-frontend-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.05) 0%, rgba(198, 40, 40, 0.05) 100%);
    transform: scale(1.01);
}

.kkv-frontend-table tbody tr:last-child {
    border-bottom: none;
}

.kkv-frontend-table tbody td {
    padding: 16px 20px;
    color: #333;
    font-size: 14px;
    border: none;
}

.kkv-no-data {
    text-align: center !important;
    color: #999 !important;
    font-style: italic;
    padding: 40px 20px !important;
}

/* Error-Nachricht */
.kkv-frontend-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Badges */
.kkv-user-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-unassigned-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e0e0;
    color: #666;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Aktions-Buttons */
.kkv-btn-action {
    background: transparent;
    border: none;
    padding: 6px;
    margin: 0 3px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kkv-btn-action .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.kkv-btn-edit {
    color: #e53935;
}

.kkv-btn-edit:hover {
    background: rgba(229, 57, 53, 0.1);
    transform: scale(1.1);
}

.kkv-btn-delete {
    color: #f44336;
}

.kkv-btn-delete:hover {
    background: rgba(244, 67, 54, 0.1);
    transform: scale(1.1);
}

.kkv-btn-unassign {
    color: #ff9800;
}

.kkv-btn-unassign:hover {
    background: rgba(255, 152, 0, 0.1);
    transform: scale(1.1);
}

/* Modal / Popup */
.kkv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kkv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.kkv-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kkv-modal-header {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    padding: 25px 30px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kkv-modal-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.kkv-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.kkv-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.kkv-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.kkv-modal-body {
    padding: 30px;
}

.kkv-modal-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kkv-modal-form-field {
    display: flex;
    flex-direction: column;
}

.kkv-modal-form-field label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-modal-form-field input,
.kkv-modal-form-field select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.kkv-modal-form-field input:focus,
.kkv-modal-form-field select:focus {
    outline: none;
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.kkv-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kkv-frontend-wrapper {
        padding: 15px;
    }
    
    .kkv-frontend-form-section {
        padding: 25px 20px;
    }
    
    .kkv-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .kkv-form-actions {
        flex-direction: column;
    }
    
    .kkv-btn {
        width: 100%;
    }
    
    .kkv-frontend-table-section {
        padding: 20px 15px;
    }
    
    .kkv-frontend-filters {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .kkv-frontend-table thead th,
    .kkv-frontend-table tbody td {
        padding: 12px 10px;
        font-size: 12px;
    }
    
    .kkv-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .kkv-modal-header {
        padding: 20px;
    }
    
    .kkv-modal-header h2 {
        font-size: 20px;
    }
    
    .kkv-modal-body {
        padding: 20px;
    }
    
    .kkv-modal-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .kkv-modal-actions {
        flex-direction: column;
    }
    
    .kkv-modal-actions .kkv-btn {
        width: 100%;
    }
}

/* ==========================================
   Benutzerverwaltung (Shortcode: kleiderkammer_benutzer)
   ========================================== */

.kkv-frontend-users-page h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 700;
}

.kkv-users-search-section {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(229, 57, 53, 0.3);
}

.kkv-users-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.kkv-users-search-section .kkv-filter-field label {
    color: #ffffff;
}

.kkv-frontend-users-list {
    margin-top: 30px;
}

.kkv-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.kkv-user-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.kkv-user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.kkv-user-card.active {
    border-color: #ffffff;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.kkv-user-card h4 {
    margin: 0 0 10px 0;
    color: #e53935;
    font-size: 18px;
    font-weight: 700;
}

.kkv-user-card p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.kkv-user-work-id {
    color: #e53935 !important;
    font-weight: 700;
    font-size: 14px;
}

.kkv-user-email {
    font-style: italic;
}

.kkv-user-standort {
    color: #c62828 !important;
    font-weight: 600;
}

.kkv-info-text {
    text-align: center;
    font-size: 16px;
    padding: 20px;
}

.kkv-users-search-section .kkv-info-text {
    color: #ffffff;
}

.kkv-articles-list .kkv-info-text {
    color: #666;
}

.kkv-frontend-user-details {
    margin-top: 40px;
}

.kkv-frontend-user-details h2 {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.3);
}

/* Benachrichtigungs-Box unter User-Name */
.kkv-user-notification {
    margin-bottom: 30px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kkv-notification-close:hover {
    color: #000 !important;
    transform: scale(1.1);
}

.kkv-user-articles-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.kkv-user-articles-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.kkv-user-articles-section h3 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid #e53935;
}

.kkv-articles-list-container {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.kkv-articles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kkv-article-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.kkv-article-item:hover {
    border-color: #e53935;
    box-shadow: 0 2px 10px rgba(229, 57, 53, 0.1);
}

.kkv-article-checkbox {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.kkv-article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.kkv-article-info strong {
    color: #2c3e50;
    font-size: 15px;
}

.kkv-article-meta {
    color: #666;
    font-size: 13px;
}

/* Historie-Button in Artikellisten */
.kkv-article-history-btn {
    background: #e53935;
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 3px;
}

.kkv-article-history-btn:hover {
    background: #c62828;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

.kkv-article-history-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.kkv-article-history-btn:active {
    transform: scale(0.95);
}

.kkv-standort-save-field {
    display: flex;
    flex-direction: column;
}

.kkv-standort-save-field label {
    visibility: hidden;
    height: 21px;
}

.kkv-btn-standort {
    background: #ffffff;
    color: #e53935;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    height: 48px;
    white-space: nowrap;
}

.kkv-btn-standort:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.kkv-btn-standort:disabled {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(229, 57, 53, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
}

.kkv-actions-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    margin-top: 20px;
}

.kkv-actions-footer .kkv-btn {
    min-width: 200px;
    font-size: 15px;
    padding: 12px 24px;
}

.kkv-actions-footer .kkv-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive für Benutzerverwaltung */
@media (max-width: 1024px) {
    .kkv-user-articles-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .kkv-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .kkv-users-search-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kkv-frontend-wrapper > * {
    animation: fadeIn 0.5s ease;
}

.kkv-frontend-form-section {
    animation-delay: 0.1s;
}

.kkv-frontend-table-section {
    animation-delay: 0.2s;
}

/* ==========================================
   HISTORIE-BUTTON & TIMELINE
   ========================================== */

.kkv-btn-history {
    color: #e53935;
}

.kkv-btn-history:hover {
    background: rgba(229, 57, 53, 0.1);
    transform: scale(1.1);
}

/* Historie-Timeline */
.kkv-history-timeline {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.kkv-history-entry {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #e53935;
    transition: all 0.3s ease;
}

.kkv-history-entry:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.kkv-history-entry:last-child {
    margin-bottom: 0;
}

.kkv-history-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.kkv-history-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: #ffffff;
}

.kkv-history-action {
    font-weight: 600;
    font-size: 15px;
    flex-grow: 1;
}

.kkv-history-date {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.kkv-history-details {
    padding-left: 44px;
}

.kkv-history-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.kkv-history-details p:first-child {
    margin-top: 0;
}

.kkv-history-details p:last-child {
    margin-bottom: 0;
}

.kkv-history-details strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Scrollbar für Historie-Timeline */
.kkv-history-timeline::-webkit-scrollbar {
    width: 8px;
}

.kkv-history-timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.kkv-history-timeline::-webkit-scrollbar-thumb {
    background: #e53935;
    border-radius: 4px;
}

.kkv-history-timeline::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Responsive für Historie */
@media (max-width: 768px) {
    .kkv-history-entry {
        padding: 15px;
    }
    
    .kkv-history-header {
        gap: 8px;
    }
    
    .kkv-history-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .kkv-history-action {
        font-size: 14px;
    }
    
    .kkv-history-date {
        font-size: 12px;
    }
    
    .kkv-history-details {
        padding-left: 36px;
    }
    
    .kkv-history-details p {
        font-size: 13px;
    }
}

/* ==========================================
   STATISTIK-SEITE
   ========================================== */

.kkv-statistics-page h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* Standort-Tabs */
.kkv-statistics-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.kkv-tab-btn {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kkv-tab-btn .dashicons {
    font-size: 20px;
}

.kkv-tab-btn:hover {
    border-color: #e53935;
    color: #e53935;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
}

.kkv-tab-btn.active {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-color: #e53935;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.3);
}

.kkv-tab-btn.active .dashicons {
    color: #ffffff;
}

/* Statistik-Container */
.kkv-statistics-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.kkv-statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.kkv-statistics-header h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.kkv-btn-export {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kkv-btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.kkv-btn-export .dashicons {
    font-size: 18px;
}

/* Statistik-Summary (nur Gesamtzahlen) */
.kkv-statistics-summary {
    margin-top: 20px;
}

.kkv-summary-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 12px;
    border-left: 4px solid #e53935;
}

.kkv-summary-header h3 {
    margin: 0 0 10px 0;
    color: #c62828;
    font-size: 22px;
    font-weight: 700;
}

.kkv-summary-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Statistik-Tabelle */
.kkv-statistics-table-wrapper {
    overflow-x: auto;
}

.kkv-statistics-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.kkv-statistics-table thead {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.kkv-statistics-table thead th {
    padding: 16px;
    text-align: left;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #b71c1c;
}

.kkv-statistics-table thead th:first-child {
    border-top-left-radius: 8px;
}

.kkv-statistics-table thead th:last-child {
    border-top-right-radius: 8px;
}

.kkv-statistics-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.kkv-statistics-table tbody tr:hover {
    background-color: #f5f5f5;
}

.kkv-statistics-table tbody tr:last-child {
    border-bottom: none;
}

.kkv-statistics-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: #333;
}

.kkv-stat-name {
    font-weight: 600;
    color: #2c3e50;
    min-width: 200px;
}

.kkv-stat-category-header {
    text-align: left !important;
    min-width: 250px;
}

.kkv-stat-count-header {
    text-align: center !important;
    min-width: 150px;
}

.kkv-stat-category {
    text-align: center;
    min-width: 80px;
}

.kkv-stat-total {
    text-align: center;
    min-width: 100px;
    background-color: rgba(229, 57, 53, 0.05);
}

.kkv-stat-count-value {
    text-align: center;
    color: #e53935;
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(135deg, #ffebee 0%, #fff 100%);
}

.kkv-stat-count-zero {
    text-align: center;
    color: #999;
}

.kkv-stat-total-value {
    text-align: center;
    color: #e53935;
    font-weight: 700;
    font-size: 16px;
}

.kkv-stat-total-zero {
    text-align: center;
    color: #999;
}

/* Tabellenfuß (Summenzeile) */
.kkv-statistics-table tfoot {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-top: 2px solid #e53935;
}

.kkv-statistics-table tfoot td {
    padding: 16px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
}

.kkv-stat-footer-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-stat-footer-value {
    text-align: center;
    color: #666;
}

.kkv-stat-footer-total {
    text-align: center;
    color: #e53935;
    font-size: 18px;
    background-color: rgba(229, 57, 53, 0.1);
}

/* Info und Error Text */
.kkv-info-text {
    color: #666;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

.kkv-error-text {
    color: #e53935;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

/* Responsive Design für Statistik-Seite */
@media screen and (max-width: 1024px) {
    .kkv-statistics-table {
        font-size: 13px;
    }
    
    .kkv-statistics-table thead th,
    .kkv-statistics-table tbody td,
    .kkv-statistics-table tfoot td {
        padding: 12px;
    }
    
    .kkv-stat-name {
        min-width: 150px;
    }
}

@media screen and (max-width: 768px) {
    .kkv-statistics-page h1 {
        font-size: 28px;
    }
    
    .kkv-statistics-tabs {
        flex-direction: column;
    }
    
    .kkv-tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .kkv-statistics-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .kkv-statistics-header h2 {
        font-size: 22px;
    }
    
    .kkv-btn-export {
        width: 100%;
        justify-content: center;
    }
    
    .kkv-statistics-container {
        padding: 20px;
    }
    
    .kkv-statistics-table {
        font-size: 12px;
    }
    
    .kkv-statistics-table thead th,
    .kkv-statistics-table tbody td,
    .kkv-statistics-table tfoot td {
        padding: 10px 8px;
    }
    
    .kkv-stat-name {
        min-width: 120px;
    }
    
    .kkv-stat-category,
    .kkv-stat-total {
        min-width: 60px;
    }
}

/* ==========================================
   DASHBOARD-SEITE
   ========================================== */

.kkv-dashboard-page h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* Kennzahlen-Karten */
.kkv-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.kkv-dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kkv-dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.kkv-card-icon {
    font-size: 48px;
    line-height: 1;
}

.kkv-card-content {
    flex: 1;
}

.kkv-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.kkv-card-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Karten-Farben */
.kkv-card-primary { border-left: 4px solid #e53935; }
.kkv-card-success { border-left: 4px solid #4caf50; }
.kkv-card-warning { border-left: 4px solid #ff9800; }
.kkv-card-info { border-left: 4px solid #2196f3; }
.kkv-card-location { border-left: 4px solid #9c27b0; }

/* Dashboard-Grid */
.kkv-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.kkv-dashboard-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.kkv-dashboard-widget h2 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e53935;
}

/* Bar-Chart (Standorte) */
.kkv-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kkv-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kkv-bar-label {
    min-width: 120px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.kkv-bar-wrapper {
    flex: 1;
    height: 32px;
    background: #f5f5f5;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.kkv-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-radius: 16px;
    transition: width 0.6s ease;
}

.kkv-bar-value {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Kategorien-Liste */
.kkv-category-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kkv-category-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kkv-category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kkv-category-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.kkv-category-count {
    font-size: 14px;
    color: #666;
}

.kkv-category-bar {
    height: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.kkv-category-fill {
    height: 100%;
    background: linear-gradient(90deg, #e53935 0%, #ff6f60 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Timeline (Aktivitäten) */
.kkv-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kkv-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.kkv-timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    flex-shrink: 0;
}

.kkv-timeline-content {
    flex: 1;
    padding-top: 4px;
}

.kkv-timeline-action {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.kkv-timeline-time {
    font-size: 12px;
    color: #999;
}

/* Quick Actions */
.kkv-quick-actions .kkv-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kkv-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    width: 100%;
}

.kkv-action-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kkv-action-btn .dashicons {
    font-size: 20px;
}

.kkv-action-btn.kkv-btn-primary {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
}

.kkv-action-btn.kkv-btn-secondary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #ffffff;
}

.kkv-action-btn.kkv-btn-info {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #ffffff;
}

/* Loading */
.kkv-loading {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

/* Responsive für Dashboard */
@media screen and (max-width: 768px) {
    .kkv-dashboard-page h1 {
        font-size: 28px;
    }
    
    .kkv-dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .kkv-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .kkv-bar-label {
        min-width: 80px;
        font-size: 13px;
    }
    
    .kkv-dashboard-widget {
        padding: 16px;
    }
}

/* ==========================================
   KATEGORIEN-MATRIX
   ========================================== */

.kkv-matrix-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.kkv-matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.kkv-matrix-table thead {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
}

.kkv-matrix-table th {
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.kkv-matrix-table th:last-child {
    border-right: none;
}

.kkv-matrix-header-kategorie {
    text-align: left !important;
    min-width: 180px;
    background: rgba(198, 40, 40, 0.95) !important;
}

.kkv-matrix-header-gesamt {
    background: rgba(198, 40, 40, 0.95) !important;
    font-size: 15px !important;
}

.kkv-matrix-table tbody tr {
    transition: background-color 0.2s;
}

.kkv-matrix-row-even {
    background: #fafafa;
}

.kkv-matrix-row-odd {
    background: #ffffff;
}

.kkv-matrix-table tbody tr:hover {
    background: #ffebee !important;
}

.kkv-matrix-table td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #eeeeee;
    border-right: 1px solid #eeeeee;
    font-size: 14px;
}

.kkv-matrix-table td:last-child {
    border-right: none;
}

.kkv-matrix-cell-kategorie {
    text-align: left !important;
    font-weight: 600;
    color: #333;
    background: #f5f5f5 !important;
}

.kkv-matrix-cell-count {
    color: #666;
    min-width: 60px;
}

.kkv-matrix-cell-has-value {
    background: #e8f5e9 !important;
    color: #2e7d32;
    font-weight: 600;
}

.kkv-matrix-cell-gesamt {
    background: #fff3e0 !important;
    color: #e65100;
    font-weight: 700;
    font-size: 15px;
}

/* Summenzeile */
.kkv-matrix-row-sum {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
    color: #ffffff !important;
}

.kkv-matrix-row-sum td {
    padding: 16px 12px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.kkv-matrix-row-sum td:last-child {
    border-right: none;
}

.kkv-matrix-cell-sum-label {
    text-align: left !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kkv-matrix-cell-sum-total {
    font-size: 16px !important;
    background: rgba(198, 40, 40, 0.95) !important;
}

/* Tab-Button für Matrix */
.kkv-tab-matrix {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%) !important;
}

.kkv-tab-matrix:hover {
    background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%) !important;
}

.kkv-tab-matrix.active {
    background: linear-gradient(135deg, #7b1fa2 0%, #6a1b9a 100%) !important;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

/* Responsive für Matrix */
@media screen and (max-width: 768px) {
    .kkv-matrix-table {
        font-size: 12px;
    }
    
    .kkv-matrix-table th,
    .kkv-matrix-table td {
        padding: 10px 8px;
    }
    
    .kkv-matrix-header-kategorie {
        min-width: 120px;
    }
    
    .kkv-matrix-cell-count {
        min-width: 50px;
    }
}

