/**
 * AP-ITS Dokumenten-Upload Styles
 * Styles für Upload-Modal und Dokumente-Liste
 */

/* ===== UPLOAD MODAL OVERLAY ===== */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.upload-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.upload-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-modal-header h2 i {
    color: #2563eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.modal-close:hover {
    color: #ef4444;
    background: #fee2e2;
}

.upload-modal-body {
    padding: 24px;
}

.upload-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

.upload-modal-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-modal-footer .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drop-zone {
    border: 3px dashed #cbd5e0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.drop-zone:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.drop-zone.drag-over {
    border-color: #10b981;
    background: #d1fae5;
    border-style: solid;
}

.drop-zone i {
    font-size: 48px;
    color: #2563eb;
    margin-bottom: 20px;
}

.drop-zone p {
    margin: 10px 0;
    color: #4b5563;
}

.drop-zone .hint {
    font-size: 12px;
    color: #9ca3af;
}

/* ===== FILE PREVIEW ===== */
.file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.file-preview-icon {
    font-size: 40px;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-info {
    flex: 1;
}

.file-preview-info h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #1f2937;
}

.file-preview-info p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #fee2e2;
    color: #ef4444;
}

.btn-icon i {
    font-size: 18px;
}

.file-restrictions {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 15px;
    line-height: 1.6;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.file-item i {
    font-size: 32px;
    color: #2563eb;
}

.file-info {
    flex: 1;
}

.file-info strong {
    display: block;
    margin-bottom: 5px;
    color: #1f2937;
}

.file-info span {
    font-size: 14px;
    color: #6b7280;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #dc2626;
}

/* ===== UPLOAD PROGRESS ===== */
.upload-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #10b981 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.upload-progress p {
    margin-top: 10px;
    text-align: center;
    color: #6b7280;
}

/* ===== DOKUMENTE-LISTE ===== */
.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.documents-header h2 {
    margin: 0;
}

.documents-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.documents-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.documents-filters select,
.documents-filters input {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    font-size: 14px;
}

.documents-filters input {
    min-width: 250px;
}

/* ===== DOKUMENTE KATEGORIEN ===== */
.document-category {
    margin-bottom: 30px;
}

.document-category h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-category h3 i {
    color: #2563eb;
}

/* ===== DOKUMENTE GRID ===== */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* ===== DOKUMENT CARD ===== */
.document-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.document-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.document-card.status-new {
    border-left: 4px solid #10b981;
}

.document-card.status-read {
    border-left: 4px solid #cbd5e0;
}

.document-icon {
    font-size: 40px;
    color: #2563eb;
    margin-bottom: 15px;
}

.document-info {
    flex: 1;
}

.document-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #1f2937;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.document-description {
    font-size: 14px;
    color: #6b7280;
    margin: 10px 0;
    font-style: italic;
}

.document-user {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 5px;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.status-new {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-read {
    background: #e5e7eb;
    color: #6b7280;
}

.document-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.document-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

.document-actions .btn i {
    margin-right: 5px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }

    .documents-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .documents-actions {
        width: 100%;
    }

    .documents-actions .btn {
        flex: 1;
    }

    .documents-filters {
        width: 100%;
        flex-direction: column;
    }

    .documents-filters select,
    .documents-filters input {
        width: 100%;
    }

    .document-actions {
        flex-direction: column;
    }

    .upload-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .drop-zone {
        padding: 30px 15px;
        min-height: 150px;
    }

    .drop-zone i {
        font-size: 36px;
    }
}

/* ===== FILE TYPE COLORS ===== */
.fa-file-pdf {
    color: #dc2626 !important;
}

.fa-file-image {
    color: #10b981 !important;
}

.fa-file-word {
    color: #2563eb !important;
}

.fa-file-excel {
    color: #059669 !important;
}

.fa-file-archive {
    color: #f59e0b !important;
}

.fa-file-alt {
    color: #6b7280 !important;
}

/* ===== BUTTONS ===== */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 13px !important;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #2563eb;
}

.form-control,
.form-group select,
.form-group textarea,
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== MODAL ACTIONS ===== */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.modal-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

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

.modal-actions .btn i {
    margin-right: 5px;
}
