.documents-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.documents-summary-item {
    min-width: 130px;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

.documents-summary-label {
    display: block;
    margin-bottom: 1px;
    color: #6b7280;
    font-size: 0.72rem;
}

#documents-list {
    display: grid;
    gap: 8px;
}

.document-card {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #64748b;
    border-radius: 9px;
    background:
        linear-gradient(
            90deg,
            #f8fafc 0%,
            #ffffff 45%
        );
}

.document-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.document-date {
    margin-right: 6px;
    color: #6b7280;
    font-size: 0.78rem;
}

.document-category {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
}

.document-size {
    color: #6b7280;
    font-size: 0.76rem;
    white-space: nowrap;
}

.document-title {
    margin: 5px 0 0;
    font-size: 0.95rem;
}

.document-filename {
    margin-top: 1px;
    color: #6b7280;
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.document-notes {
    margin-top: 6px;
    padding: 5px 7px;
    border-radius: 6px;
    background: rgb(255 255 255 / 65%);
    color: #4b5563;
    font-size: 0.82rem;
    white-space: pre-line;
}

.document-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.document-actions .action-button {
    padding: 5px 9px;
    min-height: auto;
    font-size: 0.78rem;
}

.document-current-file {
    min-width: 0;
}

.document-field-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.document-current-file-box {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}

.document-current-file-box strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.document-current-file-box span {
    color: #6b7280;
    white-space: nowrap;
}

.nav-button[data-section="documents"].active {
    background: #64748b;
    color: white;
}


@media (max-width: 700px) {
    .documents-summary {
        gap: 6px;
    }

    .documents-summary-item {
        min-width: 105px;
        padding: 6px 8px;
    }

    .document-card {
        padding: 9px;
    }

    .document-card-header {
        gap: 6px;
    }

    .document-current-file-box {
        flex-direction: column;
        gap: 3px;
    }

    .document-actions .action-button {
        padding: 5px 8px;
    }
}

/* 0.23.3 - kompaktnější karty dokumentů */

.document-card {
    padding: 7px 10px;
}

.document-card-header {
    min-height: 18px;
}

.document-title {
    margin-top: 3px;
    line-height: 1.15;
}

.document-filename {
    margin-top: 0;
    line-height: 1.15;
}

.document-notes {
    margin-top: 3px;
    padding: 0;
    background: transparent;
    font-size: 0.78rem;
    line-height: 1.2;
}

.document-actions {
    margin-top: 3px;
}

.document-actions .action-button {
    padding: 3px 7px;
    font-size: 0.74rem;
}


/* === NAV ACTIVE STRIP CONSISTENCY START === */

/* Přehled – stejný styl aktivní záložky jako Tankování */
.navigation .nav-button[data-section="overview"].active {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 -3px 0 #9ca3af !important;
}

/* Náklady */
.navigation .nav-button[data-section="expenses"].active {
    background: #f0fdfa !important;
    color: #115e59 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 -3px 0 #0f766e !important;
}

/* Dokumenty */
.navigation .nav-button[data-section="documents"].active {
    background: #f8fafc !important;
    color: #475569 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 -3px 0 #64748b !important;
}

/* === NAV ACTIVE STRIP CONSISTENCY END === */



/* 0.24.0 - více příloh jednoho dokumentu */

.document-attachment-list {
    display: grid;
    gap: 4px;
    margin-top: 6px;
}

.document-attachment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.document-attachment-info {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.document-attachment-info strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.8rem;
}

.document-attachment-info span {
    color: #64748b;
    font-size: 0.72rem;
    white-space: nowrap;
}

.document-attachment-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
}

.document-attachment-actions .action-button {
    min-height: auto;
    padding: 3px 6px;
    font-size: 0.7rem;
}

.document-no-attachments {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 0.76rem;
    font-style: italic;
}

.document-existing-attachments {
    min-width: 0;
}

@media (max-width: 700px) {
    .document-attachment-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .document-attachment-info {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .document-attachment-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 0.24.0 - ovládání příloh */

.document-attachment-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.document-attachment-link:hover {
    text-decoration: underline;
}

.document-attachment-remove-button {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.document-attachment-remove-button:hover {
    background: #e2e8f0;
}

/* 0.24.0 - samostatné přidání příloh v detailu */

.document-file-add-block {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.document-file-add-block label {
    flex: 1 1 auto;
    margin: 0;
}

.document-file-add-block > .action-button {
    flex: 0 0 auto;
    margin-bottom: 1px;
}

@media (max-width: 700px) {
    .document-file-add-block {
        align-items: stretch;
        flex-direction: column;
    }
}
