/* ===============================
   Dokumenten Dashboard Container
=============================== */
.doc-dashboard {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background-color: #1a1b2f;
    min-height: 100vh;
}

.doc-card {
    background-color: #2c2a4d;
    border-radius: 1rem;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 1000px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
    color: #f3f4f6;
}

.doc-title {
    color: #fbbf24;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

/* ===============================
   Upload Form
=============================== */
.doc-upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.doc-upload-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.doc-upload-btn {
    background: linear-gradient(90deg, #4ade80, #22c55e);
    color: #1a1b2f;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.doc-upload-btn:hover {
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transform: scale(1.05);
}

.doc-upload-input {
    display: none;
}

.doc-file-names {
    color: #f3f4f6;
    font-size: 0.9rem;
    max-width: 400px;
    text-align: center;
    word-break: break-word;
}

.doc-submit-btn {
    background: linear-gradient(90deg, #fcd34d, #fbbf24);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    color: #1a1b2f;
    transition: all 0.3s ease;
}

.doc-submit-btn:hover {
    background: linear-gradient(90deg, #fbbf24, #fcd34d);
    transform: scale(1.05);
}

/* Upload Hinweis */
.doc-upload-hint {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
}

/* Divider */
.doc-divider {
    border: 1px solid #444370;
    margin: 1.5rem 0;
}

/* ===============================
   Dokumenten-Tabelle
=============================== */
.doc-table-wrapper {
    width: 100%;
    overflow-x: hidden; /* Keine Scrollbar */
    margin-top: 2rem;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.doc-table th,
.doc-table td {
    padding: 12px 10px;
    text-align: center; /* Zellen zentriert */
    word-break: break-word;
}

.doc-table thead {
    background-color: #3b3a63;
    color: #fbbf24;
    font-weight: 600;
}

.doc-table tbody tr {
    background-color: #1f1f38;
    border-bottom: 1px solid #33325b;
    transition: background 0.3s;
}

.doc-table tbody tr:hover {
    background-color: #2a2950;
}

/* Aktionen Buttons */
.doc-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.doc-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.doc-btn-download {
    background-color: #10b981;
}

.doc-btn-download:hover {
    background-color: #059669;
    transform: scale(1.1);
}

.doc-btn-delete {
    background-color: #ef4444;
}

.doc-btn-delete:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

/* Keine Dokumente */
.doc-no-files {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    margin-top: 2rem;
}

/* ===============================
   Responsive Anpassungen
=============================== */

/* Tablet / mittelgroße Geräte */
@media (max-width: 1024px) {
    .doc-table th,
    .doc-table td {
        padding: 10px 8px;
        font-size: 0.95rem;
    }

    .doc-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Handy Ansicht */
@media (max-width: 768px) {
    .doc-table {
        display: block; /* Flexible mobile Ansicht */
    }

    .doc-table thead {
        display: none; /* Kopfzeile ausblenden */
    }

    .doc-table tbody tr {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 15px;
        background-color: #1f1f38;
        border-radius: 10px;
        padding: 12px;
    }

    .doc-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        text-align: left;
        flex-wrap: wrap;
    }

    .doc-table td[data-label]::before {
        content: attr(data-label);
        flex: 1 0 50%;
        color: #fbbf24;
        font-weight: 600;
    }

    .doc-actions {
        justify-content: center;
        margin-top: 8px;
    }
}

/* Kleine Handys (<480px) */
@media (max-width: 480px) {
    .doc-table tbody tr {
        padding: 10px;
    }

    .doc-table td {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .doc-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Überschrift zentrieren */
    .documents-title {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
        font-size: 1.6rem;
    }
}


/* Aktionen */
.doc-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.doc-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.doc-btn-download {
    background-color: #10b981;
}

.doc-btn-download:hover {
    background-color: #059669;
    transform: scale(1.1);
}

.doc-btn-delete {
    background-color: #ef4444;
}

.doc-btn-delete:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

/* Keine Dokumente */
.doc-no-files {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    margin-top: 2rem;
}

/* ===============================
   Responsive Anpassungen
=============================== */
@media (max-width: 480px) {
    /* Tabellenüberschrift zentrieren, keine Einrückung */
    .documents-title {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
        font-size: 1.6rem;
    }

    /* Tabelle mobilfreundlich */
    .doc-table th, 
    .doc-table td {
        padding: 10px 6px;
        font-size: 0.9rem;
    }

    .doc-actions {
        justify-content: center;
        gap: 8px;
    }

    .doc-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}
/* ===============================
   Voll Responsive Premium Modal
=============================== */
.doc-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.doc-modal-content {
    background-color: #2c2a4d;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    padding: 30px;
    color: #f3f4f6;
    position: relative;
}

.doc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444370;
    padding-bottom: 10px;
    flex-shrink: 0;
}

.doc-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fbbf24;
    margin: 0;
}

.doc-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #fbbf24;
    transition: all 0.25s ease-in-out;
}

.doc-modal-close:hover {
    color: #fff;
    transform: scale(1.2);
}

.doc-modal-body {
    overflow-y: auto;
    flex-grow: 1; /* nutzt die maximale Höhe */
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #fbbf24 #2c2a4d;
}

/* Scrollbar Styling */
.doc-modal-body::-webkit-scrollbar {
    width: 10px;
}

.doc-modal-body::-webkit-scrollbar-track {
    background: #2c2a4d;
    border-radius: 10px;
}

.doc-modal-body::-webkit-scrollbar-thumb {
    background-color: #fbbf24;
    border-radius: 10px;
    border: 2px solid #2c2a4d;
}

/* Inhalt */
.doc-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.doc-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.doc-text {
    background-color: #1f1f38;
    color: #f3f4f6;
    padding: 10px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    width: 100%;
    height: 100%;
    overflow: auto;
}

/* Animation */
@keyframes modalFade {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

.doc-modal-content {
    animation: modalFade 0.25s ease-out;
}

/* ===============================
   Responsive Anpassungen
=============================== */
@media (max-width: 1024px) {
    .doc-modal-content {
        width: 95%;
        height: 85%;
        padding: 25px;
    }
    .doc-modal-title {
        font-size: 1.4rem;
    }
    .doc-modal-close {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .doc-modal-content {
        width: 95%;
        height: 80%;
        padding: 20px;
    }
    .doc-modal-title {
        font-size: 1.3rem;
    }
    .doc-modal-body {
        max-height: 70%;
    }
}

@media (max-width: 480px) {
    .doc-modal-content {
        width: 95%;
        height: 75%;
        padding: 15px;
    }
    .doc-modal-title {
        font-size: 1.1rem;
    }
    .doc-modal-body {
        max-height: 65%;
    }
}